mirror of
https://git.um-react.app/um/um-react.git
synced 2026-11-27 23:56:59 +00:00
refactor: reorganize Kugou and Kuwo imports, add key management features
- Updated import paths for Kugou and Kuwo instructions to reflect new directory structure. - Introduced new key management functionalities for Kugou, including key import and selection logic. - Added comprehensive instructions for both Kugou and Kuwo key handling across various platforms. - Implemented Redux selectors for managing staging and production keys for Kugou and Kuwo. - Enhanced documentation and tests for new features and key management processes.
This commit is contained in:
1 parent
a9a937bc5e
commit
7a11d4f941
58 files changed
+522
-311
No files matched your search
@@ -1,24 +1,28 @@
|
||||
import { createSlice } from '@reduxjs/toolkit';
|
||||
import type { PayloadAction } from '@reduxjs/toolkit';
|
||||
import {
|
||||
ProductionKWMv2Keys,
|
||||
ProductionQMCv2Keys,
|
||||
StagingKWMv2Key,
|
||||
StagingQMCv2Key,
|
||||
kwm2ProductionToStaging,
|
||||
kwm2StagingToProductionKey,
|
||||
kwm2StagingToProductionValue,
|
||||
productionKeyToStaging,
|
||||
type ProductionQMCv2Keys,
|
||||
type StagingQMCv2Key,
|
||||
qmc2ProductionToStaging,
|
||||
qmc2StagingToProductionKey,
|
||||
qmc2StagingToProductionValue,
|
||||
stagingKeyToProduction,
|
||||
ProductionKugouKey,
|
||||
} from '~/features/qmc/types';
|
||||
import {
|
||||
type ProductionKWMv2Keys,
|
||||
type StagingKWMv2Key,
|
||||
kwm2ProductionToStaging,
|
||||
kwm2StagingToProductionKey,
|
||||
kwm2StagingToProductionValue,
|
||||
} from '~/features/kwm/types';
|
||||
import {
|
||||
type ProductionKugouKey,
|
||||
type StagingKugouKey,
|
||||
kugouProductionToStaging,
|
||||
kugouStagingToProductionKey,
|
||||
kugouStagingToProductionValue,
|
||||
StagingKugouKey,
|
||||
} from './keyFormats';
|
||||
} from '~/features/kugou/types';
|
||||
import { EMPTY_QTFM_SETTINGS, type ProductionQtfmSettings, type StagingQtfmSettings } from '~/features/qtfm/types';
|
||||
import { productionKeyToStaging, stagingKeyToProduction } from './keyFormats';
|
||||
import { createKeyListReducers } from './createKeyListReducers';
|
||||
|
||||
export interface BatchDownloadSettings {
|
||||
@@ -46,9 +50,7 @@ export interface StagingSettings {
|
||||
kugou: {
|
||||
keys: StagingKugouKey[];
|
||||
};
|
||||
qtfm: {
|
||||
android: string;
|
||||
};
|
||||
qtfm: StagingQtfmSettings;
|
||||
}
|
||||
|
||||
export interface ProductionSettings {
|
||||
@@ -69,9 +71,7 @@ export interface ProductionSettings {
|
||||
kugou: {
|
||||
keys: ProductionKugouKey; // { [fileName]: ekey }
|
||||
};
|
||||
qtfm: {
|
||||
android: string;
|
||||
};
|
||||
qtfm: ProductionQtfmSettings;
|
||||
}
|
||||
|
||||
export const DEFAULT_BATCH_DOWNLOAD_SETTINGS: BatchDownloadSettings = {
|
||||
@@ -93,7 +93,7 @@ const initialState: SettingsState = {
|
||||
general: { batchDownload: { ...DEFAULT_BATCH_DOWNLOAD_SETTINGS } },
|
||||
qmc2: { allowFuzzyNameSearch: true, keys: [] },
|
||||
kwm2: { keys: [] },
|
||||
qtfm: { android: '' },
|
||||
qtfm: { ...EMPTY_QTFM_SETTINGS },
|
||||
kugou: { keys: [] },
|
||||
},
|
||||
production: {
|
||||
@@ -101,7 +101,7 @@ const initialState: SettingsState = {
|
||||
qmc2: { allowFuzzyNameSearch: true, keys: {} },
|
||||
kwm2: { keys: {} },
|
||||
kugou: { keys: {} },
|
||||
qtfm: { android: '' },
|
||||
qtfm: { ...EMPTY_QTFM_SETTINGS },
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user