feat: integrate FAQ to webapp

This commit is contained in:
鲁树人
2023-09-05 01:34:42 +01:00
parent 36a289ee9e
commit 99197e85fe
18 changed files with 380 additions and 50 deletions

50
src/faq/KuwoFAQ.tsx Normal file
View File

@@ -0,0 +1,50 @@
import { Alert, AlertIcon, Container, List, ListItem, Text, VStack, chakra } from '@chakra-ui/react';
import { Header4 } from '~/components/HelpText/Header4';
import { VQuote } from '~/components/HelpText/VQuote';
import { SegmentTryOfficialPlayer } from './SegmentTryOfficialPlayer';
import { HiWord } from '~/components/HelpText/HiWord';
import { KWMv2AllInstructions } from '~/features/settings/panels/KWMv2/KWMv2AllInstructions';
import { SegmentKeyImportInstructions } from './SegmentKeyImportInstructions';
export function KuwoFAQ() {
return (
<>
<Header4></Header4>
<List spacing={2}>
<ListItem>
<SegmentTryOfficialPlayer />
</ListItem>
<ListItem>
<Text>
<chakra.strong>2</chakra.strong>
</Text>
<Text>
<HiWord></HiWord>
<VQuote>
<strong></strong>
</VQuote>
<VQuote>
<strong></strong>
</VQuote>
{'音质的音乐文件采用新版加密。'}
</Text>
<Text></Text>
<Text>PC平台暂未推出使用新版加密的音质</Text>
<Container p={2}>
<Alert status="warning" borderRadius={5}>
<AlertIcon />
<VStack>
<Text>Android root </Text>
<Text>使使</Text>
</VStack>
</Alert>
</Container>
<SegmentKeyImportInstructions tab="KWMv2 密钥" clientInstructions={<KWMv2AllInstructions />} />
</ListItem>
</List>
</>
);
}

28
src/faq/OtherFAQ.tsx Normal file
View File

@@ -0,0 +1,28 @@
import { ExternalLinkIcon } from '@chakra-ui/icons';
import { Link, Text } from '@chakra-ui/react';
import { Header4 } from '~/components/HelpText/Header4';
import { ProjectIssue } from '~/components/ProjectIssue';
export function OtherFAQ() {
return (
<>
<Header4></Header4>
<Text></Text>
<Text>使</Text>
<Header4></Header4>
<Text>
<ProjectIssue id={34} title="[UI] 全部下载功能" /> {' '}
<ProjectIssue id={43} title="批量下载" />
</Text>
<Header4></Header4>
<Text>
{'欢迎进入 '}
<Link href={'https://t.me/unlock_music_chat'} isExternal>
Telegram -
<ExternalLinkIcon />
</Link>
{' 一起探讨。'}
</Text>
</>
);
}

40
src/faq/QQMusicFAQ.tsx Normal file
View File

@@ -0,0 +1,40 @@
import { Alert, AlertIcon, Container, List, ListItem, Text, chakra } from '@chakra-ui/react';
import { Header4 } from '~/components/HelpText/Header4';
import { SegmentTryOfficialPlayer } from './SegmentTryOfficialPlayer';
import { QMCv2AllInstructions } from '~/features/settings/panels/QMCv2/QMCv2AllInstructions';
import { SegmentKeyImportInstructions } from './SegmentKeyImportInstructions';
export function QQMusicFAQ() {
return (
<>
<Header4></Header4>
<List spacing={2}>
<ListItem>
<SegmentTryOfficialPlayer />
</ListItem>
<ListItem>
<Text>
<chakra.strong>2</chakra.strong>
</Text>
<Text>Windows客户端下载的歌曲无需密钥</Text>
<Container p={2}>
<Alert status="warning" borderRadius={5}>
<AlertIcon />
iOS用户提取歌曲困难Android用户提取密钥需要root
</Alert>
</Container>
<Container p={2} pt={0}>
<Alert status="info" borderRadius={5}>
<AlertIcon />
</Alert>
</Container>
<SegmentKeyImportInstructions tab="QMCv2 密钥" clientInstructions={<QMCv2AllInstructions />} />
</ListItem>
</List>
</>
);
}

View File

@@ -0,0 +1,25 @@
import { Flex, IconButton } from '@chakra-ui/react';
import { MdExpandMore } from 'react-icons/md';
import { HiWord } from '~/components/HelpText/HiWord';
import { VQuote } from '~/components/HelpText/VQuote';
export function SegmentAddKeyDropdown() {
return (
<Flex as="span" alignItems="center">
<VQuote></VQuote>
<HiWord></HiWord>
<IconButton
colorScheme="purple"
variant="outline"
size="sm"
icon={<MdExpandMore />}
ml="2"
borderTopLeftRadius={0}
borderBottomLeftRadius={0}
isDisabled
css={{ ':disabled': { opacity: 1 } }}
aria-label="示例按钮"
/>
</Flex>
);
}

View File

@@ -0,0 +1,44 @@
import { Flex, Icon, ListItem, OrderedList, Tabs, Text } from '@chakra-ui/react';
import { SegmentTopNavSettings } from './SegmentTopNavSettings';
import { VQuote } from '~/components/HelpText/VQuote';
import { SegmentAddKeyDropdown } from './SegmentAddKeyDropdown';
import React from 'react';
import { MdFileUpload } from 'react-icons/md';
export interface SegmentKeyImportInstructionsProps {
clientInstructions: React.ReactNode;
tab: string;
}
export function SegmentKeyImportInstructions({ clientInstructions, tab }: SegmentKeyImportInstructionsProps) {
return (
<>
<Text></Text>
<OrderedList>
<ListItem>
<SegmentTopNavSettings />
</ListItem>
<ListItem>
<VQuote>{tab}</VQuote>
</ListItem>
<ListItem>
<SegmentAddKeyDropdown />
</ListItem>
<ListItem>
<Flex flexDir="row" alignItems="center">
{'选择 '}
<VQuote>
<Icon as={MdFileUpload} boxSize={5} mr={2} />
</VQuote>
</Flex>
</ListItem>
<ListItem>
<Text></Text>
<Tabs display="flex" flexDir="column" border="1px solid" borderColor="gray.300" borderRadius={5}>
{clientInstructions}
</Tabs>
</ListItem>
</OrderedList>
</>
);
}

View File

@@ -0,0 +1,9 @@
import { VQuote } from '~/components/HelpText/VQuote';
export function SegmentTopNavSettings() {
return (
<>
<VQuote></VQuote>
</>
);
}

View File

@@ -0,0 +1,12 @@
import { Text, chakra } from '@chakra-ui/react';
export function SegmentTryOfficialPlayer() {
return (
<>
<Text>
<chakra.strong>1</chakra.strong>
</Text>
<Text></Text>
</>
);
}