Skip to content

Commit efd0b99

Browse files
committed
Rime-Wanxiang-Updater:new:增加新的万象辅助码下载更新
1 parent ec61aa7 commit efd0b99

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

Rime-Wanxiang-Updater/components/SettingsView.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,17 @@ const INPUT_METHODS: { label: string; value: InputMethod }[] = [
4848
{ label: "元书输入法", value: "hamster3" },
4949
]
5050

51+
const PRO_KEY_LABELS: Record<ProSchemeKey, string> = {
52+
moqi: "moqi-墨奇",
53+
flypy: "flypy-小鹤",
54+
zrm: "zrm-自然码",
55+
tiger: "tiger-虎码",
56+
wubi: "wubi-五笔",
57+
hanxin: "hanxin-汉心",
58+
shouyou: "shouyou-首右",
59+
wx: "wx-万象",
60+
}
61+
5162
const RESET_STORAGE_KEYS = [
5263
"wanxiang_updater_config",
5364
"wanxiang_meta_store",
@@ -421,7 +432,7 @@ export function SettingsView(props: {
421432
// 供 Picker 渲染用的文本数组(与你示例一致:Text tag={index})
422433
const releaseLabels = useMemo<string[]>(() => ["CNB", "GitHub"], [])
423434
const schemeLabels = useMemo<string[]>(() => ["base", "pro"], [])
424-
const proLabels = useMemo<string[]>(() => PRO_KEYS.slice(), [])
435+
const proLabels = useMemo<string[]>(() => PRO_KEYS.map((key) => PRO_KEY_LABELS[key] ?? key), [])
425436

426437
return (
427438
<NavigationStack>

Rime-Wanxiang-Updater/utils/config.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { Runtime } from "./runtime"
33

44
export type ReleaseSource = "cnb" | "github"
55
export type SchemeEdition = "base" | "pro"
6-
export type ProSchemeKey = "moqi" | "flypy" | "zrm" | "tiger" | "wubi" | "hanxin" | "shouyou"
6+
export type ProSchemeKey = "moqi" | "flypy" | "zrm" | "tiger" | "wubi" | "hanxin" | "shouyou" | "wx"
77
export type InputMethod = "hamster" | "hamster3"
88
export type HomeSectionKey = "local" | "remote" | "notes" | "actions" | "status"
99

10-
export const PRO_KEYS: ProSchemeKey[] = ["moqi", "flypy", "zrm", "tiger", "wubi", "hanxin", "shouyou"]
10+
export const PRO_KEYS: ProSchemeKey[] = ["moqi", "flypy", "zrm", "tiger", "wubi", "hanxin", "shouyou", "wx"]
1111
export const HOME_SECTION_KEYS: HomeSectionKey[] = ["local", "remote", "notes", "actions", "status"]
1212
export const HOME_SECTION_LABELS: Record<HomeSectionKey, string> = {
1313
local: "本地信息",

0 commit comments

Comments
 (0)