feat: home page
This commit is contained in:
@@ -81,7 +81,7 @@ export const ProfileItem = (props: Props) => {
|
||||
const expire = parseExpire(extra?.expire);
|
||||
const progress = Math.min(
|
||||
Math.round(((download + upload) * 100) / (total + 0.01)) + 1,
|
||||
100
|
||||
100,
|
||||
);
|
||||
|
||||
const loading = loadingCache[itemData.uid] ?? false;
|
||||
@@ -202,11 +202,12 @@ export const ProfileItem = (props: Props) => {
|
||||
|
||||
try {
|
||||
await updateProfile(itemData.uid, option);
|
||||
Notice.success(t("Update subscription successfully"));
|
||||
mutate("getProfiles");
|
||||
} catch (err: any) {
|
||||
const errmsg = err?.message || err.toString();
|
||||
Notice.error(
|
||||
errmsg.replace(/error sending request for url (\S+?): /, "")
|
||||
errmsg.replace(/error sending request for url (\S+?): /, ""),
|
||||
);
|
||||
} finally {
|
||||
setLoadingCache((cache) => ({ ...cache, [itemData.uid]: false }));
|
||||
|
||||
Reference in New Issue
Block a user