Init server timezone

This commit is contained in:
Louis Lam
2022-12-12 22:57:57 +08:00
parent 3b87209e26
commit 39987ba9ac
3 changed files with 32 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ import { io } from "socket.io-client";
import { useToast } from "vue-toastification";
import jwtDecode from "jwt-decode";
import Favico from "favico.js";
import dayjs from "dayjs";
const toast = useToast();
let socket;
@@ -271,6 +272,10 @@ export default {
socket.on("cloudflared_message", (res) => this.cloudflared.message = res);
socket.on("cloudflared_errorMessage", (res) => this.cloudflared.errorMessage = res);
socket.on("cloudflared_token", (res) => this.cloudflared.cloudflareTunnelToken = res);
socket.on("initServerTimezone", () => {
socket.emit("initServerTimezone", dayjs.tz.guess());
});
},
/**