mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-21 04:09:39 +08:00
fixes
This commit is contained in:
@@ -51,7 +51,22 @@ export function timezoneList() {
|
||||
}
|
||||
|
||||
export function setPageLocale() {
|
||||
const html = document.documentElement
|
||||
const html = document.documentElement
|
||||
html.setAttribute('lang', currentLocale() )
|
||||
html.setAttribute('dir', localeDirection() )
|
||||
}
|
||||
}
|
||||
|
||||
export function jwtDecrypt(token) {
|
||||
const base64Url = token.split(".")[1];
|
||||
const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/");
|
||||
const jsonPayload = decodeURIComponent(
|
||||
atob(base64)
|
||||
.split("")
|
||||
.map(function(c) {
|
||||
return "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2);
|
||||
})
|
||||
.join("")
|
||||
);
|
||||
|
||||
return JSON.parse(jsonPayload);
|
||||
}
|
||||
|
Reference in New Issue
Block a user