Compare commits
2 Commits
63c1a25f53
...
244a1b002d
Author | SHA1 | Date | |
---|---|---|---|
244a1b002d | |||
320c80d8cd |
@ -4,6 +4,8 @@ import {
|
|||||||
Center,
|
Center,
|
||||||
Flex,
|
Flex,
|
||||||
HStack,
|
HStack,
|
||||||
|
Icon,
|
||||||
|
IconButton,
|
||||||
Menu,
|
Menu,
|
||||||
MenuButton,
|
MenuButton,
|
||||||
MenuItem,
|
MenuItem,
|
||||||
@ -21,7 +23,7 @@ import {
|
|||||||
} from '@chakra-ui/react';
|
} from '@chakra-ui/react';
|
||||||
import { PanelQMCv2Key } from './panels/PanelQMCv2Key';
|
import { PanelQMCv2Key } from './panels/PanelQMCv2Key';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { MdExpandMore, MdMenu } from 'react-icons/md';
|
import { MdExpandMore, MdMenu, MdOutlineSettingsBackupRestore } from 'react-icons/md';
|
||||||
import { useAppDispatch } from '~/hooks';
|
import { useAppDispatch } from '~/hooks';
|
||||||
import { commitStagingChange, discardStagingChanges } from './settingsSlice';
|
import { commitStagingChange, discardStagingChanges } from './settingsSlice';
|
||||||
|
|
||||||
@ -104,9 +106,14 @@ export function Settings() {
|
|||||||
</Center>
|
</Center>
|
||||||
<Spacer />
|
<Spacer />
|
||||||
<HStack gap="2" justifyContent="flex-end">
|
<HStack gap="2" justifyContent="flex-end">
|
||||||
<Button onClick={handleResetSettings} colorScheme="red" variant="ghost" title="还原为更改前的状态">
|
<IconButton
|
||||||
丢弃更改
|
icon={<Icon as={MdOutlineSettingsBackupRestore} />}
|
||||||
</Button>
|
onClick={handleResetSettings}
|
||||||
|
colorScheme="red"
|
||||||
|
variant="ghost"
|
||||||
|
title="放弃未储存的更改,将设定还原为储存前的状态。"
|
||||||
|
aria-label="放弃未储存的更改"
|
||||||
|
/>
|
||||||
<Button onClick={handleApplySettings}>保存</Button>
|
<Button onClick={handleApplySettings}>保存</Button>
|
||||||
</HStack>
|
</HStack>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
@ -45,22 +45,25 @@ export function PanelQMCv2Key() {
|
|||||||
QMCv2 密钥
|
QMCv2 密钥
|
||||||
</Heading>
|
</Heading>
|
||||||
|
|
||||||
<Text>QQ 音乐目前采用的加密方案(QMCv2),安卓端与 Mac 端均下加密内容与密钥隔离储存。</Text>
|
<Text>
|
||||||
|
QQ 音乐目前采用的加密方案(QMCv2)。在使用「QQ 音乐」安卓、Mac 或 iOS
|
||||||
|
客户端的情况下,其「离线加密文件」对应的「密钥」储存在独立的数据库文件内。
|
||||||
|
</Text>
|
||||||
|
|
||||||
<Box pb={2} pt={2}>
|
<Box pb={2} pt={2}>
|
||||||
<ButtonGroup isAttached variant="outline">
|
<ButtonGroup isAttached colorScheme="purple" variant="outline">
|
||||||
<Button onClick={addKey} leftIcon={<Icon as={MdAdd} />}>
|
<Button onClick={addKey} leftIcon={<Icon as={MdAdd} />}>
|
||||||
添加
|
添加一条密钥
|
||||||
</Button>
|
</Button>
|
||||||
<Menu>
|
<Menu>
|
||||||
<MenuButton as={IconButton} icon={<MdExpandMore />}></MenuButton>
|
<MenuButton as={IconButton} icon={<MdExpandMore />}></MenuButton>
|
||||||
<MenuList>
|
<MenuList>
|
||||||
<MenuItem onClick={() => setShowImportModal(true)} icon={<Icon as={MdFileUpload} boxSize={5} />}>
|
<MenuItem onClick={() => setShowImportModal(true)} icon={<Icon as={MdFileUpload} boxSize={5} />}>
|
||||||
从文件导入
|
从文件导入密钥
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuDivider />
|
<MenuDivider />
|
||||||
<MenuItem color="red" onClick={clearAll} icon={<Icon as={MdDeleteForever} boxSize={5} />}>
|
<MenuItem color="red" onClick={clearAll} icon={<Icon as={MdDeleteForever} boxSize={5} />}>
|
||||||
清空
|
清空密钥
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</MenuList>
|
</MenuList>
|
||||||
</Menu>
|
</Menu>
|
||||||
|
Loading…
Reference in New Issue
Block a user