feat: UI: move account releated code to header.vue (#84)

This commit is contained in:
Dream Hunter
2024-03-31 16:16:15 +08:00
committed by GitHub
parent ce7430393e
commit a8e961caf4
5 changed files with 168 additions and 147 deletions

View File

@@ -63,14 +63,18 @@ const getOpenSettings = async (message) => {
}
const getSettings = async () => {
if (typeof jwt.value != 'string' || jwt.value.trim() === '' || jwt.value === 'undefined') {
return "";
try {
if (typeof jwt.value != 'string' || jwt.value.trim() === '' || jwt.value === 'undefined') {
return "";
}
const res = await apiFetch("/api/settings");;
settings.value = {
address: res["address"],
auto_reply: res["auto_reply"]
};
} finally {
settings.value.fetched = true;
}
const res = await apiFetch("/api/settings");;
settings.value = {
address: res["address"],
auto_reply: res["auto_reply"]
};
}
const adminShowPassword = async (id) => {