mirror of
https://git.um-react.app/um/um-react.git
synced 2026-12-02 01:27:14 +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
@@ -0,0 +1,41 @@
|
||||
import { PiFileAudio, PiHash } from 'react-icons/pi';
|
||||
import { kwm2DeleteKey, kwm2UpdateKey } from '~/features/settings/settingsSlice';
|
||||
import { useAppDispatch } from '~/hooks';
|
||||
import { memo } from 'react';
|
||||
import type { StagingKWMv2Key } from '~/features/kwm/types';
|
||||
import { KeyInput } from '~/components/KeyInput';
|
||||
|
||||
export const KWMv2EKeyItem = memo(({ id, ekey, quality, rid, i }: StagingKWMv2Key & { i: number }) => {
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
const ekeyLen = ekey.length;
|
||||
const isValidEKey = ekeyLen === 364 || ekeyLen === 704;
|
||||
|
||||
return (
|
||||
<KeyInput
|
||||
name={rid}
|
||||
quality={quality}
|
||||
value={ekey}
|
||||
isValidKey={isValidEKey}
|
||||
onSetName={(value) => dispatch(kwm2UpdateKey({ id, field: 'rid', value }))}
|
||||
onSetQuality={(value) => dispatch(kwm2UpdateKey({ id, field: 'quality', value }))}
|
||||
onSetValue={(value) => dispatch(kwm2UpdateKey({ id, field: 'ekey', value }))}
|
||||
onDelete={() => dispatch(kwm2DeleteKey({ id }))}
|
||||
sequence={i + 1}
|
||||
nameLabel={
|
||||
<>
|
||||
ID
|
||||
<PiHash className="hidden md:inline-block" />
|
||||
</>
|
||||
}
|
||||
qualityLabel={
|
||||
<>
|
||||
质量 <PiFileAudio className="hidden md:inline-block" />
|
||||
</>
|
||||
}
|
||||
namePlaceholder="音频哈希。不建议手动填写。"
|
||||
qualityPlaceholder="比特率 ID"
|
||||
valuePlaceholder="密钥,通常包含 364 或 704 位字符,没有空格。"
|
||||
/>
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user