diff --git a/src/renderer/src/components/tools/LocalCard.tsx b/src/renderer/src/components/tools/LocalCard.tsx index 53642cf..7dc3efb 100644 --- a/src/renderer/src/components/tools/LocalCard.tsx +++ b/src/renderer/src/components/tools/LocalCard.tsx @@ -4,7 +4,7 @@ import Icon from '@ant-design/icons' import '@/assets/css/components/tools/local-card.scss' import { COLOR_BACKGROUND, COLOR_MAIN } from '@/constants/common.constants' import { checkDesktop, omitText } from '@/util/common' -import { navigateToStore, navigateToView } from '@/util/navigation' +import { getAndroidUrl, navigateToStore, navigateToView } from '@/util/navigation' import Card from '@/components/common/Card' import FlexBox from '@/components/common/FlexBox' import DragHandle from '@/components/dnd/DragHandle' @@ -21,7 +21,6 @@ interface StoreCardProps extends DetailedHTMLProps { const navigate = useNavigate() @@ -67,10 +65,7 @@ const StoreCard = ({ title: 'Android 端', content: ( - + 请使用手机端扫描上方二维码 ), @@ -98,10 +93,7 @@ const StoreCard = ({ title: 'Android 端', content: ( - + 请使用手机端扫描上方二维码 ), diff --git a/src/renderer/src/components/tools/StoreCard.tsx b/src/renderer/src/components/tools/StoreCard.tsx index 1046600..eb1fcaf 100644 --- a/src/renderer/src/components/tools/StoreCard.tsx +++ b/src/renderer/src/components/tools/StoreCard.tsx @@ -12,6 +12,7 @@ import { import { checkDesktop, omitText } from '@/util/common' import { getLoginStatus, getUserId } from '@/util/auth' import { + getAndroidUrl, navigateToLogin, navigateToSource, navigateToStore, @@ -96,10 +97,7 @@ const StoreCard = ({ title: 'Android 端', content: ( - + 请使用手机端扫描上方二维码 ), @@ -220,10 +218,7 @@ const StoreCard = ({ title: 'Android 端', content: ( - + 请使用手机端扫描上方二维码 ), diff --git a/src/renderer/src/util/navigation.ts b/src/renderer/src/util/navigation.ts index 8b667e8..8f2d5dc 100644 --- a/src/renderer/src/util/navigation.ts +++ b/src/renderer/src/util/navigation.ts @@ -153,3 +153,6 @@ export const getViewPath = ( return `${url.pathname}${url.search}` } + +export const getAndroidUrl = (username: string, toolId: string) => + `oxygen://opentool/${username}/${toolId}`