From ebb819eec9f4a3a8df2e4664f912b7ab3a111eee Mon Sep 17 00:00:00 2001 From: poli0981 <127664709+poli0981@users.noreply.github.com> Date: Mon, 11 May 2026 21:30:39 +0700 Subject: [PATCH] =?UTF-8?q?feat(v0.13.1):=20hotfix=20bundle=20=E2=80=94=20?= =?UTF-8?q?workflows,=20donate/dev=20surfaces,=20SEO,=20horror=20warnings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - workflows: narrow notify-* triggers to specific producer names so non-matching workflow_run events don't instantiate a run (kills the Actions tab Skipped spam) - workflows: auto-link each published release to a GitHub Discussion under Announcements via a new link-discussion job before the Discord announce - repo: add FUNDING.yml + ISSUE_TEMPLATE/{config,bug_report,feature_request}.yml - docs: add docs/pc_spec.md, docs/dev_env.md (+ VI mirrors) and webapp/TAURI.md - about: restructure AboutPage with Donate / Dev Environment sections, expanded socials (Bluesky, Mastodon, Steam, Telegram bot+user, email, game Discord); Ko-fi / Patreon moved from ABOUT.socials to new @config/donate - header: persistent Donate button (Ko-fi) left of the language switcher - sidebar: external Report Bug item linking directly to the bug_report template - seo: full metadata (description, OG, Twitter card, JSON-LD WebApplication, 6 locale alternates), per-route useDocumentTitle hook applied to all 9 pages, robots.txt, sitemap.xml, manifest.webmanifest, placeholder favicon.svg - warnings: new "horror_specific" group with 7 IDs (eye_horror, body_horror, face_horror, cosmic_horror, extreme_gore, decay_rot, mutilation), localized to en/vi/ja/es/ko/zh in both ui.json and templates.json Additive only — no breaking changes to the engine, store schema, or persisted content-warning IDs. _schema.json updated to reflect new keys. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/FUNDING.yml | 6 + .github/ISSUE_TEMPLATE/bug_report.yml | 99 ++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 8 ++ .github/ISSUE_TEMPLATE/feature_request.yml | 48 +++++++ .github/workflows/announce-release.yml | 24 +++- .github/workflows/notify-ci-failure.yml | 4 +- .github/workflows/notify-deploy.yml | 5 +- .github/workflows/notify-release-pipeline.yml | 5 +- docs/dev_env.md | 46 +++++++ docs/i18n/vi/dev_env.md | 46 +++++++ docs/i18n/vi/pc_spec.md | 39 ++++++ docs/pc_spec.md | 40 ++++++ index.html | 65 +++++++++- package.json | 2 +- public/favicon.svg | 5 + public/manifest.webmanifest | 32 +++++ public/robots.txt | 3 + public/sitemap.xml | 8 ++ .../editor/ContentWarningChecklist.tsx | 1 + src/components/layout/Header.tsx | 17 ++- src/components/layout/Sidebar.tsx | 76 ++++++++--- src/config/about.ts | 16 ++- src/config/content-warning-groups.ts | 13 ++ src/config/donate.ts | 22 ++++ src/engine/types.ts | 8 ++ src/hooks/use-document-title.ts | 19 +++ src/i18n/locales/_schema.json | 22 +++- src/i18n/locales/en/templates.json | 9 +- src/i18n/locales/en/ui.json | 52 +++++++- src/i18n/locales/es/templates.json | 9 +- src/i18n/locales/es/ui.json | 52 +++++++- src/i18n/locales/ja/templates.json | 9 +- src/i18n/locales/ja/ui.json | 52 +++++++- src/i18n/locales/ko/templates.json | 9 +- src/i18n/locales/ko/ui.json | 52 +++++++- src/i18n/locales/vi/templates.json | 9 +- src/i18n/locales/vi/ui.json | 52 +++++++- src/i18n/locales/zh/templates.json | 9 +- src/i18n/locales/zh/ui.json | 52 +++++++- src/pages/AboutPage.tsx | 122 ++++++++++++++++-- src/pages/BatchPage.tsx | 2 + src/pages/EditorPage.tsx | 2 + src/pages/HistoryPage.tsx | 2 + src/pages/LogPage.tsx | 2 + src/pages/OutputPage.tsx | 2 + src/pages/PlaylistPage.tsx | 2 + src/pages/ProfilesPage.tsx | 2 + src/pages/SettingsPage.tsx | 2 + webapp/TAURI.md | 69 ++++++++++ 49 files changed, 1162 insertions(+), 90 deletions(-) create mode 100644 .github/FUNDING.yml create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 docs/dev_env.md create mode 100644 docs/i18n/vi/dev_env.md create mode 100644 docs/i18n/vi/pc_spec.md create mode 100644 docs/pc_spec.md create mode 100644 public/favicon.svg create mode 100644 public/manifest.webmanifest create mode 100644 public/robots.txt create mode 100644 public/sitemap.xml create mode 100644 src/config/donate.ts create mode 100644 src/hooks/use-document-title.ts create mode 100644 webapp/TAURI.md diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..1ff3618 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,6 @@ +github: poli0981 +ko_fi: skullmute +buy_me_a_coffee: skullmute +patreon: skullmute +custom: + - paypal.me/DungDang212 diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..94fb863 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,99 @@ +name: Bug report +description: Something is broken or behaving unexpectedly. +title: "[Bug]: " +labels: ["bug", "triage"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to file a bug. Please fill in as much detail as you can — + a clear reproduction is the difference between a fix today and a fix in 3 weeks. + - type: input + id: version + attributes: + label: App version + description: From the About page or the title bar. Example `v0.13.0`. + placeholder: v0.13.0 + validations: + required: true + - type: dropdown + id: surface + attributes: + label: Where are you running YTDescGen? + options: + - Web (GitHub Pages) + - Desktop — Windows (Tauri) + - Desktop — macOS (Tauri) + - Desktop — Linux (Tauri) + - Local dev (npm run dev) + validations: + required: true + - type: input + id: os + attributes: + label: Operating system + description: e.g. Windows 11 25H2, macOS 14.6, Ubuntu 24.04 + validations: + required: true + - type: input + id: browser + attributes: + label: Browser (web only) + description: e.g. Chrome 131, Brave 1.70, Safari 17. Leave blank for desktop. + - type: dropdown + id: language + attributes: + label: App language at the time of the bug + options: + - English (en) + - Tiếng Việt (vi) + - 日本語 (ja) + - Español (es) + - 한국어 (ko) + - 中文 (zh) + validations: + required: true + - type: textarea + id: repro + attributes: + label: Steps to reproduce + description: Numbered steps. Include the exact inputs that triggered the bug. + placeholder: | + 1. Open Editor + 2. Pick genre "Survival Horror" + 3. Toggle "eye_horror" warning + 4. Click Generate + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected behavior + validations: + required: true + - type: textarea + id: actual + attributes: + label: Actual behavior + validations: + required: true + - type: textarea + id: console + attributes: + label: Console / log output + description: Open DevTools (web) or the log panel (desktop) and paste any errors. Rendered as code. + render: shell + - type: textarea + id: screenshots + attributes: + label: Screenshots / screen recording (optional) + description: Drag and drop images or videos here. + - type: checkboxes + id: checks + attributes: + label: Pre-flight checks + options: + - label: I searched existing issues and this is not a duplicate. + required: true + - label: I'm on the latest released version (or noted my older version above). + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..05b593b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +blank_issues_enabled: false +contact_links: + - name: Discord — General chat + url: https://discord.gg/2aNR3aVt + about: For casual questions, gameplay chat, or quick help. Use a bug report or feature request for anything actionable. + - name: GitHub Discussions + url: https://github.com/poli0981/youtube-generator/discussions + about: Ideas, Q&A, and release announcements live here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..f832300 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,48 @@ +name: Feature request +description: Suggest a new feature or improvement. +title: "[Feature]: " +labels: ["enhancement", "triage"] +body: + - type: textarea + id: problem + attributes: + label: Problem + description: What pain point or workflow gap are you running into today? + validations: + required: true + - type: textarea + id: proposal + attributes: + label: Proposed solution + description: What should YTDescGen do? Be concrete — UI sketch, example output, etc. + validations: + required: true + - type: textarea + id: alternatives + attributes: + label: Alternatives considered + description: Other approaches you thought about and why you ruled them out. + - type: dropdown + id: scope + attributes: + label: Scope + description: Which surfaces does this affect? + multiple: true + options: + - Editor + - Output / preview + - Profiles / presets + - Templates (description, title, tags) + - i18n / locales + - Settings + - Desktop (Tauri) + - Documentation + validations: + required: true + - type: checkboxes + id: checks + attributes: + label: Pre-flight checks + options: + - label: I searched existing issues and this is not a duplicate. + required: true diff --git a/.github/workflows/announce-release.yml b/.github/workflows/announce-release.yml index 392e871..a7c683a 100644 --- a/.github/workflows/announce-release.yml +++ b/.github/workflows/announce-release.yml @@ -10,13 +10,31 @@ on: required: true type: string -# Reusable announce-release.yml only needs `contents: read` to fetch -# release metadata via the gh CLI. +# `link-discussion` needs `contents: write` (to edit the release) and +# `discussions: write` (so GitHub auto-creates the linked Discussion under +# the configured category). The reusable announce job only needs read. permissions: - contents: read + contents: write + discussions: write jobs: + link-discussion: + runs-on: ubuntu-latest + steps: + - name: Link release to Announcements discussion + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Setting --discussion-category on a published release causes + # GitHub to auto-create the linked Discussion. Requires the + # repo to have Discussions enabled with an "Announcements" + # category (configured manually under repo Settings). + run: | + gh release edit "${{ github.event.release.tag_name || inputs.tag }}" \ + --repo "${{ github.repository }}" \ + --discussion-category "Announcements" + announce: + needs: link-discussion uses: poli0981/.github/.github/workflows/announce-release.yml@main with: tag_override: ${{ inputs.tag || '' }} diff --git a/.github/workflows/notify-ci-failure.yml b/.github/workflows/notify-ci-failure.yml index a450438..e09bb66 100644 --- a/.github/workflows/notify-ci-failure.yml +++ b/.github/workflows/notify-ci-failure.yml @@ -2,7 +2,9 @@ name: Notify CI Failures on: workflow_run: - workflows: ["*"] + # Match the exact `name:` of the CI workflow (.github/workflows/ci.yml). + # Renaming CI silently breaks this filter — keep them in sync. + workflows: ["CI"] types: [completed] # REQUIRED: declare permissions matching the reusable workflow's needs. diff --git a/.github/workflows/notify-deploy.yml b/.github/workflows/notify-deploy.yml index df2f7b4..e16c3bc 100644 --- a/.github/workflows/notify-deploy.yml +++ b/.github/workflows/notify-deploy.yml @@ -2,7 +2,10 @@ name: Notify Deploy Status on: workflow_run: - workflows: ["*"] + # Match the exact `name:` of the deploy workflow + # (.github/workflows/deploy-web.yml). Renaming it silently breaks this + # filter — keep them in sync. + workflows: ["Deploy to GitHub Pages"] types: [completed] permissions: diff --git a/.github/workflows/notify-release-pipeline.yml b/.github/workflows/notify-release-pipeline.yml index 6daf133..aeb2763 100644 --- a/.github/workflows/notify-release-pipeline.yml +++ b/.github/workflows/notify-release-pipeline.yml @@ -2,7 +2,10 @@ name: Notify Release Pipeline on: workflow_run: - workflows: ["*"] + # Match the exact `name:` of the release-pipeline producers + # (release-desktop.yml + announce-release.yml). Renaming either silently + # breaks this filter — keep them in sync. + workflows: ["Release Desktop", "Announce Release to Discord"] types: [completed] permissions: diff --git a/docs/dev_env.md b/docs/dev_env.md new file mode 100644 index 0000000..c966a62 --- /dev/null +++ b/docs/dev_env.md @@ -0,0 +1,46 @@ +# Development environment + +What we install on a fresh box to be productive on YTDescGen. Hardware spec +lives in [`pc_spec.md`](pc_spec.md); this file is the toolchain side. + +## Editors + +- **JetBrains 2026.x** (paid lineup) — PyCharm, WebStorm, RustRover, Rider. +- **VS Code** — for quick edits, markdown preview, and shared remote sessions. + +Pick whichever feels right for the file; both share the project's ESLint / +Prettier / TypeScript config out of the box. + +## Toolchains + +| Tool | Version | Notes | +|--------|-------------------|-------| +| Node.js | ≥ 25.8.1 | Required for Vite 5 + Vitest 2. Use `nvm` / `volta` if pinning. | +| Python | 3.12 | Used by tooling scripts under `scripts/`. | +| Rust | stable (`rustup`) | Required for Tauri 2 desktop builds. | +| Git | recent | Any version with SSH + Sparse Checkout support. | + +## Git hygiene + +- `commit.gpgsign = true` — all commits are GPG-signed. +- Branch model: `main` (stable) ← `dev` (integration) ← `feat/*`. +- Commit message format: `type(scope): message` — see [`../CLAUDE.md`](../CLAUDE.md). + +## Common commands + +See [`../CLAUDE.md`](../CLAUDE.md) for the full list. Day-to-day: + +```bash +npm install # first time +npm run dev # Vite dev server +npm run typecheck # tsc --noEmit +npm run test # Vitest watch +npm run validate:locales +npm run tauri dev # desktop shell against the dev server +``` + +## Companion docs + +- [`pc_spec.md`](pc_spec.md) — hardware reference. +- [`../webapp/TAURI.md`](../webapp/TAURI.md) — Tauri 2 build prerequisites per platform. +- [`i18n/vi/dev_env.md`](i18n/vi/dev_env.md) — Vietnamese mirror. diff --git a/docs/i18n/vi/dev_env.md b/docs/i18n/vi/dev_env.md new file mode 100644 index 0000000..9102ee7 --- /dev/null +++ b/docs/i18n/vi/dev_env.md @@ -0,0 +1,46 @@ +# Môi trường phát triển + +Những thứ cần cài trên máy mới để làm việc với YTDescGen. Phần phần cứng +ở [`pc_spec.md`](pc_spec.md); file này tập trung vào toolchain. + +## Editor + +- **JetBrains 2026.x** (bản trả phí) — PyCharm, WebStorm, RustRover, Rider. +- **VS Code** — cho chỉnh sửa nhanh, xem trước markdown, và pair session. + +Chọn editor phù hợp với từng file; cả hai đều dùng chung cấu hình +ESLint / Prettier / TypeScript của project. + +## Toolchain + +| Công cụ | Phiên bản | Ghi chú | +|---------|--------------------|---------| +| Node.js | ≥ 25.8.1 | Cần cho Vite 5 + Vitest 2. Nên dùng `nvm` / `volta` để pin version. | +| Python | 3.12 | Phục vụ các script trong `scripts/`. | +| Rust | stable (`rustup`) | Cần cho build desktop Tauri 2. | +| Git | bản mới | Phiên bản nào hỗ trợ SSH + Sparse Checkout đều dùng được. | + +## Quy ước Git + +- `commit.gpgsign = true` — mọi commit đều được GPG-sign. +- Mô hình branch: `main` (stable) ← `dev` (integration) ← `feat/*`. +- Format commit message: `type(scope): message` — xem [`../../../CLAUDE.md`](../../../CLAUDE.md). + +## Lệnh hay dùng + +Xem [`../../../CLAUDE.md`](../../../CLAUDE.md) để có danh sách đầy đủ. Hàng ngày: + +```bash +npm install # lần đầu +npm run dev # Vite dev server +npm run typecheck # tsc --noEmit +npm run test # Vitest watch +npm run validate:locales +npm run tauri dev # shell desktop chạy đè lên dev server +``` + +## Tài liệu liên quan + +- [`pc_spec.md`](pc_spec.md) — phần cứng (tiếng Việt). +- [`../../../webapp/TAURI.md`](../../../webapp/TAURI.md) — yêu cầu build Tauri 2 theo nền tảng. +- [`../../dev_env.md`](../../dev_env.md) — bản gốc tiếng Anh. diff --git a/docs/i18n/vi/pc_spec.md b/docs/i18n/vi/pc_spec.md new file mode 100644 index 0000000..f6f2cd4 --- /dev/null +++ b/docs/i18n/vi/pc_spec.md @@ -0,0 +1,39 @@ +# Máy phát triển + +Cấu hình tham chiếu cho máy dev chính của YTDescGen — bản web public, các +binary Tauri desktop, và video demo ghi hình đều đến từ máy này. Xem +[`dev_env.md`](dev_env.md) cho phần IDE + toolchain, và +[`../../pc_spec.md`](../../pc_spec.md) cho bản gốc tiếng Anh. + +## Máy chính + +| Thành phần | Chi tiết | +|------------|----------| +| OS | Windows 11 Pro 25H2 Insider Preview (Dev Channel) | +| Build | 26300.8376 | +| CPU | Intel Core i7-14700KF | +| GPU | NVIDIA GeForce RTX 5080 (16 GB VRAM) | +| RAM | 32 GB DDR5 | +| Lưu trữ | 1 TB SSD | +| IDE | JetBrains bản trả phí, 2026.x — PyCharm, WebStorm, RustRover, Rider — cộng thêm VS Code | + +## Điện thoại kiểm thử bản web + +Bản web được smoke-test trên Safari và các trình duyệt Chromium trên các +máy sau: + +- iPhone 14 Pro (iOS 26.x) +- iPhone 13 Pro Max (iOS 26.x) +- Trình duyệt: Chrome, Brave + +## Vì sao cần ghi rõ + +Hiệu năng render, style scrollbar, và sidebar `position: sticky` của editor +hoạt động hơi khác giữa Safari mobile và Chromium desktop. Mọi thay đổi UI +được smoke-test trên các điện thoại liệt kê ở trên trước khi ship. + +## Tài liệu liên quan + +- [`dev_env.md`](dev_env.md) — bảng IDE + toolchain (tiếng Việt). +- [`../../../webapp/TAURI.md`](../../../webapp/TAURI.md) — yêu cầu build Tauri desktop. +- [`../../pc_spec.md`](../../pc_spec.md) — bản gốc tiếng Anh. diff --git a/docs/pc_spec.md b/docs/pc_spec.md new file mode 100644 index 0000000..d0de944 --- /dev/null +++ b/docs/pc_spec.md @@ -0,0 +1,40 @@ +# Developer Machine + +Reference hardware spec for the primary YTDescGen developer workstation. This +is the box the public web build, the desktop Tauri binaries, and the recorded +demo videos all come off of. See [`dev_env.md`](dev_env.md) for the IDE + +language toolchain side of the same setup, and [`i18n/vi/pc_spec.md`](i18n/vi/pc_spec.md) +for the Vietnamese mirror. + +## Primary workstation + +| Component | Details | +|-----------|---------| +| OS | Windows 11 Pro 25H2 Insider Preview (Dev Channel) | +| Build | 26300.8376 | +| CPU | Intel Core i7-14700KF | +| GPU | NVIDIA GeForce RTX 5080 (16 GB VRAM) | +| RAM | 32 GB DDR5 | +| Storage | 1 TB SSD | +| IDE | JetBrains paid lineup, 2026.x — PyCharm, WebStorm, RustRover, Rider — plus VS Code | + +## Mobile devices used for web QA + +We check the web build on Safari and Chromium browsers on these phones: + +- iPhone 14 Pro (iOS 26.x) +- iPhone 13 Pro Max (iOS 26.x) +- Browsers: Chrome, Brave + +## Why this matters + +Render performance, scrollbar styling, and the `position: sticky` editor +sidebar all behave subtly differently on mobile Safari than on desktop +Chromium. Anything UI-heavy gets smoke-tested on the listed phones before it +ships. + +## Companion docs + +- [`dev_env.md`](dev_env.md) — IDE + toolchain table. +- [`../webapp/TAURI.md`](../webapp/TAURI.md) — desktop build prerequisites. +- [`i18n/vi/pc_spec.md`](i18n/vi/pc_spec.md) — Vietnamese mirror. diff --git a/index.html b/index.html index 529d27e..132b498 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,70 @@ - YTDescGen + + + + YTDescGen — YouTube Title, Description & Tag Generator for Gameplay Channels + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/package.json b/package.json index 6a4ec14..21253c0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yt-desc-gen", - "version": "0.13.0", + "version": "0.13.1", "private": true, "type": "module", "scripts": { diff --git a/public/favicon.svg b/public/favicon.svg new file mode 100644 index 0000000..f8fe969 --- /dev/null +++ b/public/favicon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/manifest.webmanifest b/public/manifest.webmanifest new file mode 100644 index 0000000..ad283f9 --- /dev/null +++ b/public/manifest.webmanifest @@ -0,0 +1,32 @@ +{ + "name": "YTDescGen", + "short_name": "YTDescGen", + "description": "YouTube title, description, and tag generator for Gameplay No Commentary channels.", + "start_url": "/youtube-generator/", + "scope": "/youtube-generator/", + "display": "standalone", + "background_color": "#0a0a0a", + "theme_color": "#0a0a0a", + "lang": "en", + "categories": ["productivity", "utilities", "multimedia"], + "icons": [ + { + "src": "favicon.svg", + "sizes": "any", + "type": "image/svg+xml", + "purpose": "any" + }, + { + "src": "icon-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "any maskable" + }, + { + "src": "icon-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "any maskable" + } + ] +} diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..582c322 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,3 @@ +User-agent: * +Allow: / +Sitemap: https://poli0981.github.io/youtube-generator/sitemap.xml diff --git a/public/sitemap.xml b/public/sitemap.xml new file mode 100644 index 0000000..75a63a7 --- /dev/null +++ b/public/sitemap.xml @@ -0,0 +1,8 @@ + + + + https://poli0981.github.io/youtube-generator/ + weekly + 1.0 + + diff --git a/src/components/editor/ContentWarningChecklist.tsx b/src/components/editor/ContentWarningChecklist.tsx index bc550ba..eaf2c9c 100644 --- a/src/components/editor/ContentWarningChecklist.tsx +++ b/src/components/editor/ContentWarningChecklist.tsx @@ -32,6 +32,7 @@ export function ContentWarningChecklist() { phobias: false, mental_health: false, sensitive: false, + horror_specific: false, })); const trimmedQuery = query.trim().toLowerCase(); diff --git a/src/components/layout/Header.tsx b/src/components/layout/Header.tsx index 644602f..347a694 100644 --- a/src/components/layout/Header.tsx +++ b/src/components/layout/Header.tsx @@ -1,8 +1,9 @@ import { useState, useRef, useEffect } from "react"; import { useTranslation } from "react-i18next"; -import { ChevronDown } from "lucide-react"; +import { ChevronDown, Heart } from "lucide-react"; import { SUPPORTED_LANGUAGES } from "@i18n/index"; import { useSettingsStore } from "@store/settings-store"; +import { PRIMARY_DONATE_URL } from "@config/donate"; import type { SupportedLanguage } from "@engine/types"; import clsx from "clsx"; @@ -37,7 +38,18 @@ export function Header() {

