Notifications
Settings Notifications User Panel
This commit is contained in:
@@ -338,13 +338,14 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
},
|
||||
|
||||
addDynamicPages($router: Router | null) {
|
||||
// console.log('this.mypage', this.mypage)
|
||||
// console.log('addDynamicPages')
|
||||
const arrpagesroute: IListRoutes[] = []
|
||||
|
||||
for (const page of this.mypage) {
|
||||
if (page.active) {
|
||||
// console.log('page', page.lang)
|
||||
if (this.isMyLang(page)) {
|
||||
// console.log('page.active', page.title)
|
||||
// console.log('page', page.title, 'OK')
|
||||
arrpagesroute.push({
|
||||
active: true,
|
||||
@@ -416,17 +417,21 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
|
||||
if ($router) {
|
||||
if (tools.sito_online(false)) {
|
||||
// console.log('SITO ONLINE', arrpagesroute)
|
||||
arrpagesroute.forEach(function (route: any) {
|
||||
$router.addRoute(route)
|
||||
})
|
||||
|
||||
$router.addRoute(last)
|
||||
} else {
|
||||
// console.log('SITO OFFLINE')
|
||||
$router.addRoute(sito_offline)
|
||||
$router.addRoute(last)
|
||||
$router.replace('/sito_offline')
|
||||
}
|
||||
|
||||
// console.log('getRoutes', $router.getRoutes())
|
||||
|
||||
const mypathsel = $router.currentRoute.value.fullPath
|
||||
if (mypathsel !== '/') {
|
||||
// console.log('mypathsel', mypathsel)
|
||||
@@ -898,6 +903,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
if (res) {
|
||||
const index = this.mypage.findIndex((rec) => rec.path === path)
|
||||
if (index >= 0) {
|
||||
console.log('load page', path, '...')
|
||||
this.mypage[index] = res.data.mypage
|
||||
}
|
||||
return res.data.mypage
|
||||
@@ -1360,8 +1366,9 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
if (showall) {
|
||||
this.newstosent = (res.data.newstosent) ? [...res.data.newstosent] : []
|
||||
this.mailinglist = (res.data.mailinglist) ? [...res.data.mailinglist] : []
|
||||
this.mypage = (res.data.mypage) ? [...res.data.mypage] : []
|
||||
}
|
||||
this.mypage = (res.data.mypage) ? [...res.data.mypage] : []
|
||||
console.log('this.mypage', this.mypage)
|
||||
|
||||
let isLogged = false
|
||||
|
||||
@@ -1592,7 +1599,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
else if (table === toolsext.TABLOCACCOM) myarr = shared_consts.LocationAccom
|
||||
else if (table === toolsext.TABPREF) myarr = shared_consts.Preferences
|
||||
else if (table === 'usernotifs') myarr = shared_consts.UsersNotif_Adv_List
|
||||
else if (table === 'typenotifs') myarr = shared_consts.typeNotifs
|
||||
else if (table === 'typenotifs') myarr = shared_consts.TypeNotifs_Arr
|
||||
else myarr = this.getListByTable(table)
|
||||
|
||||
if (costanti.TABLES_ARRAY.includes(table)) {
|
||||
|
||||
Reference in New Issue
Block a user