Compare commits
3 Commits
v1.0.7
...
c7c1b6c7c6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7c1b6c7c6 | ||
|
|
f7d5d9d019 | ||
|
|
f1d7d3617d |
@@ -1,8 +1,16 @@
|
|||||||
import { boot } from 'quasar/wrappers';
|
import { boot } from 'quasar/wrappers';
|
||||||
import { useUserStore } from 'src/vueLib/login/userStore';
|
import { useUserStore } from 'src/vueLib/login/userStore';
|
||||||
|
import { appApi } from './axios';
|
||||||
|
|
||||||
export default boot(async ({ router }) => {
|
export default boot(async ({ router }) => {
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
|
// load user
|
||||||
|
try {
|
||||||
|
const { data } = await appApi.get('/login/me');
|
||||||
|
await userStore.setUser(data);
|
||||||
|
} catch {
|
||||||
|
/* ignore error */
|
||||||
|
}
|
||||||
|
|
||||||
// Restore logic after router is ready but before navigation
|
// Restore logic after router is ready but before navigation
|
||||||
router.isReady().then(() => {
|
router.isReady().then(() => {
|
||||||
|
|||||||
@@ -48,9 +48,24 @@ export function useNotify() {
|
|||||||
$q?.notify({
|
$q?.notify({
|
||||||
message: message,
|
message: message,
|
||||||
color: color,
|
color: color,
|
||||||
position: 'bottom-right',
|
position: 'top-left',
|
||||||
icon: icon,
|
icon: icon,
|
||||||
timeout: timeout,
|
timeout: timeout,
|
||||||
|
classes: 'custom-notify',
|
||||||
|
attrs: {
|
||||||
|
style: 'margin-top: 50px',
|
||||||
|
},
|
||||||
|
actions: [
|
||||||
|
{
|
||||||
|
icon: 'close',
|
||||||
|
color: 'white',
|
||||||
|
dense: true,
|
||||||
|
round: true,
|
||||||
|
handler: () => {
|
||||||
|
/* just closes */
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,9 +56,23 @@ export const useUserStore = defineStore('user', {
|
|||||||
$q?.notify({
|
$q?.notify({
|
||||||
message: "user '" + this.user?.username + "' logged out",
|
message: "user '" + this.user?.username + "' logged out",
|
||||||
color: 'orange',
|
color: 'orange',
|
||||||
position: 'bottom-right',
|
position: 'top-left',
|
||||||
icon: 'warning',
|
icon: 'warning',
|
||||||
timeout: 5000,
|
timeout: 5000,
|
||||||
|
attrs: {
|
||||||
|
style: 'margin-top: 50px',
|
||||||
|
},
|
||||||
|
actions: [
|
||||||
|
{
|
||||||
|
icon: 'close',
|
||||||
|
color: 'white',
|
||||||
|
dense: true,
|
||||||
|
round: true,
|
||||||
|
handler: () => {
|
||||||
|
/* just closes */
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.error("user '" + this.user?.username + "' logged out");
|
console.error("user '" + this.user?.username + "' logged out");
|
||||||
@@ -73,9 +87,23 @@ export const useUserStore = defineStore('user', {
|
|||||||
$q?.notify({
|
$q?.notify({
|
||||||
message: err,
|
message: err,
|
||||||
color: 'orange',
|
color: 'orange',
|
||||||
position: 'bottom-right',
|
position: 'top-left',
|
||||||
icon: 'warning',
|
icon: 'warning',
|
||||||
timeout: 5000,
|
timeout: 5000,
|
||||||
|
attrs: {
|
||||||
|
style: 'margin-top: 50px',
|
||||||
|
},
|
||||||
|
actions: [
|
||||||
|
{
|
||||||
|
icon: 'close',
|
||||||
|
color: 'white',
|
||||||
|
dense: true,
|
||||||
|
round: true,
|
||||||
|
handler: () => {
|
||||||
|
/* just closes */
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.error("user '" + this.user?.username + "' logged out");
|
console.error("user '" + this.user?.username + "' logged out");
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export function useMemberTable() {
|
|||||||
lastName: true,
|
lastName: true,
|
||||||
birthday: true,
|
birthday: true,
|
||||||
age: true,
|
age: true,
|
||||||
address: false,
|
address: true,
|
||||||
town: true,
|
town: true,
|
||||||
zip: true,
|
zip: true,
|
||||||
phone: true,
|
phone: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user