{t("app.title")}

{t("app.subtitle")}

-
+
+ + + {t("header.donate")} + +
)} +
); diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx index aa3e4b6..b72e97a 100644 --- a/src/components/layout/Sidebar.tsx +++ b/src/components/layout/Sidebar.tsx @@ -10,13 +10,23 @@ import { ListVideo, ScrollText, Info, + Bug, PanelLeftClose, PanelLeftOpen, + type LucideIcon, } from "lucide-react"; import clsx from "clsx"; import { useSettingsStore } from "@store/settings-store"; +import { ABOUT } from "@config/about"; -const tabs = [ +interface TabItem { + to: string; + labelKey: string; + icon: LucideIcon; + external?: boolean; +} + +const tabs: readonly TabItem[] = [ { to: "/", labelKey: "tabs.editor", icon: Pencil }, { to: "/output", labelKey: "tabs.output", icon: FileText }, { to: "/batch", labelKey: "tabs.batch", icon: Layers }, @@ -26,6 +36,7 @@ const tabs = [ { to: "/logs", labelKey: "tabs.logs", icon: ScrollText }, { to: "/settings", labelKey: "tabs.settings", icon: Settings }, { to: "/about", labelKey: "tabs.about", icon: Info }, + { to: ABOUT.bugReportUrl, labelKey: "tabs.reportBug", icon: Bug, external: true }, ] as const; export function Sidebar() { @@ -56,26 +67,49 @@ export function Sidebar() { )} ); diff --git a/src/config/about.ts b/src/config/about.ts index a285d85..662af4e 100644 --- a/src/config/about.ts +++ b/src/config/about.ts @@ -6,6 +6,9 @@ import pkg from "../../package.json"; * Versions come from `package.json` so the About page never lies after a * version bump. Empty social URLs are hidden by the page; fill in the * channel / handle URLs you want to expose before tagging a release. + * + * Note: Ko-fi / Patreon were moved out of `socials` into `@config/donate` + * in v0.13.1 — they're "support" links, not "presence" links. */ export const ABOUT = { appName: "YTDescGen", @@ -13,14 +16,23 @@ export const ABOUT = { license: "MIT", repo: "https://github.com/poli0981/youtube-generator", issuesUrl: "https://github.com/poli0981/youtube-generator/issues", + bugReportUrl: "https://github.com/poli0981/youtube-generator/issues/new?template=bug_report.yml", + discussionsUrl: "https://github.com/poli0981/youtube-generator/discussions", licenseUrl: "https://github.com/poli0981/youtube-generator/blob/main/LICENSE", githubAuthor: "https://github.com/poli0981", + pcSpecDocUrl: "https://github.com/poli0981/youtube-generator/blob/main/docs/pc_spec.md", + devEnvDocUrl: "https://github.com/poli0981/youtube-generator/blob/main/docs/dev_env.md", socials: { youtube: "https://www.youtube.com/@SkullMute", x: "https://x.com/SkullMute0011", + bluesky: "https://bsky.app/profile/skullmute0011.bsky.social", + mastodon: "https://mastodon.social/@skullmute1122", discord: "https://discord.gg/2aNR3aVt", - kofi: "https://ko-fi.com/skullmute", - patreon: "https://www.patreon.com/skullmute", + discordGame: "https://discord.gg/kDM9GMu5vm", + steam: "https://steamcommunity.com/profiles/76561199544666292/", + telegramBot: "https://t.me/my_skull_bot", + telegramUser: "https://t.me/SkullMute0011", + email: "mailto:lopop05905@proton.me", }, } as const; diff --git a/src/config/content-warning-groups.ts b/src/config/content-warning-groups.ts index bd31464..df60a4f 100644 --- a/src/config/content-warning-groups.ts +++ b/src/config/content-warning-groups.ts @@ -105,6 +105,19 @@ export const CONTENT_WARNING_GROUPS: readonly ContentWarningGroup[] = [ "bullying_themes", ], }, + { + id: "horror_specific", + labelKey: "editor.contentWarningGroups.horror_specific", + items: [ + "eye_horror", + "body_horror", + "face_horror", + "cosmic_horror", + "extreme_gore", + "decay_rot", + "mutilation", + ], + }, { id: "playstyle", labelKey: "editor.contentWarningGroups.playstyle", diff --git a/src/config/donate.ts b/src/config/donate.ts new file mode 100644 index 0000000..fc48753 --- /dev/null +++ b/src/config/donate.ts @@ -0,0 +1,22 @@ +/** + * Donate / support links surfaced on the About page and via the persistent + * Donate button in the Header. + * + * Mirrors `.github/FUNDING.yml` so GitHub's "Sponsor this project" picker + * and the in-app surface stay aligned. Update both files together. + */ +export const DONATE = { + githubSponsors: "https://github.com/sponsors/poli0981", + kofi: "https://ko-fi.com/skullmute", + buyMeACoffee: "https://buymeacoffee.com/skullmute", + patreon: "https://www.patreon.com/skullmute", + paypal: "https://paypal.me/DungDang212", +} as const; + +export type DonateId = keyof typeof DONATE; + +/** + * Single "primary" link the Header button points at. Ko-fi has no account + * gate and lowest friction — change here to swap the Header default. + */ +export const PRIMARY_DONATE_URL = DONATE.kofi; diff --git a/src/engine/types.ts b/src/engine/types.ts index 342c0af..ac7cc27 100644 --- a/src/engine/types.ts +++ b/src/engine/types.ts @@ -285,6 +285,14 @@ export const CONTENT_WARNINGS = [ "slavery_themes", "terrorism_themes", "bullying_themes", + // Heavy-horror specific (v0.13.1) + "eye_horror", + "body_horror", + "face_horror", + "cosmic_horror", + "extreme_gore", + "decay_rot", + "mutilation", // Playstyle disclosures "blind_playthrough", "no_spoilers_chat", diff --git a/src/hooks/use-document-title.ts b/src/hooks/use-document-title.ts new file mode 100644 index 0000000..698954a --- /dev/null +++ b/src/hooks/use-document-title.ts @@ -0,0 +1,19 @@ +import { useEffect } from "react"; + +/** + * Sets `document.title` to `" · YTDescGen"` for the lifetime of the + * component, and restores the previous title on unmount. Per-page titles + * help with browser-tab readability and OS-level window menus (and feed + * the OG tag in `index.html` for the root route). + * + * Pass the localized page name — e.g. `useDocumentTitle(t("tabs.editor"))`. + */ +export function useDocumentTitle(title: string): void { + useEffect(() => { + const previous = document.title; + document.title = `${title} · YTDescGen`; + return () => { + document.title = previous; + }; + }, [title]); +} diff --git a/src/i18n/locales/_schema.json b/src/i18n/locales/_schema.json index 099148b..b67a50d 100644 --- a/src/i18n/locales/_schema.json +++ b/src/i18n/locales/_schema.json @@ -1,14 +1,20 @@ { "ui": { "app": ["title", "subtitle"], - "tabs": ["editor", "output", "profiles", "history", "settings", "batch", "playlist", "logs", "about"], + "tabs": ["editor", "output", "profiles", "history", "settings", "batch", "playlist", "logs", "about", "reportBug"], "sidebar": ["expand", "collapse"], + "header": ["donate"], "about": [ "tagline", - "repoHeading", "repoLabel", "issuesLabel", "authorLabel", "licenseLabel", - "connectHeading", "thirdPartyHeading", "thirdPartyHelp" + "repoHeading", "repoLabel", "issuesLabel", "reportBugLabel", "discussionsLabel", "authorLabel", "licenseLabel", + "donateHeading", "donateHelp", + "connectHeading", + "devEnvHeading", "devEnvHelp", + "thirdPartyHeading", "thirdPartyHelp" ], - "about.socials": ["youtube", "x", "discord", "kofi", "patreon"], + "about.donate": ["githubSponsors", "kofi", "buyMeACoffee", "patreon", "paypal"], + "about.devEnv": ["os", "cpu", "gpu", "ram", "ide", "toolchains", "fullSpecLink", "fullDevEnvLink"], + "about.socials": ["youtube", "x", "bluesky", "mastodon", "discord", "discordGame", "steam", "telegramBot", "telegramUser", "email"], "editor.sections": ["gameInfo", "videoSettings", "contentDetails", "attribution", "rig", "storeAndSocial"], "editor": [ "videoType", "language", "genre", "gameName", "gameNamePlaceholder", @@ -93,7 +99,7 @@ "not_no_hit_run", "not_clean_walkthrough", "casual_no_commentary", "many_deaths_patience", "slow_exploration", "puzzle_stuck_possible", "grinding_cut", "not_speedrun_relaxed", "exploration_focus_skip_combat", "edited_for_pacing", "support_developers", "online_connectivity_issues" ], - "editor.contentWarningGroups": ["spoilers", "photosensitive", "phobias", "mental_health", "sensitive", "playstyle"], + "editor.contentWarningGroups": ["spoilers", "photosensitive", "phobias", "mental_health", "sensitive", "playstyle", "horror_specific"], "editor.contentWarningOptions": [ "spoiler_story", "spoiler_ending", "spoiler_true_ending", "spoiler_post_game", "spoiler_secret_ending", "spoiler_dlc", "flashing_lights", "motion_sickness", "migraine_trigger", "loud_noises", @@ -103,7 +109,8 @@ "bipolar_themes", "ocd_themes", "panic_attacks", "dissociation", "blood_gore", "mature_18plus", "disturbing_imagery", "animal_abuse", "child_harm", "domestic_violence", "sexual_assault", "torture", "religion_themes", "war_violence", "discrimination", "police_violence", "smoking_drinking", "detailed_killing", "cult_occult", "psychological_manipulation", "grief_loss", "kidnapping", "hate_speech", "historical_atrocity", "slavery_themes", "terrorism_themes", "bullying_themes", - "blind_playthrough", "no_spoilers_chat", "casual_difficulty", "hardcore_difficulty", "permadeath_run", "speedrun_attempt", "completionist_run", "learning_mechanics" + "blind_playthrough", "no_spoilers_chat", "casual_difficulty", "hardcore_difficulty", "permadeath_run", "speedrun_attempt", "completionist_run", "learning_mechanics", + "eye_horror", "body_horror", "face_horror", "cosmic_horror", "extreme_gore", "decay_rot", "mutilation" ], "editor.gachaQuestTypeOptions": [ "main_story", "world_quest", "side_quest", "spinoff_quest", "companion_quest", "bond_quest", @@ -196,7 +203,8 @@ "bipolar_themes", "ocd_themes", "panic_attacks", "dissociation", "blood_gore", "mature_18plus", "disturbing_imagery", "animal_abuse", "child_harm", "domestic_violence", "sexual_assault", "torture", "religion_themes", "war_violence", "discrimination", "police_violence", "smoking_drinking", "detailed_killing", "cult_occult", "psychological_manipulation", "grief_loss", "kidnapping", "hate_speech", "historical_atrocity", "slavery_themes", "terrorism_themes", "bullying_themes", - "blind_playthrough", "no_spoilers_chat", "casual_difficulty", "hardcore_difficulty", "permadeath_run", "speedrun_attempt", "completionist_run", "learning_mechanics" + "blind_playthrough", "no_spoilers_chat", "casual_difficulty", "hardcore_difficulty", "permadeath_run", "speedrun_attempt", "completionist_run", "learning_mechanics", + "eye_horror", "body_horror", "face_horror", "cosmic_horror", "extreme_gore", "decay_rot", "mutilation" ], "description.storeLinkSuffix": ["free", "demo"], "description.graphics": ["with", "artStyle", "videoLabel", "inGameSettingLabel", "versionLabel"], diff --git a/src/i18n/locales/en/templates.json b/src/i18n/locales/en/templates.json index cc8acb7..9cbc45b 100644 --- a/src/i18n/locales/en/templates.json +++ b/src/i18n/locales/en/templates.json @@ -259,7 +259,14 @@ "permadeath_run": "Permadeath / Iron Man run", "speedrun_attempt": "Speedrun attempt", "completionist_run": "100% completionist run", - "learning_mechanics": "Still learning the mechanics" + "learning_mechanics": "Still learning the mechanics", + "eye_horror": "Eyeball clusters / distorted gaze imagery", + "body_horror": "Body horror — flesh distortion and mutation", + "face_horror": "Distorted or mutilated face imagery", + "cosmic_horror": "Cosmic / eldritch / Lovecraftian horror", + "extreme_gore": "Extreme gore — dismemberment and viscera", + "decay_rot": "Decay, rot, maggots, corpse imagery", + "mutilation": "Mutilation / amputation imagery" } }, "graphics": { diff --git a/src/i18n/locales/en/ui.json b/src/i18n/locales/en/ui.json index d7c976d..4813869 100644 --- a/src/i18n/locales/en/ui.json +++ b/src/i18n/locales/en/ui.json @@ -12,28 +12,60 @@ "batch": "Batch", "playlist": "Playlist", "logs": "Logs", - "about": "About" + "about": "About", + "reportBug": "Report Bug" }, "sidebar": { "expand": "Expand sidebar", "collapse": "Collapse sidebar" }, + "header": { + "donate": "Donate" + }, "about": { "tagline": "YouTube title, description, and tag generator for Gameplay No Commentary channels.", "repoHeading": "Repository & License", "repoLabel": "GitHub Repo", "issuesLabel": "Report an Issue", + "reportBugLabel": "Report a Bug", + "discussionsLabel": "Discussions", "authorLabel": "Author", "licenseLabel": "License", + "donateHeading": "Donate / Support", + "donateHelp": "If YTDescGen saves you time, consider buying me a coffee. Every bit helps keep the project going.", + "donate": { + "githubSponsors": "GitHub Sponsors", + "kofi": "Ko-fi", + "buyMeACoffee": "Buy Me a Coffee", + "patreon": "Patreon", + "paypal": "PayPal" + }, "connectHeading": "Connect", + "devEnvHeading": "Dev Environment", + "devEnvHelp": "Hardware and toolchain the public web build and desktop binaries are produced on.", + "devEnv": { + "os": "OS", + "cpu": "CPU", + "gpu": "GPU", + "ram": "RAM", + "ide": "IDE", + "toolchains": "Toolchains", + "fullSpecLink": "Read full PC spec ↗", + "fullDevEnvLink": "Read dev environment guide ↗" + }, "thirdPartyHeading": "Third-Party Credits", "thirdPartyHelp": "YTDescGen is built on top of these open-source projects. Versions are pulled live from package.json.", "socials": { "youtube": "YouTube Channel", "x": "X / Twitter", - "discord": "Discord Server", - "kofi": "Ko-fi", - "patreon": "Patreon" + "bluesky": "Bluesky", + "mastodon": "Mastodon", + "discord": "Discord — Repo / General", + "discordGame": "Discord — Game lobby", + "steam": "Steam profile", + "telegramBot": "Telegram bot", + "telegramUser": "Telegram", + "email": "Email" } }, "editor": { @@ -281,7 +313,8 @@ "phobias": "Phobias", "mental_health": "Mental health", "sensitive": "Mature / Sensitive content", - "playstyle": "Playstyle disclosures" + "playstyle": "Playstyle disclosures", + "horror_specific": "Heavy horror" }, "contentWarningOptions": { "spoiler_story": "Story / ending spoilers", @@ -351,7 +384,14 @@ "permadeath_run": "Permadeath / Iron Man", "speedrun_attempt": "Speedrun attempt", "completionist_run": "100% completionist", - "learning_mechanics": "Still learning mechanics" + "learning_mechanics": "Still learning mechanics", + "eye_horror": "Eyes / eyeball clusters", + "body_horror": "Body horror (flesh distortion)", + "face_horror": "Distorted / mutilated faces", + "cosmic_horror": "Cosmic / eldritch horror", + "extreme_gore": "Extreme gore / dismemberment", + "decay_rot": "Decay, rot, maggots", + "mutilation": "Mutilation / amputation" }, "playthroughNotes": { "title": "Playthrough notes", diff --git a/src/i18n/locales/es/templates.json b/src/i18n/locales/es/templates.json index 6fb7d30..15ac6a0 100644 --- a/src/i18n/locales/es/templates.json +++ b/src/i18n/locales/es/templates.json @@ -259,7 +259,14 @@ "permadeath_run": "Permadeath / Iron Man", "speedrun_attempt": "Intento de speedrun", "completionist_run": "Completista 100%", - "learning_mechanics": "Aprendiendo las mecánicas" + "learning_mechanics": "Aprendiendo las mecánicas", + "eye_horror": "Racimos oculares / imágenes de miradas distorsionadas", + "body_horror": "Body horror — deformación corporal y mutación", + "face_horror": "Imágenes de rostros deformados o mutilados", + "cosmic_horror": "Horror cósmico / lovecraftiano", + "extreme_gore": "Gore extremo — desmembramiento y vísceras", + "decay_rot": "Putrefacción, larvas, imágenes de cadáveres", + "mutilation": "Imágenes de mutilación o amputación" } }, "graphics": { diff --git a/src/i18n/locales/es/ui.json b/src/i18n/locales/es/ui.json index 9f68790..3f18fb1 100644 --- a/src/i18n/locales/es/ui.json +++ b/src/i18n/locales/es/ui.json @@ -12,28 +12,60 @@ "batch": "Lote", "playlist": "Playlist", "logs": "Registros", - "about": "Acerca de" + "about": "Acerca de", + "reportBug": "Reportar bug" }, "sidebar": { "expand": "Expandir barra lateral", "collapse": "Colapsar barra lateral" }, + "header": { + "donate": "Donar" + }, "about": { "tagline": "Generador de título, descripción y etiquetas de YouTube para canales de Gameplay sin comentarios.", "repoHeading": "Repositorio y Licencia", "repoLabel": "Repositorio en GitHub", "issuesLabel": "Reportar un Problema", + "reportBugLabel": "Reportar un bug", + "discussionsLabel": "Discusiones", "authorLabel": "Autor", "licenseLabel": "Licencia", + "donateHeading": "Donar / Apoyar", + "donateHelp": "Si YTDescGen te ahorra tiempo, considera invitarme un café. Cada aporte ayuda al proyecto.", + "donate": { + "githubSponsors": "GitHub Sponsors", + "kofi": "Ko-fi", + "buyMeACoffee": "Buy Me a Coffee", + "patreon": "Patreon", + "paypal": "PayPal" + }, "connectHeading": "Contacto", + "devEnvHeading": "Entorno de desarrollo", + "devEnvHelp": "Hardware y toolchain con los que se compilan la web pública y los binarios de escritorio.", + "devEnv": { + "os": "SO", + "cpu": "CPU", + "gpu": "GPU", + "ram": "RAM", + "ide": "IDE", + "toolchains": "Toolchain", + "fullSpecLink": "Ver spec completa ↗", + "fullDevEnvLink": "Guía de entorno dev ↗" + }, "thirdPartyHeading": "Créditos de Terceros", "thirdPartyHelp": "YTDescGen se basa en estos proyectos de código abierto. Las versiones se toman automáticamente de package.json.", "socials": { "youtube": "Canal de YouTube", "x": "X / Twitter", - "discord": "Servidor de Discord", - "kofi": "Ko-fi", - "patreon": "Patreon" + "bluesky": "Bluesky", + "mastodon": "Mastodon", + "discord": "Discord — Repo / General", + "discordGame": "Discord — Sala de juego", + "steam": "Perfil de Steam", + "telegramBot": "Bot de Telegram", + "telegramUser": "Telegram", + "email": "Email" } }, "editor": { @@ -281,7 +313,8 @@ "phobias": "Fobias", "mental_health": "Salud mental", "sensitive": "Adulto / Sensible", - "playstyle": "Notas de juego" + "playstyle": "Notas de juego", + "horror_specific": "Horror intenso" }, "contentWarningOptions": { "spoiler_story": "Spoilers — historia / final", @@ -351,7 +384,14 @@ "permadeath_run": "Permadeath / Iron Man", "speedrun_attempt": "Intento de speedrun", "completionist_run": "Completista 100%", - "learning_mechanics": "Aprendiendo mecánicas" + "learning_mechanics": "Aprendiendo mecánicas", + "eye_horror": "Ojos / racimos oculares", + "body_horror": "Body horror (deformación)", + "face_horror": "Rostros deformados", + "cosmic_horror": "Horror cósmico / eldritch", + "extreme_gore": "Gore extremo / desmembramiento", + "decay_rot": "Putrefacción, larvas", + "mutilation": "Mutilación / amputación" }, "playthroughNotes": { "title": "Notas de la partida", diff --git a/src/i18n/locales/ja/templates.json b/src/i18n/locales/ja/templates.json index d2ab764..ca4f8af 100644 --- a/src/i18n/locales/ja/templates.json +++ b/src/i18n/locales/ja/templates.json @@ -259,7 +259,14 @@ "permadeath_run": "パーマデス / アイアンマン縛り", "speedrun_attempt": "RTAチャレンジ", "completionist_run": "100% コンプリート", - "learning_mechanics": "操作 / システム学習中" + "learning_mechanics": "操作 / システム学習中", + "eye_horror": "眼球の集合体・歪んだ視線の描写", + "body_horror": "ボディホラー — 肉体変形・突然変異", + "face_horror": "顔の歪み・損傷描写", + "cosmic_horror": "コズミック / クトゥルフ系ホラー", + "extreme_gore": "過激なゴア — 解体と内臓描写", + "decay_rot": "腐敗・腐肉・蛆・死体描写", + "mutilation": "切断・損傷の描写" } }, "graphics": { diff --git a/src/i18n/locales/ja/ui.json b/src/i18n/locales/ja/ui.json index f61baa6..2eec27f 100644 --- a/src/i18n/locales/ja/ui.json +++ b/src/i18n/locales/ja/ui.json @@ -12,28 +12,60 @@ "batch": "一括", "playlist": "プレイリスト", "logs": "ログ", - "about": "情報" + "about": "情報", + "reportBug": "バグ報告" }, "sidebar": { "expand": "サイドバーを展開", "collapse": "サイドバーを折りたたむ" }, + "header": { + "donate": "寄付" + }, "about": { "tagline": "ゲームプレイ実況なしチャンネル向けのタイトル・説明文・タグ生成ツール。", "repoHeading": "リポジトリ & ライセンス", "repoLabel": "GitHub リポジトリ", "issuesLabel": "問題を報告", + "reportBugLabel": "バグを報告", + "discussionsLabel": "ディスカッション", "authorLabel": "作者", "licenseLabel": "ライセンス", + "donateHeading": "寄付 / サポート", + "donateHelp": "YTDescGenが時短に役立ったら、コーヒー一杯分でも支援していただけると嬉しいです。", + "donate": { + "githubSponsors": "GitHub Sponsors", + "kofi": "Ko-fi", + "buyMeACoffee": "Buy Me a Coffee", + "patreon": "Patreon", + "paypal": "PayPal" + }, "connectHeading": "リンク", + "devEnvHeading": "開発環境", + "devEnvHelp": "パブリックなWebビルドとデスクトップバイナリを生成しているハードウェアとツールチェーン。", + "devEnv": { + "os": "OS", + "cpu": "CPU", + "gpu": "GPU", + "ram": "RAM", + "ide": "IDE", + "toolchains": "ツールチェーン", + "fullSpecLink": "PCスペック詳細 ↗", + "fullDevEnvLink": "開発環境ガイド ↗" + }, "thirdPartyHeading": "サードパーティ クレジット", "thirdPartyHelp": "YTDescGen は以下のオープンソースプロジェクトを利用しています。バージョンは package.json から自動取得しています。", "socials": { "youtube": "YouTube チャンネル", "x": "X / Twitter", - "discord": "Discord サーバー", - "kofi": "Ko-fi", - "patreon": "Patreon" + "bluesky": "Bluesky", + "mastodon": "Mastodon", + "discord": "Discord — リポジトリ / 一般", + "discordGame": "Discord — ゲームロビー", + "steam": "Steamプロフィール", + "telegramBot": "Telegram bot", + "telegramUser": "Telegram", + "email": "メール" } }, "editor": { @@ -281,7 +313,8 @@ "phobias": "恐怖症", "mental_health": "メンタルヘルス", "sensitive": "成人向け / センシティブ", - "playstyle": "プレイ情報" + "playstyle": "プレイ情報", + "horror_specific": "ヘビーホラー" }, "contentWarningOptions": { "spoiler_story": "ストーリー / エンディングのネタバレ", @@ -351,7 +384,14 @@ "permadeath_run": "パーマデス / アイアンマン", "speedrun_attempt": "RTAチャレンジ", "completionist_run": "100% コンプ", - "learning_mechanics": "操作を覚え中" + "learning_mechanics": "操作を覚え中", + "eye_horror": "眼球 / 集合した眼", + "body_horror": "ボディホラー(肉体変形)", + "face_horror": "顔の歪み / 損傷", + "cosmic_horror": "コズミックホラー", + "extreme_gore": "過激なゴア / 解体", + "decay_rot": "腐敗 / 蛆", + "mutilation": "切断 / 損傷" }, "playthroughNotes": { "title": "プレイ情報", diff --git a/src/i18n/locales/ko/templates.json b/src/i18n/locales/ko/templates.json index b6e3d35..02b711c 100644 --- a/src/i18n/locales/ko/templates.json +++ b/src/i18n/locales/ko/templates.json @@ -259,7 +259,14 @@ "permadeath_run": "영구 사망 / 아이언맨 모드", "speedrun_attempt": "스피드런 시도", "completionist_run": "100% 컴플리션 도전", - "learning_mechanics": "조작 / 시스템 학습 중" + "learning_mechanics": "조작 / 시스템 학습 중", + "eye_horror": "안구 군집·왜곡된 시선 묘사", + "body_horror": "신체 호러 — 육체 변형·돌연변이", + "face_horror": "일그러지거나 훼손된 얼굴 묘사", + "cosmic_horror": "코즈믹 / 크툴루 / 러브크래프트적 호러", + "extreme_gore": "극도의 고어 — 사지 절단·내장 묘사", + "decay_rot": "부패·구더기·시체 묘사", + "mutilation": "절단·손상 묘사" } }, "graphics": { diff --git a/src/i18n/locales/ko/ui.json b/src/i18n/locales/ko/ui.json index 86420f5..a4b7f21 100644 --- a/src/i18n/locales/ko/ui.json +++ b/src/i18n/locales/ko/ui.json @@ -12,28 +12,60 @@ "batch": "일괄", "playlist": "플레이리스트", "logs": "로그", - "about": "정보" + "about": "정보", + "reportBug": "버그 신고" }, "sidebar": { "expand": "사이드바 펼치기", "collapse": "사이드바 접기" }, + "header": { + "donate": "후원" + }, "about": { "tagline": "게임플레이 무편집 채널을 위한 YouTube 제목, 설명, 태그 생성기.", "repoHeading": "저장소 및 라이선스", "repoLabel": "GitHub 저장소", "issuesLabel": "문제 보고", + "reportBugLabel": "버그 신고", + "discussionsLabel": "디스커션", "authorLabel": "저자", "licenseLabel": "라이선스", + "donateHeading": "후원 / 지원", + "donateHelp": "YTDescGen이 시간을 아껴드렸다면 커피 한 잔으로 응원 부탁드립니다.", + "donate": { + "githubSponsors": "GitHub Sponsors", + "kofi": "Ko-fi", + "buyMeACoffee": "Buy Me a Coffee", + "patreon": "Patreon", + "paypal": "PayPal" + }, "connectHeading": "연결", + "devEnvHeading": "개발 환경", + "devEnvHelp": "공개 웹 빌드와 데스크톱 바이너리가 빌드되는 하드웨어 및 툴체인입니다.", + "devEnv": { + "os": "OS", + "cpu": "CPU", + "gpu": "GPU", + "ram": "RAM", + "ide": "IDE", + "toolchains": "툴체인", + "fullSpecLink": "전체 PC 스펙 보기 ↗", + "fullDevEnvLink": "개발 환경 가이드 ↗" + }, "thirdPartyHeading": "서드파티 크레딧", "thirdPartyHelp": "YTDescGen은 다음 오픈소스 프로젝트를 기반으로 합니다. 버전은 package.json에서 자동으로 가져옵니다.", "socials": { "youtube": "YouTube 채널", "x": "X / Twitter", - "discord": "Discord 서버", - "kofi": "Ko-fi", - "patreon": "Patreon" + "bluesky": "Bluesky", + "mastodon": "Mastodon", + "discord": "Discord — 저장소 / 일반", + "discordGame": "Discord — 게임 로비", + "steam": "Steam 프로필", + "telegramBot": "텔레그램 봇", + "telegramUser": "텔레그램", + "email": "이메일" } }, "editor": { @@ -281,7 +313,8 @@ "phobias": "공포증", "mental_health": "정신 건강", "sensitive": "성인 / 민감", - "playstyle": "플레이 안내" + "playstyle": "플레이 안내", + "horror_specific": "중증 호러" }, "contentWarningOptions": { "spoiler_story": "스토리 / 엔딩 스포일러", @@ -351,7 +384,14 @@ "permadeath_run": "영구 사망 / 아이언맨", "speedrun_attempt": "스피드런 시도", "completionist_run": "100% 컴플리션", - "learning_mechanics": "조작 학습 중" + "learning_mechanics": "조작 학습 중", + "eye_horror": "눈 / 안구 군집", + "body_horror": "신체 호러 (육체 변형)", + "face_horror": "일그러진 얼굴", + "cosmic_horror": "코즈믹 / 크툴루 호러", + "extreme_gore": "극도의 고어 / 사지 절단", + "decay_rot": "부패 / 구더기", + "mutilation": "절단 / 손상" }, "playthroughNotes": { "title": "플레이 노트", diff --git a/src/i18n/locales/vi/templates.json b/src/i18n/locales/vi/templates.json index c9360c1..2114097 100644 --- a/src/i18n/locales/vi/templates.json +++ b/src/i18n/locales/vi/templates.json @@ -259,7 +259,14 @@ "permadeath_run": "Lối chơi Permadeath / Iron Man", "speedrun_attempt": "Thử speedrun", "completionist_run": "Chơi 100% completionist", - "learning_mechanics": "Vẫn đang học cơ chế game" + "learning_mechanics": "Vẫn đang học cơ chế game", + "eye_horror": "Cụm nhãn cầu / hình ảnh ánh nhìn ám ảnh", + "body_horror": "Kinh dị cơ thể — biến dạng thịt, đột biến", + "face_horror": "Hình ảnh khuôn mặt biến dạng / huỷ hoại", + "cosmic_horror": "Kinh dị vũ trụ / Lovecraftian", + "extreme_gore": "Máu me cực đoan — phân thây, nội tạng", + "decay_rot": "Phân huỷ, thối rữa, dòi bọ, xác chết", + "mutilation": "Hình ảnh cắt xẻo / cụt chi" } }, "graphics": { diff --git a/src/i18n/locales/vi/ui.json b/src/i18n/locales/vi/ui.json index 2a48edc..7e17cf3 100644 --- a/src/i18n/locales/vi/ui.json +++ b/src/i18n/locales/vi/ui.json @@ -12,28 +12,60 @@ "batch": "Hàng loạt", "playlist": "Playlist", "logs": "Nhật ký", - "about": "Giới thiệu" + "about": "Giới thiệu", + "reportBug": "Báo lỗi" }, "sidebar": { "expand": "Mở rộng sidebar", "collapse": "Thu gọn sidebar" }, + "header": { + "donate": "Ủng hộ" + }, "about": { "tagline": "Công cụ tạo title, description, tag cho kênh YouTube Gameplay No Commentary.", "repoHeading": "Repository & License", "repoLabel": "GitHub Repo", "issuesLabel": "Báo lỗi / Góp ý", + "reportBugLabel": "Báo lỗi", + "discussionsLabel": "Thảo luận", "authorLabel": "Tác giả", "licenseLabel": "Giấy phép", + "donateHeading": "Ủng hộ / Donate", + "donateHelp": "Nếu YTDescGen giúp bạn tiết kiệm thời gian, mời mình một ly cà phê nhé. Mọi ủng hộ đều giúp dự án tiếp tục.", + "donate": { + "githubSponsors": "GitHub Sponsors", + "kofi": "Ko-fi", + "buyMeACoffee": "Buy Me a Coffee", + "patreon": "Patreon", + "paypal": "PayPal" + }, "connectHeading": "Kết nối", + "devEnvHeading": "Môi trường phát triển", + "devEnvHelp": "Phần cứng và toolchain dùng để build bản web public và binary desktop.", + "devEnv": { + "os": "Hệ điều hành", + "cpu": "CPU", + "gpu": "GPU", + "ram": "RAM", + "ide": "IDE", + "toolchains": "Toolchain", + "fullSpecLink": "Xem PC spec đầy đủ ↗", + "fullDevEnvLink": "Xem hướng dẫn dev environment ↗" + }, "thirdPartyHeading": "Thư viện bên thứ ba", "thirdPartyHelp": "YTDescGen được xây dựng dựa trên các dự án mã nguồn mở dưới đây. Phiên bản lấy tự động từ package.json.", "socials": { "youtube": "Kênh YouTube", "x": "X / Twitter", - "discord": "Server Discord", - "kofi": "Ko-fi", - "patreon": "Patreon" + "bluesky": "Bluesky", + "mastodon": "Mastodon", + "discord": "Discord — Repo / Chung", + "discordGame": "Discord — Game lobby", + "steam": "Profile Steam", + "telegramBot": "Telegram bot", + "telegramUser": "Telegram", + "email": "Email" } }, "editor": { @@ -281,7 +313,8 @@ "phobias": "Hội chứng sợ", "mental_health": "Sức khoẻ tinh thần", "sensitive": "Nội dung nhạy cảm / 18+", - "playstyle": "Chú thích lối chơi" + "playstyle": "Chú thích lối chơi", + "horror_specific": "Kinh dị nặng đô" }, "contentWarningOptions": { "spoiler_story": "Spoiler cốt truyện / kết thúc", @@ -351,7 +384,14 @@ "permadeath_run": "Permadeath / Iron Man", "speedrun_attempt": "Thử speedrun", "completionist_run": "100% completionist", - "learning_mechanics": "Đang học cơ chế" + "learning_mechanics": "Đang học cơ chế", + "eye_horror": "Mắt / cụm nhãn cầu", + "body_horror": "Kinh dị cơ thể (biến dạng)", + "face_horror": "Khuôn mặt biến dạng", + "cosmic_horror": "Kinh dị vũ trụ / Lovecraft", + "extreme_gore": "Máu me cực đoan / phân thây", + "decay_rot": "Phân huỷ, thối rữa, dòi bọ", + "mutilation": "Cắt xẻo / cụt chi" }, "playthroughNotes": { "title": "Ghi chú lượt chơi", diff --git a/src/i18n/locales/zh/templates.json b/src/i18n/locales/zh/templates.json index 0ba5178..ddaf5f5 100644 --- a/src/i18n/locales/zh/templates.json +++ b/src/i18n/locales/zh/templates.json @@ -259,7 +259,14 @@ "permadeath_run": "永久死亡 / Iron Man 玩法", "speedrun_attempt": "速通挑战", "completionist_run": "100% 全收集挑战", - "learning_mechanics": "仍在熟悉游戏机制" + "learning_mechanics": "仍在熟悉游戏机制", + "eye_horror": "眼球群 / 扭曲注视画面", + "body_horror": "身体恐怖 — 肉体扭曲与变异", + "face_horror": "扭曲或毁伤的面孔画面", + "cosmic_horror": "宇宙 / 邪神 / 克苏鲁式恐怖", + "extreme_gore": "极端血腥 — 肢解与内脏描绘", + "decay_rot": "腐烂、蛆虫、尸体画面", + "mutilation": "残害或截肢画面" } }, "graphics": { diff --git a/src/i18n/locales/zh/ui.json b/src/i18n/locales/zh/ui.json index 0f81ab2..8f9628b 100644 --- a/src/i18n/locales/zh/ui.json +++ b/src/i18n/locales/zh/ui.json @@ -12,28 +12,60 @@ "batch": "批量", "playlist": "播放列表", "logs": "日志", - "about": "关于" + "about": "关于", + "reportBug": "报告 Bug" }, "sidebar": { "expand": "展开侧边栏", "collapse": "折叠侧边栏" }, + "header": { + "donate": "赞助" + }, "about": { "tagline": "为游戏实况无解说频道生成 YouTube 标题、描述和标签的工具。", "repoHeading": "仓库与许可", "repoLabel": "GitHub 仓库", "issuesLabel": "报告问题", + "reportBugLabel": "报告 Bug", + "discussionsLabel": "讨论区", "authorLabel": "作者", "licenseLabel": "许可证", + "donateHeading": "赞助 / 支持", + "donateHelp": "如果 YTDescGen 帮你省下了时间,欢迎请我喝一杯咖啡。每份支持都让项目走得更远。", + "donate": { + "githubSponsors": "GitHub Sponsors", + "kofi": "Ko-fi", + "buyMeACoffee": "Buy Me a Coffee", + "patreon": "Patreon", + "paypal": "PayPal" + }, "connectHeading": "联系方式", + "devEnvHeading": "开发环境", + "devEnvHelp": "用于构建公开 Web 版本和桌面二进制的硬件与工具链。", + "devEnv": { + "os": "系统", + "cpu": "CPU", + "gpu": "GPU", + "ram": "RAM", + "ide": "IDE", + "toolchains": "工具链", + "fullSpecLink": "查看完整 PC 配置 ↗", + "fullDevEnvLink": "开发环境指南 ↗" + }, "thirdPartyHeading": "第三方致谢", "thirdPartyHelp": "YTDescGen 基于以下开源项目构建。版本号从 package.json 自动同步。", "socials": { "youtube": "YouTube 频道", "x": "X / Twitter", - "discord": "Discord 服务器", - "kofi": "Ko-fi", - "patreon": "Patreon" + "bluesky": "Bluesky", + "mastodon": "Mastodon", + "discord": "Discord — 仓库 / 综合", + "discordGame": "Discord — 游戏频道", + "steam": "Steam 个人主页", + "telegramBot": "Telegram 机器人", + "telegramUser": "Telegram", + "email": "邮箱" } }, "editor": { @@ -281,7 +313,8 @@ "phobias": "恐惧症", "mental_health": "心理健康", "sensitive": "成人 / 敏感", - "playstyle": "游玩说明" + "playstyle": "游玩说明", + "horror_specific": "重度恐怖" }, "contentWarningOptions": { "spoiler_story": "剧情 / 结局剧透", @@ -351,7 +384,14 @@ "permadeath_run": "永久死亡 / Iron Man", "speedrun_attempt": "速通挑战", "completionist_run": "100% 全收集", - "learning_mechanics": "仍在熟悉机制" + "learning_mechanics": "仍在熟悉机制", + "eye_horror": "眼球 / 眼球群", + "body_horror": "身体恐怖(肉体扭曲)", + "face_horror": "扭曲的面孔", + "cosmic_horror": "宇宙 / 邪神恐怖", + "extreme_gore": "极端血腥 / 肢解", + "decay_rot": "腐烂 / 蛆虫", + "mutilation": "残害 / 截肢" }, "playthroughNotes": { "title": "本期游玩说明", diff --git a/src/pages/AboutPage.tsx b/src/pages/AboutPage.tsx index b191dea..99ab628 100644 --- a/src/pages/AboutPage.tsx +++ b/src/pages/AboutPage.tsx @@ -6,12 +6,23 @@ import { Youtube, Twitter, MessageCircle, + MessageSquare, + Cloud, + Gamepad2, + Send, + Mail, Coffee, Heart, + Sparkles, + DollarSign, + Cpu, + Monitor, type LucideIcon, } from "lucide-react"; import { ABOUT, type AboutSocialId } from "@config/about"; +import { DONATE, type DonateId } from "@config/donate"; import { THIRD_PARTY } from "@config/third-party"; +import { useDocumentTitle } from "@hooks/use-document-title"; interface SocialLinkConfig { id: AboutSocialId; @@ -20,20 +31,53 @@ interface SocialLinkConfig { labelKey: string; } +interface DonateLinkConfig { + id: DonateId; + url: string; + icon: LucideIcon; + labelKey: string; +} + export function AboutPage() { const { t } = useTranslation("ui"); + useDocumentTitle(t("tabs.about")); // Hidden when empty so a fresh clone with no socials filled in still - // looks tidy on the About page. + // looks tidy on the About page. Ko-fi / Patreon were moved to the + // Donate section in v0.13.1 — keep them out of this list. const allSocials: readonly SocialLinkConfig[] = [ { id: "youtube", url: ABOUT.socials.youtube, icon: Youtube, labelKey: "about.socials.youtube" }, { id: "x", url: ABOUT.socials.x, icon: Twitter, labelKey: "about.socials.x" }, + { id: "bluesky", url: ABOUT.socials.bluesky, icon: Cloud, labelKey: "about.socials.bluesky" }, + { id: "mastodon", url: ABOUT.socials.mastodon, icon: MessageSquare, labelKey: "about.socials.mastodon" }, { id: "discord", url: ABOUT.socials.discord, icon: MessageCircle, labelKey: "about.socials.discord" }, - { id: "kofi", url: ABOUT.socials.kofi, icon: Coffee, labelKey: "about.socials.kofi" }, - { id: "patreon", url: ABOUT.socials.patreon, icon: Heart, labelKey: "about.socials.patreon" }, + { id: "discordGame", url: ABOUT.socials.discordGame, icon: Gamepad2, labelKey: "about.socials.discordGame" }, + { id: "steam", url: ABOUT.socials.steam, icon: Gamepad2, labelKey: "about.socials.steam" }, + { id: "telegramBot", url: ABOUT.socials.telegramBot, icon: Send, labelKey: "about.socials.telegramBot" }, + { id: "telegramUser", url: ABOUT.socials.telegramUser, icon: Send, labelKey: "about.socials.telegramUser" }, + { id: "email", url: ABOUT.socials.email, icon: Mail, labelKey: "about.socials.email" }, ]; const socials = allSocials.filter((s) => s.url.trim().length > 0); + const donateLinks: readonly DonateLinkConfig[] = [ + { id: "githubSponsors", url: DONATE.githubSponsors, icon: Sparkles, labelKey: "about.donate.githubSponsors" }, + { id: "kofi", url: DONATE.kofi, icon: Coffee, labelKey: "about.donate.kofi" }, + { id: "buyMeACoffee", url: DONATE.buyMeACoffee, icon: Coffee, labelKey: "about.donate.buyMeACoffee" }, + { id: "patreon", url: DONATE.patreon, icon: Heart, labelKey: "about.donate.patreon" }, + { id: "paypal", url: DONATE.paypal, icon: DollarSign, labelKey: "about.donate.paypal" }, + ]; + + // Pulled from docs/pc_spec.md — keep them in sync when the box gets an + // upgrade. The page surfaces the summary; the full spec lives in docs. + const devEnvRows: ReadonlyArray<{ icon: LucideIcon; labelKey: string; value: string }> = [ + { icon: Monitor, labelKey: "about.devEnv.os", value: "Windows 11 Pro 25H2 Insider (build 26300.8376)" }, + { icon: Cpu, labelKey: "about.devEnv.cpu", value: "Intel Core i7-14700KF" }, + { icon: Cpu, labelKey: "about.devEnv.gpu", value: "NVIDIA GeForce RTX 5080 (16 GB)" }, + { icon: Cpu, labelKey: "about.devEnv.ram", value: "32 GB DDR5" }, + { icon: Monitor, labelKey: "about.devEnv.ide", value: "JetBrains 2026.x · VS Code" }, + { icon: Cpu, labelKey: "about.devEnv.toolchains", value: "Node ≥ 25.8.1 · Python 3.12 · Rust stable · Tauri 2" }, + ]; + return ( <div className="mx-auto flex max-w-3xl flex-col gap-8 p-6"> <header className="flex flex-col gap-2"> @@ -59,9 +103,14 @@ export function AboutPage() { label={t("about.repoLabel")} /> <ExternalLinkRow - href={ABOUT.issuesUrl} + href={ABOUT.bugReportUrl} icon={Bug} - label={t("about.issuesLabel")} + label={t("about.reportBugLabel")} + /> + <ExternalLinkRow + href={ABOUT.discussionsUrl} + icon={MessageSquare} + label={t("about.discussionsLabel")} /> <ExternalLinkRow href={ABOUT.githubAuthor} @@ -76,6 +125,24 @@ export function AboutPage() { </div> </section> + <section className="flex flex-col gap-3"> + <h2 className="text-sm font-semibold uppercase tracking-wide text-text-muted"> + {t("about.donateHeading")} + </h2> + <p className="text-xs text-text-muted">{t("about.donateHelp")}</p> + <div className="grid gap-2 sm:grid-cols-2"> + {donateLinks.map((d) => ( + <ExternalLinkRow + key={d.id} + href={d.url} + icon={d.icon} + label={t(d.labelKey)} + accent + /> + ))} + </div> + </section> + {socials.length > 0 && ( <section className="flex flex-col gap-3"> <h2 className="text-sm font-semibold uppercase tracking-wide text-text-muted"> @@ -94,6 +161,40 @@ export function AboutPage() { </section> )} + <section className="flex flex-col gap-3"> + <h2 className="text-sm font-semibold uppercase tracking-wide text-text-muted"> + {t("about.devEnvHeading")} + </h2> + <p className="text-xs text-text-muted">{t("about.devEnvHelp")}</p> + <ul className="overflow-hidden rounded-lg border border-border bg-surface-1"> + {devEnvRows.map((row) => { + const Icon = row.icon; + return ( + <li + key={row.labelKey} + className="flex items-center gap-3 border-b border-border px-3 py-2 text-sm last:border-b-0" + > + <Icon className="h-4 w-4 shrink-0 text-text-muted" /> + <span className="w-32 shrink-0 text-text-secondary">{t(row.labelKey)}</span> + <span className="flex-1 truncate font-mono text-xs text-text-primary">{row.value}</span> + </li> + ); + })} + </ul> + <div className="grid gap-2 sm:grid-cols-2"> + <ExternalLinkRow + href={ABOUT.pcSpecDocUrl} + icon={ExternalLink} + label={t("about.devEnv.fullSpecLink")} + /> + <ExternalLinkRow + href={ABOUT.devEnvDocUrl} + icon={ExternalLink} + label={t("about.devEnv.fullDevEnvLink")} + /> + </div> + </section> + <section className="flex flex-col gap-3"> <h2 className="text-sm font-semibold uppercase tracking-wide text-text-muted"> {t("about.thirdPartyHeading")} @@ -126,17 +227,22 @@ interface ExternalLinkRowProps { href: string; icon: LucideIcon; label: string; + accent?: boolean; } -function ExternalLinkRow({ href, icon: Icon, label }: ExternalLinkRowProps) { +function ExternalLinkRow({ href, icon: Icon, label, accent }: ExternalLinkRowProps) { return ( <a href={href} target="_blank" rel="noopener noreferrer" - className="flex items-center gap-3 rounded-lg border border-border bg-surface-1 px-3 py-2.5 text-sm text-text-primary transition-colors hover:border-accent hover:bg-surface-2" + className={ + accent + ? "flex items-center gap-3 rounded-lg border border-pink-500/30 bg-pink-500/5 px-3 py-2.5 text-sm text-text-primary transition-colors hover:border-pink-400/60 hover:bg-pink-500/10" + : "flex items-center gap-3 rounded-lg border border-border bg-surface-1 px-3 py-2.5 text-sm text-text-primary transition-colors hover:border-accent hover:bg-surface-2" + } > - <Icon className="h-4 w-4 shrink-0 text-text-secondary" /> + <Icon className={accent ? "h-4 w-4 shrink-0 text-pink-300" : "h-4 w-4 shrink-0 text-text-secondary"} /> <span className="flex-1 truncate">{label}</span> <ExternalLink className="h-3.5 w-3.5 shrink-0 text-text-muted" /> </a> diff --git a/src/pages/BatchPage.tsx b/src/pages/BatchPage.tsx index 14097a7..bbf85a2 100644 --- a/src/pages/BatchPage.tsx +++ b/src/pages/BatchPage.tsx @@ -1,5 +1,6 @@ import { useState, useMemo } from "react"; import { useTranslation } from "react-i18next"; +import { useDocumentTitle } from "@hooks/use-document-title"; import i18n from "i18next"; import { Input } from "@components/ui/Input"; import { Button } from "@components/ui/Button"; @@ -29,6 +30,7 @@ interface BatchResult { export function BatchPage() { const { t } = useTranslation("ui"); + useDocumentTitle(t("tabs.batch")); const state = useEditorStore(); const baseInput = useCurrentGeneratorInput(); const { diff --git a/src/pages/EditorPage.tsx b/src/pages/EditorPage.tsx index bca48c1..54f919d 100644 --- a/src/pages/EditorPage.tsx +++ b/src/pages/EditorPage.tsx @@ -26,12 +26,14 @@ import { Accordion } from "@components/ui/Accordion"; import { useEditorStore } from "@store/editor-store"; import { useSettingsStore } from "@store/settings-store"; import { useTranslation } from "react-i18next"; +import { useDocumentTitle } from "@hooks/use-document-title"; import { validateEmails, validatePlaylistUrl } from "@utils/validation"; import { RotateCcw } from "lucide-react"; import { useState } from "react"; export function EditorPage() { const { t } = useTranslation("ui"); + useDocumentTitle(t("tabs.editor")); const store = useEditorStore(); const accordion = useSettingsStore((s) => s.editorAccordionState); const toggleAccordion = useSettingsStore((s) => s.toggleEditorAccordion); diff --git a/src/pages/HistoryPage.tsx b/src/pages/HistoryPage.tsx index 23d4f60..ab78267 100644 --- a/src/pages/HistoryPage.tsx +++ b/src/pages/HistoryPage.tsx @@ -1,5 +1,6 @@ import { useState } from "react"; import { useTranslation } from "react-i18next"; +import { useDocumentTitle } from "@hooks/use-document-title"; import { Trash2 } from "lucide-react"; import { Input } from "@components/ui/Input"; import { Button } from "@components/ui/Button"; @@ -9,6 +10,7 @@ import { useHistoryStore } from "@store/history-store"; export function HistoryPage() { const { t } = useTranslation("ui"); + useDocumentTitle(t("tabs.history")); const { entries, clearAll } = useHistoryStore(); const [search, setSearch] = useState(""); const [showClearAll, setShowClearAll] = useState(false); diff --git a/src/pages/LogPage.tsx b/src/pages/LogPage.tsx index abd12e3..986faeb 100644 --- a/src/pages/LogPage.tsx +++ b/src/pages/LogPage.tsx @@ -1,5 +1,6 @@ import { useState, useRef, useEffect } from "react"; import { useTranslation } from "react-i18next"; +import { useDocumentTitle } from "@hooks/use-document-title"; import { Trash2 } from "lucide-react"; import { Input } from "@components/ui/Input"; import { Button } from "@components/ui/Button"; @@ -18,6 +19,7 @@ const LEVEL_FILTERS: Array<{ value: LogLevel | "all"; label: string; color: stri export function LogPage() { const { t } = useTranslation("ui"); + useDocumentTitle(t("tabs.logs")); const { entries, clearAll } = useLogStore(); const [search, setSearch] = useState(""); const [levelFilter, setLevelFilter] = useState<LogLevel | "all">("all"); diff --git a/src/pages/OutputPage.tsx b/src/pages/OutputPage.tsx index 820de38..92b3f98 100644 --- a/src/pages/OutputPage.tsx +++ b/src/pages/OutputPage.tsx @@ -1,5 +1,6 @@ import { useEffect, useRef, useState, useMemo } from "react"; import { useTranslation } from "react-i18next"; +import { useDocumentTitle } from "@hooks/use-document-title"; import { Shuffle, Bookmark } from "lucide-react"; import { Button } from "@components/ui/Button"; import { OutputPreview } from "@components/output/OutputPreview"; @@ -18,6 +19,7 @@ import clsx from "clsx"; export function OutputPage() { const { t } = useTranslation("ui"); + useDocumentTitle(t("tabs.output")); const defaultOutput = useGeneratedOutput(); const { gameName, videoType, language, genres } = useEditorStore(); const addEntry = useHistoryStore((s) => s.addEntry); diff --git a/src/pages/PlaylistPage.tsx b/src/pages/PlaylistPage.tsx index c5a17e0..70e429b 100644 --- a/src/pages/PlaylistPage.tsx +++ b/src/pages/PlaylistPage.tsx @@ -1,5 +1,6 @@ import { useState, useMemo } from "react"; import { useTranslation } from "react-i18next"; +import { useDocumentTitle } from "@hooks/use-document-title"; import i18n from "i18next"; import { Input } from "@components/ui/Input"; import { Textarea } from "@components/ui/Textarea"; @@ -38,6 +39,7 @@ const CONTENT_TYPE_OPTIONS = [ export function PlaylistPage() { const { t } = useTranslation("ui"); + useDocumentTitle(t("tabs.playlist")); const editor = useEditorStore(); const [status, setStatus] = useState<PlaylistStatus>("completed"); diff --git a/src/pages/ProfilesPage.tsx b/src/pages/ProfilesPage.tsx index c316e39..a67d0d2 100644 --- a/src/pages/ProfilesPage.tsx +++ b/src/pages/ProfilesPage.tsx @@ -1,5 +1,6 @@ import { useState } from "react"; import { useTranslation } from "react-i18next"; +import { useDocumentTitle } from "@hooks/use-document-title"; import { Download, Upload } from "lucide-react"; import { Button } from "@components/ui/Button"; import { ProfileList } from "@components/profiles/ProfileList"; @@ -16,6 +17,7 @@ type Tab = "profiles" | "presets" | "templates"; export function ProfilesPage() { const { t } = useTranslation("ui"); + useDocumentTitle(t("tabs.profiles")); const [tab, setTab] = useState<Tab>("profiles"); const { profiles, importProfiles } = useProfileStore(); const { presets, importPresets } = usePresetStore(); diff --git a/src/pages/SettingsPage.tsx b/src/pages/SettingsPage.tsx index 1aefeb6..e76b426 100644 --- a/src/pages/SettingsPage.tsx +++ b/src/pages/SettingsPage.tsx @@ -1,4 +1,5 @@ import { useTranslation } from "react-i18next"; +import { useDocumentTitle } from "@hooks/use-document-title"; import { FolderOpen, Save } from "lucide-react"; import { Toggle } from "@components/ui/Toggle"; import { Select } from "@components/ui/Select"; @@ -54,6 +55,7 @@ async function exportSettingsToFile() { export function SettingsPage() { const { t, i18n } = useTranslation("ui"); + useDocumentTitle(t("tabs.settings")); const settings = useSettingsStore(); const langOptions = SUPPORTED_LANGUAGES.map((l) => ({ diff --git a/webapp/TAURI.md b/webapp/TAURI.md new file mode 100644 index 0000000..a1747c0 --- /dev/null +++ b/webapp/TAURI.md @@ -0,0 +1,69 @@ +# Tauri 2 desktop build prerequisites + +YTDescGen ships a Tauri 2 desktop shell alongside the web build. This file +covers the per-platform native dependencies you need before +`npm run tauri:dev` or `npm run tauri:build` will succeed. + +The corresponding hardware reference is in [`../docs/pc_spec.md`](../docs/pc_spec.md); +toolchain versions are in [`../docs/dev_env.md`](../docs/dev_env.md). + +## All platforms + +- **Rust stable** via `rustup`. Tauri 2 currently tracks the latest stable. +- **Node.js ≥ 25.8.1**. Tauri-action in CI uses Node 20; locally we use ≥ 25 + so the JetBrains and VS Code dev tools have a single shared LTS. + +```bash +rustup update stable +rustup target add x86_64-pc-windows-msvc # Windows +rustup target add aarch64-apple-darwin # Apple Silicon +rustup target add x86_64-unknown-linux-gnu # Linux +``` + +## Windows + +- **MSVC build tools** — install via "Desktop development with C++" workload in + Visual Studio Installer, or `winget install Microsoft.VisualStudio.2022.BuildTools`. +- **WebView2 Runtime** — ships with Windows 11; on Windows 10 you may need + to install the Evergreen Bootstrapper from Microsoft. +- Default bundles produced: MSI installer + NSIS `.exe`. + +## macOS + +- **Xcode Command Line Tools** — `xcode-select --install`. +- **Apple Silicon only** for hosted CI; Intel is not in the matrix anymore. +- Bundling DMG on hosted runners has historically flaked inside + `bundle_dmg.sh`. The release matrix builds the `.app` bundle and tar-gzips + it (`--bundles app`). Users expand and drag-drop into `/Applications`. + +## Linux + +Hosted Ubuntu runners need these apt packages: + +```bash +sudo apt-get update +sudo apt-get install -y \ + libwebkit2gtk-4.1-dev \ + libgtk-3-dev \ + libayatana-appindicator3-dev \ + librsvg2-dev \ + patchelf +``` + +Default bundles produced: AppImage + `.deb`. + +## Verifying the toolchain + +```bash +npm run tauri info +``` + +`tauri info` prints versions of Rust, the WebView, the Node runtime, and the +detected bundle targets. Use this before opening a bug — most "Tauri won't +build" reports are version mismatches. + +## CI reference + +Release builds run on tagged pushes via +[`.github/workflows/release-desktop.yml`](../.github/workflows/release-desktop.yml). +That file is the source of truth for what versions actually shipped.