changes
This commit is contained in:
@@ -36,16 +36,21 @@ const showmodal = ref(undefined);
|
||||
function getViewport() {
|
||||
let viewport;
|
||||
const width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
||||
|
||||
// Follow Bulma's breakpoints: https://bulma.io/documentation/start/responsiveness/#breakpoints
|
||||
if (width <= 768)
|
||||
viewport = 1; // 'mobile'
|
||||
else if (width >= 769 && width <= 1023)
|
||||
else if (width <= 1023)
|
||||
viewport = 2; // 'tablet'
|
||||
else if (width >= 1024 && width <= 1215)
|
||||
else if (width <= 1215)
|
||||
viewport = 3; // 'desktop'
|
||||
else if (width >= 1216 && width <= 1407)
|
||||
else if (width <= 1407)
|
||||
viewport = 4; // 'widescreen'
|
||||
else if (width >= 1408) viewport = 5; // 'fullhd'
|
||||
$store.commit("viewport", viewport);
|
||||
else viewport = 5; // 'fullhd'
|
||||
|
||||
if (viewport !== $store.viewport) {
|
||||
$store.commit("viewport", viewport);
|
||||
}
|
||||
}
|
||||
async function checkRedirect() {
|
||||
if (route.query.username && route.query.token) {
|
||||
@@ -69,18 +74,6 @@ async function checkRedirect() {
|
||||
async function checkLogin() {
|
||||
if ($store.login ? $store.login.token : false) {
|
||||
$store.commit("rights", await $getdata("grouprights", { group: $store.login.type }));
|
||||
$store.commit(
|
||||
"dealer",
|
||||
await $getdata(
|
||||
"dealer",
|
||||
undefined,
|
||||
{
|
||||
filter: { user: $store.login.id },
|
||||
values: "id,code,name,phone,email,create_time",
|
||||
},
|
||||
true,
|
||||
),
|
||||
);
|
||||
let authtoken = await $getdata("token", { token: $store.login.token }, undefined, true);
|
||||
if (authtoken ? authtoken.expiry : true) return; /* $requestLogin(); */
|
||||
authorized.value = true;
|
||||
|
||||
Reference in New Issue
Block a user