chore: trivial improvements

This commit is contained in:
sigoden
2023-04-01 16:10:34 +08:00
parent 652f836c23
commit 3c6206849f
2 changed files with 11 additions and 7 deletions

View File

@@ -216,7 +216,11 @@ Uploader.runQueue = async () => {
if (!uploader) return;
if (!Uploader.auth) {
Uploader.auth = true;
await login();
try {
await login();
} catch {
Uploader.auth = false;
}
}
uploader.ajax();
}
@@ -643,6 +647,7 @@ async function saveChange() {
method: "PUT",
body: $editor.value,
});
location.reload();
} catch (err) {
alert(`Failed to save file, ${err.message}`);
}