mirror of
https://git.um-react.app/um/um-react.git
synced 2026-11-25 06:46:59 +00:00
- Added detailed comments and documentation for KuGou/KGG key formats and settings in keyFormats.ts, persistSettings.ts, settingsSelector.ts, settingsSlice.ts, and settingsTabs.tsx. - Improved clarity on UI route identifiers and Redux persist keys for better understanding and maintenance.
24 lines
1.0 KiB
TypeScript
24 lines
1.0 KiB
TypeScript
import type { FC } from 'react';
|
|
import { PanelGeneral } from '~/features/settings/panels/PanelGeneral.tsx';
|
|
import { PanelQMCv2Key } from '~/features/settings/panels/PanelQMCv2Key.tsx';
|
|
import { PanelKWMv2Key } from '~/features/settings/panels/PanelKWMv2Key.tsx';
|
|
import { PanelKGGKey } from '~/features/settings/panels/PanelKGGKey.tsx';
|
|
import { PanelQingTing } from '~/features/settings/panels/PanelQingTing.tsx';
|
|
|
|
/**
|
|
* Settings UI route ids → panels.
|
|
*
|
|
* Naming aliases (route vs Redux / persist):
|
|
* - `qmc` ↔ state `qmc2`
|
|
* - `kwm` ↔ state `kwm2`
|
|
* - `kgg` ↔ state `kugou` (persist key stays `kugou`; Phase 2 may align paths)
|
|
* - `qtfm` ↔ state `qtfm`
|
|
*/
|
|
export const SETTINGS_TABS: Record<string, { name: string; Tab: FC }> = {
|
|
general: { name: '通用设置', Tab: PanelGeneral },
|
|
qmc: { name: 'QMCv2 密钥', Tab: PanelQMCv2Key },
|
|
kwm: { name: 'KWMv2 密钥', Tab: PanelKWMv2Key },
|
|
kgg: { name: 'KGG 密钥', Tab: PanelKGGKey },
|
|
qtfm: { name: '蜻蜓 FM', Tab: PanelQingTing },
|
|
} as const;
|