From 1176dba2821f3c2cd7ab60a24cae0d01d8d1973c Mon Sep 17 00:00:00 2001 From: josc146 Date: Wed, 24 May 2023 12:22:47 +0800 Subject: [PATCH] fix manifest programFiles version to enhance cdn real-time performance --- frontend/src/utils/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/utils/index.tsx b/frontend/src/utils/index.tsx index 0a33837..dceb258 100644 --- a/frontend/src/utils/index.tsx +++ b/frontend/src/utils/index.tsx @@ -178,14 +178,14 @@ export function downloadProgramFiles() { manifest.programFiles.forEach(({ url, path }) => { FileExists(path).then(exists => { if (!exists) - AddToDownloadList(path, url); + AddToDownloadList(path, url.replace('@master', '@v' + manifest.version)); }); }); } export function forceDownloadProgramFiles() { manifest.programFiles.forEach(({ url, path }) => { - DownloadFile(path, url); + DownloadFile(path, url.replace('@master', '@v' + manifest.version)); }); } @@ -228,7 +228,7 @@ export async function checkUpdate(notifyEvenLatest: boolean = false) { toast(t('Downloading update, please wait. If it is not completed, please manually download the program from GitHub and replace the original program.'), { type: 'info', position: 'bottom-left', - autoClose: 6000 + autoClose: 10000 }); setTimeout(() => { UpdateApp(updateUrl).catch((e) => {