Compare commits

...
19 Commits
Author SHA1 Message Date
poli0981 fdb55f3018 Merge pull request #120 from poli0981/claude/zalo-messenger-community-links-a6a29e
feat: add Messenger community + VN Zalo group links (v0.32.0)
2026-07-08 20:51:03 +07:00
poli0981andClaude Opus 4.8 12b0099238 feat: add Messenger community + VN Zalo group links (v0.32.0)
Add two "join the chat" community links that render into a single
"💬 COMMUNITY" description block:

- Messenger community (https://m.me/[id]) — shown for every language.
- Zalo group (https://zalo.me/g/<code>) — Zalo is a Vietnam-audience
  app, so the editor input only appears (and the description line only
  renders) when the output language is Vietnamese, mirroring the VN
  donate block. A value entered while in Vietnamese is preserved if the
  creator switches language.

Both links are hard-validated (validateMessengerUrl / validateZaloGroupUrl)
so a malformed URL never reaches the output. New editor-store fields
persist via a v15→v16 migration and round-trip through saved templates.

i18n across all 6 locales (967 ui / 559 templates). Tests 560→581.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 20:47:53 +07:00
poli0981 e5776fa38c Merge pull request #118 from poli0981/claude/wizardly-tesla-6f470f
feat: playlist pinned-comment + dropped reasons (v0.31.0)
2026-06-28 22:18:23 +07:00
poli0981andClaude Opus 4.8 fe7e89d57e feat: add playlist pinned-comment + dropped reasons (v0.31.0)
Playlist Generator now produces a status-adaptive pinned comment for the
latest video, and when a series is marked dropped, a multi-select of
reasons (predefined checklist + free-text) that render in both the
playlist description and the comment. Localized across all 6 locales.
New buildPlaylistComment engine fn + first tests for playlist-builder.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 22:15:14 +07:00
poli0981 f637d89aae Merge pull request #116 from poli0981/claude/xenodochial-goldstine-599ba3
feat: Playtest section + invalid-number validation (v0.30.0)
2026-06-27 01:12:21 +07:00
poli0981andClaude Opus 4.8 1e5720eecc feat: add Playtest section and invalid-number validation (v0.30.0)
Playtest section (Store & Social): a signup link + platform dropdown
(Steam Playtest / Epic / itch.io / Discord / Other) + invite count
capped per-platform (≤100). Renders a localized "🧪 PLAYTEST" block in
the description only when a link is set, like Store Links. New config
playtest-platforms.ts; 3 editor fields thread through the store (persist
v14→v15 migration), GeneratorInput, and the editor→engine mapping.

Invalid-number guarding: validateIntegerInRange + validateBatchRange
reject negative / decimal / out-of-range / end<start / >100-span inputs.
Batch and Social bulk disable Generate + warn on a bad range; Playlist
"Total videos" and Playtest invites warn inline and guard the output.
Input primitive gains optional errorText/helpText.

60 new i18n strings across all six locales (validator 948/544). 544
tests (517 + 27), typecheck, lint, and locale validation pass; verified
live. Five manifests bumped 0.29.3 → 0.30.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 01:08:58 +07:00
dependabot[bot] 08ebae0416 chore(deps-dev): bump @babel/core from 7.29.0 to 7.29.7 (#109)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.29.0 to 7.29.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.29.7/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-version: 7.29.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-21 22:12:43 +07:00
dependabot[bot] 546802210e chore(deps-dev): bump js-yaml from 4.1.1 to 4.2.0 (#108)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.1 to 4.2.0.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/commits)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.2.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-21 22:12:22 +07:00
poli0981andClaude Opus 4.8 da22625178 fix(engine): keep multi-language content blocks single-language (v0.29.3)
Multi-language Output tabs were rendering content warnings / tech notes / playthrough notes bilingually after v0.29.2 forwarded the shared `tEn` translator. New `bilingualContentBlocks` render option (default true) lets the multi-language hook keep those blocks single-language while the AI-translation disclaimer stays bilingual. Single-language output unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 20:33:04 +07:00
poli0981 f53b7df65b Merge pull request #112 from poli0981/claude/serene-taussig-955f69
fix(hooks): AI-translation disclaimer missing in multi-language output (v0.29.2)
2026-06-20 11:27:00 +07:00
poli0981andClaude Opus 4.8 303f978a60 fix(hooks): forward translation-quality toggle to multi-language output (v0.29.2)
useMultilangOutput had drifted out of sync with useGeneratedOutput and never
forwarded showTranslationQuality, showThirdPartyAds, or the always-English tEn
translator to renderAll. As a result the AI-translation disclaimer (and the
identical third-party-ads disclaimer) never appeared when the Output page showed
two or more languages, and the bilingual blocks rendered target-language-only.

Bring the hook to parity with the single-language hook: destructure both
settings, build a memoized tEn, and pass all three into renderAll. Single-language
output and the Batch page were already correct. No engine/store/config/i18n
changes; 513 tests + locale validation (937/542) pass; verified live.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 11:25:12 +07:00
poli0981 8405c6fa49 Merge pull request #111 from poli0981/claude/priceless-mayer-d6b5cc
ci(android): bump Node-20 actions to Node-24 majors
2026-06-17 11:47:55 +07:00
poli0981andClaude Opus 4.8 7ea308293a ci(android): bump Node-20 actions to Node-24 majors
GitHub deprecated the Node.js 20 Actions runtime on 2026-06-16 (removal
from runners 2026-09-16). release-android.yml was the only workflow still
pinning actions whose latest-supported runtime was node20; each has a
newer major declaring `runs.using: node24`, so bump to the floating major:

  actions/setup-java          v4 -> v5  (node20 -> node24)
  android-actions/setup-android v3 -> v4 (node20 -> node24; defaults
                                          cmdline-tools 20.0, NDK install
                                          via sdkmanager unaffected)
  actions/cache               v4 -> v5  (node20 -> node24)
  softprops/action-gh-release v2 -> v3  (node20 -> node24)

All four bumps are pure runtime migrations with unchanged inputs. The
node24 majors require Actions Runner >= 2.327.1, which GitHub-hosted
ubuntu-latest already satisfies. ci.yml and release-desktop.yml use only
checkout@v6 / setup-node@v6 (already node24) plus composite actions
(rust-toolchain, tauri-action) that have no Node runtime, so no changes
there. App build node-version (22) is unaffected — this is action
runtimes only. Verified with actionlint (clean) + YAML parse.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 11:43:26 +07:00
poli0981 9f156d1f2c Merge pull request #107 from poli0981/claude/clever-goldberg-557979
fix(ui): mobile viewport overflow on Batch/Profile + sweep (v0.29.1)
2026-06-17 11:06:44 +07:00
poli0981andClaude Opus 4.8 79be06b804 fix(ui): mobile viewport overflow on Batch/Profile + sweep (v0.29.1)
Side-by-side rows that never collapsed on narrow mobile (~360-400px) made
the Batch and Profile screens overrun the viewport horizontally on Android
and web mobile. Make those rows responsive (flex-col -> sm:flex-row) and
sweep a few adjacent overflow spots. Layout-only; desktop is unchanged
(every change gated behind the sm: breakpoint).

- Batch: part-range row stacks below sm (full-width Generate); copy-button
  rows wrap.
- Profile: tab pill + Export/Import stack onto separate rows; Profile/
  Preset/Template cards stack action buttons below content and let long
  names wrap (min-w-0).
- Sweep: Settings responsive padding + wrapping header (Import/Export shows
  on Android), VideoSettingsForm grid 1-col below sm, Modal pinned to
  calc(100% - 2rem).

Bumps five manifests 0.29.0 -> 0.29.1 (package-lock.json resynced from a
0.28.0 drift). typecheck/lint/locales/513 tests/build all green; verified
live at 375px and 1280px with zero horizontal overflow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 11:04:42 +07:00
poli0981 b4e32eac63 Merge pull request #106 from poli0981/claude/android-docs
docs(android): requirements + tested versions (11–16, real device Android 12)
2026-06-15 19:29:31 +07:00
poli0981andClaude Opus 4.8 f8ada5944a docs(android): document requirements + tested versions
Add an explicit "Requirements & tested versions" section for the Android build:
- Minimum Android 11 (minSdk 30), target Android 16 (targetSdk 36), universal ABIs.
- Tested Android 11 -> 16 on emulators, plus a real device on Android 12.
- Rationale for the Android 11 floor: device coverage, a modern auto-updating
  WebView (why the Android 12 real device worked but a stale WebView-91 emulator
  black-screened), and component-level security upkeep (Play system updates /
  Play services / WebView) since OS bulletins for 11-13 have ended.

Touches docs/PACKAGING.md, docs/FEATURES.md, README.md only — no code change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 19:28:11 +07:00
poli0981 ca0b795a0d Merge pull request #104 from poli0981/claude/youthful-albattani-95ef02
feat(android): Android (.apk) build + WebView fixes + Android 11+ (v0.29.0)
2026-06-15 18:58:40 +07:00
poli0981andClaude Opus 4.8 89c0e76c2c feat(android): Android (.apk) build + packaging, WebView fixes, Android 11+ (v0.29.0)
Build and package the app for Android from the same Tauri 2 codebase, shipping
an installable, sideloadable signed APK alongside the desktop binaries.

Build / packaging
- cfg-gate desktop-only tray / single-instance / hide-to-tray / exit-prevention
  in lib.rs behind #[cfg(desktop)]; move tauri-plugin-single-instance to a
  desktop-only target table so the library compiles for Android.
- `cargo tauri android init` -> committed gen/android Gradle project; release
  signingConfigs read keystore.properties (gitignored, from CI secrets locally).
- .github/workflows/release-android.yml: JDK 17 + Android SDK/NDK + rust targets,
  decode keystore from secrets, build --apk, upload to the same draft release.
- vite.config.ts: es2020 build.target for Tauri builds (older-WebView safety).

Runtime fixes (found via on-device testing)
- External links: a real tap on `<a target="_blank">` makes the Android WebView
  fire onCreateWindow, which Tauri tries to satisfy via the shell plugin's open
  (no such binary on Android -> uncaught error, nothing opens). Strip
  target="_blank" from external anchors and route clicks through the opener
  plugin in the capture phase. (open-external.ts, main.tsx)
- Boot black screen on old WebViews: crypto.randomUUID() (Chrome/WebView 92+)
  ran at module load and threw on WebView 91. Fall back to a manual RFC 4122 v4
  built on getRandomValues. (uuid.ts; +4 regression tests, 509 -> 513)
- File export on Android routes through the in-WebView blob download. (IS_MOBILE)

Compatibility
- minSdk 30 (Android 11+), targetSdk 36 (Android 16): covers the large majority
  of active devices with a modern, patched WebView + Google Play system updates.

Release: bump manifests 0.28.0 -> 0.29.0; docs (README, FEATURES, PACKAGING,
CHANGELOG). Verified on an Android 13 emulator (render, links, export).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 18:56:37 +07:00
106 changed files with 16651 additions and 230 deletions

No files matched your search

+89
View File
@@ -0,0 +1,89 @@
name: Release Android
on:
push:
tags: ["v*"]
workflow_dispatch:
inputs:
tag:
description: "Tag to build (e.g. v0.29.0). The manifests must already carry this version."
required: true
type: string
permissions:
contents: write
jobs:
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.tag || github.ref }}
- uses: actions/setup-node@v6
with:
node-version: 22
cache: npm
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "17"
- uses: android-actions/setup-android@v4
- name: Install Android NDK (r27 LTS)
run: sdkmanager "ndk;27.3.13750724"
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-linux-android,armv7-linux-androideabi,i686-linux-android,x86_64-linux-android
- name: Cache cargo
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
src-tauri/target
key: ${{ runner.os }}-android-cargo-${{ hashFiles('src-tauri/Cargo.lock') }}
- run: npm ci
- name: Install Tauri CLI
run: cargo install tauri-cli --version "^2" --locked
- name: Decode keystore
env:
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
run: echo "$ANDROID_KEYSTORE_BASE64" | base64 -d > "$RUNNER_TEMP/release.jks"
- name: Write keystore.properties
env:
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
ANDROID_STORE_PASSWORD: ${{ secrets.ANDROID_STORE_PASSWORD }}
run: |
{
echo "storeFile=$RUNNER_TEMP/release.jks"
echo "storePassword=$ANDROID_STORE_PASSWORD"
echo "keyAlias=$ANDROID_KEY_ALIAS"
echo "keyPassword=$ANDROID_KEY_PASSWORD"
} > src-tauri/gen/android/keystore.properties
- name: Build signed APK
env:
# Pin NDK_HOME to the exact version we installed above — the runner may
# ship a different default NDK that ANDROID_NDK_ROOT would point at.
NDK_HOME: ${{ env.ANDROID_HOME }}/ndk/27.3.13750724
run: cargo tauri android build --apk
- name: Upload APK to draft release
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ github.event.inputs.tag || github.ref_name }}
draft: true
files: src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+11
View File
@@ -11,3 +11,14 @@ coverage/
.claude/
src-tauri/target/
app-icon.png
# Android (Tauri gen) — the generated Gradle project source IS committed, but
# never the signing secrets, machine-local files, or build artifacts.
*.jks
*.keystore
src-tauri/gen/android/keystore.properties
src-tauri/gen/android/local.properties
src-tauri/gen/android/.gradle/
src-tauri/gen/android/.idea/
src-tauri/gen/android/build/
src-tauri/gen/android/app/build/
+111
View File
@@ -2,6 +2,117 @@
All notable changes to YTDescGen ship as tagged releases on `main`.
## v0.30.0 — 2026-06-27
A **feature** release adding two things creators kept doing by hand: advertising a
game's **playtest / early-access signup**, and getting **stopped before a bad number**
breaks a batch.
### Added
- **Playtest section** ([src/components/editor/PlaytestEditor.tsx](src/components/editor/PlaytestEditor.tsx), [src/config/playtest-platforms.ts](src/config/playtest-platforms.ts)) — a new entry in the **Store & Social** group: a signup link, a platform dropdown (Steam Playtest, Epic, itch.io, Discord / Community, Other), and an invite count. The invite input maxes out at the selected platform's cap (≤ 100); switching to a lower-cap platform clamps an over-budget count down. It renders into the description **only when a link is entered** — no toggle, no video-type gating — exactly like Store Links. The description block ([src/engine/description-builder.ts](src/engine/description-builder.ts)) is a localized `🧪 PLAYTEST / EARLY ACCESS` heading, the platform-labelled link, and an optional `🎟️ N invites available` line (emitted only for a positive whole number, so a stray decimal / negative can never produce a broken line).
- **Invalid-number guarding** ([src/utils/validation.ts](src/utils/validation.ts)) — two pure validators (`validateIntegerInRange`, `validateBatchRange`) now reject negative, decimal, out-of-range, and `end < start` / over-100-span inputs. The **Batch** ([src/pages/BatchPage.tsx](src/pages/BatchPage.tsx)) and **Social bulk** ([src/pages/SocialPage.tsx](src/pages/SocialPage.tsx)) part-range inputs **disable the Generate button** and show a warning when the range is invalid; **Playlist** "Total videos" ([src/pages/PlaylistPage.tsx](src/pages/PlaylistPage.tsx)) and the new Playtest invite count warn inline and guard the output. The `Input` primitive ([src/components/ui/Input.tsx](src/components/ui/Input.tsx)) gained optional `errorText` / `helpText` props (backward-compatible).
### Under the hood
- Three editor fields (`playtestLink`, `playtestPlatform`, `playtestInvites`) thread through the store (persist **v14 → v15** migration: unknown platform → default, invite count clamped to an integer in `[0, 100]`), `GeneratorInput`, and the editor → engine mapping — guarded by the existing parity test.
- 60 new i18n strings across all six locales (validator **948 ui / 544 templates**). typecheck, lint, locale validation, and **544 tests** (517 + 27: playtest block, validators, v15 migration, mapping parity) pass; verified live — the block renders and localizes (EN / JA), the itch.io cap clamps invites 80 → 50, decimals warn, and Batch generation blocks on `end < start` and over-100 ranges.
- Five manifests bumped 0.29.3 → 0.30.0.
## v0.29.3 — 2026-06-20
A follow-up **hotfix** to v0.29.2. Forwarding the always-English `tEn` translator
to multi-language Output (so the AI-translation disclaimer could render `EN · LOCAL`)
also turned the **content-warnings, tech-notes, and playthrough-notes** blocks
bilingual in every multi-language tab — because `tEn` was the single shared signal
for bilingual rendering. Each multi-language tab is already a dedicated single
language, so those "video" blocks should be that language only; only the
translation disclaimer is meant to stay bilingual.
### Fixed
- **Multi-language tabs render content blocks single-language again** ([src/hooks/use-multilang-output.ts](src/hooks/use-multilang-output.ts), [src/engine/description-builder.ts](src/engine/description-builder.ts), [src/engine/template-renderer.ts](src/engine/template-renderer.ts)) — a new `bilingualContentBlocks` render option (default `true`) gates the three video blocks. The multi-language hook passes `false`, so content warnings / tech notes / playthrough notes show the target language only, while the `▸ 🌐 ABOUT THIS TRANSLATION` disclaimer keeps the raw `tEn` and stays bilingual `EN · LOCAL`. Single-language output is unchanged (default `true` preserves the v0.11/v0.12 bilingual blocks).
### Under the hood
- The Social / cross-post path ([src/engine/social-post-builder.ts](src/engine/social-post-builder.ts)) is intentionally left as-is — it is driven by separate hooks, never wired through the multi-language Output tabs, and its bilingual content warnings are long-standing v0.24.0 behavior. The asymmetry is deliberate.
- Additive, default-preserving change: the engine option defaults to the old behavior, so every existing caller and test is unaffected. typecheck, lint, locale validation (937/542), and all **517 tests** (513 + 4 new `bilingualContentBlocks` gate tests) pass; verified live — multi-language JA tab shows JA-only content blocks with a bilingual disclaimer, the EN tab omits the disclaimer, and single-language JA still renders content warnings bilingually.
- Five manifests bumped 0.29.2 → 0.29.3.
## v0.29.2 — 2026-06-20
A one-line **hotfix**. The opt-in *"Show translation-quality notice"* setting
(the AI-translation disclaimer, v0.24.0) had no effect when the Output page was
showing **two or more languages at once** — the multi-language output hook had
drifted out of sync with the single-language one and never forwarded the setting
to the engine.
### Fixed
- **AI-translation disclaimer now appears in multi-language Output** ([src/hooks/use-multilang-output.ts](src/hooks/use-multilang-output.ts)) — the multi-language hook now forwards `showTranslationQuality` to `renderAll`, matching [useGeneratedOutput](src/hooks/use-generated-output.ts). The same patch also restores `showThirdPartyAds` (an identical latent gap — its disclaimer was dropped in multi-language mode too) and the always-English `tEn` translator, so the bilingual blocks render `EN · LOCAL` instead of target-language-only. Selecting 2+ languages and viewing a non-English/Vietnamese tab now shows the `▸ 🌐 ABOUT THIS TRANSLATION` block. Single-language output and the Batch page were already correct.
### Under the hood
- One-file fix; no engine, store, config, or i18n changes (the `translationQuality` template keys already exist in all six locales). typecheck, lint, locale validation (937/542), all **513 tests**, and the production build pass; verified live — the JA tab renders the block bilingually while the EN/VI tabs correctly omit it.
- This hook has drifted out of sync before (a prior `showSponsorCredit` miss), so the recurrence is a known class of bug.
- Five manifests bumped 0.29.1 → 0.29.2.
## v0.29.1 — 2026-06-17
A UI/UX hotfix for **mobile viewport overflow**. On Android and narrow web
mobile (~360–400px) the **Batch** and **Profile** screens overran the viewport
horizontally — rows laid out side-by-side on desktop never collapsed to a stack
on small screens. This release makes those rows responsive and sweeps a few
adjacent overflow spots. Layout-only: no logic, store, or i18n changes, and
desktop layout is byte-for-byte unchanged (every change is gated behind the
`sm` breakpoint).
### Fixed
- **Batch page fits mobile** ([src/pages/BatchPage.tsx](src/pages/BatchPage.tsx)) — the part-range row (Start / End / Generate) stacks vertically below `sm` with a full-width Generate button, and the result-card copy-button rows wrap instead of overflowing.
- **Profile page fits mobile** ([src/pages/ProfilesPage.tsx](src/pages/ProfilesPage.tsx)) — the tab pill and the Export/Import buttons drop onto separate rows below `sm`; the Profile / Preset / Template cards ([ProfileCard](src/components/profiles/ProfileCard.tsx), [PresetCard](src/components/presets/PresetCard.tsx), [TemplateCard](src/components/templates/TemplateCard.tsx)) move their action buttons below the content and let long names wrap (`min-w-0`) instead of shoving the buttons off-screen.
- **Adjacent mobile overflow swept** — responsive padding + a wrapping header on [Settings](src/pages/SettingsPage.tsx) (its Import/Export row shows on Android, where `IS_TAURI` is true), the video-settings selector grid collapses to one column below `sm` ([VideoSettingsForm](src/components/editor/VideoSettingsForm.tsx)), and modals are pinned to `calc(100% - 2rem)` so they never exceed the viewport ([Modal](src/components/ui/Modal.tsx)).
### Under the hood
- Layout-only className changes across 8 components. typecheck, lint, locale validation (937/542), all **513 tests**, and the production build pass; verified live at 375 px and 1280 px with zero horizontal overflow on Batch, Profiles, Settings, and Editor.
- Five manifests bumped 0.29.0 → 0.29.1 (`package-lock.json`, which had drifted at 0.28.0, is resynced to 0.29.1).
## v0.29.0 — 2026-06-15
Adds an **Android build** — an installable, sideloadable signed `.apk` built
from the same Tauri 2 codebase as the desktop apps. No app rewrite: Tauri 2
ships Android support, the crate was already `cdylib`/`staticlib` with a
`#[cfg_attr(mobile, …)]` entry point, and the Android launcher icons were
already in the repo. The work was making the Rust shell compile for mobile,
routing file export through the WebView on Android, and wiring a signed-APK CI
job that publishes the APK alongside the desktop binaries.
### Added
- **Android APK target** — `cargo tauri android init` + `cargo tauri android build --apk` produce a signed, sideloadable APK. The generated Gradle project lives at [src-tauri/gen/android](src-tauri/gen/android) (committed so signing/manifest edits persist); secrets (`keystore.properties`, `*.jks`) and build artifacts are gitignored.
- **Requires Android 11+ (minSdk 30)** ([src-tauri/tauri.conf.json](src-tauri/tauri.conf.json) `bundle.android.minSdkVersion`, [build.gradle.kts](src-tauri/gen/android/app/build.gradle.kts)) — raised from Tauri's default 24 (Android 7) to API 30. Android 11+ covers the large majority of active devices and keeps a modern, auto-updating System WebView plus Google Play system/Play-services security updates — even though Google's OS-level security bulletins for Android 11–13 have now ended (12 in 2025, 13 in early 2026). `targetSdk` stays at 36 (Android 16).
- **APK signing config** ([src-tauri/gen/android/app/build.gradle.kts](src-tauri/gen/android/app/build.gradle.kts)) — a `release` `signingConfigs` block reads `keystore.properties`, guarded by `if (exists())` so keystore-less debug / contributor builds still work (they produce an unsigned release build instead of failing).
- **Android release CI** ([.github/workflows/release-android.yml](.github/workflows/release-android.yml)) — on a `v*` tag (or `workflow_dispatch`), an `ubuntu-latest` job sets up JDK 17 + Android SDK/NDK + the four Rust android targets, decodes the keystore from repo secrets, builds the signed APK, and uploads it to the same draft release as the desktop binaries. Needs four secrets: `ANDROID_KEYSTORE_BASE64`, `ANDROID_STORE_PASSWORD`, `ANDROID_KEY_PASSWORD`, `ANDROID_KEY_ALIAS`.
### Changed
- **Rust shell is now mobile-aware** ([src-tauri/src/lib.rs](src-tauri/src/lib.rs)) — the tray icon, single-instance plugin, hide-to-tray and exit-prevention logic are gated behind `#[cfg(desktop)]`; the four cross-platform plugins (dialog / fs / opener / shell) and all six file commands register on every platform. Desktop behaviour is byte-for-byte unchanged (`cargo check` clean).
- **`tauri-plugin-single-instance` is desktop-only** ([src-tauri/Cargo.toml](src-tauri/Cargo.toml)) — moved under `[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]` so it is never compiled into the Android library.
- **File export is mobile-aware** ([src/utils/platform.ts](src/utils/platform.ts), [src/utils/file-ops.ts](src/utils/file-ops.ts)) — a new `IS_MOBILE` flag routes `saveFile()` (log export) through the in-WebView blob download on Android (lands in Downloads), since the native save dialog + `std::fs` path write is unreliable under Android scoped storage. Settings / profile / preset JSON export + import already use blob download / `<input type=file>`, which work as-is in the Android WebView.
### Fixed
These two surfaced during on-device testing of the Android build:
- **External links now open on Android** ([src/utils/open-external.ts](src/utils/open-external.ts), [src/main.tsx](src/main.tsx)) — legal-doc / donate / repo / social links did nothing on a real device. On-device debugging showed why: a real tap on `<a target="_blank">` makes the Android WebView fire its native `onCreateWindow`, which Tauri tries to satisfy via the shell plugin's `open` — there is no such binary on Android, so it throws an uncaught *"Scoped shell IO error"* and nothing opens (JS `preventDefault` does **not** stop that native path). Fix (Tauri-only; the web build keeps native `target="_blank"`): strip `target="_blank"` from external anchors (a `MutationObserver` covers React re-renders) so `onCreateWindow` never fires, and intercept the click in the **capture** phase, routing the URL through the `opener` plugin (`openUrl` → system browser). `opener:default` already grants `allow-open-url`, so no capability change was needed. Verified end-to-end on an Android 13 emulator (tap → Chrome opens, no shell error).
- **No more black screen on older Android WebViews** ([src/utils/uuid.ts](src/utils/uuid.ts)) — `generateId()` called `crypto.randomUUID()`, which only exists in Chromium/WebView **92+**. It runs at module load (the log store's `CURRENT_SESSION_ID`), so on a stale WebView (e.g. the Chromium 91 some emulator images ship) it threw during boot and black-screened the whole app. It now falls back to a manual RFC 4122 v4 built on `crypto.getRandomValues`. As defence-in-depth, Tauri builds also set `build.target: "es2020"` ([vite.config.ts](vite.config.ts)) so the bundle's *syntax* stays within reach of older WebViews (the web build keeps Vite's modern default).
### Under the hood
- **+4 tests (509 → 513)** — [tests/utils/uuid.test.ts](tests/utils/uuid.test.ts) locks down the `generateId()` v4 shape and both fallback paths (no `randomUUID`, no `crypto` at all) so the WebView-91 black screen can't regress. The rest is build/infra plus small guards. Storage (`appDataDir()` via the six file commands) and localStorage persistence both work unchanged on Android (the app's private data dir is writable with `std::fs`).
- Five manifests bumped 0.28.0 → 0.29.0.
## v0.28.0 — 2026-06-13
Adds a first-run **legal consent gate**. Before the app is usable, the user
+13 -2
View File
@@ -2,7 +2,7 @@
**YouTube Gameplay Description Generator** — an offline-first template engine for Gameplay No Commentary YouTube channels.
Generate YouTube titles, descriptions, and tags in six languages with one click. Save channel, rig, and game presets to skip repetitive data entry. Works in the browser (GitHub Pages) or as a ~8 MB native desktop app (Tauri).
Generate YouTube titles, descriptions, and tags in six languages with one click. Save channel, rig, and game presets to skip repetitive data entry. Works in the browser (GitHub Pages), as a ~8 MB native desktop app (Windows / macOS / Linux), or as an installable Android APK — all from one Tauri 2 codebase.
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](./LICENSE)
[![Node](https://img.shields.io/badge/node-%E2%89%A522-brightgreen)](./docs/DEVELOPMENT.md)
@@ -33,6 +33,7 @@ Built for the gameplay no-commentary niche — especially horror / scary games
- **Batch mode** — generate metadata for all parts of a series in one pass.
- **Cross-post captions** — a dedicated **Social** tab re-packages the same YouTube source into short-form captions for **TikTok** (4,000-char), **Instagram Reels**, and **Facebook Reels** — title, rig, content warnings, copyright, thanks, and hashtags (game + genre + curated per-platform popular tags). Single + bulk modes, per-platform character limits with smart overflow trimming, and JSON import/export.
- **Desktop app** — Windows, macOS & Linux native binaries via Tauri (~8 MB).
- **Android app** — installable, sideloadable `.apk` built from the same Tauri 2 codebase. **Requires Android 11+** (tested 11–16; real-device test on Android 12). Grab it from [Releases](https://github.com/poli0981/youtube-generator/releases) and enable "Install unknown apps" to sideload.
- **Mobile-responsive web** — drawer navigation, touch-sized controls, iOS-safe text-input behavior. Tested down to 360 × 640.
- **100% offline** — no server, no telemetry, no account. See [PRIVACY.md](./PRIVACY.md).
@@ -52,6 +53,16 @@ npm run tauri:build
# Output: src-tauri/target/release/bundle/{msi,deb,dmg,app}
```
Android build (`.apk`) — requires the Android SDK + NDK + a JDK:
```bash
cargo tauri android init # one-time; generates src-tauri/gen/android
cargo tauri android build --apk
# Output: src-tauri/gen/android/app/build/outputs/apk/universal/release/
```
See [`docs/PACKAGING.md`](./docs/PACKAGING.md#android-apk-packaging) for the SDK/NDK setup and signing steps.
Full development setup, IDE config, and troubleshooting: see [`docs/DEVELOPMENT.md`](./docs/DEVELOPMENT.md). Vietnamese version: [`docs/i18n/vi/DEVELOPMENT.md`](./docs/i18n/vi/DEVELOPMENT.md).
## Use Cases
@@ -83,7 +94,7 @@ Architecture overview: [`docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md).
| [Roadmap](./docs/ROADMAP.md) | Development phases. |
| [Tech Spec](./docs/TECH-SPEC.md) | Implementation details and configs. |
| [i18n Guide](./docs/I18N.md) | Adding new locales. |
| [Packaging](./docs/PACKAGING.md) | Tauri release builds and signing. |
| [Packaging](./docs/PACKAGING.md) | Tauri desktop + Android release builds and signing. |
| [Contributing](./CONTRIBUTING.md) | PR process, commit conventions, auto-ignore rules. |
| [Security](./SECURITY.md) | Reporting vulnerabilities. |
| [Privacy](./PRIVACY.md) | Data handling (TL;DR: none). |
+17
View File
@@ -250,6 +250,23 @@ interface HistoryEntry {
| Offline | Full functionality without internet |
| Global Hotkey | System-wide hotkey to open app (optional) |
## 📱 Android App (v0.29)
An installable, sideloadable `.apk` built from the same Tauri 2 codebase — no
separate mobile project. Build with `cargo tauri android build --apk`; see
[PACKAGING.md](./PACKAGING.md#android-apk-packaging).
| Feature | Description |
|---------|-------------|
| Same codebase | One Tauri 2 project produces web, desktop, and Android |
| Min version | Android 11+ (minSdk 30); `targetSdk` 36 (Android 16) |
| Tested | Android 11 → 16 (emulators); real device on Android 12 |
| Signed APK | Self-signed release APK for sideloading; CI publishes it to GitHub Releases |
| Responsive UI | Drawer navigation, touch-sized controls, safe-area insets |
| File export | Routed through the WebView download (lands in Downloads) on Android |
| Persistence | App-private data dir (`appDataDir()`) + localStorage; works offline |
| No tray | Desktop-only tray / single-instance are `#[cfg(desktop)]`-gated out |
## 🚦 Error Pages & Offline (v0.27)
A single reusable, fully-localized `ErrorPage` component (`src/components/errors/`)
+136
View File
@@ -274,6 +274,142 @@ Linux runners install `libwebkit2gtk-4.1-dev`, `libgtk-3-dev`, `libayatana-appin
**Backfill for pre-workflow tags:** `v0.8.0` and `v0.8.1` predate the multi-platform matrix and only have local Windows builds. To attach binaries retroactively, build manually then `gh release create v0.8.0 --notes-file CHANGELOG.md path/to/*.msi …`.
## Android (.apk) Packaging
YTDescGen also builds an installable Android APK from the **same** Tauri 2
codebase — there is no separate mobile project. Tauri 2 ships Android support;
the crate is already `cdylib`/`staticlib` with a `#[cfg_attr(mobile, …)]` entry
point, and the Android launcher icons live in `src-tauri/icons/android/`. The
desktop-only tray / single-instance / hide-to-tray logic in `src-tauri/src/lib.rs`
is gated behind `#[cfg(desktop)]` so the library compiles for Android.
### Requirements & tested versions
| | |
|---|---|
| **Minimum OS** | **Android 11** (API level 30, `minSdk 30`). The APK will not install below this. |
| **Target OS** | **Android 16** (API level 36, `targetSdk 36`). |
| **Architectures** | Universal APK — `arm64-v8a`, `armeabi-v7a`, `x86`, `x86_64`. |
| **Tested** | **Android 11 → 16.** The v0.29.0 build was verified on Android emulators across this range **and on a real device running Android 12** (the maintainer's phone). |
Where the value lives: `bundle.android.minSdkVersion` in
[`src-tauri/tauri.conf.json`](../src-tauri/tauri.conf.json) is the source of
truth used by `tauri android init`; the generated
`gen/android/app/build.gradle.kts` carries the baked `minSdk = 30` — edit that
directly if you change the floor without re-running `init`.
**Why Android 11 is the floor (rationale):**
- **Coverage.** Android 11+ accounts for the large majority of active devices in
2026 (Android 14/15 alone are the two biggest slices, and 11–13 together still
hold a sizeable share). Going lower buys few extra users at growing compat cost.
- **A modern, patched WebView.** The app renders entirely in the system WebView,
whose minimum is Android 10. On Android 11+ the WebView auto-updates via Google
Play, so the rendering/JS engine stays current and patched. This is exactly why
the **real-device test on Android 12 worked**, while a *stale* Android-12
emulator stuck on WebView 91 showed a black screen (the `crypto.randomUUID`
boot crash) — that class of bug is fixed in v0.29.0 and is moot on an
up-to-date WebView.
- **Security upkeep.** Even though Google's *OS-level* monthly security bulletins
for Android 11–13 have ended (Android 12 in 2025, Android 13 in early 2026),
Android 11+ keeps receiving security updates for the components that matter to a
sandboxed WebView app: Google Play system updates (Project Mainline), Google
Play services, and System WebView. Requiring strict OS-bulletin support would
mean Android 14+, which would drop more than half of users.
### Prerequisites
- **Android SDK** — platform-tools, a platform (e.g. `android-34`/`android-36`), build-tools. Install via Android Studio or the command-line tools.
- **Android NDK** — r27 LTS recommended (e.g. `27.3.13750724`).
- **JDK 17** — Android Studio's bundled JBR works (`…/Android Studio/jbr`).
- **Rust android targets**:
```bash
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
```
Set these environment variables before any `android` command (PowerShell shown):
```powershell
$env:ANDROID_HOME = "C:\Users\<you>\AppData\Local\Android\Sdk"
$env:NDK_HOME = "C:\Users\<you>\AppData\Local\Android\Sdk\ndk\27.3.13750724"
$env:JAVA_HOME = "C:\Jetbrains\Android Studio\jbr" # or any JDK 17
```
### Initialize (one-time)
```bash
cargo tauri android init
```
Generates the Gradle project under `src-tauri/gen/android/` — **committed** to
the repo so the signing block and any manifest edits persist. It pulls launcher
icons from `src-tauri/icons/android/` and sets `applicationId =
com.skullmute.ytdescgen`. Treat `init` as a one-time step: re-running it
overwrites hand edits like the signing config below, so only re-run it if a
Tauri upgrade requires regenerating the project (then re-apply the signing edit).
### Signing (one-time)
Sideloaded APKs must be signed. Create a self-signed release keystore and keep
it **outside** the repo:
```powershell
& "$env:JAVA_HOME\bin\keytool.exe" -genkeypair -v `
-keystore C:\keys\ytdescgen-release.jks `
-keyalg RSA -keysize 2048 -validity 10000 -alias ytdescgen
```
> ⚠️ **Back this keystore up.** If you lose it you can never publish an update
> that installs over an existing copy — Android rejects a changed signature.
Create `src-tauri/gen/android/keystore.properties` (gitignored):
```properties
storeFile=C:/keys/ytdescgen-release.jks
storePassword=<store-password>
keyAlias=ytdescgen
keyPassword=<key-password>
```
`app/build.gradle.kts` carries a `release` `signingConfigs` block that reads this
file, guarded by `if (exists())` — a missing keystore yields an *unsigned*
release build rather than a hard failure (handy for contributors).
### Build
```bash
cargo tauri android build --apk
# → src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release.apk
```
- `--apk` produces an APK. **Without it Tauri builds an `.aab`** App Bundle for the Play Store, which cannot be sideloaded.
- `cargo tauri android build --apk --target aarch64` builds an arm64-only APK (smaller download; covers virtually all modern phones).
- The build runs `npm run build` first (the `beforeBuildCommand`), then Gradle. The first build takes several minutes (Rust × up to 4 ABIs + a cold Gradle).
- For on-device iteration with hot reload: `cargo tauri android dev`.
Install on a device: copy the APK over (or `adb install -r <apk>`) and enable
"Install unknown apps" for the source app.
### CI
[.github/workflows/release-android.yml](../.github/workflows/release-android.yml)
builds and signs the APK on a `v*` tag (or `workflow_dispatch`) and attaches it
to the same draft GitHub Release as the desktop binaries. It needs four repo
secrets:
| Secret | Value |
|---|---|
| `ANDROID_KEYSTORE_BASE64` | base64 of the `.jks` (`base64 -w0 ytdescgen-release.jks`) |
| `ANDROID_STORE_PASSWORD` | keystore store password |
| `ANDROID_KEY_PASSWORD` | key password |
| `ANDROID_KEY_ALIAS` | `ytdescgen` |
### App-level changes for Android
- **`src-tauri/src/lib.rs`** — tray / single-instance / hide-to-tray / exit-prevention are `#[cfg(desktop)]`; the dialog/fs/opener/shell plugins and the six file commands run on every platform.
- **`src-tauri/Cargo.toml`** — `tauri-plugin-single-instance` lives in a desktop-only `[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]` table.
- **`src/utils/platform.ts` / `file-ops.ts`** — `IS_MOBILE` routes file export through the WebView blob download on Android (the native save dialog is unreliable under scoped storage). Settings persist via `appDataDir()` (app-private storage) **and** localStorage, both of which work on Android.
## Auto-Update Flow
```
+96 -86
View File
@@ -1,12 +1,12 @@
{
"name": "yt-desc-gen",
"version": "0.28.0",
"version": "0.32.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "yt-desc-gen",
"version": "0.28.0",
"version": "0.32.0",
"license": "Apache-2.0",
"dependencies": {
"@tauri-apps/api": "^2.11.0",
@@ -68,13 +68,13 @@
}
},
"node_modules/@babel/code-frame": {
"version": "7.29.0",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz",
"integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==",
"version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz",
"integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/helper-validator-identifier": "^7.28.5",
"@babel/helper-validator-identifier": "^7.29.7",
"js-tokens": "^4.0.0",
"picocolors": "^1.1.1"
},
@@ -83,9 +83,9 @@
}
},
"node_modules/@babel/compat-data": {
"version": "7.29.0",
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.0.tgz",
"integrity": "sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg==",
"version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz",
"integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -93,21 +93,21 @@
}
},
"node_modules/@babel/core": {
"version": "7.29.0",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz",
"integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==",
"version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz",
"integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/code-frame": "^7.29.0",
"@babel/generator": "^7.29.0",
"@babel/helper-compilation-targets": "^7.28.6",
"@babel/helper-module-transforms": "^7.28.6",
"@babel/helpers": "^7.28.6",
"@babel/parser": "^7.29.0",
"@babel/template": "^7.28.6",
"@babel/traverse": "^7.29.0",
"@babel/types": "^7.29.0",
"@babel/code-frame": "^7.29.7",
"@babel/generator": "^7.29.7",
"@babel/helper-compilation-targets": "^7.29.7",
"@babel/helper-module-transforms": "^7.29.7",
"@babel/helpers": "^7.29.7",
"@babel/parser": "^7.29.7",
"@babel/template": "^7.29.7",
"@babel/traverse": "^7.29.7",
"@babel/types": "^7.29.7",
"@jridgewell/remapping": "^2.3.5",
"convert-source-map": "^2.0.0",
"debug": "^4.1.0",
@@ -124,14 +124,14 @@
}
},
"node_modules/@babel/generator": {
"version": "7.29.1",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.1.tgz",
"integrity": "sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw==",
"version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.7.tgz",
"integrity": "sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/parser": "^7.29.0",
"@babel/types": "^7.29.0",
"@babel/parser": "^7.29.7",
"@babel/types": "^7.29.7",
"@jridgewell/gen-mapping": "^0.3.12",
"@jridgewell/trace-mapping": "^0.3.28",
"jsesc": "^3.0.2"
@@ -141,14 +141,14 @@
}
},
"node_modules/@babel/helper-compilation-targets": {
"version": "7.28.6",
"resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.28.6.tgz",
"integrity": "sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==",
"version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz",
"integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/compat-data": "^7.28.6",
"@babel/helper-validator-option": "^7.27.1",
"@babel/compat-data": "^7.29.7",
"@babel/helper-validator-option": "^7.29.7",
"browserslist": "^4.24.0",
"lru-cache": "^5.1.1",
"semver": "^6.3.1"
@@ -158,9 +158,9 @@
}
},
"node_modules/@babel/helper-globals": {
"version": "7.28.0",
"resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz",
"integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==",
"version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz",
"integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -168,29 +168,29 @@
}
},
"node_modules/@babel/helper-module-imports": {
"version": "7.28.6",
"resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.28.6.tgz",
"integrity": "sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==",
"version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz",
"integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/traverse": "^7.28.6",
"@babel/types": "^7.28.6"
"@babel/traverse": "^7.29.7",
"@babel/types": "^7.29.7"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-module-transforms": {
"version": "7.28.6",
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.6.tgz",
"integrity": "sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==",
"version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz",
"integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/helper-module-imports": "^7.28.6",
"@babel/helper-validator-identifier": "^7.28.5",
"@babel/traverse": "^7.28.6"
"@babel/helper-module-imports": "^7.29.7",
"@babel/helper-validator-identifier": "^7.29.7",
"@babel/traverse": "^7.29.7"
},
"engines": {
"node": ">=6.9.0"
@@ -210,9 +210,9 @@
}
},
"node_modules/@babel/helper-string-parser": {
"version": "7.27.1",
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz",
"integrity": "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==",
"version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz",
"integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -220,9 +220,9 @@
}
},
"node_modules/@babel/helper-validator-identifier": {
"version": "7.28.5",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz",
"integrity": "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==",
"version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz",
"integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -230,9 +230,9 @@
}
},
"node_modules/@babel/helper-validator-option": {
"version": "7.27.1",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.27.1.tgz",
"integrity": "sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==",
"version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz",
"integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -240,27 +240,27 @@
}
},
"node_modules/@babel/helpers": {
"version": "7.29.2",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz",
"integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==",
"version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz",
"integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/template": "^7.28.6",
"@babel/types": "^7.29.0"
"@babel/template": "^7.29.7",
"@babel/types": "^7.29.7"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/parser": {
"version": "7.29.2",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz",
"integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==",
"version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.7.tgz",
"integrity": "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/types": "^7.29.0"
"@babel/types": "^7.29.7"
},
"bin": {
"parser": "bin/babel-parser.js"
@@ -311,33 +311,33 @@
}
},
"node_modules/@babel/template": {
"version": "7.28.6",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz",
"integrity": "sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==",
"version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz",
"integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/code-frame": "^7.28.6",
"@babel/parser": "^7.28.6",
"@babel/types": "^7.28.6"
"@babel/code-frame": "^7.29.7",
"@babel/parser": "^7.29.7",
"@babel/types": "^7.29.7"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/traverse": {
"version": "7.29.0",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.0.tgz",
"integrity": "sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA==",
"version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.7.tgz",
"integrity": "sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/code-frame": "^7.29.0",
"@babel/generator": "^7.29.0",
"@babel/helper-globals": "^7.28.0",
"@babel/parser": "^7.29.0",
"@babel/template": "^7.28.6",
"@babel/types": "^7.29.0",
"@babel/code-frame": "^7.29.7",
"@babel/generator": "^7.29.7",
"@babel/helper-globals": "^7.29.7",
"@babel/parser": "^7.29.7",
"@babel/template": "^7.29.7",
"@babel/types": "^7.29.7",
"debug": "^4.3.1"
},
"engines": {
@@ -345,14 +345,14 @@
}
},
"node_modules/@babel/types": {
"version": "7.29.0",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz",
"integrity": "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==",
"version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.7.tgz",
"integrity": "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/helper-string-parser": "^7.27.1",
"@babel/helper-validator-identifier": "^7.28.5"
"@babel/helper-string-parser": "^7.29.7",
"@babel/helper-validator-identifier": "^7.29.7"
},
"engines": {
"node": ">=6.9.0"
@@ -4021,10 +4021,20 @@
"license": "MIT"
},
"node_modules/js-yaml": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
"integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz",
"integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==",
"dev": true,
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/puzrin"
},
{
"type": "github",
"url": "https://github.com/sponsors/nodeca"
}
],
"license": "MIT",
"dependencies": {
"argparse": "^2.0.1"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "yt-desc-gen",
"version": "0.28.0",
"version": "0.32.0",
"private": true,
"license": "Apache-2.0",
"type": "module",
+1 -1
View File
@@ -5535,7 +5535,7 @@ dependencies = [
[[package]]
name = "yt-desc-gen"
version = "0.28.0"
version = "0.32.0"
dependencies = [
"tauri",
"tauri-build",
+6 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "yt-desc-gen"
version = "0.28.0"
version = "0.32.0"
description = "YouTube Gameplay Description Generator"
authors = ["poli0981"]
edition = "2021"
@@ -19,4 +19,9 @@ tauri-plugin-dialog = "2"
tauri-plugin-fs = "2"
tauri-plugin-opener = "2"
tauri-plugin-shell = "2"
# Desktop-only: single-instance is unsupported on mobile and must not be
# compiled into the Android/iOS library. cfg(not(any(android, ios))) is the
# canonical Tauri "desktop" target table.
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
tauri-plugin-single-instance = "2"
+12
View File
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false
+19
View File
@@ -0,0 +1,19 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
build
/captures
.externalNativeBuild
.cxx
local.properties
key.properties
/.tauri
/tauri.settings.gradle
+6
View File
@@ -0,0 +1,6 @@
/src/main/**/generated
/src/main/jniLibs/**/*.so
/src/main/assets/tauri.conf.json
/tauri.build.gradle.kts
/proguard-tauri.pro
/tauri.properties
@@ -0,0 +1,92 @@
import java.util.Properties
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("rust")
}
val tauriProperties = Properties().apply {
val propFile = file("tauri.properties")
if (propFile.exists()) {
propFile.inputStream().use { load(it) }
}
}
// Release signing. `keystore.properties` is gitignored and created out-of-band
// (locally by the maintainer, or written from CI secrets). When it is absent
// the release build is left unsigned instead of failing, so debug builds and
// contributor checkouts without a keystore still work.
val keystorePropertiesFile = rootProject.file("keystore.properties")
val keystoreProperties = Properties().apply {
if (keystorePropertiesFile.exists()) {
keystorePropertiesFile.inputStream().use { load(it) }
}
}
android {
compileSdk = 36
namespace = "com.skullmute.ytdescgen"
defaultConfig {
manifestPlaceholders["usesCleartextTraffic"] = "false"
applicationId = "com.skullmute.ytdescgen"
minSdk = 30
targetSdk = 36
versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt()
versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0")
}
signingConfigs {
create("release") {
if (keystorePropertiesFile.exists()) {
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String
storeFile = file(keystoreProperties["storeFile"] as String)
storePassword = keystoreProperties["storePassword"] as String
}
}
}
buildTypes {
getByName("debug") {
manifestPlaceholders["usesCleartextTraffic"] = "true"
isDebuggable = true
isJniDebuggable = true
isMinifyEnabled = false
packaging { jniLibs.keepDebugSymbols.add("*/arm64-v8a/*.so")
jniLibs.keepDebugSymbols.add("*/armeabi-v7a/*.so")
jniLibs.keepDebugSymbols.add("*/x86/*.so")
jniLibs.keepDebugSymbols.add("*/x86_64/*.so")
}
}
getByName("release") {
isMinifyEnabled = true
proguardFiles(
*fileTree(".") { include("**/*.pro") }
.plus(getDefaultProguardFile("proguard-android-optimize.txt"))
.toList().toTypedArray()
)
signingConfig = signingConfigs.getByName("release")
}
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
buildConfig = true
}
}
rust {
rootDirRel = "../../../"
}
dependencies {
implementation("androidx.webkit:webkit:1.14.0")
implementation("androidx.appcompat:appcompat:1.7.1")
implementation("androidx.activity:activity-ktx:1.10.1")
implementation("com.google.android.material:material:1.12.0")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.4")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0")
}
apply(from = "tauri.build.gradle.kts")
+21
View File
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<!-- AndroidTV support -->
<uses-feature android:name="android.software.leanback" android:required="false" />
<application
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.yt_desc_gen"
android:usesCleartextTraffic="${usesCleartextTraffic}">
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
android:launchMode="singleTask"
android:label="@string/main_activity_title"
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<!-- AndroidTV support -->
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
</application>
</manifest>
@@ -0,0 +1,11 @@
package com.skullmute.ytdescgen
import android.os.Bundle
import androidx.activity.enableEdgeToEdge
class MainActivity : TauriActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
enableEdgeToEdge()
super.onCreate(savedInstanceState)
}
}
@@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@@ -0,0 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.yt_desc_gen" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Customize your theme here. -->
</style>
</resources>
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
</resources>
@@ -0,0 +1,4 @@
<resources>
<string name="app_name">YTDescGen</string>
<string name="main_activity_title">YTDescGen</string>
</resources>
@@ -0,0 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.yt_desc_gen" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Customize your theme here. -->
</style>
</resources>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path name="my_images" path="." />
<cache-path name="my_cache_images" path="." />
</paths>
+22
View File
@@ -0,0 +1,22 @@
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:8.11.0")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25")
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
tasks.register("clean").configure {
delete("build")
}
@@ -0,0 +1,23 @@
plugins {
`kotlin-dsl`
}
gradlePlugin {
plugins {
create("pluginsForCoolKids") {
id = "rust"
implementationClass = "RustPlugin"
}
}
}
repositories {
google()
mavenCentral()
}
dependencies {
compileOnly(gradleApi())
implementation("com.android.tools.build:gradle:8.11.0")
}
@@ -0,0 +1,68 @@
import java.io.File
import org.apache.tools.ant.taskdefs.condition.Os
import org.gradle.api.DefaultTask
import org.gradle.api.GradleException
import org.gradle.api.logging.LogLevel
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.TaskAction
open class BuildTask : DefaultTask() {
@Input
var rootDirRel: String? = null
@Input
var target: String? = null
@Input
var release: Boolean? = null
@TaskAction
fun assemble() {
val executable = """cargo""";
try {
runTauriCli(executable)
} catch (e: Exception) {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
// Try different Windows-specific extensions
val fallbacks = listOf(
"$executable.exe",
"$executable.cmd",
"$executable.bat",
)
var lastException: Exception = e
for (fallback in fallbacks) {
try {
runTauriCli(fallback)
return
} catch (fallbackException: Exception) {
lastException = fallbackException
}
}
throw lastException
} else {
throw e;
}
}
}
fun runTauriCli(executable: String) {
val rootDirRel = rootDirRel ?: throw GradleException("rootDirRel cannot be null")
val target = target ?: throw GradleException("target cannot be null")
val release = release ?: throw GradleException("release cannot be null")
val args = listOf("tauri", "android", "android-studio-script");
project.exec {
workingDir(File(project.projectDir, rootDirRel))
executable(executable)
args(args)
if (project.logger.isEnabled(LogLevel.DEBUG)) {
args("-vv")
} else if (project.logger.isEnabled(LogLevel.INFO)) {
args("-v")
}
if (release) {
args("--release")
}
args(listOf("--target", target))
}.assertNormalExitValue()
}
}
@@ -0,0 +1,85 @@
import com.android.build.api.dsl.ApplicationExtension
import org.gradle.api.DefaultTask
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.get
const val TASK_GROUP = "rust"
open class Config {
lateinit var rootDirRel: String
}
open class RustPlugin : Plugin<Project> {
private lateinit var config: Config
override fun apply(project: Project) = with(project) {
config = extensions.create("rust", Config::class.java)
val defaultAbiList = listOf("arm64-v8a", "armeabi-v7a", "x86", "x86_64");
val abiList = (findProperty("abiList") as? String)?.split(',') ?: defaultAbiList
val defaultArchList = listOf("arm64", "arm", "x86", "x86_64");
val archList = (findProperty("archList") as? String)?.split(',') ?: defaultArchList
val targetsList = (findProperty("targetList") as? String)?.split(',') ?: listOf("aarch64", "armv7", "i686", "x86_64")
extensions.configure<ApplicationExtension> {
@Suppress("UnstableApiUsage")
flavorDimensions.add("abi")
productFlavors {
create("universal") {
dimension = "abi"
ndk {
abiFilters += abiList
}
}
defaultArchList.forEachIndexed { index, arch ->
create(arch) {
dimension = "abi"
ndk {
abiFilters.add(defaultAbiList[index])
}
}
}
}
}
afterEvaluate {
for (profile in listOf("debug", "release")) {
val profileCapitalized = profile.replaceFirstChar { it.uppercase() }
val buildTask = tasks.maybeCreate(
"rustBuildUniversal$profileCapitalized",
DefaultTask::class.java
).apply {
group = TASK_GROUP
description = "Build dynamic library in $profile mode for all targets"
}
tasks["mergeUniversal${profileCapitalized}JniLibFolders"].dependsOn(buildTask)
for (targetPair in targetsList.withIndex()) {
val targetName = targetPair.value
val targetArch = archList[targetPair.index]
val targetArchCapitalized = targetArch.replaceFirstChar { it.uppercase() }
val targetBuildTask = project.tasks.maybeCreate(
"rustBuild$targetArchCapitalized$profileCapitalized",
BuildTask::class.java
).apply {
group = TASK_GROUP
description = "Build dynamic library in $profile mode for $targetArch"
rootDirRel = config.rootDirRel
target = targetName
release = profile == "release"
}
buildTask.dependsOn(targetBuildTask)
tasks["merge$targetArchCapitalized${profileCapitalized}JniLibFolders"].dependsOn(
targetBuildTask
)
}
}
}
}
}
+24
View File
@@ -0,0 +1,24 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.nonFinalResIds=false
Binary file not shown.
@@ -0,0 +1,6 @@
#Tue May 10 19:22:52 CST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
+185
View File
@@ -0,0 +1,185 @@
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"
+89
View File
@@ -0,0 +1,89 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
+3
View File
@@ -0,0 +1,3 @@
include ':app'
apply from: 'tauri.settings.gradle'
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+106 -83
View File
@@ -1,6 +1,13 @@
// The tray icon, single-instance enforcement, hide-to-tray and
// exit-prevention machinery below are desktop-only. None of these APIs exist
// (or make sense) on mobile, so gate the imports too — otherwise the Android
// build fails with unresolved imports / unused-import warnings.
#[cfg(desktop)]
use std::sync::atomic::{AtomicBool, Ordering};
#[cfg(desktop)]
use std::sync::Arc;
#[cfg(desktop)]
use tauri::{
menu::{Menu, MenuItem},
tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent},
@@ -91,83 +98,16 @@ fn delete_file(path: String) -> Result<(), String> {
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
// Flag that signals the user has requested a full quit (via tray menu).
// When false, closing the window hides it to the tray; when true,
// the app is allowed to exit.
let quitting = Arc::new(AtomicBool::new(false));
let quitting_menu = quitting.clone();
let quitting_window = quitting.clone();
let quitting_run = quitting.clone();
tauri::Builder::default()
// Single-instance MUST be the first plugin registered (v0.12). Without
// it, every launch spawns a fresh process — which then builds its own
// tray icon in `setup()`, stacking duplicates in the system tray and
// leaving orphan processes in Task Manager. The callback runs in the
// *first* (already-running) instance when a second launch is attempted:
// we surface its window instead of letting the second process boot.
.plugin(tauri_plugin_single_instance::init(|app, _argv, _cwd| {
if let Some(window) = app.get_webview_window("main") {
let _ = window.show();
let _ = window.unminimize();
let _ = window.set_focus();
}
}))
// Plugins and commands shared by every platform (desktop + Android). The
// dialog/fs/opener/shell plugins all support mobile, and the six file
// commands use std::fs which works against the app's private data dir on
// Android. Desktop-only pieces (single-instance, tray, hide-to-tray,
// exit-prevention) are layered on below behind #[cfg(desktop)].
let builder = tauri::Builder::default()
.plugin(tauri_plugin_dialog::init())
.plugin(tauri_plugin_fs::init())
.plugin(tauri_plugin_opener::init())
.plugin(tauri_plugin_shell::init())
.setup(move |app| {
let show = MenuItem::with_id(app, "show", "Show YTDescGen", true, None::<&str>)?;
let quit = MenuItem::with_id(app, "quit", "Quit", true, None::<&str>)?;
let menu = Menu::with_items(app, &[&show, &quit])?;
let _tray = TrayIconBuilder::with_id("ytdescgen-tray")
.tooltip("YTDescGen — YouTube Description Generator")
.menu(&menu)
.on_menu_event(move |app, event| match event.id.as_ref() {
"show" => {
if let Some(window) = app.get_webview_window("main") {
let _ = window.show();
let _ = window.unminimize();
let _ = window.set_focus();
}
}
"quit" => {
quitting_menu.store(true, Ordering::SeqCst);
app.exit(0);
}
_ => {}
})
.on_tray_icon_event(|tray, event| {
if let TrayIconEvent::Click {
button: MouseButton::Left,
button_state: MouseButtonState::Up,
..
} = event
{
let app = tray.app_handle();
if let Some(window) = app.get_webview_window("main") {
let _ = window.show();
let _ = window.unminimize();
let _ = window.set_focus();
}
}
})
.build(app)?;
Ok(())
})
.on_window_event(move |window, event| {
if let WindowEvent::CloseRequested { api, .. } = event {
// If the user asked to quit via the tray menu, let the
// window close normally so the app can exit.
if !quitting_window.load(Ordering::SeqCst) {
let _ = window.hide();
api.prevent_close();
}
}
})
.invoke_handler(tauri::generate_handler![
save_to_file,
read_from_file,
@@ -175,15 +115,98 @@ pub fn run() {
append_to_file,
list_dir,
delete_file
])
.build(tauri::generate_context!())
.expect("error while building tauri application")
.run(move |_app_handle, event| {
if let RunEvent::ExitRequested { api, .. } = event {
// Only prevent exit when the user hasn't explicitly asked to quit.
if !quitting_run.load(Ordering::SeqCst) {
api.prevent_exit();
]);
#[cfg(desktop)]
{
// Flag that signals the user has requested a full quit (via tray menu).
// When false, closing the window hides it to the tray; when true,
// the app is allowed to exit.
let quitting = Arc::new(AtomicBool::new(false));
let quitting_menu = quitting.clone();
let quitting_window = quitting.clone();
let quitting_run = quitting.clone();
builder
// Single-instance MUST be the first desktop plugin registered (v0.12).
// Without it, every launch spawns a fresh process — which then builds
// its own tray icon in `setup()`, stacking duplicates in the system
// tray and leaving orphan processes in Task Manager. The callback runs
// in the *first* (already-running) instance when a second launch is
// attempted: we surface its window instead of letting the second boot.
.plugin(tauri_plugin_single_instance::init(|app, _argv, _cwd| {
if let Some(window) = app.get_webview_window("main") {
let _ = window.show();
let _ = window.unminimize();
let _ = window.set_focus();
}
}
});
}))
.setup(move |app| {
let show = MenuItem::with_id(app, "show", "Show YTDescGen", true, None::<&str>)?;
let quit = MenuItem::with_id(app, "quit", "Quit", true, None::<&str>)?;
let menu = Menu::with_items(app, &[&show, &quit])?;
let _tray = TrayIconBuilder::with_id("ytdescgen-tray")
.tooltip("YTDescGen — YouTube Description Generator")
.menu(&menu)
.on_menu_event(move |app, event| match event.id.as_ref() {
"show" => {
if let Some(window) = app.get_webview_window("main") {
let _ = window.show();
let _ = window.unminimize();
let _ = window.set_focus();
}
}
"quit" => {
quitting_menu.store(true, Ordering::SeqCst);
app.exit(0);
}
_ => {}
})
.on_tray_icon_event(|tray, event| {
if let TrayIconEvent::Click {
button: MouseButton::Left,
button_state: MouseButtonState::Up,
..
} = event
{
let app = tray.app_handle();
if let Some(window) = app.get_webview_window("main") {
let _ = window.show();
let _ = window.unminimize();
let _ = window.set_focus();
}
}
})
.build(app)?;
Ok(())
})
.on_window_event(move |window, event| {
if let WindowEvent::CloseRequested { api, .. } = event {
// If the user asked to quit via the tray menu, let the
// window close normally so the app can exit.
if !quitting_window.load(Ordering::SeqCst) {
let _ = window.hide();
api.prevent_close();
}
}
})
.build(tauri::generate_context!())
.expect("error while building tauri application")
.run(move |_app_handle, event| {
if let RunEvent::ExitRequested { api, .. } = event {
// Only prevent exit when the user hasn't explicitly asked to quit.
if !quitting_run.load(Ordering::SeqCst) {
api.prevent_exit();
}
}
});
}
// Mobile (Android): no tray, single-instance, or hide-to-tray — just run.
#[cfg(not(desktop))]
builder
.run(tauri::generate_context!())
.expect("error while building tauri application");
}
+4 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/tauri-apps/tauri/dev/crates/tauri-cli/schema.json",
"productName": "YTDescGen",
"version": "0.28.0",
"version": "0.32.0",
"identifier": "com.skullmute.ytdescgen",
"build": {
"beforeBuildCommand": "npm run build",
@@ -44,6 +44,9 @@
"icons/icon.ico"
],
"targets": "all",
"android": {
"minSdkVersion": 30
},
"windows": {
"webviewInstallMode": {
"type": "downloadBootstrapper"
+61
View File
@@ -0,0 +1,61 @@
import { useTranslation } from "react-i18next";
import { ValidatedInput } from "@components/ui/ValidatedInput";
import { useEditorStore } from "@store/editor-store";
import { validateMessengerUrl, validateZaloGroupUrl } from "@utils/validation";
/**
* Community invite links (v0.32.0). A single section for "join the chat"
* links that feed the description's "💬 COMMUNITY" block:
*
* - Messenger community (`https://m.me/<id>`) — shown for every output
* language.
* - Zalo group (`https://zalo.me/g/<code>`) — Zalo is a Vietnam-audience
* app, so the input only appears (and the description line only renders)
* when the output language is Vietnamese. A value entered while in
* Vietnamese is preserved if the creator later switches language.
*
* Both inputs hard-reject malformed links via {@link ValidatedInput}, so a
* bad URL never reaches the generated description.
*/
export function CommunityEditor() {
const { t } = useTranslation("ui");
const messengerCommunityLink = useEditorStore((s) => s.messengerCommunityLink);
const zaloGroupLink = useEditorStore((s) => s.zaloGroupLink);
const language = useEditorStore((s) => s.language);
const setField = useEditorStore((s) => s.set);
const isVi = language === "vi";
return (
<div className="flex flex-col gap-3">
<div className="flex flex-col gap-1">
<span className="text-sm font-medium text-text-secondary">
{t("editor.community")}
</span>
<p className="text-xs text-text-muted">{t("editor.communityHelp")}</p>
</div>
<ValidatedInput
label={t("editor.messengerCommunityLink")}
placeholder={t("editor.messengerCommunityLinkPlaceholder")}
value={messengerCommunityLink}
onChange={(v) => setField("messengerCommunityLink", v)}
validate={validateMessengerUrl}
inputMode="url"
autoComplete="off"
/>
{isVi && (
<ValidatedInput
label={t("editor.zaloGroupLink")}
placeholder={t("editor.zaloGroupLinkPlaceholder")}
value={zaloGroupLink}
onChange={(v) => setField("zaloGroupLink", v)}
validate={validateZaloGroupUrl}
inputMode="url"
autoComplete="off"
/>
)}
</div>
);
}
+124
View File
@@ -0,0 +1,124 @@
import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { ValidatedInput } from "@components/ui/ValidatedInput";
import { Input } from "@components/ui/Input";
import { Select } from "@components/ui/Select";
import { useEditorStore } from "@store/editor-store";
import {
validateUrl,
validateUrlWithPattern,
validateIntegerInRange,
} from "@utils/validation";
import {
PLAYTEST_PLATFORMS,
maxInvitesForPlatform,
} from "@config/playtest-platforms";
/**
* Playtest section (v0.30.0). One signup link + the platform it lives on +
* an optional invite count. Mirrors {@link StoreLinkEditor} but is a single
* entry rather than one-per-platform. The invite-count input maxes out at
* the selected platform's cap (≤100); switching to a lower-cap platform
* clamps an over-budget count down. Renders into the description only when
* a link is entered — no settings toggle gates it.
*/
export function PlaytestEditor() {
const { t } = useTranslation("ui");
const playtestLink = useEditorStore((s) => s.playtestLink);
const playtestPlatform = useEditorStore((s) => s.playtestPlatform);
const playtestInvites = useEditorStore((s) => s.playtestInvites);
const setField = useEditorStore((s) => s.set);
const platform =
PLAYTEST_PLATFORMS.find((p) => p.id === playtestPlatform) ?? PLAYTEST_PLATFORMS[0];
const cap = maxInvitesForPlatform(playtestPlatform);
const platformOptions = PLAYTEST_PLATFORMS.map((p) => ({
value: p.id,
label: p.label,
}));
// The store holds the invite count as a number; the input edits raw text
// so a mid-edit "2.5" / "-1" can show a warning without snapping back.
// Invalid text is NOT committed, so the description stays clean.
const [invitesText, setInvitesText] = useState(
playtestInvites > 0 ? String(playtestInvites) : "",
);
// Resync the text when the store value changes from outside this input
// (platform clamp, profile / preset load, draft reset). Only fires on a
// real store change, so it never clobbers an in-progress invalid edit.
useEffect(() => {
const current = invitesText.trim() === "" ? 0 : Number(invitesText);
if (current !== playtestInvites) {
setInvitesText(playtestInvites > 0 ? String(playtestInvites) : "");
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [playtestInvites]);
const handlePlatformChange = (id: string) => {
setField("playtestPlatform", id);
const newCap = maxInvitesForPlatform(id);
if (playtestInvites > newCap) {
setField("playtestInvites", newCap);
}
};
const handleInvitesChange = (raw: string) => {
setInvitesText(raw);
const result = validateIntegerInRange(raw, { min: 1, max: cap, allowEmpty: true });
if (result.valid) {
setField("playtestInvites", raw.trim() === "" ? 0 : Number(raw));
}
};
const invitesValidation = validateIntegerInRange(invitesText, {
min: 1,
max: cap,
allowEmpty: true,
});
const invitesError = invitesValidation.valid
? undefined
: t(invitesValidation.error ?? "", invitesValidation.errorParams);
return (
<div className="flex flex-col gap-3">
<span className="text-sm font-medium text-text-secondary">
{t("editor.playtest.heading")}
</span>
<ValidatedInput
label={t("editor.playtest.linkLabel")}
placeholder={platform?.urlPrefix ?? "https://"}
value={playtestLink}
onChange={(v) => setField("playtestLink", v)}
validate={(v) =>
platform ? validateUrlWithPattern(v, platform.urlPattern) : validateUrl(v)
}
inputMode="url"
autoComplete="off"
/>
<div className="grid grid-cols-[1fr_9rem] items-start gap-2">
<Select
label={t("editor.playtest.platformLabel")}
value={playtestPlatform}
options={platformOptions}
onChange={handlePlatformChange}
/>
<Input
label={t("editor.playtest.invitesLabel", { max: cap })}
type="number"
min={1}
max={cap}
step={1}
inputMode="numeric"
value={invitesText}
onChange={(e) => handleInvitesChange(e.target.value)}
errorText={invitesError}
helpText={t("editor.playtest.invitesHelp", { max: cap })}
/>
</div>
</div>
);
}
+1 -1
View File
@@ -113,7 +113,7 @@ export function VideoSettingsForm() {
<div className="flex flex-col gap-3">
<span className="text-sm font-medium text-text-secondary">{t("editor.videoSettings")}</span>
<div className="grid grid-cols-3 gap-3">
<div className="grid grid-cols-1 gap-3 sm:grid-cols-3">
<Select
label={t("editor.resolution")}
options={RESOLUTION_OPTIONS}
+3 -3
View File
@@ -46,8 +46,8 @@ export function PresetCard({ preset }: PresetCardProps) {
return (
<>
<div className="flex items-center justify-between rounded-lg border border-border-strong bg-surface-2 p-4 shadow-md shadow-black/10 transition-colors hover:border-accent/30">
<div className="flex-1">
<div className="flex flex-col gap-3 rounded-lg border border-border-strong bg-surface-2 p-4 shadow-md shadow-black/10 transition-colors hover:border-accent/30 sm:flex-row sm:items-center sm:justify-between">
<div className="min-w-0 flex-1">
<h3 className="text-sm font-semibold text-text-primary">{preset.gameName}</h3>
<div className="mt-1.5 flex flex-wrap items-center gap-1.5 text-xs text-text-muted">
{genreDefs.map((g) => (
@@ -58,7 +58,7 @@ export function PresetCard({ preset }: PresetCardProps) {
<span>{preset.platform}</span>
</div>
</div>
<div className="flex items-center gap-1.5">
<div className="flex shrink-0 items-center gap-1.5">
<Button variant="primary" size="sm" onClick={handleLoad}>
<Upload className="h-3.5 w-3.5" />
{t("presets.loadPreset")}
+4 -4
View File
@@ -43,16 +43,16 @@ export function ProfileCard({ profile }: ProfileCardProps) {
return (
<>
<div className="flex items-center justify-between rounded-lg border border-border-strong bg-surface-2 p-4 shadow-md shadow-black/10 transition-colors hover:border-accent/30">
<div className="flex-1">
<div className="flex flex-col gap-3 rounded-lg border border-border-strong bg-surface-2 p-4 shadow-md shadow-black/10 transition-colors hover:border-accent/30 sm:flex-row sm:items-center sm:justify-between">
<div className="min-w-0 flex-1">
<h3 className="text-sm font-semibold text-text-primary">{profile.name}</h3>
<p className="mt-0.5 text-xs text-text-secondary">{profile.channelName || "No channel"}</p>
<div className="mt-1.5 flex gap-3 text-xs text-text-muted">
<div className="mt-1.5 flex flex-wrap gap-3 text-xs text-text-muted">
{socialCount > 0 && <span>{socialCount} social links</span>}
{rigCount > 0 && <span>{rigCount} rig fields</span>}
</div>
</div>
<div className="flex items-center gap-1.5">
<div className="flex shrink-0 items-center gap-1.5">
<Button variant="primary" size="sm" onClick={handleLoad}>
<Upload className="h-3.5 w-3.5" />
{t("profiles.loadProfile")}
+4 -4
View File
@@ -35,16 +35,16 @@ export function TemplateCard({ template }: TemplateCardProps) {
return (
<>
<div className="flex items-center justify-between rounded-lg border border-border-strong bg-surface-2 p-4 shadow-md shadow-black/10 transition-colors hover:border-accent/30">
<div className="flex-1">
<div className="flex flex-col gap-3 rounded-lg border border-border-strong bg-surface-2 p-4 shadow-md shadow-black/10 transition-colors hover:border-accent/30 sm:flex-row sm:items-center sm:justify-between">
<div className="min-w-0 flex-1">
<h3 className="text-sm font-semibold text-text-primary">{template.name}</h3>
<div className="mt-1.5 flex items-center gap-2 text-xs text-text-muted">
<div className="mt-1.5 flex flex-wrap items-center gap-2 text-xs text-text-muted">
<span>{template.snapshot.gameName || "—"}</span>
<span>·</span>
<span>{date}</span>
</div>
</div>
<div className="flex items-center gap-1.5">
<div className="flex shrink-0 items-center gap-1.5">
<Button variant="primary" size="sm" onClick={handleApply}>
<Upload className="h-3.5 w-3.5" />
{t("templates.loadTemplate")}
@@ -80,6 +80,8 @@ export function TemplateSaveForm({ open, onClose }: TemplateSaveFormProps) {
vnBankHolder: editor.vnBankHolder,
vnMomo: editor.vnMomo,
vnZalopay: editor.vnZalopay,
messengerCommunityLink: editor.messengerCommunityLink,
zaloGroupLink: editor.zaloGroupLink,
};
addTemplate(name, snapshot);
toast.success(t("templates.savedAs", { name: name.trim() || "Untitled" }));
+10 -2
View File
@@ -4,11 +4,16 @@ import clsx from "clsx";
interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
label?: string;
error?: boolean;
/** Inline error message shown below the input (also forces the red border). */
errorText?: string;
/** Inline hint shown below the input when there is no error. */
helpText?: string;
}
export const Input = forwardRef<HTMLInputElement, InputProps>(
({ label, error, className, id, ...props }, ref) => {
({ label, error, errorText, helpText, className, id, ...props }, ref) => {
const inputId = id ?? label?.toLowerCase().replace(/\s+/g, "-");
const isError = error || Boolean(errorText);
return (
<div className="flex flex-col gap-1">
@@ -20,13 +25,16 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(
<input
ref={ref}
id={inputId}
aria-invalid={isError || undefined}
className={clsx(
"min-h-touch rounded-lg border bg-surface-1 px-3 py-2.5 text-base text-text-primary placeholder:text-text-muted transition-colors focus:outline-none focus:ring-2 focus:ring-accent/50 sm:text-sm",
error ? "border-danger" : "border-border focus:border-accent",
isError ? "border-danger" : "border-border focus:border-accent",
className,
)}
{...props}
/>
{errorText && <p className="text-xs text-danger">{errorText}</p>}
{helpText && !errorText && <p className="text-xs text-text-muted">{helpText}</p>}
</div>
);
},
+1 -1
View File
@@ -35,7 +35,7 @@ export function Modal({ open, onClose, title, children, footer, className }: Mod
>
<div
className={clsx(
"mx-4 flex max-h-[85vh] w-full max-w-lg flex-col rounded-xl border border-border bg-surface-1 shadow-2xl",
"mx-4 flex max-h-[85vh] w-[calc(100%-2rem)] max-w-lg flex-col rounded-xl border border-border bg-surface-1 shadow-2xl",
className,
)}
>
+16
View File
@@ -10,6 +10,7 @@ import type {
} from "./graphics-settings";
import type { VideoStyleEra } from "./video-styles";
import { DEFAULT_GACHA_QUEST_TYPE, type GachaQuestType } from "./gacha-quest-types";
import { DEFAULT_PLAYTEST_PLATFORM } from "./playtest-platforms";
import type {
SupportedLanguage,
StoreLinkType,
@@ -131,6 +132,16 @@ export interface EditorDefaults {
vnBankHolder: string;
vnMomo: string;
vnZalopay: string;
/** Playtest signup link (v0.30.0). Empty string = no playtest block. */
playtestLink: string;
/** Playtest platform id (see `@config/playtest-platforms`). */
playtestPlatform: string;
/** Playtest invites available, 0..platform max (≤100). 0 = unset. */
playtestInvites: number;
/** Messenger community invite link (v0.32.0). `https://m.me/<id>`. Empty = no community line. */
messengerCommunityLink: string;
/** Zalo group invite link (v0.32.0). `https://zalo.me/g/<code>`. Rendered only for Vietnamese output. */
zaloGroupLink: string;
}
export interface SettingsDefaults {
@@ -208,6 +219,11 @@ export const DEFAULTS = {
vnBankHolder: "",
vnMomo: "",
vnZalopay: "",
playtestLink: "",
playtestPlatform: DEFAULT_PLAYTEST_PLATFORM,
playtestInvites: 0,
messengerCommunityLink: "",
zaloGroupLink: "",
} satisfies EditorDefaults,
settings: {
+21
View File
@@ -0,0 +1,21 @@
/**
* Predefined "why was this playlist dropped" reasons (v0.31.0).
*
* Drives the Playlist Generator's dropped-reason multi-select, shown only
* when the playlist status is "dropped". Each id maps to a localized label
* under `playlist.droppedReasons.<id>` in BOTH the `ui` namespace (the
* selection chips) and the `templates` namespace (the rendered output) —
* the same split used by content warnings. The list is a starting point,
* just plain constants free to tune; the editor's free-text "other reason"
* field covers anything not listed here.
*/
export const DROPPED_REASONS = [
{ id: "boring", icon: "😴" },
{ id: "performance", icon: "🐌" },
{ id: "bugs", icon: "🐛" },
{ id: "delisted", icon: "🗑️" },
{ id: "low_views", icon: "📉" },
{ id: "time", icon: "⏳" },
] as const;
export type DroppedReasonId = (typeof DROPPED_REASONS)[number]["id"];
+85
View File
@@ -0,0 +1,85 @@
/**
* Playtest platform catalogue (v0.30.0).
*
* Drives the editor's Playtest section: the creator picks ONE platform
* their playtest signup lives on, pastes the link, and optionally records
* how many invites they have to give away. Mirrors the {@link PlatformConfig}
* shape from `@config/platforms` (id / label / urlPrefix / urlPattern) and
* adds a per-platform `maxInvites`.
*
* Why per-platform caps: a playtest's invite budget varies by storefront
* (Steam Playtest grants, itch.io download keys, Discord closed-beta seats…),
* so the editor's invite-count input maxes out at the selected platform's
* cap rather than one flat number. The absolute ceiling is
* {@link PLAYTEST_MAX_INVITES_CAP} (100) — no platform may exceed it.
*
* The `maxInvites` numbers below are sensible starting points, NOT hard
* facts — they're plain constants and meant to be tuned freely.
*/
/** Absolute hard cap on playtest invites, regardless of platform. */
export const PLAYTEST_MAX_INVITES_CAP = 100;
export interface PlaytestPlatformConfig {
readonly id: string;
readonly label: string;
/** Shown as the link input's placeholder / hint. */
readonly urlPrefix: string;
/** Authoritative validator. Must match the entire trimmed URL. */
readonly urlPattern: RegExp;
/** Per-platform invite ceiling. Always ≤ {@link PLAYTEST_MAX_INVITES_CAP}. */
readonly maxInvites: number;
}
export const PLAYTEST_PLATFORMS: readonly PlaytestPlatformConfig[] = [
{
id: "steam",
label: "Steam Playtest",
urlPrefix: "https://store.steampowered.com/app/",
urlPattern: /^https:\/\/store\.steampowered\.com\/app\/\d+(?:\/[^\s]*)?$/i,
maxInvites: 100,
},
{
id: "epic",
label: "Epic Games Store",
urlPrefix: "https://store.epicgames.com/",
urlPattern: /^https:\/\/store\.epicgames\.com\/[^\s]+$/i,
maxInvites: 100,
},
{
id: "itchio",
label: "itch.io",
urlPrefix: "https://<dev>.itch.io/<game>",
urlPattern:
/^https:\/\/[a-z0-9][a-z0-9-]*\.itch\.io\/[a-z0-9][a-z0-9_-]*\/?$/i,
maxInvites: 50,
},
{
id: "discord",
label: "Discord / Community",
urlPrefix: "https://discord.gg/",
urlPattern: /^https:\/\/(?:discord\.gg|discord\.com\/invite)\/[^\s]+$/i,
maxInvites: 100,
},
{
// Catch-all for signup forms, publisher beta pages, Google Forms, etc.
// Pattern is intentionally loose (any HTTPS URL with a host).
id: "other",
label: "Other / Signup form",
urlPrefix: "https://",
urlPattern: /^https:\/\/[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)+(?:\/[^\s]*)?$/i,
maxInvites: 100,
},
] as const;
/** Default platform id used by a fresh draft / migration back-fill. */
export const DEFAULT_PLAYTEST_PLATFORM = PLAYTEST_PLATFORMS[0]?.id ?? "steam";
/**
* Invite ceiling for a platform id, capped at the absolute maximum.
* Unknown ids (e.g. a hand-edited blob) fall back to the absolute cap.
*/
export function maxInvitesForPlatform(id: string): number {
const found = PLAYTEST_PLATFORMS.find((p) => p.id === id);
return Math.min(found?.maxInvites ?? PLAYTEST_MAX_INVITES_CAP, PLAYTEST_MAX_INVITES_CAP);
}
+54 -3
View File
@@ -1,6 +1,7 @@
import type { GeneratorInput, TranslationFn, CharLimitWarning } from "./types";
import { YT_LIMITS } from "./types";
import { PLATFORMS } from "@config/platforms";
import { PLAYTEST_PLATFORMS } from "@config/playtest-platforms";
import { SOCIAL_FIELDS } from "@config/social-fields";
import { formatRigValue } from "@config/rig-fields";
import { DEFAULT_GACHA_QUEST_TYPE } from "@config/gacha-quest-types";
@@ -260,6 +261,12 @@ export interface BuildDescriptionOptions {
* `EN · output-language`. When omitted, the warnings block falls
* back to single-language output via `t`. */
tEn?: TranslationFn;
/** When false, content warnings / tech notes / playthrough notes render
* single-language even when `tEn` is provided; the translation-quality
* disclaimer stays bilingual. Multi-language Output tabs pass false so
* each (single-language) tab doesn't show `EN · LOCAL` content blocks.
* Defaults to true. v0.29.3. */
bilingualContentBlocks?: boolean;
}
export function buildDescription(
@@ -276,7 +283,12 @@ export function buildDescription(
showGameCopyright = false,
showTranslationQuality = false,
tEn,
bilingualContentBlocks = true,
} = options;
// Multi-language Output tabs set this false: each tab is one target
// language, so the v0.11/v0.12 content blocks must NOT render `EN · LOCAL`.
// The translation-quality disclaimer keeps the raw `tEn` and stays bilingual.
const contentBlockTEn = bilingualContentBlocks ? tEn : undefined;
const sections: string[] = [];
const gameName =
input.gameNameLocalized?.[input.language] ?? input.gameName;
@@ -339,7 +351,7 @@ export function buildDescription(
// are skipped; if every bullet is empty the whole block is skipped.
// Bilingual when `tEn` is provided AND output language ≠ English —
// pattern mirrors the v0.11 content-warnings block.
const pnBlock = buildPlaythroughNotesSection(input, t, tEn);
const pnBlock = buildPlaythroughNotesSection(input, t, contentBlockTEn);
if (pnBlock) sections.push(pnBlock);
// 2. No Commentary tagline
@@ -403,6 +415,29 @@ export function buildDescription(
);
}
// 4.7 Playtest / early access — opt-in access block (v0.30.0). Always
// available in the editor; renders only when a link is entered, so
// it follows the Store Links convention (localized heading + plain
// link line, NOT bilingual). The platform label prefixes the link;
// the optional invites line is gated on a positive integer so a
// stray decimal / negative that slipped past the editor can never
// produce a broken line.
if (input.playtestLink && input.playtestLink.trim()) {
const link = input.playtestLink.trim();
const platformLabel = getLabelForId(
input.playtestPlatform ?? "",
PLAYTEST_PLATFORMS,
);
const lines = [`🧪 ${platformLabel}: ${link}`];
const invites = input.playtestInvites ?? 0;
if (Number.isInteger(invites) && invites > 0) {
lines.push(
t("description.sections.playtestInvites", { count: String(invites) }),
);
}
sections.push(`${t("description.sections.playtest")}\n${lines.join("\n")}`);
}
// 5. Video Settings — skipped entirely for 2D / pixel-art / no-in-game-
// settings games (the user toggles that explicitly; v0.8 phase 2 also
// auto-suggests it on certain genres but the toggle is the source of
@@ -508,7 +543,7 @@ export function buildDescription(
"description.contentWarnings",
input.language,
t,
tEn,
contentBlockTEn,
);
if (cwSection) sections.push(cwSection);
@@ -521,7 +556,7 @@ export function buildDescription(
"description.techNotes",
input.language,
t,
tEn,
contentBlockTEn,
);
if (tnSection) sections.push(tnSection);
@@ -632,6 +667,22 @@ export function buildDescription(
sections.push(`${t("description.sections.social")}\n${socialEntries.join("\n")}`);
}
// 10.5 Community — a single "💬 COMMUNITY" block for "join the chat"
// invites. Messenger renders for every language; the Zalo group is a
// Vietnam-audience app so its line is gated on Vietnamese output (same
// rationale as the VN donate block above). The whole block is skipped
// when neither eligible link is present.
const communityLines: string[] = [];
const messenger = input.messengerCommunityLink?.trim() ?? "";
if (messenger) communityLines.push(`💬 Messenger: ${messenger}`);
const zalo = input.zaloGroupLink?.trim() ?? "";
if (zalo && input.language === "vi") communityLines.push(`💙 Zalo: ${zalo}`);
if (communityLines.length > 0) {
sections.push(
`${t("description.sections.community")}\n${communityLines.join("\n")}`,
);
}
// 11. Playlist
if (input.playlistLink && input.playlistLink.trim()) {
sections.push(t("description.sections.playlist", { link: input.playlistLink }));
+80
View File
@@ -21,6 +21,38 @@ export interface PlaylistInput {
totalVideos?: number;
storeLinks?: Partial<Record<string, string>>;
playlistNote?: string;
/**
* Selected dropped-reason ids (see `@config/dropped-reasons`). Only
* rendered when {@link status} is "dropped". v0.31.0
*/
droppedReasons?: string[];
/** Free-text custom dropped reason, appended after the predefined ones. v0.31.0 */
droppedReasonCustom?: string;
/**
* Playlist URL, reused from the editor store — drives the pinned-comment
* "watch the full playlist" line. Empty/absent omits the line. v0.31.0
*/
playlistLink?: string;
}
/**
* Dropped-reason bullet lines, shared by the description and the comment.
* Empty unless the playlist is actually dropped. Each predefined id resolves
* via `playlist.droppedReasons.<id>`; an unresolved key (missing translation)
* is skipped rather than printed raw. The free-text custom reason, when set,
* is appended last.
*/
function buildDroppedReasonBullets(input: PlaylistInput, t: TranslationFn): string[] {
if (input.status !== "dropped") return [];
const bullets: string[] = [];
for (const id of input.droppedReasons ?? []) {
const key = `playlist.droppedReasons.${id}`;
const label = t(key);
if (label && label !== key) bullets.push(`• ${label}`);
}
const custom = input.droppedReasonCustom?.trim();
if (custom) bullets.push(`• ${custom}`);
return bullets;
}
export function buildPlaylistTitle(input: PlaylistInput, t: TranslationFn): string {
@@ -43,6 +75,15 @@ export function buildPlaylistDescription(input: PlaylistInput, t: TranslationFn)
lines.push("");
// Dropped reasons (v0.31.0) — only when the series is marked dropped and
// at least one reason (predefined or custom) is present.
const droppedBullets = buildDroppedReasonBullets(input, t);
if (droppedBullets.length > 0) {
lines.push(t("playlist.droppedHeading"));
lines.push(...droppedBullets);
lines.push("");
}
if (input.totalVideos && input.totalVideos > 0) {
lines.push(t("playlist.videoCount", { count: String(input.totalVideos) }));
lines.push("");
@@ -71,3 +112,42 @@ export function buildPlaylistDescription(input: PlaylistInput, t: TranslationFn)
return lines.join("\n");
}
/**
* Pinned-comment template for the playlist's most-recent video (v0.31.0).
* Status-adaptive: the opening line changes per status, and a dropped
* playlist appends its reasons. Mirrors {@link buildPinnedComment}'s idioms
* — sub-key composition, `t(key) === key` missing-key fallback, blocks
* joined by a blank line, "" when nothing renders. Pure.
*/
export function buildPlaylistComment(input: PlaylistInput, t: TranslationFn): string {
const blocks: string[] = [];
const openingKey = `playlist.comment.opening.${input.status}`;
const opening = t(openingKey, { gameName: input.gameName });
if (opening && opening !== openingKey) blocks.push(opening);
if (input.totalVideos && input.totalVideos > 0) {
const count = t("playlist.videoCount", { count: String(input.totalVideos) });
if (count && count !== "playlist.videoCount") blocks.push(count);
}
const link = input.playlistLink?.trim();
if (link) {
const linkLine = t("playlist.comment.playlistPrompt", { link });
if (linkLine && linkLine !== "playlist.comment.playlistPrompt") blocks.push(linkLine);
}
const droppedBullets = buildDroppedReasonBullets(input, t);
if (droppedBullets.length > 0) {
const introKey = "playlist.comment.droppedReasonsIntro";
const intro = t(introKey);
const introLine = intro && intro !== introKey ? `${intro}\n` : "";
blocks.push(`${introLine}${droppedBullets.join("\n")}`);
}
const engagement = t("playlist.comment.engagement");
if (engagement && engagement !== "playlist.comment.engagement") blocks.push(engagement);
return blocks.filter((b) => b.trim() !== "").join("\n\n");
}
+9
View File
@@ -67,6 +67,14 @@ export interface RenderOptions extends TagOptions {
* to single-language output via `t`.
*/
tEn?: TranslationFn;
/**
* When false, the three "video" content blocks (content warnings, tech
* notes, playthrough notes) render single-language even though `tEn` is
* supplied — used by the multi-language Output tabs, where each tab is
* already a single target language. The AI-translation disclaimer is
* unaffected and stays bilingual. Defaults to true. v0.29.3.
*/
bilingualContentBlocks?: boolean;
}
export function renderAll(
@@ -89,6 +97,7 @@ export function renderAll(
showGameCopyright: options?.showGameCopyright,
showTranslationQuality: options?.showTranslationQuality,
tEn: options?.tEn,
bilingualContentBlocks: options?.bilingualContentBlocks,
});
const tags = generateTags(input, options);
const tagString = formatTagString(tags);
+21
View File
@@ -821,6 +821,27 @@ export interface GeneratorInput {
vnBankHolder?: string;
vnMomo?: string;
vnZalopay?: string;
/**
* Playtest access (v0.30.0). When {@link playtestLink} is non-empty the
* description emits a "🧪 PLAYTEST / EARLY ACCESS" block: a heading, the
* link prefixed by the platform label, and an optional
* "N invites available" line. {@link playtestPlatform} is a config id
* (see `@config/playtest-platforms`); {@link playtestInvites} is
* 0..100 (0 = unset → no count line). Always rendered when filled, like
* store links — no settings toggle gates it.
*/
playtestLink?: string;
playtestPlatform?: string;
playtestInvites?: number;
/**
* Community invite links (v0.32.0). {@link messengerCommunityLink}
* (`https://m.me/<id>`) renders for every language; {@link zaloGroupLink}
* (`https://zalo.me/g/<code>`) is gated on {@link language} === `"vi"`
* (Zalo is a Vietnam-audience app). Both feed a single "💬 COMMUNITY"
* block, which is omitted when it would be empty.
*/
messengerCommunityLink?: string;
zaloGroupLink?: string;
}
export interface GeneratorOutput {
+5
View File
@@ -94,6 +94,11 @@ export function buildGeneratorInputFromEditor(
vnBankHolder: state.vnBankHolder,
vnMomo: state.vnMomo,
vnZalopay: state.vnZalopay,
playtestLink: state.playtestLink,
playtestPlatform: state.playtestPlatform,
playtestInvites: state.playtestInvites,
messengerCommunityLink: state.messengerCommunityLink,
zaloGroupLink: state.zaloGroupLink,
};
}
+18
View File
@@ -23,9 +23,20 @@ export function useMultilangOutput(
showUsagePolicy,
showSponsorCredit,
showGameCopyright,
showThirdPartyAds,
showTranslationQuality,
titleFormat,
} = useSettingsStore();
// Always-English `t` for the bilingual translation-quality disclaimer.
// In multi-language tabs each tab is already a single target language, so
// we pass `bilingualContentBlocks: false` below — `tEn` therefore drives
// ONLY the AI-translation disclaimer here (content warnings / tech notes /
// playthrough notes stay single-language per tab), unlike `useGeneratedOutput`
// where `tEn` also makes those blocks bilingual `EN · LOCAL`. v0.29.3.
// `en` is eagerly bundled, so it never needs the readiness gate.
const tEn = useMemo(() => i18n.getFixedT("en", "templates"), []);
return useMemo(() => {
const results: Record<string, GeneratorOutput> = {};
if (!ready) return results;
@@ -41,7 +52,11 @@ export function useMultilangOutput(
showUsagePolicy,
showSponsorCredit,
showGameCopyright,
showThirdPartyAds,
showTranslationQuality,
titleFormat,
tEn,
bilingualContentBlocks: false,
});
}
return results;
@@ -57,6 +72,9 @@ export function useMultilangOutput(
showUsagePolicy,
showSponsorCredit,
showGameCopyright,
showThirdPartyAds,
showTranslationQuality,
titleFormat,
tEn,
]);
}
+14 -5
View File
@@ -47,6 +47,9 @@
"timestamps", "timestampsPlaceholder",
"storeLinks", "storeLinkType", "rig", "social", "warnings",
"playlistLink", "playlistLinkPlaceholder",
"community", "communityHelp",
"messengerCommunityLink", "messengerCommunityLinkPlaceholder",
"zaloGroupLink", "zaloGroupLinkPlaceholder",
"contactEmail", "contactEmailPlaceholder", "contactEmailHelp",
"musicAttribution", "musicAttributionPlaceholder",
"sponsorName", "sponsorNamePlaceholder",
@@ -81,6 +84,7 @@
"gpuMissingSeries", "gpuMissingModel", "gpuCustomEmpty",
"ramMissingDdr", "ramMissingSize", "ramCustomEmpty"
],
"editor.playtest": ["heading", "linkLabel", "platformLabel", "invitesLabel", "invitesHelp"],
"editor.playthroughOptions": ["none", "blind", "replay", "newgame_plus", "postgame"],
"editor.difficultyOptions": ["none", "easy", "normal", "hard", "nightmare", "custom"],
"editor.playthroughNotes": [
@@ -151,7 +155,7 @@
"storeLinkTypes": ["paid", "free", "demo"],
"output": [
"title", "description", "tags",
"copyTitle", "copyDescription", "copyTags", "copyAll",
"copyTitle", "copyDescription", "copyTags", "copyAll", "copyComment",
"copied", "charCount", "selectLanguages",
"thumbnailText", "copyThumbnailText",
"pinnedComment", "copyPinnedComment",
@@ -186,9 +190,10 @@
"socialPost": ["title", "single", "bulk", "copyCaption", "emptyState", "trimmedHint", "overLimitHint", "exported", "exportFailed", "imported", "importFailed", "importedHeading"],
"socialPost.platforms": ["tiktok", "instagram_reels", "facebook_reels"],
"shortcuts": ["title", "generate", "copyAll", "saveDraft", "toggleSidebar", "help", "close", "searchPlaceholder", "noResults"],
"validation": ["emailInvalid", "emailMaxExceeded", "urlInvalid", "urlPrefixMismatch", "playlistUrlInvalid"],
"validation": ["emailInvalid", "emailMaxExceeded", "urlInvalid", "urlPrefixMismatch", "playlistUrlInvalid", "messengerUrlInvalid", "zaloUrlInvalid", "numberRequired", "numberInvalid", "numberNotInteger", "numberOutOfRange", "rangeEndBeforeStart", "rangeTooLarge"],
"logs": ["title", "emptyState", "clearAll", "clearConfirm", "clearPersistedConfirm", "clearSession", "searchPlaceholder", "exportJson", "exportTxt", "sessionCurrent", "sessionLabel", "entriesShort"],
"playlist": ["title", "status", "contentType", "totalVideos", "customNote", "generatePlaylist"]
"playlist": ["title", "status", "contentType", "totalVideos", "customNote", "generatePlaylist", "droppedReasonsLabel", "droppedReasonCustomLabel", "droppedReasonCustomPlaceholder", "pinnedComment"],
"playlist.droppedReasons": ["boring", "performance", "bugs", "delisted", "low_views", "time"]
},
"templates": {
"title": ["separator", "suffix"],
@@ -214,9 +219,10 @@
],
"description": ["noCommentaryLine"],
"description.sections": [
"timestamps", "storeLinksBuy", "storeLinksDownload", "gameCopyright", "videoSettings", "rig",
"timestamps", "storeLinksBuy", "storeLinksDownload", "gameCopyright", "playtest", "playtestInvites", "videoSettings", "rig",
"modList", "vnDonate",
"sponsorCredit", "thirdPartyAds", "music", "donate", "social",
"community",
"playlist", "contact", "cta",
"copyright", "usagePolicyHeader", "usagePolicy"
],
@@ -288,8 +294,11 @@
],
"hashtags": ["gameplay", "noCommentary", "genre"],
"playlist.status": ["completed", "dropped", "incomplete", "in_progress"],
"playlist": ["titleFormat", "videoCount", "storeSection", "footer"],
"playlist": ["titleFormat", "videoCount", "storeSection", "footer", "droppedHeading"],
"playlist.description": ["full_gameplay", "boss_fights", "speedrun", "all_endings", "dlc", "100_percent", "guide", "highlights"],
"playlist.droppedReasons": ["boring", "performance", "bugs", "delisted", "low_views", "time"],
"playlist.comment": ["playlistPrompt", "droppedReasonsIntro", "engagement"],
"playlist.comment.opening": ["completed", "dropped", "incomplete", "in_progress"],
"timeline.keywords": ["chapter", "part", "boss", "final_boss", "intro", "ending", "tutorial", "credits"]
}
}
+23
View File
@@ -105,6 +105,8 @@
"demo": "free demo"
},
"sections": {
"playtest": "🧪 PLAYTEST / EARLY ACCESS",
"playtestInvites": "🎟️ {{count}} invites available — first come, first served",
"timestamps": "⏱ TIMESTAMPS",
"storeLinksBuy": "🎮 GET THE GAME (if you want to buy)",
"storeLinksDownload": "⬇️ DOWNLOAD THE GAME (if you want to play)",
@@ -118,6 +120,7 @@
"music": "🎵 MUSIC / SOUND",
"donate": "☕ SUPPORT THE CHANNEL",
"social": "🔗 FOLLOW ME",
"community": "💬 COMMUNITY / JOIN THE GROUP",
"playlist": "▶️ Watch the full series: {{link}}",
"contact": "📧 Business inquiries: {{email}}",
"cta": "👍 Like | 🔔 Subscribe | ↗️ Share",
@@ -610,6 +613,26 @@
"videoCount": "📹 {{count}} video(s)",
"storeSection": "🎮 Get the game:",
"footer": "👍 Like | 🔔 Subscribe for more gameplay!",
"droppedHeading": "⚠️ Why this series was dropped:",
"droppedReasons": {
"boring": "Game got boring / lost interest",
"performance": "Performance issues (lag, low FPS)",
"bugs": "Too many bugs / crashes",
"delisted": "Removed / delisted from store",
"low_views": "Low views / engagement",
"time": "No time / shifted priorities"
},
"comment": {
"opening": {
"completed": "✅ The {{gameName}} series is complete — thanks for watching, No Commentary all the way! 🎮",
"in_progress": "▶️ New {{gameName}} part is live! More episodes coming soon. 🎮",
"incomplete": "🔄 The {{gameName}} playthrough continues — catch up on the series so far!",
"dropped": "❌ Update on the {{gameName}} series: I've decided to drop this playthrough."
},
"playlistPrompt": "▶️ Watch the full playlist here: {{link}}",
"droppedReasonsIntro": "Here's why:",
"engagement": "👍 Drop a like & 🔔 subscribe for more No Commentary gameplay!"
},
"description": {
"full_gameplay": "This playlist contains the full gameplay of {{gameName}} on {{channelName}}.\nNo Commentary — pure gameplay experience.",
"boss_fights": "This playlist contains boss fights from {{gameName}} on {{channelName}}.\nNo Commentary — pure gameplay experience.",
+36 -2
View File
@@ -60,6 +60,13 @@
}
},
"editor": {
"playtest": {
"heading": "Playtest",
"linkLabel": "Playtest link",
"platformLabel": "Platform",
"invitesLabel": "Invitations (max {{max}})",
"invitesHelp": "How many playtest invites you have to give away (1–{{max}})."
},
"sections": {
"gameInfo": "Game Info",
"videoSettings": "Video Settings",
@@ -285,6 +292,12 @@
"warnings": "Content warnings",
"playlistLink": "Playlist Link",
"playlistLinkPlaceholder": "https://youtube.com/playlist?list=...",
"community": "💬 Community",
"communityHelp": "Links to your community chat. The Zalo group only shows when the content language is Vietnamese.",
"messengerCommunityLink": "Messenger Community Link",
"messengerCommunityLinkPlaceholder": "https://m.me/yourpage",
"zaloGroupLink": "Zalo Group Link",
"zaloGroupLinkPlaceholder": "https://zalo.me/g/xxxxxx",
"contactEmail": "Contact Email",
"contactEmailPlaceholder": "business@example.com",
"musicAttribution": "Music / Sound Attribution",
@@ -713,6 +726,7 @@
"copyDescription": "Copy Description",
"copyTags": "Copy Tags",
"copyAll": "Copy All",
"copyComment": "Copy comment",
"copied": "Copied!",
"charCount": "{{count}}/{{limit}}",
"selectLanguages": "Select Languages",
@@ -1047,11 +1061,19 @@
"noResults": "No matching shortcuts"
},
"validation": {
"numberRequired": "Enter a number.",
"numberInvalid": "Enter a valid number.",
"numberNotInteger": "Enter a whole number (no decimals).",
"numberOutOfRange": "Enter a number between {{min}} and {{max}}.",
"rangeEndBeforeStart": "End part ({{end}}) must be ≥ start part ({{start}}).",
"rangeTooLarge": "Range too large — generate at most {{maxSpan}} parts at once.",
"emailInvalid": "Invalid email: {{email}}",
"emailMaxExceeded": "Maximum {{max}} emails allowed (currently {{count}})",
"urlInvalid": "Invalid URL. Must start with https://",
"urlPrefixMismatch": "Expected URL starting with {{expected}}",
"playlistUrlInvalid": "Invalid YouTube playlist URL. Expected: {{expected}}"
"playlistUrlInvalid": "Invalid YouTube playlist URL. Expected: {{expected}}",
"messengerUrlInvalid": "Invalid Messenger link. Expected: {{expected}}",
"zaloUrlInvalid": "Invalid Zalo group link. Expected: {{expected}}"
},
"storeLinkTypes": {
"paid": "Paid",
@@ -1064,7 +1086,19 @@
"contentType": "Content Type",
"totalVideos": "Total Videos",
"customNote": "Custom Note",
"generatePlaylist": "Generate Playlist"
"generatePlaylist": "Generate Playlist",
"droppedReasonsLabel": "Reasons for dropping",
"droppedReasonCustomLabel": "Other reason (optional)",
"droppedReasonCustomPlaceholder": "e.g. server shut down, lost the save file…",
"pinnedComment": "Pinned Comment (latest video)",
"droppedReasons": {
"boring": "Game got boring / lost interest",
"performance": "Performance issues (lag, low FPS)",
"bugs": "Too many bugs / crashes",
"delisted": "Removed / delisted from store",
"low_views": "Low views / engagement",
"time": "No time / shifted priorities"
}
},
"logs": {
"title": "Logs",
+23
View File
@@ -105,6 +105,8 @@
"demo": "demo gratis"
},
"sections": {
"playtest": "🧪 PLAYTEST / ACCESO ANTICIPADO",
"playtestInvites": "🎟️ {{count}} invitaciones disponibles — por orden de llegada",
"timestamps": "⏱ MARCAS DE TIEMPO",
"storeLinksBuy": "🎮 CONSIGUE EL JUEGO (si quieres comprarlo)",
"storeLinksDownload": "⬇️ DESCARGA EL JUEGO (si quieres jugar)",
@@ -118,6 +120,7 @@
"music": "🎵 MÚSICA / SONIDO",
"donate": "☕ APOYA EL CANAL",
"social": "🔗 SÍGUEME",
"community": "💬 COMUNIDAD / ÚNETE AL GRUPO",
"playlist": "▶️ Ver la serie completa: {{link}}",
"contact": "📧 Consultas comerciales: {{email}}",
"cta": "👍 Me gusta | 🔔 Suscríbete | ↗️ Comparte",
@@ -610,6 +613,26 @@
"videoCount": "📹 {{count}} video(s)",
"storeSection": "🎮 Obtener el juego:",
"footer": "👍 Me gusta | 🔔 ¡Suscríbete para más gameplay!",
"droppedHeading": "⚠️ Por qué se abandonó esta serie:",
"droppedReasons": {
"boring": "El juego se volvió aburrido / perdí interés",
"performance": "Problemas de rendimiento (lag, FPS bajos)",
"bugs": "Demasiados errores / cierres",
"delisted": "Eliminado / retirado de la tienda",
"low_views": "Pocas visitas / interacción",
"time": "Sin tiempo / cambio de prioridades"
},
"comment": {
"opening": {
"completed": "✅ ¡La serie de {{gameName}} está completa! Gracias por ver, sin comentarios de principio a fin. 🎮",
"in_progress": "▶️ ¡Nueva parte de {{gameName}} ya disponible! Más episodios muy pronto. 🎮",
"incomplete": "🔄 La partida de {{gameName}} continúa: ¡ponte al día con la serie!",
"dropped": "❌ Novedad sobre la serie de {{gameName}}: he decidido abandonar esta partida."
},
"playlistPrompt": "▶️ Mira la lista de reproducción completa aquí: {{link}}",
"droppedReasonsIntro": "Estas son las razones:",
"engagement": "👍 ¡Deja un like y 🔔 suscríbete para más gameplay sin comentarios!"
},
"description": {
"full_gameplay": "Esta playlist contiene el gameplay completo de {{gameName}} en {{channelName}}.\nSin comentarios — experiencia de juego pura.",
"boss_fights": "Esta playlist contiene todas las peleas de jefes de {{gameName}} en {{channelName}}.\nSin comentarios.",
+36 -2
View File
@@ -60,6 +60,13 @@
}
},
"editor": {
"playtest": {
"heading": "Playtest",
"linkLabel": "Enlace de playtest",
"platformLabel": "Plataforma",
"invitesLabel": "Invitaciones (máx. {{max}})",
"invitesHelp": "Cuántas invitaciones de playtest tienes para repartir (1–{{max}})."
},
"sections": {
"gameInfo": "Info del Juego",
"videoSettings": "Ajustes de Video",
@@ -285,6 +292,12 @@
"warnings": "Advertencias de contenido",
"playlistLink": "Enlace de Lista de Reproducción",
"playlistLinkPlaceholder": "https://youtube.com/playlist?list=...",
"community": "💬 Comunidad",
"communityHelp": "Enlaces al chat de tu comunidad. El grupo de Zalo solo aparece cuando el idioma del contenido es vietnamita.",
"messengerCommunityLink": "Enlace de comunidad de Messenger",
"messengerCommunityLinkPlaceholder": "https://m.me/yourpage",
"zaloGroupLink": "Enlace de grupo de Zalo",
"zaloGroupLinkPlaceholder": "https://zalo.me/g/xxxxxx",
"contactEmail": "Correo de Contacto",
"contactEmailPlaceholder": "negocios@ejemplo.com",
"musicAttribution": "Crédito Musical / Sonidos",
@@ -713,6 +726,7 @@
"copyDescription": "Copiar Descripción",
"copyTags": "Copiar Etiquetas",
"copyAll": "Copiar Todo",
"copyComment": "Copiar comentario",
"copied": "¡Copiado!",
"charCount": "{{count}}/{{limit}}",
"selectLanguages": "Seleccionar Idiomas",
@@ -1047,11 +1061,19 @@
"noResults": "No se encontraron atajos"
},
"validation": {
"numberRequired": "Introduce un número.",
"numberInvalid": "Introduce un número válido.",
"numberNotInteger": "Introduce un número entero (sin decimales).",
"numberOutOfRange": "Introduce un número entre {{min}} y {{max}}.",
"rangeEndBeforeStart": "La parte final ({{end}}) debe ser ≥ la parte inicial ({{start}}).",
"rangeTooLarge": "Rango demasiado grande: genera como máximo {{maxSpan}} partes a la vez.",
"emailInvalid": "Email inválido: {{email}}",
"emailMaxExceeded": "Máximo {{max}} emails permitidos (actualmente {{count}})",
"urlInvalid": "URL inválida. Debe comenzar con https://",
"urlPrefixMismatch": "Se espera URL que comience con {{expected}}",
"playlistUrlInvalid": "URL de lista de reproducción de YouTube inválida. Se espera: {{expected}}"
"playlistUrlInvalid": "URL de lista de reproducción de YouTube inválida. Se espera: {{expected}}",
"messengerUrlInvalid": "Enlace de Messenger inválido. Se espera: {{expected}}",
"zaloUrlInvalid": "Enlace de grupo de Zalo inválido. Se espera: {{expected}}"
},
"storeLinkTypes": {
"paid": "De pago",
@@ -1064,7 +1086,19 @@
"contentType": "Tipo de Contenido",
"totalVideos": "Total de Videos",
"customNote": "Nota Personal",
"generatePlaylist": "Generar Playlist"
"generatePlaylist": "Generar Playlist",
"droppedReasonsLabel": "Razones para abandonar",
"droppedReasonCustomLabel": "Otra razón (opcional)",
"droppedReasonCustomPlaceholder": "p. ej. cerraron el servidor, perdí la partida guardada…",
"pinnedComment": "Comentario fijado (último vídeo)",
"droppedReasons": {
"boring": "El juego se volvió aburrido / perdí interés",
"performance": "Problemas de rendimiento (lag, FPS bajos)",
"bugs": "Demasiados errores / cierres",
"delisted": "Eliminado / retirado de la tienda",
"low_views": "Pocas visitas / interacción",
"time": "Sin tiempo / cambio de prioridades"
}
},
"logs": {
"title": "Registros",
+23
View File
@@ -105,6 +105,8 @@
"demo": "無料体験版"
},
"sections": {
"playtest": "🧪 プレイテスト / 早期アクセス",
"playtestInvites": "🎟️ 招待枠 残り {{count}} 件 — 先着順",
"timestamps": "⏱ タイムスタンプ",
"storeLinksBuy": "🎮 ゲームを購入 (応援したい方へ)",
"storeLinksDownload": "⬇️ ゲームをダウンロード (遊びたい方へ)",
@@ -118,6 +120,7 @@
"music": "🎵 音楽・サウンド",
"donate": "☕ チャンネルを応援",
"social": "🔗 フォローする",
"community": "💬 コミュニティ / グループに参加",
"playlist": "▶️ シリーズ全体を見る:{{link}}",
"contact": "📧 お仕事の依頼:{{email}}",
"cta": "👍 いいね | 🔔 チャンネル登録 | ↗️ シェア",
@@ -610,6 +613,26 @@
"videoCount": "📹 {{count}}本の動画",
"storeSection": "🎮 ゲーム購入:",
"footer": "👍 高評価 | 🔔 チャンネル登録お願いします!",
"droppedHeading": "⚠️ このシリーズを中止した理由:",
"droppedReasons": {
"boring": "ゲームに飽きた / 興味を失った",
"performance": "パフォーマンスの問題(ラグ、低FPS)",
"bugs": "バグ / クラッシュが多すぎる",
"delisted": "ストアから削除 / 配信終了",
"low_views": "再生回数 / 反応が少ない",
"time": "時間がない / 優先度の変更"
},
"comment": {
"opening": {
"completed": "✅ {{gameName}} シリーズが完結しました — ノーコメンタリーで最後までご視聴ありがとうございました!🎮",
"in_progress": "▶️ {{gameName}} の新しいパートを公開しました!続きもお楽しみに。🎮",
"incomplete": "🔄 {{gameName}} のプレイはまだ続きます — これまでのシリーズもぜひチェックしてください!",
"dropped": "❌ {{gameName}} シリーズについてのお知らせ:このプレイは中止することにしました。"
},
"playlistPrompt": "▶️ 再生リスト全体はこちら:{{link}}",
"droppedReasonsIntro": "理由は次のとおりです:",
"engagement": "👍 高評価&🔔 チャンネル登録で、ノーコメンタリー実況をもっとお楽しみください!"
},
"description": {
"full_gameplay": "このプレイリストは{{channelName}}での{{gameName}}のフルゲームプレイです。\n解説なし — 純粋なゲームプレイ体験。",
"boss_fights": "このプレイリストは{{channelName}}での{{gameName}}のボス戦集です。\n解説なし — 純粋なゲームプレイ体験。",
+36 -2
View File
@@ -60,6 +60,13 @@
}
},
"editor": {
"playtest": {
"heading": "プレイテスト",
"linkLabel": "プレイテストのリンク",
"platformLabel": "プラットフォーム",
"invitesLabel": "招待枠(最大 {{max}})",
"invitesHelp": "配布できるプレイテスト招待の数(1〜{{max}})。"
},
"sections": {
"gameInfo": "ゲーム情報",
"videoSettings": "動画設定",
@@ -285,6 +292,12 @@
"warnings": "コンテンツ警告",
"playlistLink": "プレイリストリンク",
"playlistLinkPlaceholder": "https://youtube.com/playlist?list=...",
"community": "💬 コミュニティ",
"communityHelp": "コミュニティチャットへのリンク。Zaloグループはコンテンツ言語がベトナム語の場合のみ表示されます。",
"messengerCommunityLink": "Messengerコミュニティリンク",
"messengerCommunityLinkPlaceholder": "https://m.me/yourpage",
"zaloGroupLink": "Zaloグループリンク",
"zaloGroupLinkPlaceholder": "https://zalo.me/g/xxxxxx",
"contactEmail": "連絡先メール",
"contactEmailPlaceholder": "business@example.com",
"musicAttribution": "音楽・サウンドクレジット",
@@ -713,6 +726,7 @@
"copyDescription": "説明文をコピー",
"copyTags": "タグをコピー",
"copyAll": "全てコピー",
"copyComment": "コメントをコピー",
"copied": "コピーしました!",
"charCount": "{{count}}/{{limit}}",
"selectLanguages": "言語を選択",
@@ -1047,11 +1061,19 @@
"noResults": "該当するショートカットはありません"
},
"validation": {
"numberRequired": "数値を入力してください。",
"numberInvalid": "正しい数値を入力してください。",
"numberNotInteger": "整数を入力してください(小数は不可)。",
"numberOutOfRange": "{{min}}〜{{max}}の数値を入力してください。",
"rangeEndBeforeStart": "終了パート({{end}})は開始パート({{start}})以上にしてください。",
"rangeTooLarge": "範囲が大きすぎます — 一度に生成できるのは最大{{maxSpan}}パートまでです。",
"emailInvalid": "無効なメール: {{email}}",
"emailMaxExceeded": "最大{{max}}件のメール (現在{{count}}件)",
"urlInvalid": "無効なURL。https://で始める必要があります",
"urlPrefixMismatch": "{{expected}}で始まるURLが必要です",
"playlistUrlInvalid": "無効なYouTubeプレイリストURLです。期待される形式: {{expected}}"
"playlistUrlInvalid": "無効なYouTubeプレイリストURLです。期待される形式: {{expected}}",
"messengerUrlInvalid": "無効なMessengerリンクです。期待される形式: {{expected}}",
"zaloUrlInvalid": "無効なZaloグループリンクです。期待される形式: {{expected}}"
},
"storeLinkTypes": {
"paid": "有料",
@@ -1064,7 +1086,19 @@
"contentType": "コンテンツタイプ",
"totalVideos": "動画総数",
"customNote": "カスタムノート",
"generatePlaylist": "プレイリスト生成"
"generatePlaylist": "プレイリスト生成",
"droppedReasonsLabel": "中止した理由",
"droppedReasonCustomLabel": "その他の理由(任意)",
"droppedReasonCustomPlaceholder": "例:サーバー終了、セーブデータ消失…",
"pinnedComment": "固定コメント(最新動画用)",
"droppedReasons": {
"boring": "ゲームに飽きた / 興味を失った",
"performance": "パフォーマンスの問題(ラグ、低FPS)",
"bugs": "バグ / クラッシュが多すぎる",
"delisted": "ストアから削除 / 配信終了",
"low_views": "再生回数 / 反応が少ない",
"time": "時間がない / 優先度の変更"
}
},
"logs": {
"title": "ログ",
+23
View File
@@ -105,6 +105,8 @@
"demo": "무료 데모"
},
"sections": {
"playtest": "🧪 플레이테스트 / 앞서 해보기",
"playtestInvites": "🎟️ 초대 {{count}}개 남음 — 선착순",
"timestamps": "⏱ 타임스탬프",
"storeLinksBuy": "🎮 게임 구매 (구매하고 싶다면)",
"storeLinksDownload": "⬇️ 게임 다운로드 (플레이하고 싶다면)",
@@ -118,6 +120,7 @@
"music": "🎵 음악 / 사운드",
"donate": "☕ 채널 후원",
"social": "🔗 팔로우",
"community": "💬 커뮤니티 / 그룹 참여",
"playlist": "▶️ 전체 시리즈 보기: {{link}}",
"contact": "📧 비즈니스 문의: {{email}}",
"cta": "👍 좋아요 | 🔔 구독 | ↗️ 공유",
@@ -610,6 +613,26 @@
"videoCount": "📹 {{count}}개 영상",
"storeSection": "🎮 게임 구매:",
"footer": "👍 좋아요 | 🔔 구독 부탁드립니다!",
"droppedHeading": "⚠️ 이 시리즈를 중단한 이유:",
"droppedReasons": {
"boring": "게임이 지루해짐 / 흥미 상실",
"performance": "성능 문제 (렉, 낮은 FPS)",
"bugs": "버그 / 크래시가 너무 많음",
"delisted": "스토어에서 삭제 / 판매 종료",
"low_views": "조회수 / 반응 저조",
"time": "시간 부족 / 우선순위 변경"
},
"comment": {
"opening": {
"completed": "✅ {{gameName}} 시리즈가 완결되었습니다 — 무해설로 끝까지 시청해 주셔서 감사합니다! 🎮",
"in_progress": "▶️ {{gameName}} 새로운 파트가 올라왔습니다! 다음 편도 곧 찾아올게요. 🎮",
"incomplete": "🔄 {{gameName}} 플레이는 계속됩니다 — 지난 시리즈도 확인해 보세요!",
"dropped": "❌ {{gameName}} 시리즈 관련 소식: 이 플레이를 중단하기로 했습니다."
},
"playlistPrompt": "▶️ 전체 재생목록은 여기에서: {{link}}",
"droppedReasonsIntro": "이유는 다음과 같습니다:",
"engagement": "👍 좋아요와 🔔 구독으로 더 많은 무해설 게임플레이를 만나보세요!"
},
"description": {
"full_gameplay": "이 플레이리스트는 {{channelName}}에서 {{gameName}}의 전체 게임플레이입니다.\n해설 없음 — 순수한 게임플레이 경험.",
"boss_fights": "이 플레이리스트는 {{channelName}}에서 {{gameName}}의 모든 보스전을 담고 있습니다.\n해설 없음.",
+36 -2
View File
@@ -60,6 +60,13 @@
}
},
"editor": {
"playtest": {
"heading": "플레이테스트",
"linkLabel": "플레이테스트 링크",
"platformLabel": "플랫폼",
"invitesLabel": "초대 수 (최대 {{max}})",
"invitesHelp": "나눠줄 수 있는 플레이테스트 초대 수 (1–{{max}})."
},
"sections": {
"gameInfo": "게임 정보",
"videoSettings": "비디오 설정",
@@ -285,6 +292,12 @@
"warnings": "콘텐츠 경고",
"playlistLink": "재생목록 링크",
"playlistLinkPlaceholder": "https://youtube.com/playlist?list=...",
"community": "💬 커뮤니티",
"communityHelp": "커뮤니티 채팅 링크입니다. Zalo 그룹은 콘텐츠 언어가 베트남어일 때만 표시됩니다.",
"messengerCommunityLink": "Messenger 커뮤니티 링크",
"messengerCommunityLinkPlaceholder": "https://m.me/yourpage",
"zaloGroupLink": "Zalo 그룹 링크",
"zaloGroupLinkPlaceholder": "https://zalo.me/g/xxxxxx",
"contactEmail": "문의 이메일",
"contactEmailPlaceholder": "business@example.com",
"musicAttribution": "음악 / 사운드 크레딧",
@@ -713,6 +726,7 @@
"copyDescription": "설명 복사",
"copyTags": "태그 복사",
"copyAll": "전체 복사",
"copyComment": "댓글 복사",
"copied": "복사 완료!",
"charCount": "{{count}}/{{limit}}",
"selectLanguages": "언어 선택",
@@ -1047,11 +1061,19 @@
"noResults": "일치하는 단축키 없음"
},
"validation": {
"numberRequired": "숫자를 입력하세요.",
"numberInvalid": "올바른 숫자를 입력하세요.",
"numberNotInteger": "정수를 입력하세요 (소수 불가).",
"numberOutOfRange": "{{min}}에서 {{max}} 사이의 숫자를 입력하세요.",
"rangeEndBeforeStart": "끝 파트({{end}})는 시작 파트({{start}}) 이상이어야 합니다.",
"rangeTooLarge": "범위가 너무 큽니다 — 한 번에 최대 {{maxSpan}}개 파트까지 생성할 수 있습니다.",
"emailInvalid": "잘못된 이메일: {{email}}",
"emailMaxExceeded": "최대 {{max}}개 이메일 허용 (현재 {{count}}개)",
"urlInvalid": "잘못된 URL입니다. https://로 시작해야 합니다",
"urlPrefixMismatch": "{{expected}}로 시작하는 URL이 필요합니다",
"playlistUrlInvalid": "잘못된 YouTube 재생목록 URL입니다. 예상 형식: {{expected}}"
"playlistUrlInvalid": "잘못된 YouTube 재생목록 URL입니다. 예상 형식: {{expected}}",
"messengerUrlInvalid": "잘못된 Messenger 링크입니다. 예상 형식: {{expected}}",
"zaloUrlInvalid": "잘못된 Zalo 그룹 링크입니다. 예상 형식: {{expected}}"
},
"storeLinkTypes": {
"paid": "유료",
@@ -1064,7 +1086,19 @@
"contentType": "콘텐츠 유형",
"totalVideos": "총 영상 수",
"customNote": "사용자 메모",
"generatePlaylist": "플레이리스트 생성"
"generatePlaylist": "플레이리스트 생성",
"droppedReasonsLabel": "중단한 이유",
"droppedReasonCustomLabel": "기타 이유 (선택)",
"droppedReasonCustomPlaceholder": "예: 서버 종료, 세이브 파일 분실…",
"pinnedComment": "고정 댓글 (최신 영상용)",
"droppedReasons": {
"boring": "게임이 지루해짐 / 흥미 상실",
"performance": "성능 문제 (렉, 낮은 FPS)",
"bugs": "버그 / 크래시가 너무 많음",
"delisted": "스토어에서 삭제 / 판매 종료",
"low_views": "조회수 / 반응 저조",
"time": "시간 부족 / 우선순위 변경"
}
},
"logs": {
"title": "로그",
+23
View File
@@ -105,6 +105,8 @@
"demo": "demo miễn phí"
},
"sections": {
"playtest": "🧪 PLAYTEST / TRẢI NGHIỆM SỚM",
"playtestInvites": "🎟️ Còn {{count}} lời mời — ai nhanh tay người đó được",
"timestamps": "⏱ MỐC THỜI GIAN",
"storeLinksBuy": "🎮 MUA GAME (nếu bạn muốn ủng hộ)",
"storeLinksDownload": "⬇️ TẢI GAME (nếu bạn muốn chơi)",
@@ -118,6 +120,7 @@
"music": "🎵 NHẠC / ÂM THANH",
"donate": "☕ ỦNG HỘ KÊNH",
"social": "🔗 THEO DÕI MÌNH",
"community": "💬 CỘNG ĐỒNG / THAM GIA NHÓM",
"playlist": "▶️ Xem toàn bộ series: {{link}}",
"contact": "📧 Liên hệ hợp tác: {{email}}",
"cta": "👍 Like | 🔔 Đăng ký | ↗️ Chia sẻ",
@@ -610,6 +613,26 @@
"videoCount": "📹 {{count}} video",
"storeSection": "🎮 Tải / mua game:",
"footer": "👍 Like | 🔔 Subscribe để xem thêm gameplay!",
"droppedHeading": "⚠️ Vì sao series này bị dừng:",
"droppedReasons": {
"boring": "Game nhàm chán / mất hứng thú",
"performance": "Vấn đề hiệu năng (lag, FPS thấp)",
"bugs": "Quá nhiều lỗi / crash",
"delisted": "Bị gỡ / khai tử khỏi store",
"low_views": "Lượt xem / tương tác thấp",
"time": "Không có thời gian / đổi ưu tiên"
},
"comment": {
"opening": {
"completed": "✅ Series {{gameName}} đã hoàn thành — cảm ơn các bạn đã theo dõi, No Commentary trọn vẹn! 🎮",
"in_progress": "▶️ Phần mới của {{gameName}} đã lên sóng! Các tập tiếp theo sẽ sớm ra mắt. 🎮",
"incomplete": "🔄 Series {{gameName}} vẫn đang tiếp tục — xem lại các phần trước nhé!",
"dropped": "❌ Cập nhật về series {{gameName}}: mình quyết định dừng playthrough này."
},
"playlistPrompt": "▶️ Xem toàn bộ playlist tại đây: {{link}}",
"droppedReasonsIntro": "Lý do là:",
"engagement": "👍 Để lại một like & 🔔 đăng ký kênh để xem thêm gameplay No Commentary nhé!"
},
"description": {
"full_gameplay": "Playlist này là toàn bộ gameplay của game {{gameName}} trên kênh {{channelName}}.\nKhông bình luận — chỉ có gameplay thuần túy.",
"boss_fights": "Playlist này là tổng hợp các trận đánh boss trong {{gameName}} trên kênh {{channelName}}.\nKhông bình luận — chỉ có gameplay thuần túy.",
+36 -2
View File
@@ -60,6 +60,13 @@
}
},
"editor": {
"playtest": {
"heading": "Playtest",
"linkLabel": "Link playtest",
"platformLabel": "Nền tảng",
"invitesLabel": "Số lời mời (tối đa {{max}})",
"invitesHelp": "Bạn có bao nhiêu lời mời playtest để tặng (1–{{max}})."
},
"sections": {
"gameInfo": "Thông tin game",
"videoSettings": "Cài đặt video",
@@ -285,6 +292,12 @@
"warnings": "Cảnh báo nội dung",
"playlistLink": "Link Playlist",
"playlistLinkPlaceholder": "https://youtube.com/playlist?list=...",
"community": "💬 Cộng đồng",
"communityHelp": "Link nhóm chat cộng đồng. Nhóm Zalo chỉ hiển thị khi ngôn ngữ nội dung là Tiếng Việt.",
"messengerCommunityLink": "Link cộng đồng Messenger",
"messengerCommunityLinkPlaceholder": "https://m.me/yourpage",
"zaloGroupLink": "Link nhóm Zalo",
"zaloGroupLinkPlaceholder": "https://zalo.me/g/xxxxxx",
"contactEmail": "Email liên hệ",
"contactEmailPlaceholder": "business@example.com",
"musicAttribution": "Credit nhạc / âm thanh",
@@ -713,6 +726,7 @@
"copyDescription": "Sao chép mô tả",
"copyTags": "Sao chép tags",
"copyAll": "Sao chép tất cả",
"copyComment": "Sao chép comment",
"copied": "Đã sao chép!",
"charCount": "{{count}}/{{limit}}",
"selectLanguages": "Chọn ngôn ngữ",
@@ -1047,11 +1061,19 @@
"noResults": "Không có phím tắt phù hợp"
},
"validation": {
"numberRequired": "Hãy nhập một số.",
"numberInvalid": "Hãy nhập một số hợp lệ.",
"numberNotInteger": "Hãy nhập số nguyên (không có số thập phân).",
"numberOutOfRange": "Hãy nhập số trong khoảng {{min}} đến {{max}}.",
"rangeEndBeforeStart": "Phần cuối ({{end}}) phải ≥ phần đầu ({{start}}).",
"rangeTooLarge": "Khoảng quá lớn — chỉ tạo tối đa {{maxSpan}} phần mỗi lần.",
"emailInvalid": "Email không hợp lệ: {{email}}",
"emailMaxExceeded": "Tối đa {{max}} email (hiện tại {{count}})",
"urlInvalid": "URL không hợp lệ. Phải bắt đầu bằng https://",
"urlPrefixMismatch": "URL nên bắt đầu bằng {{expected}}",
"playlistUrlInvalid": "URL playlist YouTube không hợp lệ. Định dạng mong muốn: {{expected}}"
"playlistUrlInvalid": "URL playlist YouTube không hợp lệ. Định dạng mong muốn: {{expected}}",
"messengerUrlInvalid": "Link Messenger không hợp lệ. Định dạng mong muốn: {{expected}}",
"zaloUrlInvalid": "Link nhóm Zalo không hợp lệ. Định dạng mong muốn: {{expected}}"
},
"storeLinkTypes": {
"paid": "Trả phí",
@@ -1064,7 +1086,19 @@
"contentType": "Loại nội dung",
"totalVideos": "Tổng video",
"customNote": "Ghi chú",
"generatePlaylist": "Tạo Playlist"
"generatePlaylist": "Tạo Playlist",
"droppedReasonsLabel": "Lý do dừng series",
"droppedReasonCustomLabel": "Lý do khác (tùy chọn)",
"droppedReasonCustomPlaceholder": "vd: server đóng cửa, mất file save…",
"pinnedComment": "Comment ghim (video mới nhất)",
"droppedReasons": {
"boring": "Game nhàm chán / mất hứng thú",
"performance": "Vấn đề hiệu năng (lag, FPS thấp)",
"bugs": "Quá nhiều lỗi / crash",
"delisted": "Bị gỡ / khai tử khỏi store",
"low_views": "Lượt xem / tương tác thấp",
"time": "Không có thời gian / đổi ưu tiên"
}
},
"logs": {
"title": "Nhật ký",
+23
View File
@@ -105,6 +105,8 @@
"demo": "免费试玩"
},
"sections": {
"playtest": "🧪 试玩测试 / 抢先体验",
"playtestInvites": "🎟️ 剩余 {{count}} 个名额 — 先到先得",
"timestamps": "⏱ 时间戳",
"storeLinksBuy": "🎮 获取游戏 (如果你想购买)",
"storeLinksDownload": "⬇️ 下载游戏 (如果你想游玩)",
@@ -118,6 +120,7 @@
"music": "🎵 音乐 / 音效",
"donate": "☕ 支持频道",
"social": "🔗 关注我",
"community": "💬 社区 / 加入群组",
"playlist": "▶️ 观看完整系列:{{link}}",
"contact": "📧 商务合作:{{email}}",
"cta": "👍 点赞 | 🔔 订阅 | ↗️ 分享",
@@ -610,6 +613,26 @@
"videoCount": "📹 {{count}}个视频",
"storeSection": "🎮 获取游戏:",
"footer": "👍 点赞 | 🔔 订阅获取更多游戏实况!",
"droppedHeading": "⚠️ 这个系列弃坑的原因:",
"droppedReasons": {
"boring": "游戏变无聊 / 失去兴趣",
"performance": "性能问题(卡顿、低帧率)",
"bugs": "太多 bug / 崩溃",
"delisted": "已从商店下架 / 停售",
"low_views": "播放量 / 互动太低",
"time": "没时间 / 优先级改变"
},
"comment": {
"opening": {
"completed": "✅ {{gameName}} 系列已完结——感谢观看,全程无解说!🎮",
"in_progress": "▶️ {{gameName}} 新一期已上线!更多内容敬请期待。🎮",
"incomplete": "🔄 {{gameName}} 的流程仍在继续——快来补看之前的系列吧!",
"dropped": "❌ 关于 {{gameName}} 系列的更新:我决定弃坑这个流程。"
},
"playlistPrompt": "▶️ 在此观看完整播放列表:{{link}}",
"droppedReasonsIntro": "原因如下:",
"engagement": "👍 点个赞并 🔔 订阅,观看更多无解说游戏实况!"
},
"description": {
"full_gameplay": "本播放列表包含{{channelName}}的{{gameName}}完整游戏实况。\n无解说 — 纯粹的游戏体验。",
"boss_fights": "本播放列表包含{{channelName}}的{{gameName}}全部Boss战。\n无解说。",
+36 -2
View File
@@ -60,6 +60,13 @@
}
},
"editor": {
"playtest": {
"heading": "试玩测试",
"linkLabel": "试玩测试链接",
"platformLabel": "平台",
"invitesLabel": "邀请数量(最多 {{max}})",
"invitesHelp": "你有多少个试玩测试邀请可以送出(1–{{max}})。"
},
"sections": {
"gameInfo": "游戏信息",
"videoSettings": "视频设置",
@@ -285,6 +292,12 @@
"warnings": "内容警告",
"playlistLink": "播放列表链接",
"playlistLinkPlaceholder": "https://youtube.com/playlist?list=...",
"community": "💬 社区",
"communityHelp": "社区聊天链接。Zalo 群仅在内容语言为越南语时显示。",
"messengerCommunityLink": "Messenger 社区链接",
"messengerCommunityLinkPlaceholder": "https://m.me/yourpage",
"zaloGroupLink": "Zalo 群链接",
"zaloGroupLinkPlaceholder": "https://zalo.me/g/xxxxxx",
"contactEmail": "联系邮箱",
"contactEmailPlaceholder": "business@example.com",
"musicAttribution": "音乐 / 音效署名",
@@ -713,6 +726,7 @@
"copyDescription": "复制描述",
"copyTags": "复制标签",
"copyAll": "复制全部",
"copyComment": "复制评论",
"copied": "已复制!",
"charCount": "{{count}}/{{limit}}",
"selectLanguages": "选择语言",
@@ -1047,11 +1061,19 @@
"noResults": "未找到快捷键"
},
"validation": {
"numberRequired": "请输入一个数字。",
"numberInvalid": "请输入有效的数字。",
"numberNotInteger": "请输入整数(不能有小数)。",
"numberOutOfRange": "请输入 {{min}} 到 {{max}} 之间的数字。",
"rangeEndBeforeStart": "结束分集({{end}})必须 ≥ 起始分集({{start}})。",
"rangeTooLarge": "范围太大 — 每次最多生成 {{maxSpan}} 个分集。",
"emailInvalid": "无效邮箱: {{email}}",
"emailMaxExceeded": "最多允许{{max}}个邮箱 (当前{{count}}个)",
"urlInvalid": "无效URL。必须以https://开头",
"urlPrefixMismatch": "URL应以{{expected}}开头",
"playlistUrlInvalid": "无效的YouTube播放列表URL。期望格式: {{expected}}"
"playlistUrlInvalid": "无效的YouTube播放列表URL。期望格式: {{expected}}",
"messengerUrlInvalid": "无效的Messenger链接。期望格式: {{expected}}",
"zaloUrlInvalid": "无效的Zalo群链接。期望格式: {{expected}}"
},
"storeLinkTypes": {
"paid": "付费",
@@ -1064,7 +1086,19 @@
"contentType": "内容类型",
"totalVideos": "视频总数",
"customNote": "自定义备注",
"generatePlaylist": "生成播放列表"
"generatePlaylist": "生成播放列表",
"droppedReasonsLabel": "弃坑原因",
"droppedReasonCustomLabel": "其他原因(可选)",
"droppedReasonCustomPlaceholder": "例如:服务器关闭、存档丢失……",
"pinnedComment": "置顶评论(最新视频)",
"droppedReasons": {
"boring": "游戏变无聊 / 失去兴趣",
"performance": "性能问题(卡顿、低帧率)",
"bugs": "太多 bug / 崩溃",
"delisted": "已从商店下架 / 停售",
"low_views": "播放量 / 互动太低",
"time": "没时间 / 优先级改变"
}
},
"logs": {
"title": "日志",
+4
View File
@@ -5,6 +5,7 @@ import { ErrorBoundary } from "./components/ErrorBoundary";
import i18n, { ensureLanguagesLoaded } from "@i18n/index";
import { useSettingsStore } from "@store/settings-store";
import { useEditorStore } from "@store/editor-store";
import { installExternalLinkHandler } from "@utils/open-external";
import "./styles/globals.css";
const root = document.getElementById("root");
@@ -56,6 +57,9 @@ function applyPersistedTheme(): void {
// page — defeating the point of per-route boundaries.
void preloadLocales().finally(() => {
applyPersistedTheme();
// In a Tauri webview, `<a target="_blank">` is inert — route external links
// through the OS via the opener plugin. No-op on the web build.
installExternalLinkHandler();
createRoot(root).render(
<StrictMode>
<ErrorBoundary label="app">
+35 -6
View File
@@ -14,6 +14,7 @@ import { buildPinnedComment } from "@engine/pinned-comment-builder";
import { YT_LIMITS } from "@engine/types";
import type { GeneratorOutput, SupportedLanguage } from "@engine/types";
import { useCurrentGeneratorInput } from "@hooks/use-current-generator-input";
import { validateBatchRange } from "@utils/validation";
import clsx from "clsx";
interface BatchLanguageRow {
@@ -53,6 +54,16 @@ export function BatchPage() {
const [results, setResults] = useState<BatchResult[]>([]);
const [generating, setGenerating] = useState(false);
// Block generation on an invalid part range: negative / decimal / NaN
// endpoints, end < start, or a span over 100 parts (the loop's hard cap).
const rangeResult = useMemo(
() => validateBatchRange(startPart, endPart, { maxSpan: 100 }),
[startPart, endPart],
);
const rangeError = rangeResult.valid
? undefined
: t(rangeResult.error ?? "", rangeResult.errorParams);
const toggleLang = (lang: SupportedLanguage) => {
setSelectedLangs((prev) => {
if (prev.includes(lang)) {
@@ -137,7 +148,7 @@ export function BatchPage() {
);
return (
<div className="mx-auto max-w-4xl p-6">
<div className="mx-auto max-w-4xl p-4 sm:p-6">
<h1 className="mb-4 text-lg font-bold text-text-primary">{t("batch.title")}</h1>
{/* Language selector */}
@@ -163,26 +174,44 @@ export function BatchPage() {
</div>
</div>
<div className="mb-6 flex items-end gap-4">
<div className="mb-2 flex flex-col gap-3 sm:flex-row sm:items-end sm:gap-4">
<Input
label={t("batch.startPart")}
type="number"
min={1}
step={1}
inputMode="numeric"
error={!rangeResult.valid}
value={startPart}
onChange={(e) => setStartPart(e.target.value)}
/>
<Input
label={t("batch.endPart")}
type="number"
min={1}
step={1}
inputMode="numeric"
error={!rangeResult.valid}
value={endPart}
onChange={(e) => setEndPart(e.target.value)}
/>
<Button
className="w-full sm:w-auto"
onClick={() => void handleGenerate()}
disabled={!state.gameName || generating}
disabled={!state.gameName || generating || !rangeResult.valid}
>
{t("batch.generateBatch")}
</Button>
</div>
{rangeError && (
<p
role="alert"
className="mb-6 rounded-lg border border-warning/40 bg-warning/10 px-3 py-2 text-xs text-warning"
>
{rangeError}
</p>
)}
{!rangeError && <div className="mb-6" />}
{results.length === 0 ? (
<p className="rounded-lg border border-dashed border-border py-8 text-center text-sm text-text-muted">
@@ -190,7 +219,7 @@ export function BatchPage() {
</p>
) : (
<>
<div className="mb-4 flex items-center justify-between">
<div className="mb-4 flex flex-wrap items-center justify-between gap-2">
<span className="text-sm text-text-secondary">
{results.length} parts x {selectedLangs.length} languages
</span>
@@ -205,7 +234,7 @@ export function BatchPage() {
<div className="flex flex-col gap-3">
{result.languages.map((lang) => (
<div key={lang.language} className="rounded-lg bg-surface-2 p-3">
<div className="mb-1 flex items-center justify-between">
<div className="mb-1 flex flex-wrap items-center justify-between gap-2">
<span className="text-xs font-medium uppercase text-text-muted">
{lang.language.toUpperCase()}
</span>
@@ -220,7 +249,7 @@ export function BatchPage() {
<pre className="mb-2 max-h-20 overflow-y-auto whitespace-pre-wrap font-sans text-xs text-text-secondary">
{lang.output.description.slice(0, 200)}...
</pre>
<div className="flex gap-2">
<div className="flex flex-wrap gap-2">
<CopyButton text={lang.output.description} label={t("output.copyDescription")} />
<CopyButton text={lang.output.tagString} label={t("output.copyTags")} />
{lang.pinnedComment && (
+4
View File
@@ -6,9 +6,11 @@ import { ExtraFieldsInput } from "@components/editor/ExtraFieldsInput";
import { VideoSettingsForm } from "@components/editor/VideoSettingsForm";
import { TimestampEditor } from "@components/editor/TimestampEditor";
import { StoreLinkEditor } from "@components/editor/StoreLinkEditor";
import { PlaytestEditor } from "@components/editor/PlaytestEditor";
import { RigEditor } from "@components/editor/RigEditor";
import { SocialEditor } from "@components/editor/SocialEditor";
import { VietnameseDonateEditor } from "@components/editor/VietnameseDonateEditor";
import { CommunityEditor } from "@components/editor/CommunityEditor";
import { ContentWarningChecklist } from "@components/editor/ContentWarningChecklist";
import { PlaythroughNotesForm } from "@components/editor/PlaythroughNotesForm";
import { TechNotesChecklist } from "@components/editor/TechNotesChecklist";
@@ -152,7 +154,9 @@ export function EditorPage() {
onToggle={() => toggleAccordion("storeAndSocial")}
>
<StoreLinkEditor />
<PlaytestEditor />
<SocialEditor />
<CommunityEditor />
<VietnameseDonateEditor />
</Accordion>
</div>
+78 -3
View File
@@ -9,15 +9,18 @@ import { ChipGroup } from "@components/ui/ChipGroup";
import { Select } from "@components/ui/Select";
import { CopyButton } from "@components/output/CopyButton";
import { useEditorStore } from "@store/editor-store";
import { validateIntegerInRange } from "@utils/validation";
import { SUPPORTED_LANGUAGES } from "@i18n/index";
import { useLanguagesReady } from "@hooks/use-languages-ready";
import {
buildPlaylistTitle,
buildPlaylistDescription,
buildPlaylistComment,
type PlaylistStatus,
type PlaylistContentType,
type PlaylistInput,
} from "@engine/playlist-builder";
import { DROPPED_REASONS } from "@config/dropped-reasons";
import type { SupportedLanguage } from "@engine/types";
const STATUS_OPTIONS = [
@@ -47,6 +50,8 @@ export function PlaylistPage() {
const [contentType, setContentType] = useState<PlaylistContentType>("full_gameplay");
const [totalVideos, setTotalVideos] = useState("");
const [customNote, setCustomNote] = useState("");
const [droppedReasons, setDroppedReasons] = useState<string[]>([]);
const [droppedReasonCustom, setDroppedReasonCustom] = useState("");
const [language, setLanguage] = useState<SupportedLanguage>(editor.language);
const langOptions = SUPPORTED_LANGUAGES.map((l) => ({
@@ -54,17 +59,47 @@ export function PlaylistPage() {
label: `${l.flag} ${l.nativeName}`,
}));
// Guard the output: only forward a valid whole number in range so a
// negative / decimal / out-of-range entry simply omits the count line
// instead of producing a broken "X videos" string.
const totalVideosValidation = validateIntegerInRange(totalVideos, {
min: 1,
max: 1000,
allowEmpty: true,
});
const totalVideosError = totalVideosValidation.valid
? undefined
: t(totalVideosValidation.error ?? "", totalVideosValidation.errorParams);
const playlistInput: PlaylistInput = useMemo(
() => ({
gameName: editor.gameName,
channelName: editor.channelName,
status,
contentType,
totalVideos: totalVideos ? parseInt(totalVideos) : undefined,
totalVideos:
totalVideosValidation.valid && totalVideos.trim()
? parseInt(totalVideos)
: undefined,
storeLinks: editor.storeLinks,
playlistNote: customNote,
droppedReasons,
droppedReasonCustom,
playlistLink: editor.playlistLink,
}),
[editor.gameName, editor.channelName, status, contentType, totalVideos, editor.storeLinks, customNote],
[
editor.gameName,
editor.channelName,
status,
contentType,
totalVideos,
totalVideosValidation.valid,
editor.storeLinks,
customNote,
droppedReasons,
droppedReasonCustom,
editor.playlistLink,
],
);
// Lazy-loaded locales (v0.26): the dropdown can pick a language whose
@@ -72,11 +107,12 @@ export function PlaylistPage() {
const ready = useLanguagesReady([language]);
const output = useMemo(() => {
if (!ready) return { title: "", description: "" };
if (!ready) return { title: "", description: "", comment: "" };
const tFn = i18n.getFixedT(language, "templates");
return {
title: buildPlaylistTitle(playlistInput, tFn),
description: buildPlaylistDescription(playlistInput, tFn),
comment: buildPlaylistComment(playlistInput, tFn),
};
}, [ready, playlistInput, language]);
@@ -100,6 +136,29 @@ export function PlaylistPage() {
onChange={(v) => setStatus(v as PlaylistStatus)}
/>
{status === "dropped" && (
<>
<ChipGroup
label={t("playlist.droppedReasonsLabel")}
multiple
options={DROPPED_REASONS.map((r) => ({
id: r.id,
label: t(`playlist.droppedReasons.${r.id}`),
icon: r.icon,
}))}
value={droppedReasons}
onChange={setDroppedReasons}
/>
<Textarea
label={t("playlist.droppedReasonCustomLabel")}
placeholder={t("playlist.droppedReasonCustomPlaceholder")}
value={droppedReasonCustom}
onChange={(e) => setDroppedReasonCustom(e.target.value)}
rows={2}
/>
</>
)}
<ChipGroup
label={t("playlist.contentType")}
options={CONTENT_TYPE_OPTIONS}
@@ -110,8 +169,12 @@ export function PlaylistPage() {
<Input
label={t("playlist.totalVideos")}
type="number"
min={1}
step={1}
inputMode="numeric"
placeholder="e.g. 25"
value={totalVideos}
errorText={totalVideosError}
onChange={(e) => setTotalVideos(e.target.value)}
/>
@@ -149,6 +212,18 @@ export function PlaylistPage() {
</pre>
</div>
<div>
<div className="mb-1 flex items-center justify-between">
<span className="text-xs font-medium uppercase text-text-muted">
{t("playlist.pinnedComment")}
</span>
<CopyButton text={output.comment} label={t("output.copyComment")} />
</div>
<pre className="max-h-64 overflow-y-auto whitespace-pre-wrap rounded bg-surface-2 p-2 font-sans text-xs text-text-secondary">
{output.comment || "..."}
</pre>
</div>
<Button
onClick={() => {
navigator.clipboard.writeText(`${output.title}\n\n${output.description}`);
+3 -3
View File
@@ -176,8 +176,8 @@ export function ProfilesPage() {
};
return (
<div className="mx-auto max-w-3xl p-6">
<div className="mb-6 flex items-center justify-between">
<div className="mx-auto max-w-3xl p-4 sm:p-6">
<div className="mb-6 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
<div className="flex gap-1 rounded-lg bg-surface-1 p-1">
{(["profiles", "presets", "templates"] as const).map((t2) => (
<button
@@ -194,7 +194,7 @@ export function ProfilesPage() {
</button>
))}
</div>
<div className="flex gap-2">
<div className="flex flex-wrap gap-2">
{tab === "profiles" && (
<>
<Button variant="ghost" size="sm" onClick={handleExportProfiles}>
+2 -2
View File
@@ -196,8 +196,8 @@ export function SettingsPage() {
];
return (
<div className="mx-auto max-w-2xl p-6">
<div className="mb-6 flex items-center justify-between">
<div className="mx-auto max-w-2xl p-4 sm:p-6">
<div className="mb-6 flex flex-wrap items-center justify-between gap-2">
<h1 className="text-lg font-bold text-text-primary">{t("settings.title")}</h1>
{IS_TAURI && (
<div className="flex gap-2">
+27 -1
View File
@@ -17,6 +17,7 @@ import {
type SocialPostOutput,
} from "@engine/social-post-builder";
import { useCurrentGeneratorInput } from "@hooks/use-current-generator-input";
import { validateBatchRange } from "@utils/validation";
import {
exportTypedToJsonFile,
importTypedFromJsonFile,
@@ -75,6 +76,15 @@ export function SocialPage() {
const [bulkResults, setBulkResults] = useState<BulkRow[]>([]);
const [generating, setGenerating] = useState(false);
// Block bulk generation on an invalid part range (mirrors BatchPage).
const rangeResult = useMemo(
() => validateBatchRange(startPart, endPart, { maxSpan: 100 }),
[startPart, endPart],
);
const rangeError = rangeResult.valid
? undefined
: t(rangeResult.error ?? "", rangeResult.errorParams);
// Import display (read-only)
const [imported, setImported] = useState<SocialExportBundle | null>(null);
@@ -380,22 +390,38 @@ export function SocialPage() {
<Input
label={t("batch.startPart")}
type="number"
min={1}
step={1}
inputMode="numeric"
error={!rangeResult.valid}
value={startPart}
onChange={(e) => setStartPart(e.target.value)}
/>
<Input
label={t("batch.endPart")}
type="number"
min={1}
step={1}
inputMode="numeric"
error={!rangeResult.valid}
value={endPart}
onChange={(e) => setEndPart(e.target.value)}
/>
<Button
onClick={() => void handleBulkGenerate()}
disabled={!gameName || generating}
disabled={!gameName || generating || !rangeResult.valid}
>
{t("common.generate")}
</Button>
</div>
{rangeError && (
<p
role="alert"
className="rounded-lg border border-warning/40 bg-warning/10 px-3 py-2 text-xs text-warning"
>
{rangeError}
</p>
)}
{bulkResults.length === 0 ? (
<p className="rounded-lg border border-dashed border-border py-8 text-center text-sm text-text-muted">
+61 -1
View File
@@ -38,6 +38,11 @@ import {
DEFAULT_GACHA_QUEST_TYPE,
type GachaQuestType,
} from "@config/gacha-quest-types";
import {
PLAYTEST_PLATFORMS,
PLAYTEST_MAX_INVITES_CAP,
DEFAULT_PLAYTEST_PLATFORM,
} from "@config/playtest-platforms";
import { DEFAULTS } from "@config/defaults";
export interface EditorData {
@@ -168,6 +173,16 @@ export interface EditorData {
vnBankHolder: string;
vnMomo: string;
vnZalopay: string;
/** Playtest signup link (v0.30.0). Empty = no Playtest description block. */
playtestLink: string;
/** Playtest platform id (see `@config/playtest-platforms`). */
playtestPlatform: string;
/** Playtest invites available — 0 = unset; clamped to the platform max (≤100). */
playtestInvites: number;
/** Messenger community invite link (v0.32.0). Empty = no community line. */
messengerCommunityLink: string;
/** Zalo group invite link (v0.32.0). Rendered into the description only for Vietnamese output. */
zaloGroupLink: string;
}
/**
@@ -348,6 +363,11 @@ const initialState: EditorData = {
vnBankHolder: DEFAULTS.editor.vnBankHolder,
vnMomo: DEFAULTS.editor.vnMomo,
vnZalopay: DEFAULTS.editor.vnZalopay,
playtestLink: DEFAULTS.editor.playtestLink,
playtestPlatform: DEFAULTS.editor.playtestPlatform,
playtestInvites: DEFAULTS.editor.playtestInvites,
messengerCommunityLink: DEFAULTS.editor.messengerCommunityLink,
zaloGroupLink: DEFAULTS.editor.zaloGroupLink,
};
export const useEditorStore = create<EditorState>()(
@@ -465,7 +485,20 @@ export const useEditorStore = create<EditorState>()(
// migration defensively coerces unrecognised values to `""`
// so a hand-edited blob or downgrade from a future version
// can't leave the Select stuck on a missing option.
version: 14,
// v14 → v15: v0.30.0. Playtest section — `playtestLink`,
// `playtestPlatform`, `playtestInvites` joined the schema.
// Additive: empty link / default platform / 0 invites
// back-fill. The migration coerces an unknown platform id to
// the default and clamps the invite count to an integer in
// [0, 100], so a hand-edited blob can't strand the editor's
// platform Select or number input on a bad value.
// v15 → v16: v0.32.0. Community links — `messengerCommunityLink`
// (`https://m.me/<id>`) and `zaloGroupLink`
// (`https://zalo.me/g/<code>`) joined the schema. Additive:
// both back-fill to "". Messenger renders for every output
// language; the Zalo line only renders for Vietnamese output.
// Non-string values coerce to "".
version: 16,
migrate: (persistedState, version) =>
migrateEditorState(persistedState, version),
partialize: (state) => ({
@@ -537,6 +570,11 @@ export const useEditorStore = create<EditorState>()(
vnBankHolder: state.vnBankHolder,
vnMomo: state.vnMomo,
vnZalopay: state.vnZalopay,
playtestLink: state.playtestLink,
playtestPlatform: state.playtestPlatform,
playtestInvites: state.playtestInvites,
messengerCommunityLink: state.messengerCommunityLink,
zaloGroupLink: state.zaloGroupLink,
}),
},
),
@@ -759,6 +797,28 @@ export function migrateEditorState(
? state.videoStyleEra
: "";
}
if (version < 15) {
// v0.30.0 Playtest section. Additive back-fill + defensive coercion.
if (typeof state.playtestLink !== "string") state.playtestLink = "";
if (
typeof state.playtestPlatform !== "string" ||
!PLAYTEST_PLATFORMS.some((p) => p.id === state.playtestPlatform)
) {
state.playtestPlatform = DEFAULT_PLAYTEST_PLATFORM;
}
const inv = state.playtestInvites;
state.playtestInvites =
typeof inv === "number" && Number.isInteger(inv) && inv >= 0
? Math.min(inv, PLAYTEST_MAX_INVITES_CAP)
: 0;
}
if (version < 16) {
// v0.32.0 Community links. Additive back-fill + defensive coercion.
if (typeof state.messengerCommunityLink !== "string") {
state.messengerCommunityLink = "";
}
if (typeof state.zaloGroupLink !== "string") state.zaloGroupLink = "";
}
return { ...initialState, ...state } as EditorData;
}
+3
View File
@@ -120,6 +120,9 @@ export interface TemplateSnapshot {
vnBankHolder?: string;
vnMomo?: string;
vnZalopay?: string;
/** Community invite links (v0.32.0). Optional for back-compat. */
messengerCommunityLink?: string;
zaloGroupLink?: string;
/** Channel-level third-party advertising copy (v0.11). Optional for
* back-compat with pre-v0.11 templates. */
thirdPartyAdText?: string;
+5 -2
View File
@@ -1,7 +1,10 @@
import { IS_TAURI } from "./platform";
import { IS_TAURI, IS_MOBILE } from "./platform";
export async function saveFile(content: string, filename: string): Promise<void> {
if (IS_TAURI) {
// On Android `IS_TAURI` is true, but the native save dialog + std::fs path
// write doesn't work under scoped storage — fall through to the blob
// download (lands in Downloads). Desktop keeps the native "Save As" dialog.
if (IS_TAURI && !IS_MOBILE) {
const { save } = await import("@tauri-apps/plugin-dialog");
const { invoke } = await import("@tauri-apps/api/core");
const path = await save({ defaultPath: filename });
+93
View File
@@ -0,0 +1,93 @@
import { IS_TAURI } from "./platform";
import { logger } from "./logger";
const EXTERNAL_SCHEME = /^(https?|mailto|tel):/i;
function isExternalHref(href: string | null | undefined): href is string {
return !!href && EXTERNAL_SCHEME.test(href);
}
/**
* Open an external URL from any platform.
*
* In a Tauri webview (desktop **and** Android) a plain `<a target="_blank">`
* does nothing useful — the webview has no tab/window manager. Route through
* the opener plugin instead, which dispatches the URL to the OS (system browser
* for http/https, mail client for mailto, dialer for tel). On the web build
* there is no Tauri runtime, so fall back to a normal new tab.
*/
export async function openExternal(url: string): Promise<void> {
if (IS_TAURI) {
try {
const { openUrl } = await import("@tauri-apps/plugin-opener");
await openUrl(url);
return;
} catch (e) {
logger.error("opener", `Failed to open external URL: ${url}`, String(e));
}
}
window.open(url, "_blank", "noopener,noreferrer");
}
/** Drop `target="_blank"` from an external anchor (see installExternalLinkHandler). */
function stripBlankTarget(el: Element): void {
if (
el.tagName === "A" &&
el.getAttribute("target") === "_blank" &&
isExternalHref(el.getAttribute("href"))
) {
el.removeAttribute("target");
}
}
function stripWithin(root: ParentNode): void {
if (root instanceof Element) stripBlankTarget(root);
root.querySelectorAll?.('a[target="_blank"]').forEach(stripBlankTarget);
}
/**
* Make external links work inside a Tauri (especially Android) webview.
*
* Two Android problems, both verified on a device:
* 1. A real tap on `<a target="_blank">` triggers the webview's native
* `onCreateWindow`, which Tauri tries to satisfy via the shell plugin's
* `open` — and there is no such binary on Android, so it throws an uncaught
* "Scoped shell IO error". JS `preventDefault` does NOT stop this native
* path, so we remove the `target="_blank"` attribute entirely (links are
* re-rendered by React, hence the MutationObserver).
* 2. Without `target="_blank"`, a click would navigate the app's *own*
* webview away from the UI — so we intercept the click in the **capture**
* phase (before the webview's default handling) and hand the URL to the
* opener plugin, which opens the system browser.
*
* No-op on the web build, where native `target="_blank"` already opens a new
* tab correctly.
*/
export function installExternalLinkHandler(): void {
if (!IS_TAURI) return;
// React mounts/re-renders links after this runs, so strip on every change.
stripWithin(document);
new MutationObserver((mutations) => {
for (const m of mutations) {
m.addedNodes.forEach((node) => {
if (node instanceof Element) stripWithin(node);
});
}
}).observe(document.documentElement, { childList: true, subtree: true });
// Capture phase: run before the webview's own navigation / new-window logic.
document.addEventListener(
"click",
(e) => {
if (e.defaultPrevented || e.button !== 0) return;
if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
const anchor = (e.target as Element | null)?.closest?.("a") ?? null;
const href = anchor?.getAttribute("href") ?? null;
if (!isExternalHref(href)) return;
e.preventDefault();
void openExternal(href);
},
true,
);
}
+9
View File
@@ -2,3 +2,12 @@
// context (vitest's node environment) — no `window` means no Tauri.
export const IS_TAURI =
typeof window !== "undefined" && "__TAURI_INTERNALS__" in window;
// True inside the Android WebView. On Android, Tauri still injects
// `__TAURI_INTERNALS__` (so `IS_TAURI` is true), but the desktop file-save
// dialog + `std::fs` write to an arbitrary path is unreliable under Android's
// scoped storage. Use this to route file EXPORT through the in-WebView blob
// download instead. Desktop and web both report false here, so existing
// branches are unaffected. iOS is out of scope (we only ship Android).
export const IS_MOBILE =
typeof navigator !== "undefined" && /Android/i.test(navigator.userAgent);
+32 -1
View File
@@ -1,3 +1,34 @@
/**
* Generate a RFC 4122 v4 UUID.
*
* `crypto.randomUUID()` is the fast path, but it only exists in Chrome/WebView
* **92+** — older Android System WebViews (e.g. the Chromium 91 that ships with
* some emulator images, or any device whose WebView hasn't been updated) don't
* have it. Because `generateId()` runs at module load (e.g. the log store's
* `CURRENT_SESSION_ID`), an unguarded `crypto.randomUUID()` would throw during
* boot and black-screen the whole app on those WebViews. Fall back to a manual
* v4 built on `crypto.getRandomValues` (present since Chrome 11), and finally
* `Math.random` only if even that is missing.
*/
export function generateId(): string {
return crypto.randomUUID();
const c: Crypto | undefined =
typeof globalThis !== "undefined" ? globalThis.crypto : undefined;
if (c && typeof c.randomUUID === "function") {
return c.randomUUID();
}
const bytes = new Uint8Array(16);
if (c && typeof c.getRandomValues === "function") {
c.getRandomValues(bytes);
} else {
for (let i = 0; i < 16; i++) bytes[i] = Math.floor(Math.random() * 256);
}
// RFC 4122 §4.4: set the version (4) and variant (10xx) bits.
// (`?? 0` only satisfies noUncheckedIndexedAccess — index 6/8 always exist.)
bytes[6] = ((bytes[6] ?? 0) & 0x0f) | 0x40;
bytes[8] = ((bytes[8] ?? 0) & 0x3f) | 0x80;
const hex = Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("");
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
}
+134
View File
@@ -136,3 +136,137 @@ export function validatePlaylistUrl(input: string): ValidationResult {
return { valid: true };
}
/**
* Strict validators for community-invite links (v0.32.0).
*
* - Messenger community: `https://m.me/<id>` — the id is a page username or
* numeric page id. Non-`m.me` URLs are hard-rejected so a broken invite
* never reaches the description.
* - Zalo group: `https://zalo.me/g/<code>` — the `/g/` path is the group
* join link, distinct from a personal `zalo.me/<phone>` profile. Only
* rendered for Vietnamese output, but validated regardless of language.
*/
const MESSENGER_URL_REGEX = /^https:\/\/m\.me\/[A-Za-z0-9._-]+$/;
const MESSENGER_URL_EXPECTED = "https://m.me/[id]";
const ZALO_GROUP_URL_REGEX = /^https:\/\/zalo\.me\/g\/[A-Za-z0-9]+$/;
const ZALO_GROUP_URL_EXPECTED = "https://zalo.me/g/[id]";
export function validateMessengerUrl(input: string): ValidationResult {
const trimmed = input.trim();
if (!trimmed) return { valid: true };
const baseResult = validateUrl(trimmed);
if (!baseResult.valid) return baseResult;
if (!MESSENGER_URL_REGEX.test(trimmed)) {
return {
valid: false,
error: "validation.messengerUrlInvalid",
errorParams: { expected: MESSENGER_URL_EXPECTED },
};
}
return { valid: true };
}
export function validateZaloGroupUrl(input: string): ValidationResult {
const trimmed = input.trim();
if (!trimmed) return { valid: true };
const baseResult = validateUrl(trimmed);
if (!baseResult.valid) return baseResult;
if (!ZALO_GROUP_URL_REGEX.test(trimmed)) {
return {
valid: false,
error: "validation.zaloUrlInvalid",
errorParams: { expected: ZALO_GROUP_URL_EXPECTED },
};
}
return { valid: true };
}
export interface IntRangeOptions {
min: number;
max: number;
/** When true, an empty / whitespace-only string is valid (the field is
* optional). When false, blank is rejected as `validation.numberRequired`. */
allowEmpty?: boolean;
}
/**
* Validate that a string holds a whole number within `[min, max]`.
* Rejects (in order) blank-when-required, non-numeric, decimals /
* non-integers, and out-of-range values — covering every "invalid number"
* case the editor needs to warn on (v0.30.0). Pure; returns the shared
* {@link ValidationResult} so it slots into the existing inline-error UI.
*/
export function validateIntegerInRange(
input: string,
{ min, max, allowEmpty = false }: IntRangeOptions,
): ValidationResult {
const trimmed = input.trim();
if (!trimmed) {
return allowEmpty ? { valid: true } : { valid: false, error: "validation.numberRequired" };
}
const n = Number(trimmed);
if (!Number.isFinite(n)) {
return { valid: false, error: "validation.numberInvalid" };
}
if (!Number.isInteger(n)) {
return { valid: false, error: "validation.numberNotInteger" };
}
if (n < min || n > max) {
return {
valid: false,
error: "validation.numberOutOfRange",
errorParams: { min, max },
};
}
return { valid: true };
}
export interface BatchRangeOptions {
/** Maximum number of parts allowed in a single batch (inclusive span). */
maxSpan: number;
}
/**
* Validate a Batch / Social-bulk "start → end part" range. Both endpoints
* must be whole numbers ≥ 1, `end ≥ start`, and the inclusive span must not
* exceed `maxSpan`. Returns the first failing reason so the caller can both
* block generation (disable the button) and surface the message. v0.30.0.
*/
export function validateBatchRange(
startStr: string,
endStr: string,
{ maxSpan }: BatchRangeOptions,
): ValidationResult {
const startResult = validateIntegerInRange(startStr, { min: 1, max: Number.MAX_SAFE_INTEGER });
if (!startResult.valid) return startResult;
const endResult = validateIntegerInRange(endStr, { min: 1, max: Number.MAX_SAFE_INTEGER });
if (!endResult.valid) return endResult;
const start = Number(startStr.trim());
const end = Number(endStr.trim());
if (end < start) {
return {
valid: false,
error: "validation.rangeEndBeforeStart",
errorParams: { start, end },
};
}
if (end - start + 1 > maxSpan) {
return {
valid: false,
error: "validation.rangeTooLarge",
errorParams: { maxSpan },
};
}
return { valid: true };
}
+231
View File
@@ -163,6 +163,90 @@ describe("buildDescription", () => {
expect(result).not.toContain("(free)");
});
it("includes the playtest block with platform label + link when a link is set (v0.30.0)", () => {
const t = createMockT("en");
const result = buildDescription(
makeInput({
playtestLink: "https://store.steampowered.com/app/1245620",
playtestPlatform: "steam",
playtestInvites: 25,
}),
t,
);
expect(result).toContain("🧪 PLAYTEST / EARLY ACCESS");
expect(result).toContain(
"🧪 Steam Playtest: https://store.steampowered.com/app/1245620",
);
expect(result).toContain("25 invites available");
});
it("omits the playtest block entirely when no link is set", () => {
const t = createMockT("en");
const result = buildDescription(
makeInput({ playtestPlatform: "steam", playtestInvites: 25 }),
t,
);
expect(result).not.toContain("PLAYTEST / EARLY ACCESS");
});
it("omits the invites line when the count is 0", () => {
const t = createMockT("en");
const result = buildDescription(
makeInput({
playtestLink: "https://dev.itch.io/my-game",
playtestPlatform: "itchio",
playtestInvites: 0,
}),
t,
);
expect(result).toContain("🧪 PLAYTEST / EARLY ACCESS");
expect(result).not.toContain("invites available");
});
it("guards the invites line against non-integer / negative counts", () => {
const t = createMockT("en");
const decimal = buildDescription(
makeInput({
playtestLink: "https://store.steampowered.com/app/1",
playtestInvites: 2.5,
}),
t,
);
expect(decimal).not.toContain("invites available");
const negative = buildDescription(
makeInput({
playtestLink: "https://store.steampowered.com/app/1",
playtestInvites: -3,
}),
t,
);
expect(negative).not.toContain("invites available");
});
it("falls back to the raw platform id when the platform is unknown", () => {
const t = createMockT("en");
const result = buildDescription(
makeInput({
playtestLink: "https://example.com/signup",
playtestPlatform: "mystery",
}),
t,
);
expect(result).toContain("🧪 mystery: https://example.com/signup");
});
it("renders the localized playtest heading in Vietnamese", () => {
const t = createMockT("vi");
const result = buildDescription(
makeInput({
language: "vi",
playtestLink: "https://store.steampowered.com/app/1",
}),
t,
);
expect(result).toContain("🧪 PLAYTEST / TRẢI NGHIỆM SỚM");
});
it("includes video settings with the v0.8-polish multi-line block", () => {
const t = createMockT("en");
const result = buildDescription(
@@ -449,6 +533,75 @@ describe("buildDescription", () => {
expect(result).not.toContain("💸 MoMo");
});
it("renders the community block with the Messenger line for any language (v0.32.0)", () => {
const t = createMockT("en");
const result = buildDescription(
makeInput({ messengerCommunityLink: "https://m.me/mychannel" }),
t,
);
expect(result).toContain("💬 COMMUNITY / JOIN THE GROUP");
expect(result).toContain("💬 Messenger: https://m.me/mychannel");
expect(result).not.toContain("💙 Zalo");
});
it("renders the Zalo group line when language is 'vi' (v0.32.0)", () => {
const t = createMockT("en");
const result = buildDescription(
makeInput({
language: "vi",
messengerCommunityLink: "https://m.me/mychannel",
zaloGroupLink: "https://zalo.me/g/abc123",
}),
t,
);
expect(result).toContain("💬 Messenger: https://m.me/mychannel");
expect(result).toContain("💙 Zalo: https://zalo.me/g/abc123");
});
it("never renders the Zalo group line when language is not 'vi', even if set (v0.32.0)", () => {
const t = createMockT("en");
const result = buildDescription(
makeInput({
language: "en",
messengerCommunityLink: "https://m.me/mychannel",
zaloGroupLink: "https://zalo.me/g/abc123",
}),
t,
);
// Messenger is language-agnostic and still renders…
expect(result).toContain("💬 Messenger: https://m.me/mychannel");
// …but the Zalo line is gated to Vietnamese output.
expect(result).not.toContain("💙 Zalo");
expect(result).not.toContain("zalo.me/g/abc123");
});
it("omits the community block entirely when it would be empty (v0.32.0)", () => {
const t = createMockT("en");
// Zalo is set but the output language is English and there's no
// Messenger link → the block has no eligible lines and is skipped.
const result = buildDescription(
makeInput({ language: "en", zaloGroupLink: "https://zalo.me/g/abc123" }),
t,
);
expect(result).not.toContain("COMMUNITY / JOIN THE GROUP");
expect(result).not.toContain("💬 Messenger");
expect(result).not.toContain("💙 Zalo");
});
it("localizes the community heading for Vietnamese output (v0.32.0)", () => {
const t = createMockT("vi");
const result = buildDescription(
makeInput({
language: "vi",
messengerCommunityLink: "https://m.me/mychannel",
zaloGroupLink: "https://zalo.me/g/abc123",
}),
t,
);
expect(result).toContain("CỘNG ĐỒNG / THAM GIA NHÓM");
expect(result).toContain("💙 Zalo: https://zalo.me/g/abc123");
});
it("renders the Mod List block when videoType is 'mods' and modList is non-empty", () => {
const t = createMockT("en");
const modList = "• Requiem\n• NaturalVision Evolved\n• Custom Skinpack v2.1";
@@ -1498,6 +1651,84 @@ describe("buildDescription — translation quality notice (v0.24.0)", () => {
});
});
describe("buildDescription — bilingualContentBlocks gate (v0.29.3)", () => {
it("multi-language tabs: content blocks single-language but translation-quality stays bilingual", () => {
const t = createMockT("ja");
const tEn = createMockT("en");
const result = buildDescription(
makeInput({
language: "ja",
contentWarnings: ["flashing_lights"],
techNotes: ["fps_drops_hardware"],
playthroughStatus: "blind",
}),
t,
{ tEn, bilingualContentBlocks: false, showTranslationQuality: true },
);
// Content warnings: JA-only header + no EN pairing.
expect(result).toContain("▸ ⚠️ コンテンツ警告");
expect(result).not.toContain("▸ ⚠️ CONTENT WARNINGS");
expect(result).not.toContain(
"Flashing lights — photosensitive viewers take care",
);
// Tech notes: JA-only header + no EN pairing.
expect(result).toContain("▸ 🛠 技術メモ");
expect(result).not.toContain("▸ 🛠 TECH NOTES");
expect(result).not.toContain(
"FPS drops — caused by hardware (FPS counter visible top-left)",
);
// Playthrough notes: JA-only header + no EN pairing.
expect(result).toContain("▸ 🎮 プレイ情報");
expect(result).not.toContain("▸ 🎮 PLAYTHROUGH NOTES");
// Translation-quality disclaimer: STILL bilingual (the v0.29.2 goal).
expect(result).toContain("ABOUT THIS TRANSLATION"); // EN header via tEn
expect(result).toContain("翻訳について"); // JA header — proves bilingual
});
it("multi-language tabs: content warnings render single-language with no `· ` separator", () => {
const t = createMockT("vi");
const tEn = createMockT("en");
const result = buildDescription(
makeInput({
language: "vi",
contentWarnings: ["jump_scares", "flashing_lights"],
}),
t,
{ tEn, bilingualContentBlocks: false },
);
expect(result).not.toContain(" · ");
expect(result).toContain("▸ ⚠️ CẢNH BÁO NỘI DUNG");
expect(result).not.toContain("▸ ⚠️ CONTENT WARNINGS");
expect(result).toContain("• Có jumpscare");
});
it("single-language mode (default true): content warnings stay bilingual", () => {
const t = createMockT("vi");
const tEn = createMockT("en");
const result = buildDescription(
makeInput({ language: "vi", contentWarnings: ["jump_scares"] }),
t,
{ tEn }, // bilingualContentBlocks omitted → defaults to true
);
expect(result).toContain("▸ ⚠️ CONTENT WARNINGS / ▸ ⚠️ CẢNH BÁO NỘI DUNG");
expect(result).toContain("• Jumpscares · Có jumpscare");
});
it("explicit bilingualContentBlocks:true matches the default", () => {
const t = createMockT("vi");
const tEn = createMockT("en");
const base = makeInput({
language: "vi",
contentWarnings: ["jump_scares"],
techNotes: ["fps_drops_hardware"],
playthroughStatus: "blind",
});
const a = buildDescription(base, t, { tEn });
const b = buildDescription(base, t, { tEn, bilingualContentBlocks: true });
expect(a).toBe(b);
});
});
describe("checkDescriptionWarning", () => {
it("returns null for description under limit", () => {
expect(checkDescriptionWarning("Short description")).toBeNull();
Loaded 100 of 106 files, more files were not shown because too many files have changed in this diff. Show more