Compare commits

...
Author SHA1 Message Date
poli0981andClaude Opus 4.7 6023866195 chore(about): fill in social links (YouTube/X/Discord/Ko-fi/Patreon)
Replaces the TODO placeholders with the channel's actual URLs so the
About page's Connect section renders all five rows. Empty entries
would have hidden silently — wiring the real links is what the page
was waiting on before the v0.10 release.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 09:33:35 +07:00
poli0981andClaude Opus 4.7 b41f595435 feat(v0.10): vertical collapsible sidebar + About page
Reworks the app shell from a horizontal top tab bar into a vertical
sidebar with a hamburger collapse toggle, and adds a new /about route
with app metadata, third-party credits, and configurable social links.

Sidebar
- TabBar.tsx renamed to Sidebar.tsx (vertical NavLink list, lucide
  PanelLeftClose / PanelLeftOpen, w-56 ↔ w-14 width transition).
- AppShell switched from `flex flex-col` to a left-sidebar / right-pane
  layout; Header stays at the top of the right pane.
- Collapsed state persisted via a new `sidebarCollapsed` field in the
  settings store (v7 → v8, additive — healSettings back-fills the
  default through the existing initialSettings spread).
- Ctrl+B toggles the sidebar (VS Code convention); shortcut surfaced
  in the keyboard help cheatsheet.

About page
- New `/about` lazy route. Page reads from a new `src/config/about.ts`
  (app name, version pulled live from package.json, repo + issues +
  author + license URLs, and placeholder social URLs that hide their
  rows when blank). YouTube channel left blank with a TODO marker —
  fill in before tagging the v0.10 release.
- Third-party credits sourced from a new `src/config/third-party.ts`
  with versions read from package.json deps so npm installs keep the
  list honest. License + project URL hardcoded.

i18n
- All 6 locales (en/vi/ja/es/ko/zh) updated with `tabs.about`, the
  new `sidebar.{expand,collapse}` block, the full `about.*` namespace
  including `about.socials.*`, and `shortcuts.toggleSidebar`.
  validate:locales clean at 448/448 keys.

Version bumped to 0.10.0. shadcn/ui evaluated and skipped — would have
forced a 10+ component retrofit and a token-system swap for one feature.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 09:23:42 +07:00
poli0981andClaude Opus 4.7 e32c900efc feat(editor): add Pub/Dev Name field that emits a YouTube tag
When the Publisher / Developer site URL is filled in, a free-text
"Pub/Dev Name" input now appears underneath. Whatever the user types
becomes a bare YouTube tag (e.g. "Ubisoft", "FromSoftware") via the
tag generator — so SEO-relevant publisher names enter the tag pool
without inflating the description.

The new field is independent from the existing sponsorName/sponsorPlatform
pair, which still drive the description's "🎁 Thanks to …" line — that
flow is unchanged. Different semantic, different output.

- Schema bumped to v8 with an additive migration (empty-string default).
- Tag generator gates on a non-empty trim, reuses tagFriendlyGameName
  for the 30-char per-tag limit, and lets the existing dedup pass
  collapse case-insensitive duplicates against any future tag source.
- All 6 locales (en/vi/ja/es/ko/zh) translated; validate:locales clean.
- 4 new tag-generator tests cover emission, empty/whitespace skip,
  dedup vs sponsorName, and over-long truncation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 09:15:12 +07:00
poli0981andClaude Opus 4.7 845d05b05a fix(deploy): correct GH Pages base path to /youtube-generator/
The deployed site at https://poli0981.github.io/youtube-generator/ was
serving a blank page because Vite's base was hardcoded to /yt-desc-gen/
(an old project name). Every asset request 404'd.

The actual GitHub repo is poli0981/youtube-generator, confirmed by the
Pages deploy log: "Evaluated environment url: https://poli0981.github.io/youtube-generator/".
Aligning the Vite base unblocks the live web build.

