allow avatarImg to be local absolute path

This commit is contained in:
josc146
2023-10-27 12:53:20 +08:00
parent d43954cc88
commit 7078f47f72
3 changed files with 21 additions and 5 deletions

View File

@@ -289,6 +289,14 @@ export function bytesToReadable(size: number) {
else return bytesToGb(size) + ' GB';
}
export function absPathAsset(path: string) {
if ((path.length > 0 && path[0] === '/') ||
(path.length > 1 && path[1] === ':')) {
return '=>' + path;
}
return path;
}
export async function checkUpdate(notifyEvenLatest: boolean = false) {
fetch(!commonStore.settings.giteeUpdatesSource ?
'https://api.github.com/repos/josstorer/RWKV-Runner/releases/latest' :