Updates
This commit is contained in:
919
package-lock.json
generated
919
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -11,7 +11,7 @@
|
|||||||
"type-check": "vue-tsc --build --force"
|
"type-check": "vue-tsc --build --force"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ztimson/momentum": "^0.50.3",
|
"@ztimson/momentum": "^1.1.9",
|
||||||
"vue": "^3.3.11",
|
"vue": "^3.3.11",
|
||||||
"vue-router": "^4.2.5"
|
"vue-router": "^4.2.5"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Foot from '@/components/foot.vue';
|
import Foot from '@/components/foot.vue';
|
||||||
import Profile from '@/components/profile.vue';
|
import Profile from '@/components/profile.vue';
|
||||||
|
import {momentum} from '@/services/momentum.service';
|
||||||
|
|
||||||
|
momentum.client.inject();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import {environment} from '@/environments/environment';
|
import {environment} from '@/environments/environment';
|
||||||
|
import {Momentum} from '@ztimson/momentum';
|
||||||
import {PathEvent} from '@ztimson/utils';
|
import {PathEvent} from '@ztimson/utils';
|
||||||
import {ref, onUnmounted} from 'vue';
|
import {ref, onUnmounted} from 'vue';
|
||||||
import {Momentum} from '@ztimson/momentum';
|
|
||||||
|
|
||||||
export function mRef<T>(event: string, get: (event?: PathEvent, ...args: any[]) => T | Promise<T>): any;
|
export function mRef<T>(event: string, get: (event?: PathEvent, ...args: any[]) => T | Promise<T>): any;
|
||||||
export function mRef<T>(event: string, init: () => T | Promise<T>, get: (event: PathEvent, ...args: any[]) => T | Promise<T>): any;
|
export function mRef<T>(event: string, init: () => T | Promise<T>, get: (event: PathEvent, ...args: any[]) => T | Promise<T>): any;
|
||||||
@@ -23,14 +23,9 @@ export function mWatch(event: string, get: (event?: PathEvent, ...args: any[]) =
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const momentum = new Momentum(environment.apiUrl, {
|
export const momentum = new Momentum(environment.apiUrl, {
|
||||||
app: 'ZaksCode',
|
app: "ZaksCode",
|
||||||
logLevel: 'ERROR',
|
analytics: "prompt",
|
||||||
persist: true,
|
logLevel: "ERROR",
|
||||||
socket: true
|
|
||||||
});
|
});
|
||||||
momentum.client.inject(true);
|
|
||||||
|
|
||||||
momentum.on('auth/session-expired', () => {
|
momentum.auth.on('logout', () => location.reload());
|
||||||
momentum.auth.logout();
|
|
||||||
location.reload();
|
|
||||||
});
|
|
||||||
|
|||||||
Reference in New Issue
Block a user