Also adds an empty public/.nojekyll so Vite copies it into dist/ —
defensive against future bundle filenames Jekyll might skip.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 09:10:18 +07:00
29 changed files with 695 additions and 64 deletions

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "yt-desc-gen",
"version": "0.9.0",
"version": "0.10.0",
"private": true,
"type": "module",
"scripts": {
View File
Whitespace-only changes.
+11
View File
@@ -26,6 +26,9 @@ const PlaylistPage = lazy(() =>
const LogPage = lazy(() =>
import("@pages/LogPage").then((m) => ({ default: m.LogPage })),
);
const AboutPage = lazy(() =>
import("@pages/AboutPage").then((m) => ({ default: m.AboutPage })),
);
function PageLoader() {
return <div className="flex items-center justify-center p-12 text-text-muted">Loading...</div>;
@@ -93,6 +96,14 @@ export default function App() {
</Suspense>
}
/>
<Route
path="about"
element={
<Suspense fallback={<PageLoader />}>
<AboutPage />
</Suspense>
}
/>
</Route>
</Routes>
</HashRouter>
+22 -1
View File
@@ -2,6 +2,7 @@ import { useMemo, useState } from "react";
import type { ClipboardEvent } from "react";
import { useTranslation } from "react-i18next";
import toast from "react-hot-toast";
import { Input } from "@components/ui/Input";
import { ValidatedInput } from "@components/ui/ValidatedInput";
import { Select } from "@components/ui/Select";
import { PLATFORMS } from "@config/platforms";
@@ -26,6 +27,7 @@ export function StoreLinkEditor() {
const storeLinks = useEditorStore((s) => s.storeLinks);
const storeLinkTypes = useEditorStore((s) => s.storeLinkTypes);
const gameName = useEditorStore((s) => s.gameName);
const pubDevName = useEditorStore((s) => s.pubDevName);
const setField = useEditorStore((s) => s.set);
const setNested = useEditorStore((s) => s.setNested);
const setStoreLinkType = useEditorStore((s) => s.setStoreLinkType);
@@ -128,6 +130,15 @@ export function StoreLinkEditor() {
<div className="flex flex-col gap-2">
{PLATFORMS.map((platform) => {
const currentType = storeLinkTypes[platform.id] ?? "paid";
const url = storeLinks[platform.id] ?? "";
// Publisher / Developer site is the only platform that pairs
// with a free-text name field (rendered below the URL once the
// URL is non-empty). The name becomes a YouTube tag — see
// tag-generator.ts. Keeping the input in this same grid (via
// `col-span-2`) preserves vertical rhythm with the rest of
// the platform rows.
const showPubDevName =
platform.id === "publisher" && url.trim().length > 0;
return (
<div
key={platform.id}
@@ -136,7 +147,7 @@ export function StoreLinkEditor() {
<ValidatedInput
label={platform.label}
placeholder={platform.urlPrefix}
value={storeLinks[platform.id] ?? ""}
value={url}
onChange={(v) => {
const final = v && platform.normalize ? platform.normalize(v) : v;
setNested("storeLinks", platform.id, final);
@@ -150,6 +161,16 @@ export function StoreLinkEditor() {
options={typeOptions}
onChange={(v) => setStoreLinkType(platform.id, v as StoreLinkType)}
/>
{showPubDevName && (
<div className="col-span-2">
<Input
label={t("editor.pubDevName")}
placeholder={t("editor.pubDevNamePlaceholder")}
value={pubDevName ?? ""}
onChange={(e) => setField("pubDevName", e.target.value)}
/>
</div>
)}
</div>
);
})}
+13 -7
View File
@@ -1,26 +1,32 @@
import { useState } from "react";
import { Outlet } from "react-router-dom";
import { Header } from "./Header";
import { TabBar } from "./TabBar";
import { Sidebar } from "./Sidebar";
import { ShortcutHelpModal } from "@components/ui/ShortcutHelpModal";
import { useKeyboardShortcuts } from "@hooks/use-keyboard-shortcuts";
import { useGlobalErrorHandler } from "@hooks/use-global-error-handler";
import { useSettingsStore } from "@store/settings-store";
export function AppShell() {
const [showShortcuts, setShowShortcuts] = useState(false);
const setSetting = useSettingsStore((s) => s.setSetting);
const collapsed = useSettingsStore((s) => s.sidebarCollapsed);
useKeyboardShortcuts({
onToggleHelp: () => setShowShortcuts((v) => !v),
onToggleSidebar: () => setSetting("sidebarCollapsed", !collapsed),
});
useGlobalErrorHandler();
return (
<div className="flex min-h-screen flex-col bg-surface-0">
<Header />
<TabBar />
<main className="flex-1 overflow-y-auto">
<Outlet />
</main>
<div className="flex min-h-screen bg-surface-0">
<Sidebar />
<div className="flex min-w-0 flex-1 flex-col">
<Header />
<main className="flex-1 overflow-y-auto">
<Outlet />
</main>
</div>
<ShortcutHelpModal open={showShortcuts} onClose={() => setShowShortcuts(false)} />
</div>
);
+82
View File
@@ -0,0 +1,82 @@
import { NavLink } from "react-router-dom";
import { useTranslation } from "react-i18next";
import {
Pencil,
FileText,
User,
Clock,
Settings,
Layers,
ListVideo,
ScrollText,
Info,
PanelLeftClose,
PanelLeftOpen,
} from "lucide-react";
import clsx from "clsx";
import { useSettingsStore } from "@store/settings-store";
const tabs = [
{ to: "/", labelKey: "tabs.editor", icon: Pencil },
{ to: "/output", labelKey: "tabs.output", icon: FileText },
{ to: "/batch", labelKey: "tabs.batch", icon: Layers },
{ to: "/profiles", labelKey: "tabs.profiles", icon: User },
{ to: "/history", labelKey: "tabs.history", icon: Clock },
{ to: "/playlist", labelKey: "tabs.playlist", icon: ListVideo },
{ to: "/logs", labelKey: "tabs.logs", icon: ScrollText },
{ to: "/settings", labelKey: "tabs.settings", icon: Settings },
{ to: "/about", labelKey: "tabs.about", icon: Info },
] as const;
export function Sidebar() {
const { t } = useTranslation("ui");
const collapsed = useSettingsStore((s) => s.sidebarCollapsed);
const setSetting = useSettingsStore((s) => s.setSetting);
const toggle = () => setSetting("sidebarCollapsed", !collapsed);
return (
<aside
className={clsx(
"flex shrink-0 flex-col border-r border-border bg-surface-1 transition-[width] duration-200",
collapsed ? "w-14" : "w-56",
)}
>
<button
type="button"
onClick={toggle}
aria-label={t(collapsed ? "sidebar.expand" : "sidebar.collapse")}
title={t(collapsed ? "sidebar.expand" : "sidebar.collapse")}
className="flex h-12 items-center justify-center border-b border-border text-text-muted transition-colors hover:bg-surface-2 hover:text-text-primary"
>
{collapsed ? (
<PanelLeftOpen className="h-5 w-5" />
) : (
<PanelLeftClose className="h-5 w-5" />
)}
</button>
<nav className="flex flex-1 flex-col gap-0.5 overflow-y-auto p-2">
{tabs.map((tab) => (
<NavLink
key={tab.to}
to={tab.to}
end={tab.to === "/"}
title={collapsed ? t(tab.labelKey) : undefined}
className={({ isActive }) =>
clsx(
"flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium transition-colors",
collapsed && "justify-center px-0",
isActive
? "bg-accent-muted text-accent"
: "text-text-secondary hover:bg-surface-2 hover:text-text-primary",
)
}
>
<tab.icon className="h-4 w-4 shrink-0" />
{!collapsed && <span className="truncate">{t(tab.labelKey)}</span>}
</NavLink>
))}
</nav>
</aside>
);
}
-42
View File
@@ -1,42 +0,0 @@
import { NavLink } from "react-router-dom";
import { useTranslation } from "react-i18next";
import { Pencil, FileText, User, Clock, Settings, Layers, ListVideo, ScrollText } from "lucide-react";
import clsx from "clsx";
const tabs = [
{ to: "/", labelKey: "tabs.editor", icon: Pencil },
{ to: "/output", labelKey: "tabs.output", icon: FileText },
{ to: "/batch", labelKey: "tabs.batch", icon: Layers },
{ to: "/profiles", labelKey: "tabs.profiles", icon: User },
{ to: "/history", labelKey: "tabs.history", icon: Clock },
{ to: "/playlist", labelKey: "tabs.playlist", icon: ListVideo },
{ to: "/logs", labelKey: "tabs.logs", icon: ScrollText },
{ to: "/settings", labelKey: "tabs.settings", icon: Settings },
] as const;
export function TabBar() {
const { t } = useTranslation("ui");
return (
<nav className="flex overflow-x-auto border-b border-border bg-surface-1 px-6">
{tabs.map((tab) => (
<NavLink
key={tab.to}
to={tab.to}
end={tab.to === "/"}
className={({ isActive }) =>
clsx(
"flex shrink-0 items-center gap-2 border-b-2 px-4 py-2.5 text-sm font-medium transition-colors",
isActive
? "border-accent text-accent"
: "border-transparent text-text-muted hover:text-text-secondary",
)
}
>
<tab.icon className="h-4 w-4" />
{t(tab.labelKey)}
</NavLink>
))}
</nav>
);
}
+1
View File
@@ -12,6 +12,7 @@ const SHORTCUTS = [
{ keys: "Ctrl + Enter", labelKey: "shortcuts.generate" },
{ keys: "Ctrl + Shift + C", labelKey: "shortcuts.copyAll" },
{ keys: "Ctrl + S", labelKey: "shortcuts.saveDraft" },
{ keys: "Ctrl + B", labelKey: "shortcuts.toggleSidebar" },
{ keys: "Ctrl + /", labelKey: "shortcuts.help" },
{ keys: "?", labelKey: "shortcuts.help" },
{ keys: "Escape", labelKey: "shortcuts.close" },
+27
View File
@@ -0,0 +1,27 @@
import pkg from "../../package.json";
/**
* App metadata + author / social links surfaced on the About page.
*
* 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.
*/
export const ABOUT = {
appName: "YTDescGen",
version: pkg.version,
license: "MIT",
repo: "https://github.com/poli0981/youtube-generator",
issuesUrl: "https://github.com/poli0981/youtube-generator/issues",
licenseUrl: "https://github.com/poli0981/youtube-generator/blob/main/LICENSE",
githubAuthor: "https://github.com/poli0981",
socials: {
youtube: "https://www.youtube.com/@SkullMute",
x: "https://x.com/SkullMute0011",
discord: "https://discord.gg/2aNR3aVt",
kofi: "https://ko-fi.com/skullmute",
patreon: "https://www.patreon.com/skullmute",
},
} as const;
export type AboutSocialId = keyof typeof ABOUT.socials;
+9
View File
@@ -59,6 +59,14 @@ export interface EditorDefaults {
musicAttribution: string;
sponsorName: string;
sponsorPlatform: string;
/**
* Free-text publisher / developer name shown alongside the
* Publisher / Developer site URL in the Store Links editor. Emitted
* as a YouTube tag (e.g. "Ubisoft", "FromSoftware") via tag-generator.
* Independent from {@link sponsorName}, which feeds the description's
* "🎁 Thanks to …" line and is not added to tags.
*/
pubDevName: string;
thumbnailText: string;
pinnedComment: string;
spoilerWarning: boolean;
@@ -123,6 +131,7 @@ export const DEFAULTS = {
musicAttribution: "",
sponsorName: "",
sponsorPlatform: "",
pubDevName: "",
thumbnailText: "",
pinnedComment: "",
spoilerWarning: false,
+116
View File
@@ -0,0 +1,116 @@
import pkg from "../../package.json";
interface ThirdPartyEntry {
readonly name: string;
readonly version: string;
readonly license: string;
readonly url: string;
}
const deps = pkg.dependencies as Record<string, string>;
const devDeps = pkg.devDependencies as Record<string, string>;
// Tiny lookup helper because tsconfig has `noUncheckedIndexedAccess`,
// which would otherwise type every `deps.foo` as `string | undefined`.
// `?` is a sentinel an upgrade is more likely to surface than a silent
// blank — easier to spot than an empty cell.
function v(map: Record<string, string>, key: string): string {
return map[key] ?? "?";
}
/**
* Credits surfaced on the About page. Versions are pulled from
* `package.json` so a `npm install <pkg>` keeps this list honest.
* License + URL are hardcoded (refresh on major upgrades).
*
* Listed in rough import-order: framework first, runtime libs next,
* tooling last.
*/
export const THIRD_PARTY: readonly ThirdPartyEntry[] = [
{
name: "React",
version: v(deps, "react"),
license: "MIT",
url: "https://react.dev/",
},
{
name: "react-dom",
version: v(deps, "react-dom"),
license: "MIT",
url: "https://react.dev/",
},
{
name: "react-router-dom",
version: v(deps, "react-router-dom"),
license: "MIT",
url: "https://reactrouter.com/",
},
{
name: "Zustand",
version: v(deps, "zustand"),
license: "MIT",
url: "https://zustand-demo.pmnd.rs/",
},
{
name: "i18next",
version: v(deps, "i18next"),
license: "MIT",
url: "https://www.i18next.com/",
},
{
name: "react-i18next",
version: v(deps, "react-i18next"),
license: "MIT",
url: "https://react.i18next.com/",
},
{
name: "react-hot-toast",
version: v(deps, "react-hot-toast"),
license: "MIT",
url: "https://react-hot-toast.com/",
},
{
name: "lucide-react",
version: v(deps, "lucide-react"),
license: "ISC",
url: "https://lucide.dev/",
},
{
name: "clsx",
version: v(deps, "clsx"),
license: "MIT",
url: "https://github.com/lukeed/clsx",
},
{
name: "Tauri",
version: v(deps, "@tauri-apps/api"),
license: "Apache-2.0 / MIT",
url: "https://tauri.app/",
},
{
name: "Vite",
version: v(devDeps, "vite"),
license: "MIT",
url: "https://vitejs.dev/",
},
{
name: "TypeScript",
version: v(devDeps, "typescript"),
license: "Apache-2.0",
url: "https://www.typescriptlang.org/",
},
{
name: "Tailwind CSS",
version: v(devDeps, "tailwindcss"),
license: "MIT",
url: "https://tailwindcss.com/",
},
{
name: "Vitest",
version: v(devDeps, "vitest"),
license: "MIT",
url: "https://vitest.dev/",
},
];
export type { ThirdPartyEntry };
+11
View File
@@ -421,6 +421,17 @@ export function generateTags(input: GeneratorInput, options?: TagOptions): strin
allTags.push(...getTrendingTags(composeName, primaryGenre));
}
// Publisher / Developer name (v0.10) — emitted as a bare tag only.
// Distinct semantic from the platform pool above, so the dedup pass
// catches any overlap with sponsorName-style entries case-insensitively.
// No composite (`${pubDevName} ${composeName}`) — would chew through
// the 500-char total budget for marginal search lift.
const pubDev = input.pubDevName?.trim();
if (pubDev) {
const trimmed = tagFriendlyGameName(pubDev, YT_LIMITS.SINGLE_TAG_MAX);
if (trimmed) allTags.push(trimmed);
}
// Dedup (case-insensitive) and enforce per-tag char limit
const seen = new Set<string>();
const deduped: string[] = [];
+8
View File
@@ -237,6 +237,14 @@ export interface GeneratorInput {
* Free-form string so regional / non-listed stores still work.
*/
sponsorPlatform?: string;
/**
* Free-text publisher / developer label paired with the
* `Publisher / Developer site` URL in the Store Links editor. When
* non-empty, the tag generator emits it as a bare YouTube tag (e.g.
* "Ubisoft", "FromSoftware"). Distinct from {@link sponsorName}, which
* drives the description's "🎁 Thanks to …" line and is not tagged.
*/
pubDevName?: string;
spoilerWarning: boolean;
matureWarning: boolean;
/**
+2
View File
@@ -56,6 +56,7 @@ export function useCurrentGeneratorInput(languageOverride?: SupportedLanguage):
musicAttribution: state.musicAttribution,
sponsorName: state.sponsorName,
sponsorPlatform: state.sponsorPlatform,
pubDevName: state.pubDevName,
spoilerWarning: state.spoilerWarning,
matureWarning: state.matureWarning,
playthroughStatus: state.playthroughStatus,
@@ -109,6 +110,7 @@ export function useCurrentGeneratorInput(languageOverride?: SupportedLanguage):
state.musicAttribution,
state.sponsorName,
state.sponsorPlatform,
state.pubDevName,
state.spoilerWarning,
state.matureWarning,
state.playthroughStatus,
+17 -2
View File
@@ -6,9 +6,13 @@ import toast from "react-hot-toast";
interface ShortcutOptions {
onToggleHelp: () => void;
onToggleSidebar: () => void;
}
export function useKeyboardShortcuts({ onToggleHelp }: ShortcutOptions) {
export function useKeyboardShortcuts({
onToggleHelp,
onToggleSidebar,
}: ShortcutOptions) {
const navigate = useNavigate();
const output = useGeneratedOutput();
const { copy } = useClipboard();
@@ -26,6 +30,10 @@ export function useKeyboardShortcuts({ onToggleHelp }: ShortcutOptions) {
} else if (ctrl && !e.shiftKey && e.key === "s") {
e.preventDefault();
toast.success("Draft saved");
} else if (ctrl && !e.shiftKey && (e.key === "b" || e.key === "B")) {
// VS Code convention: Ctrl/Cmd+B toggles the sidebar.
e.preventDefault();
onToggleSidebar();
} else if (ctrl && e.key === "/") {
e.preventDefault();
onToggleHelp();
@@ -44,7 +52,14 @@ export function useKeyboardShortcuts({ onToggleHelp }: ShortcutOptions) {
window.addEventListener("keydown", handleKeyDown);
return () => window.removeEventListener("keydown", handleKeyDown);
}, [navigate, output.title, output.description, copy, onToggleHelp]);
}, [
navigate,
output.title,
output.description,
copy,
onToggleHelp,
onToggleSidebar,
]);
}
/**
+10 -2
View File
@@ -1,7 +1,14 @@
{
"ui": {
"app": ["title", "subtitle"],
"tabs": ["editor", "output", "profiles", "history", "settings", "batch", "playlist", "logs"],
"tabs": ["editor", "output", "profiles", "history", "settings", "batch", "playlist", "logs", "about"],
"sidebar": ["expand", "collapse"],
"about": [
"tagline",
"repoHeading", "repoLabel", "issuesLabel", "authorLabel", "licenseLabel",
"connectHeading", "thirdPartyHeading", "thirdPartyHelp"
],
"about.socials": ["youtube", "x", "discord", "kofi", "patreon"],
"editor.sections": ["gameInfo", "videoSettings", "contentDetails", "attribution", "rig", "storeAndSocial"],
"editor": [
"videoType", "language", "genre", "gameName", "gameNamePlaceholder",
@@ -34,6 +41,7 @@
"musicAttribution", "musicAttributionPlaceholder",
"sponsorName", "sponsorNamePlaceholder",
"sponsorPlatform", "sponsorPlatformPlaceholder",
"pubDevName", "pubDevNamePlaceholder",
"thumbnailText", "thumbnailTextPlaceholder",
"pinnedComment", "pinnedCommentPlaceholder",
"playthrough", "difficulty", "difficultyCustomLabel", "difficultyCustomPlaceholder",
@@ -86,7 +94,7 @@
"history": ["title", "emptyState", "clearAll", "clearConfirm", "searchPlaceholder"],
"settings": ["title", "appearance", "defaults", "editorSettings", "tagSettings", "historySettings", "theme", "appLanguage", "defaultOutputLanguage", "defaultGenre", "showCharCount", "compactTagDisplay", "historyLimit", "multilingualTags", "trendingTags", "hashtagCount", "showQualityBadge", "showCopyright", "showUsagePolicy", "showSponsorCredit", "titleFormatTitle", "descriptionSettingsTitle", "badgePosition", "badgePositionPrefix", "badgePositionMiddle", "badgePositionSuffix", "titleSeparator", "titleSeparatorEmDash", "titleSeparatorHyphen", "titleSeparatorColon", "titleSeparatorPipe", "badgeCase", "badgeCaseUpper", "badgeCaseLower", "showPinnedCommentTemplate", "pinnedCommentIncludeAskNextGame", "pinnedCommentIncludeGenrePlaylist", "genrePlaylistsTitle", "genrePlaylistsHelp", "genrePlaylistsEmptyHint"],
"batch": ["title", "startPart", "endPart", "generateBatch", "copyAllBatch", "emptyState"],
"shortcuts": ["title", "generate", "copyAll", "saveDraft", "help", "close", "searchPlaceholder", "noResults"],
"shortcuts": ["title", "generate", "copyAll", "saveDraft", "toggleSidebar", "help", "close", "searchPlaceholder", "noResults"],
"validation": ["emailInvalid", "emailMaxExceeded", "urlInvalid", "urlPrefixMismatch", "playlistUrlInvalid"],
"logs": ["title", "emptyState", "clearAll", "clearConfirm", "searchPlaceholder"],
"playlist": ["title", "status", "contentType", "totalVideos", "customNote", "generatePlaylist"]
+27 -1
View File
@@ -11,7 +11,30 @@
"settings": "Settings",
"batch": "Batch",
"playlist": "Playlist",
"logs": "Logs"
"logs": "Logs",
"about": "About"
},
"sidebar": {
"expand": "Expand sidebar",
"collapse": "Collapse sidebar"
},
"about": {
"tagline": "YouTube title, description, and tag generator for Gameplay No Commentary channels.",
"repoHeading": "Repository & License",
"repoLabel": "GitHub Repo",
"issuesLabel": "Report an Issue",
"authorLabel": "Author",
"licenseLabel": "License",
"connectHeading": "Connect",
"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"
}
},
"editor": {
"sections": {
@@ -174,6 +197,8 @@
"sponsorNamePlaceholder": "e.g. Ubisoft, Capcom, Devolver Digital",
"sponsorPlatform": "Key platform",
"sponsorPlatformPlaceholder": "e.g. Steam, Epic Games, GOG",
"pubDevName": "Pub/Dev Name",
"pubDevNamePlaceholder": "e.g. Ubisoft, Capcom, FromSoftware",
"thumbnailText": "Thumbnail Text",
"thumbnailTextPlaceholder": "e.g. SECRET BOSS NO HIT",
"pinnedComment": "Pinned Comment Template",
@@ -471,6 +496,7 @@
"generate": "Generate (switch to Output)",
"copyAll": "Copy All",
"saveDraft": "Save Draft",
"toggleSidebar": "Toggle Sidebar",
"help": "Show Shortcuts",
"close": "Close Modal",
"searchPlaceholder": "Search shortcuts",
+27 -1
View File
@@ -11,7 +11,30 @@
"settings": "Ajustes",
"batch": "Lote",
"playlist": "Playlist",
"logs": "Registros"
"logs": "Registros",
"about": "Acerca de"
},
"sidebar": {
"expand": "Expandir barra lateral",
"collapse": "Colapsar barra lateral"
},
"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",
"authorLabel": "Autor",
"licenseLabel": "Licencia",
"connectHeading": "Contacto",
"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"
}
},
"editor": {
"sections": {
@@ -174,6 +197,8 @@
"sponsorNamePlaceholder": "ej. Ubisoft, Capcom, Devolver Digital",
"sponsorPlatform": "Plataforma de la clave",
"sponsorPlatformPlaceholder": "ej. Steam, Epic Games, GOG",
"pubDevName": "Nombre del editor / desarrollador",
"pubDevNamePlaceholder": "p. ej. Ubisoft, Capcom, FromSoftware",
"thumbnailText": "Texto de Miniatura",
"thumbnailTextPlaceholder": "ej. JEFE SECRETO SIN GOLPES",
"pinnedComment": "Plantilla de Comentario Fijado",
@@ -471,6 +496,7 @@
"generate": "Generar",
"copyAll": "Copiar Todo",
"saveDraft": "Guardar Borrador",
"toggleSidebar": "Mostrar/Ocultar Barra Lateral",
"help": "Ayuda",
"close": "Cerrar",
"searchPlaceholder": "Buscar atajos",
+27 -1
View File
@@ -11,7 +11,30 @@
"settings": "設定",
"batch": "一括",
"playlist": "プレイリスト",
"logs": "ログ"
"logs": "ログ",
"about": "情報"
},
"sidebar": {
"expand": "サイドバーを展開",
"collapse": "サイドバーを折りたたむ"
},
"about": {
"tagline": "ゲームプレイ実況なしチャンネル向けのタイトル・説明文・タグ生成ツール。",
"repoHeading": "リポジトリ & ライセンス",
"repoLabel": "GitHub リポジトリ",
"issuesLabel": "問題を報告",
"authorLabel": "作者",
"licenseLabel": "ライセンス",
"connectHeading": "リンク",
"thirdPartyHeading": "サードパーティ クレジット",
"thirdPartyHelp": "YTDescGen は以下のオープンソースプロジェクトを利用しています。バージョンは package.json から自動取得しています。",
"socials": {
"youtube": "YouTube チャンネル",
"x": "X / Twitter",
"discord": "Discord サーバー",
"kofi": "Ko-fi",
"patreon": "Patreon"
}
},
"editor": {
"sections": {
@@ -174,6 +197,8 @@
"sponsorNamePlaceholder": "例: Ubisoft、カプコン、Devolver Digital",
"sponsorPlatform": "キーのプラットフォーム",
"sponsorPlatformPlaceholder": "例: Steam、Epic Games、GOG",
"pubDevName": "パブリッシャー / デベロッパー名",
"pubDevNamePlaceholder": "例: Ubisoft、Capcom、FromSoftware",
"thumbnailText": "サムネイルテキスト",
"thumbnailTextPlaceholder": "例: 隠しボス ノーヒット",
"pinnedComment": "固定コメントのテンプレート",
@@ -471,6 +496,7 @@
"generate": "生成(出力へ切替)",
"copyAll": "すべてコピー",
"saveDraft": "下書き保存",
"toggleSidebar": "サイドバーの表示切替",
"help": "ショートカット表示",
"close": "モーダルを閉じる",
"searchPlaceholder": "ショートカットを検索",
+27 -1
View File
@@ -11,7 +11,30 @@
"settings": "설정",
"batch": "일괄",
"playlist": "플레이리스트",
"logs": "로그"
"logs": "로그",
"about": "정보"
},
"sidebar": {
"expand": "사이드바 펼치기",
"collapse": "사이드바 접기"
},
"about": {
"tagline": "게임플레이 무편집 채널을 위한 YouTube 제목, 설명, 태그 생성기.",
"repoHeading": "저장소 및 라이선스",
"repoLabel": "GitHub 저장소",
"issuesLabel": "문제 보고",
"authorLabel": "저자",
"licenseLabel": "라이선스",
"connectHeading": "연결",
"thirdPartyHeading": "서드파티 크레딧",
"thirdPartyHelp": "YTDescGen은 다음 오픈소스 프로젝트를 기반으로 합니다. 버전은 package.json에서 자동으로 가져옵니다.",
"socials": {
"youtube": "YouTube 채널",
"x": "X / Twitter",
"discord": "Discord 서버",
"kofi": "Ko-fi",
"patreon": "Patreon"
}
},
"editor": {
"sections": {
@@ -174,6 +197,8 @@
"sponsorNamePlaceholder": "예: Ubisoft, 캡콤, Devolver Digital",
"sponsorPlatform": "키 플랫폼",
"sponsorPlatformPlaceholder": "예: Steam, Epic Games, GOG",
"pubDevName": "퍼블리셔 / 개발사 이름",
"pubDevNamePlaceholder": "예: Ubisoft, Capcom, FromSoftware",
"thumbnailText": "썸네일 텍스트",
"thumbnailTextPlaceholder": "예: 시크릿 보스 노히트",
"pinnedComment": "고정 댓글 템플릿",
@@ -471,6 +496,7 @@
"generate": "생성",
"copyAll": "전체 복사",
"saveDraft": "초안 저장",
"toggleSidebar": "사이드바 토글",
"help": "도움말",
"close": "닫기",
"searchPlaceholder": "단축키 검색",
+27 -1
View File
@@ -11,7 +11,30 @@
"settings": "Cài đặt",
"batch": "Hàng loạt",
"playlist": "Playlist",
"logs": "Nhật ký"
"logs": "Nhật ký",
"about": "Giới thiệu"
},
"sidebar": {
"expand": "Mở rộng sidebar",
"collapse": "Thu gọn sidebar"
},
"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 ý",
"authorLabel": "Tác giả",
"licenseLabel": "Giấy phép",
"connectHeading": "Kết nối",
"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"
}
},
"editor": {
"sections": {
@@ -174,6 +197,8 @@
"sponsorNamePlaceholder": "Ví dụ: Ubisoft, Capcom, Devolver Digital",
"sponsorPlatform": "Platform của key",
"sponsorPlatformPlaceholder": "Ví dụ: Steam, Epic Games, GOG",
"pubDevName": "Tên Pub/Dev",
"pubDevNamePlaceholder": "Ví dụ: Ubisoft, Capcom, FromSoftware",
"thumbnailText": "Text thumbnail",
"thumbnailTextPlaceholder": "vd: SECRET BOSS NO HIT",
"pinnedComment": "Bình luận ghim",
@@ -471,6 +496,7 @@
"generate": "Tạo (chuyển sang Output)",
"copyAll": "Sao chép tất cả",
"saveDraft": "Lưu nháp",
"toggleSidebar": "Bật/tắt Sidebar",
"help": "Hiện phím tắt",
"close": "Đóng",
"searchPlaceholder": "Tìm phím tắt",
+27 -1
View File
@@ -11,7 +11,30 @@
"settings": "设置",
"batch": "批量",
"playlist": "播放列表",
"logs": "日志"
"logs": "日志",
"about": "关于"
},
"sidebar": {
"expand": "展开侧边栏",
"collapse": "折叠侧边栏"
},
"about": {
"tagline": "为游戏实况无解说频道生成 YouTube 标题、描述和标签的工具。",
"repoHeading": "仓库与许可",
"repoLabel": "GitHub 仓库",
"issuesLabel": "报告问题",
"authorLabel": "作者",
"licenseLabel": "许可证",
"connectHeading": "联系方式",
"thirdPartyHeading": "第三方致谢",
"thirdPartyHelp": "YTDescGen 基于以下开源项目构建。版本号从 package.json 自动同步。",
"socials": {
"youtube": "YouTube 频道",
"x": "X / Twitter",
"discord": "Discord 服务器",
"kofi": "Ko-fi",
"patreon": "Patreon"
}
},
"editor": {
"sections": {
@@ -174,6 +197,8 @@
"sponsorNamePlaceholder": "例如:Ubisoft、卡普空、Devolver Digital",
"sponsorPlatform": "激活码平台",
"sponsorPlatformPlaceholder": "例如:Steam、Epic Games、GOG",
"pubDevName": "发行商 / 开发商名称",
"pubDevNamePlaceholder": "例如:Ubisoft、Capcom、FromSoftware",
"thumbnailText": "缩略图文字",
"thumbnailTextPlaceholder": "如:隐藏Boss无伤",
"pinnedComment": "置顶评论模板",
@@ -471,6 +496,7 @@
"generate": "生成",
"copyAll": "复制全部",
"saveDraft": "保存草稿",
"toggleSidebar": "切换侧边栏",
"help": "帮助",
"close": "关闭",
"searchPlaceholder": "搜索快捷键",
+144
View File
@@ -0,0 +1,144 @@
import { useTranslation } from "react-i18next";
import {
ExternalLink,
Github,
Bug,
Youtube,
Twitter,
MessageCircle,
Coffee,
Heart,
type LucideIcon,
} from "lucide-react";
import { ABOUT, type AboutSocialId } from "@config/about";
import { THIRD_PARTY } from "@config/third-party";
interface SocialLinkConfig {
id: AboutSocialId;
url: string;
icon: LucideIcon;
labelKey: string;
}
export function AboutPage() {
const { t } = useTranslation("ui");
// Hidden when empty so a fresh clone with no socials filled in still
// looks tidy on the About page.
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: "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" },
];
const socials = allSocials.filter((s) => s.url.trim().length > 0);
return (
<div className="mx-auto flex max-w-3xl flex-col gap-8 p-6">
<header className="flex flex-col gap-2">
<div className="flex items-baseline gap-3">
<h1 className="text-2xl font-bold text-text-primary">
{ABOUT.appName}
</h1>
<span className="rounded bg-surface-2 px-2 py-0.5 font-mono text-xs text-text-secondary">
v{ABOUT.version}
</span>
</div>
<p className="text-sm text-text-secondary">{t("about.tagline")}</p>
</header>
<section className="flex flex-col gap-3">
<h2 className="text-sm font-semibold uppercase tracking-wide text-text-muted">
{t("about.repoHeading")}
</h2>
<div className="grid gap-2 sm:grid-cols-2">
<ExternalLinkRow
href={ABOUT.repo}
icon={Github}
label={t("about.repoLabel")}
/>
<ExternalLinkRow
href={ABOUT.issuesUrl}
icon={Bug}
label={t("about.issuesLabel")}
/>
<ExternalLinkRow
href={ABOUT.githubAuthor}
icon={Github}
label={t("about.authorLabel")}
/>
<ExternalLinkRow
href={ABOUT.licenseUrl}
icon={ExternalLink}
label={`${t("about.licenseLabel")} · ${ABOUT.license}`}
/>
</div>
</section>
{socials.length > 0 && (
<section className="flex flex-col gap-3">
<h2 className="text-sm font-semibold uppercase tracking-wide text-text-muted">
{t("about.connectHeading")}
</h2>
<div className="grid gap-2 sm:grid-cols-2">
{socials.map((s) => (
<ExternalLinkRow
key={s.id}
href={s.url}
icon={s.icon}
label={t(s.labelKey)}
/>
))}
</div>
</section>
)}
<section className="flex flex-col gap-3">
<h2 className="text-sm font-semibold uppercase tracking-wide text-text-muted">
{t("about.thirdPartyHeading")}
</h2>
<p className="text-xs text-text-muted">{t("about.thirdPartyHelp")}</p>
<ul className="grid gap-1.5 sm:grid-cols-2">
{THIRD_PARTY.map((entry) => (
<li key={entry.name} className="flex items-center justify-between rounded-lg border border-border bg-surface-1 px-3 py-2">
<a
href={entry.url}
target="_blank"
rel="noopener noreferrer"
className="flex items-center gap-2 text-sm text-text-primary hover:text-accent"
>
<span className="font-medium">{entry.name}</span>
<span className="font-mono text-xs text-text-muted">
{entry.version}
</span>
</a>
<span className="text-xs text-text-muted">{entry.license}</span>
</li>
))}
</ul>
</section>
</div>
);
}
interface ExternalLinkRowProps {
href: string;
icon: LucideIcon;
label: string;
}
function ExternalLinkRow({ href, icon: Icon, label }: 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"
>
<Icon className="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>
);
}
+11 -1
View File
@@ -61,6 +61,7 @@ interface EditorData {
musicAttribution: string;
sponsorName: string;
sponsorPlatform: string;
pubDevName: string;
thumbnailText: string;
pinnedComment: string;
spoilerWarning: boolean;
@@ -173,6 +174,7 @@ const initialState: EditorData = {
musicAttribution: DEFAULTS.editor.musicAttribution,
sponsorName: DEFAULTS.editor.sponsorName,
sponsorPlatform: DEFAULTS.editor.sponsorPlatform,
pubDevName: DEFAULTS.editor.pubDevName,
thumbnailText: DEFAULTS.editor.thumbnailText,
pinnedComment: DEFAULTS.editor.pinnedComment,
spoilerWarning: DEFAULTS.editor.spoilerWarning,
@@ -246,7 +248,11 @@ export const useEditorStore = create<EditorState>()(
// schema. Additive — pre-v0.9 drafts get the
// `"main_story"` default for the enum + empty strings for
// the free-form labels.
version: 7,
// v7 → v8: v0.10. `pubDevName` (free-text publisher / developer
// label paired with the Publisher / Developer site URL)
// joined the schema. Additive — empty-string default
// round-trips cleanly.
version: 8,
migrate: (persistedState: unknown, version: number): EditorData => {
if (!persistedState || typeof persistedState !== "object") {
return { ...initialState };
@@ -316,6 +322,9 @@ export const useEditorStore = create<EditorState>()(
if (typeof state.chapterName !== "string") state.chapterName = "";
if (typeof state.questName !== "string") state.questName = "";
}
if (version < 8) {
if (typeof state.pubDevName !== "string") state.pubDevName = "";
}
return { ...initialState, ...state } as EditorData;
},
partialize: (state) => ({
@@ -354,6 +363,7 @@ export const useEditorStore = create<EditorState>()(
musicAttribution: state.musicAttribution,
sponsorName: state.sponsorName,
sponsorPlatform: state.sponsorPlatform,
pubDevName: state.pubDevName,
thumbnailText: state.thumbnailText,
pinnedComment: state.pinnedComment,
spoilerWarning: state.spoilerWarning,
+8
View File
@@ -62,6 +62,13 @@ export interface SettingsData {
genrePlaylists: Partial<Record<GenreId, string>>;
titleFormat: TitleFormatConfig;
editorAccordionState: Record<string, boolean>;
/**
* Vertical sidebar collapsed state (v0.10). When true, the left
* sidebar shows icons only; expanded shows icon + label. Toggled by
* the hamburger button or `Ctrl+B`. Persisted across reloads so
* narrow-screen users don't keep collapsing on every visit.
*/
sidebarCollapsed: boolean;
}
export function detectBrowserLanguage(): SupportedLanguage {
@@ -109,6 +116,7 @@ export const initialSettings: SettingsData = {
rig: false,
storeAndSocial: false,
},
sidebarCollapsed: false,
};
/**
+5 -1
View File
@@ -64,7 +64,10 @@ export const useSettingsStore = create<SettingsState>()(
{
name: STORE_KEY,
storage: createJSONStorage(() => localStorage),
version: 7,
// v7 → v8: v0.10 added `sidebarCollapsed`. Additive — `healSettings`
// back-fills the default via the spread of `initialSettings`, so no
// explicit per-version migration step is required here.
version: 8,
migrate: (persistedState: unknown): SettingsData => healSettings(persistedState),
partialize: (state) => extractData(state),
onRehydrateStorage: () => {
@@ -105,6 +108,7 @@ function extractData(state: SettingsData): SettingsData {
genrePlaylists: { ...state.genrePlaylists },
titleFormat: { ...state.titleFormat },
editorAccordionState: state.editorAccordionState,
sidebarCollapsed: state.sidebarCollapsed,
};
}
+33
View File
@@ -228,4 +228,37 @@ describe("generateTags — long game names (regression for v0.7 silent drop)", (
expect(tags.some((t) => /gameplay/i.test(t))).toBe(true);
expect(tags.every((t) => t.length <= 30)).toBe(true);
});
it("emits pubDevName as a bare tag when set (v0.10)", () => {
const tags = generateTags(makeInput({ pubDevName: "FromSoftware" }));
expect(tags).toContain("FromSoftware");
});
it("does not emit a pubDev tag when pubDevName is empty", () => {
const baseline = generateTags(makeInput());
const withEmpty = generateTags(makeInput({ pubDevName: "" }));
const withWhitespace = generateTags(makeInput({ pubDevName: " " }));
expect(withEmpty).toEqual(baseline);
expect(withWhitespace).toEqual(baseline);
});
it("dedups pubDevName against sponsorName case-insensitively", () => {
// sponsorName itself isn't tagged, so this guards against future
// reintroduction: a user typing the same publisher in both fields
// should see exactly one bare tag for that name.
const tags = generateTags(
makeInput({ sponsorName: "Acme Inc", pubDevName: "ACME INC" }),
);
const acme = tags.filter((t) => t.toLowerCase() === "acme inc");
expect(acme.length).toBe(1);
});
it("trims an over-long pubDevName to fit the 30-char per-tag limit", () => {
const long = "PlatinumGames International Holdings Limited";
const tags = generateTags(makeInput({ pubDevName: long }));
expect(tags.every((t) => t.length <= 30)).toBe(true);
// The trimmed form must start with the original first word so the
// tag remains a recognisable publisher anchor.
expect(tags.some((t) => t.startsWith("Platinum"))).toBe(true);
});
});
+1
View File
@@ -95,6 +95,7 @@ describe("healSettings", () => {
pinnedCommentIncludeGenrePlaylist: true,
genrePlaylists: { horror: "https://www.youtube.com/playlist?list=abc" },
editorAccordionState: { gameInfo: false, videoSettings: true },
sidebarCollapsed: true,
};
const healed = healSettings(complete);
expect(healed).toEqual(complete);
+1 -1
View File
@@ -6,7 +6,7 @@ const isTauri = !!process.env.TAURI_ENV_PLATFORM;
export default defineConfig({
plugins: [react()],
base: isTauri ? "/" : "/yt-desc-gen/",
base: isTauri ? "/" : "/youtube-generator/",
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),