feat: v0.1.9 - Setup 頁面 i18n + 語言選擇器 UI 修復 + 文件重構

 Features:
- 全頁拖曳上傳:檔案可拖曳到頁面任何位置
- Setup 頁面新增語言選擇器

🐛 Bug Fixes:
- 語言 icon 尺寸修復(h-5→h-6)
- Dropdown 背景完全不透明
- 新增 scrollbar 樣式

🌍 i18n:
- 所有 confirm/alert 訊息國際化
- Setup 頁面 i18n 完整化

📚 Documentation:
- README 精簡為開箱即用版本
- 新增 docs/deployment/, docs/config/, docs/versions/
This commit is contained in:
Your Name 2026-01-20 15:55:49 +08:00
parent a45a049fe2
commit d563682753
14 changed files with 1305 additions and 594 deletions

View file

@ -28,7 +28,7 @@ export const LanguageSelector = ({
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="h-5 w-5"
class="h-6 w-6"
>
<path
stroke-linecap="round"
@ -58,8 +58,9 @@ export const LanguageSelector = ({
<ul
id="language-dropdown"
class={`
absolute top-full right-0 z-50 mt-2 hidden max-h-[320px] min-w-[160px] flex-col
overflow-y-auto rounded border border-neutral-700 bg-neutral-800 shadow-lg
absolute top-full right-0 z-50 mt-2 scrollbar hidden max-h-[320px] min-w-[180px] flex-col
overflow-y-auto rounded border border-neutral-600 bg-neutral-800 shadow-xl
scrollbar-thumb-neutral-600 scrollbar-track-neutral-800
`}
role="menu"
>

View file

@ -3,6 +3,7 @@ import { jwt } from "@elysiajs/jwt";
import { Elysia, t } from "elysia";
import { BaseHtml } from "../components/base";
import { Header } from "../components/header";
import { LanguageSelector } from "../components/languageSelector";
import db from "../db/db";
import { User } from "../db/types";
import {
@ -93,57 +94,69 @@ export const user = new Elysia()
return (
<BaseHtml title="ConvertX-CN | Setup" webroot={WEBROOT} locale={locale}>
<main
class={`
mx-auto w-full max-w-4xl flex-1 px-2
sm:px-4
`}
>
<h1 class="my-8 text-3xl">{t("setup", "welcome")}</h1>
<article class="article p-0">
<header class="w-full bg-neutral-800 p-4">{t("setup", "createYourAccount")}</header>
<form method="post" action={`${WEBROOT}/register`} class="p-4">
<fieldset class="mb-4 flex flex-col gap-4">
<label class="flex flex-col gap-1">
{t("auth", "email")}
<input
type="email"
name="email"
class="rounded-sm bg-neutral-800 p-3"
placeholder={t("auth", "email")}
autocomplete="email"
required
/>
</label>
<label class="flex flex-col gap-1">
{t("auth", "password")}
<input
type="password"
name="password"
class="rounded-sm bg-neutral-800 p-3"
placeholder={t("auth", "password")}
autocomplete="current-password"
required
/>
</label>
</fieldset>
<input type="submit" value={t("auth", "createAccount")} class="btn-primary" />
</form>
<footer class="p-4">
{t("setup", "reportIssues")}{" "}
<a
class={`
text-accent-500 underline
hover:text-accent-400
`}
href="https://github.com/pi-docket/ConvertX-CN"
>
{t("setup", "github")}
</a>
.
</footer>
</article>
</main>
<>
<header class="w-full p-4">
<nav
class={`
mx-auto flex max-w-4xl items-center justify-between rounded-sm bg-neutral-900 p-4
`}
>
<strong>ConvertX-CN</strong>
<LanguageSelector currentLocale={locale} webroot={WEBROOT} t={t} />
</nav>
</header>
<main
class={`
mx-auto w-full max-w-4xl flex-1 px-2
sm:px-4
`}
>
<h1 class="my-8 text-3xl">{t("setup", "welcome")}</h1>
<article class="article p-0">
<header class="w-full bg-neutral-800 p-4">{t("setup", "createYourAccount")}</header>
<form method="post" action={`${WEBROOT}/register`} class="p-4">
<fieldset class="mb-4 flex flex-col gap-4">
<label class="flex flex-col gap-1">
{t("auth", "email")}
<input
type="email"
name="email"
class="rounded-sm bg-neutral-800 p-3"
placeholder={t("auth", "email")}
autocomplete="email"
required
/>
</label>
<label class="flex flex-col gap-1">
{t("auth", "password")}
<input
type="password"
name="password"
class="rounded-sm bg-neutral-800 p-3"
placeholder={t("auth", "password")}
autocomplete="current-password"
required
/>
</label>
</fieldset>
<input type="submit" value={t("auth", "createAccount")} class="btn-primary" />
</form>
<footer class="p-4">
{t("setup", "reportIssues")}{" "}
<a
class={`
text-accent-500 underline
hover:text-accent-400
`}
href="https://github.com/pi-docket/ConvertX-CN"
>
{t("setup", "github")}
</a>
.
</footer>
</article>
</main>
</>
</BaseHtml>
);
})