docs: update faq to include valid version of qmpc #52

This commit is contained in:
鲁树人
2023-11-02 23:57:36 +00:00
parent c39d2edce7
commit a0bab29966
5 changed files with 41 additions and 12 deletions

View File

@@ -7,7 +7,6 @@ import {
Box,
Code,
Heading,
Link,
ListItem,
OrderedList,
Text,
@@ -19,6 +18,7 @@ import hljsStyleGitHub from 'react-syntax-highlighter/dist/esm/styles/hljs/githu
import PowerShellAdbDumpCommandTemplate from './adb_dump.ps1?raw';
import ShellAdbDumpCommandTemplate from './adb_dump.sh?raw';
import { ExtLink } from '../ExtLink';
const applyTemplate = (tpl: string, values: Record<string, unknown>) => {
return tpl.replace(/\{\{\s*(\w+)\s*\}\}/g, (_, key) => (Object.hasOwn(values, key) ? String(values[key]) : '<nil>'));
@@ -96,9 +96,9 @@ export function AndroidADBPullInstruction({ dir, file }: AndroidADBPullInstructi
</Text>
<Text>
💡
<Link href="https://scoop.sh/#/apps?q=adb" isExternal>
<ExtLink href="https://scoop.sh/#/apps?q=adb">
使 Scoop <ExternalLinkIcon />
</Link>
</ExtLink>
</Text>
</ListItem>

View File

@@ -0,0 +1,12 @@
import type { AnchorHTMLAttributes } from 'react';
import { ExternalLinkIcon } from '@chakra-ui/icons';
import { Link } from '@chakra-ui/react';
export function ExtLink({ children, ...props }: AnchorHTMLAttributes<HTMLAnchorElement>) {
return (
<Link isExternal {...props} rel="noreferrer noopener nofollow">
{children}
<ExternalLinkIcon />
</Link>
);
}