Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions frontend/src/components/settings/Languages.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ export default {
data() {
const dataObj = {};
const locales = {
"ar_AR": "العربية",
"en_GB": "English",
"es_AR": "Español (Argentina)",
"es_CO": "Español (Colombia)",
"es_ES": "Español",
"es_MX": "Español (Mexico)",
"fr_FR": "Français",
"id_ID": "Bahasa Indonesia",
"lt_LT": "Lietuvių",
"pt_BR": "Português (Brasil)",
"pt_PT": "Português",
"ru_RU": "Русский",
"tr_TR": "Türkçe",
"uk_UA": "Український",
"zh_CN": "中文 (简体)",
ar_AR: "العربية",
en_GB: "English",
es_AR: "Español (Argentina)",
es_CO: "Español (Colombia)",
es_ES: "Español",
es_MX: "Español (Mexico)",
fr_FR: "Français",
id_ID: "Bahasa Indonesia",
lt_LT: "Lietuvių",
pt_BR: "Português (Brasil)",
pt_PT: "Português",
ru_RU: "Русский",
tr_TR: "Türkçe",
uk_UA: "Український",
zh_CN: "中文 (简体)",
};

// Vue3 reactivity breaks with this configuration
Expand Down
21 changes: 9 additions & 12 deletions frontend/src/utils/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,27 +124,24 @@ export async function signup(username: string, password: string) {
export function logout(reason?: string) {
document.cookie = "auth=; Max-Age=0; Path=/; SameSite=Strict;";

const authStore = useAuthStore();
authStore.clearUser();

localStorage.setItem("jwt", "");
if (noAuth) {
window.location.reload();
} else if (authMethod === "proxy" && authLogoutURL !== "") {
if (authMethod === "proxy" && authLogoutURL !== "") {
// Hostinger specific
fetch(authLogoutURL, {
method: "POST",
headers: {
"Content-Type": "application/json",
},
})
.catch(() => {
}).catch(() => {
console.error("Failed to logout using proxy auth");
});
}

router.push({
path: "/login",
});
const authStore = useAuthStore();
authStore.clearUser();

localStorage.setItem("jwt", "");
if (noAuth) {
window.location.reload();
} else if (logoutPage !== "/login") {
document.location.href = `${logoutPage}`;
} else {
Expand Down