diff --git a/compose.yaml b/compose.yaml
index e7d079f..fc365e5 100644
--- a/compose.yaml
+++ b/compose.yaml
@@ -1,6 +1,6 @@
# ==============================================================================
# ConvertX-CN 部署範例(docker-compose.yml / compose.yaml)
-#
+#
# 🎉 這是完整版 image,已內建所有轉換依賴:
# - LibreOffice (headless)
# - TexLive Full
@@ -23,19 +23,19 @@ services:
- ./data:/app/data
environment:
# === 帳號設定 ===
- - ACCOUNT_REGISTRATION=false # 是否允許註冊新帳號(首次帳號不受此限制)
- - JWT_SECRET=請更換為一個長且隨機的字串 # 若不設定則使用 randomUUID()
-
+ - ACCOUNT_REGISTRATION=false # 是否允許註冊新帳號(首次帳號不受此限制)
+ - JWT_SECRET=請更換為一個長且隨機的字串 # 若不設定則使用 randomUUID()
+
# === 安全設定 ===
- - HTTP_ALLOWED=false # 是否允許非 HTTPS 連線(僅本地測試時設為 true)
- - ALLOW_UNAUTHENTICATED=false # 是否允許未登入使用(僅本地測試時設為 true)
-
+ - HTTP_ALLOWED=false # 是否允許非 HTTPS 連線(僅本地測試時設為 true)
+ - ALLOW_UNAUTHENTICATED=false # 是否允許未登入使用(僅本地測試時設為 true)
+
# === 檔案管理 ===
- - AUTO_DELETE_EVERY_N_HOURS=24 # 自動刪除超過 N 小時的檔案(0 = 停用)
-
+ - AUTO_DELETE_EVERY_N_HOURS=24 # 自動刪除超過 N 小時的檔案(0 = 停用)
+
# === 時區設定 ===
- TZ=Asia/Taipei
-
+
# === 可選設定 ===
# - WEBROOT=/convertx # 子路徑部署(例如 example.com/convertx/)
# - HIDE_HISTORY=true # 隱藏歷史紀錄頁面
diff --git a/docs/faq.md b/docs/faq.md
index 585d318..8c3b88c 100644
--- a/docs/faq.md
+++ b/docs/faq.md
@@ -5,8 +5,9 @@
### Q: 如何註冊帳號?
首次訪問 ConvertX-CN 時:
+
1. 開啟 `http://localhost:3000`
-2. 點擊右上角 **Register**
+2. 點擊右上角 **Register**
3. 輸入 Email 和密碼
4. 完成!系統會自動登入
@@ -26,6 +27,7 @@ environment:
### Q: 忘記密碼怎麼辦?
目前版本尚未提供密碼重設功能。您可以:
+
1. 刪除 `data/convertx.db`
2. 重新啟動容器
3. 重新註冊
@@ -39,6 +41,7 @@ environment:
### Q: 為什麼 Image 這麼大(4-6 GB)?
ConvertX-CN 是「完整版」,內建:
+
- LibreOffice(文件轉換)
- TexLive(LaTeX 支援)
- FFmpeg(影音轉換)
@@ -46,11 +49,13 @@ ConvertX-CN 是「完整版」,內建:
- CJK 字型
如果您只需要基本功能,可使用原作者的輕量版:
+
- `ghcr.io/c4illin/convertx:latest`
### Q: Docker 啟動失敗?
常見原因:
+
1. **Port 被占用**:改用其他 port,如 `-p 3001:3000`
2. **磁碟空間不足**:Image 需約 6GB
3. **權限問題**:確保 `./data` 資料夾有寫入權限
@@ -62,6 +67,7 @@ chmod -R 777 ./data
### Q: 資料存在哪裡?
所有資料存放在掛載的 `/app/data` 目錄:
+
- `convertx.db` - SQLite 資料庫
- `uploads/` - 上傳的原始檔案
- `output/` - 轉換後的檔案
@@ -97,6 +103,7 @@ chmod -R 777 ./data
### Q: 支援哪些格式?
ConvertX-CN 支援數百種格式,包括:
+
- **影音**:MP4, AVI, MKV, MP3, WAV 等
- **圖片**:PNG, JPG, WEBP, SVG, PDF 等
- **文件**:DOCX, PDF, XLSX, PPTX 等
@@ -116,6 +123,7 @@ ConvertX-CN 支援數百種格式,包括:
### Q: 檔案大小有限制嗎?
預設無硬性限制,但大檔案:
+
- 上傳需要更長時間
- 轉換可能耗用大量記憶體
diff --git a/docs/getting-started.md b/docs/getting-started.md
index 2534a46..04c097c 100644
--- a/docs/getting-started.md
+++ b/docs/getting-started.md
@@ -35,6 +35,7 @@ docker run -d \
```
開啟瀏覽器訪問 `http://localhost:3000`:
+
1. 點擊右上角 **Register** 註冊帳號
2. 輸入 Email 和密碼
3. 完成!開始使用
diff --git a/eslint.config.ts b/eslint.config.ts
index 8ede127..d361883 100644
--- a/eslint.config.ts
+++ b/eslint.config.ts
@@ -61,6 +61,8 @@ export default tseslint.config(
"target",
"convert_to_target",
"job-details-toggle",
+ "language-selector",
+ "language-option",
],
},
],
diff --git a/knip.json b/knip.json
index 4512911..88a90af 100644
--- a/knip.json
+++ b/knip.json
@@ -1,8 +1,11 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
- "entry": ["tests/**/*.test.ts"],
+ "entry": ["tests/**/*.test.ts", "src/i18n/index.ts"],
"project": ["src/**/*.ts", "src/**/*.tsx", "tests/**/*.ts"],
"tailwind": {
"entry": ["src/main.css"]
- }
+ },
+ "ignore": ["src/i18n/**"],
+ "ignoreDependencies": [],
+ "ignoreExportsUsedInFile": true
}
diff --git a/public/i18n.js b/public/i18n.js
index 7b9718c..18f92fd 100644
--- a/public/i18n.js
+++ b/public/i18n.js
@@ -90,7 +90,7 @@
options.forEach((option) => {
option.addEventListener("click", () => {
const locale = option.dataset.locale;
- const webroot = option.dataset.webroot || "";
+ // webroot is available in option.dataset.webroot if needed for future use
// Save to cookie
setCookie(LOCALE_COOKIE_NAME, locale, LOCALE_EXPIRY_DAYS);
diff --git a/src/components/base.tsx b/src/components/base.tsx
index d13a8b2..561c4e2 100644
--- a/src/components/base.tsx
+++ b/src/components/base.tsx
@@ -24,9 +24,7 @@ export const BaseHtml = ({
-
+
diff --git a/src/components/header.tsx b/src/components/header.tsx
index e016668..b0b8868 100644
--- a/src/components/header.tsx
+++ b/src/components/header.tsx
@@ -1,4 +1,9 @@
-import { type SupportedLocale, type Translator, createTranslator, defaultLocale } from "../i18n/index";
+import {
+ type SupportedLocale,
+ type Translator,
+ createTranslator,
+ defaultLocale,
+} from "../i18n/index";
import { LanguageSelector } from "./languageSelector";
export const Header = ({
diff --git a/src/components/languageSelector.tsx b/src/components/languageSelector.tsx
index aa7f5ae..e88ffdd 100644
--- a/src/components/languageSelector.tsx
+++ b/src/components/languageSelector.tsx
@@ -36,7 +36,14 @@ export const LanguageSelector = ({
d="M10.5 21l5.25-11.25L21 21m-9-3h7.5M3 5.621a48.474 48.474 0 016-.371m0 0c1.12 0 2.233.038 3.334.114M9 5.25V3m3.334 2.364C11.176 10.658 7.69 15.08 3 17.502m9.334-12.138c.896.061 1.785.147 2.666.257m-4.589 8.495a18.023 18.023 0 01-3.827-5.802"
/>
- {t("nav", "language")}
+
+ {t("nav", "language")}
+