diff --git a/README.md b/README.md index 14bba8e..f43c9ee 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Instant AI Face Swap, Hairstyles & Outfits — One click to a brand new you! -[![GitHub release](https://img.shields.io/github/v/release/idootop/MagicMirror.svg)](https://github.com/idootop/MagicMirror/releases) [![Release MagicMirror](https://github.com/idootop/MagicMirror/actions/workflows/build-app.yaml/badge.svg)](https://github.com/idootop/MagicMirror/actions/workflows/build-app.yaml) [![Discord](https://img.shields.io/discord/xxx?logo=discord&logoColor=white)](https://discord.gg/xxx) +[![GitHub release](https://img.shields.io/github/v/release/idootop/MagicMirror.svg)](https://github.com/idootop/MagicMirror/releases) [![Release MagicMirror](https://github.com/idootop/MagicMirror/actions/workflows/build-app.yaml/badge.svg)](https://github.com/idootop/MagicMirror/actions/workflows/build-app.yaml) [![Discord](https://img.shields.io/discord/1309845147433042002?logo=discord&logoColor=white)](https://discord.gg/87RuMC5smy) ![](src/assets/images/magic-mirror.svg) @@ -21,9 +21,9 @@ Instant AI Face Swap, Hairstyles & Outfits — One click to a brand new you! MagicMirror currently supports macOS and Windows: 1. [Download](https://github.com/idootop/MagicMirror/releases/tag/app-v1.0.0) -2. [Usage Guide](#) +2. [Usage Guide](https://thread-sphynx-f26.notion.site/MagicMirror-User-Guide-147aea89ebf680c189cdd76f5668261a) -If you have any questions or need assistance, please [submit an issue]((https://github.com/idootop/MagicMirror/issues)) or join our [Discord server](). +If you have any questions or need assistance, please [submit an issue](https://github.com/idootop/MagicMirror/issues) or join our [Discord server](https://discord.gg/87RuMC5smy). ## Motivation diff --git a/README.zh-CN.md b/README.zh-CN.md index 7eea671..1e8e5de 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -18,7 +18,7 @@ MagicMirror 目前支持 macOS 和 Windows 系统: 1. [下载安装包](https://github.com/idootop/MagicMirror/releases/tag/app-v1.0.0) -2. [使用教程](#) +2. [使用教程](https://docs.qq.com/doc/p/401be525749f8ccc22d5dc68a9cd9063641b49ad) 如果你还有其他问题,请提交 [Issue](https://github.com/idootop/MagicMirror/issues) 或加入 [QQ 交流群](https://pd.qq.com/s/btxvzr9de)。 diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json index 6e2a512..79f2b54 100644 --- a/src/assets/locales/en.json +++ b/src/assets/locales/en.json @@ -14,6 +14,6 @@ "Switch": "Switch", "About": "About", "downloadURL": "https://github.com/idootop/MagicMirror/releases/download/server-v1.0.0/server_{{type}}_{{arch}}.zip", - "downloadTutorial": "https://github.com/idootop/MagicMirror", + "downloadTutorial": "https://thread-sphynx-f26.notion.site/MagicMirror-User-Guide-147aea89ebf680c189cdd76f5668261a", "aboutLink": "https://github.com/idootop/MagicMirror" } diff --git a/src/assets/locales/zh.json b/src/assets/locales/zh.json index 9da5366..113f72d 100644 --- a/src/assets/locales/zh.json +++ b/src/assets/locales/zh.json @@ -14,6 +14,6 @@ "Switch": "翻转镜像", "About": "关于", "downloadURL": "https://github.com/idootop/MagicMirror/releases/download/server-v1.0.0/server_{{type}}_{{arch}}.zip", - "downloadTutorial": "https://github.com/idootop/MagicMirror", + "downloadTutorial": "https://docs.qq.com/doc/p/401be525749f8ccc22d5dc68a9cd9063641b49ad", "aboutLink": "https://github.com/idootop/MagicMirror" } diff --git a/src/hooks/useDownload.ts b/src/hooks/useDownload.ts index d1d2511..e505251 100644 --- a/src/hooks/useDownload.ts +++ b/src/hooks/useDownload.ts @@ -76,6 +76,10 @@ export function useDownload() { }, []); const download = useCallback(async () => { + const isDownloaded = await Server.isDownloaded(); + if (isDownloaded) { + return true; + } try { const states = kDownloadStates.getState(); if (["downloading", "unzipping"].includes(states.status)) { diff --git a/src/pages/Launch.tsx b/src/pages/Launch.tsx index 7323861..3e5582e 100644 --- a/src/pages/Launch.tsx +++ b/src/pages/Launch.tsx @@ -42,17 +42,23 @@ export function LaunchPage() { } }, [downloadStatus]); - const launching = ["launching", "running"].includes(launchingStatus) ? ( - <> -

{t("Starting... First load may take longer, please wait.")}

- - ) : null; + const launching = + ["idle", "success"].includes(downloadStatus) || + ["launching", "running"].includes(launchingStatus) ? ( + <> +

{t("Starting... First load may take longer, please wait.")}

+ + ) : null; const downloading = ["downloading", "unzipping", "failed"].includes( downloadStatus ) ? ( <> -

{t("Downloading resources, please wait", { progress })}

+

+ {t("Downloading resources, please wait", { + progress: progress.toFixed(2), + })} +

{t(