|
|
@ -417,7 +417,7 @@ import TwoFADialog from "../components/TwoFADialog.vue";
|
|
|
|
dayjs.extend(utc);
|
|
|
|
dayjs.extend(utc);
|
|
|
|
dayjs.extend(timezone);
|
|
|
|
dayjs.extend(timezone);
|
|
|
|
|
|
|
|
|
|
|
|
import { timezoneList, setPageLocale } from "../util-frontend";
|
|
|
|
import { timezoneList, setPageLocale, jwtDecrypt } from "../util-frontend";
|
|
|
|
import { useToast } from "vue-toastification";
|
|
|
|
import { useToast } from "vue-toastification";
|
|
|
|
|
|
|
|
|
|
|
|
const toast = useToast();
|
|
|
|
const toast = useToast();
|
|
|
@ -487,11 +487,9 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
loadUsername() {
|
|
|
|
loadUsername() {
|
|
|
|
const jwtToken = localStorage.getItem("token");
|
|
|
|
const jwtToken = this.$root.storage().token;
|
|
|
|
const [, payloadBase64] = jwtToken.match(/^\S+\.(\S+)\.\S+$/i);
|
|
|
|
const jwtPayload = jwtDecrypt(jwtToken);
|
|
|
|
const payload = atob(payloadBase64);
|
|
|
|
this.username = jwtPayload.username;
|
|
|
|
const oPayload = JSON.parse(payload);
|
|
|
|
|
|
|
|
this.username = oPayload.username;
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
loadSettings() {
|
|
|
|
loadSettings() {
|
|
|
|