diff --git a/cfg_freeplanet.app/index.ts b/cfg_freeplanet.app/index.ts deleted file mode 100644 index 4ffa7f7..0000000 --- a/cfg_freeplanet.app/index.ts +++ /dev/null @@ -1,294 +0,0 @@ -import { RouteNames } from '@src/router/route-names' -import { GlobalStore, Projects, Todos, UserStore } from '@src/store/Modules' -import { IListRoutes, IMenuList } from '@src/model' -import { tools } from '@src/store/Modules/tools' - -export const cfgrouter = { - - routes: [ - { - path: '/', - name: RouteNames.home, - component: () => import('@/root/home/home.vue') - }, - { - path: '/signup', - name: 'Registration', - component: () => import('@/views/login/signup/signup.vue') - }, - { - path: '/signin', - name: RouteNames.login, - component: () => import('@/views/login/signin/signin.vue') - }, - { - path: '/vreg', - name: 'Verify Reg', - component: () => import('@/views/login/vreg/vreg.vue') - }, - { - path: '/todo/:category', - name: 'Todos', - component: () => import('@/views/todo-list/todo-list.vue'), - meta: { - requiresAuth: true, - async asyncData() { - await Todos.actions.dbLoad({ checkPending: false }) - } - // middleware: [auth] - } - }, - { - path: '/category', - name: 'category', - component: () => import('@/views/categories/category/category.vue') - }, - { - path: '/admin/cfgserv', - name: 'cfgserv', - component: () => import('@/views/admin/cfgServer/cfgServer.vue'), - meta: { - requiresAuth: true - // middleware: [auth] - } - }, - { - path: '/admin/testp1/:category', - name: 'Categories', - component: () => import('@/views/admin/testp1/testp1.vue') - }, - { - path: '/offline', - name: 'Offline', - component: () => import('@/views/offline/offline.vue') - }, - // { - // path: '/malaga', - // name: 'malaga', - // component: () => import('@/root/malaga/malaga.vue') - // }, - { - path: '/' + RouteNames.projectsall + '/:idProj', - name: RouteNames.projectsall, - component: () => import('@/views/projects/proj-list/proj-list.vue'), - meta: { - requiresAuth: false, - async asyncData() { - await Projects.actions.dbLoad({ checkPending: false, onlyiffirsttime: true }) - } - // middleware: [auth] - } - }, - { - path: '/' + RouteNames.myprojects + '/:idProj', - name: RouteNames.myprojects, - component: () => import('@/views/projects/proj-list/proj-list.vue'), - meta: { - requiresAuth: true, - async asyncData() { - await Projects.actions.dbLoad({ checkPending: false, onlyiffirsttime: true }) - } - // middleware: [auth] - } - }, - { - path: '/' + RouteNames.projectsshared + '/:idProj', - name: RouteNames.projectsshared, - component: () => import('@/views/projects/proj-list/proj-list.vue'), - meta: { - requiresAuth: true, - async asyncData() { - await Projects.actions.dbLoad({ checkPending: false, onlyiffirsttime: true }) - } - // middleware: [auth] - } - }, - { - path: '/' + RouteNames.listprojects, - name: RouteNames.listprojects, - component: () => import('@/views/projects/proj-list/proj-list.vue'), - meta: { - requiresAuth: true, - async asyncData() { - await Projects.actions.dbLoad({ checkPending: false, onlyiffirsttime: true }) - } - // middleware: [auth] - } - }, - { - path: '/' + RouteNames.favouriteprojects, - name: RouteNames.favouriteprojects, - component: () => import('@/views/projects/proj-list/proj-list.vue'), - meta: { - requiresAuth: true, - async asyncData() { - await Projects.actions.dbLoad({ checkPending: false, onlyiffirsttime: true }) - } - // middleware: [auth] - } - } - /* - - { - path: '/requestresetpwd', - component: () => import('@/views/login/requestresetpwd.vue'), - meta: { nametranslate: 'Reset your Password' } - }, - { - path: '/updatepwd', - component: () => import('@/views/login/updatepassword.vue'), - meta: { nametranslate: 'Update your Password' } - } - - { - path: '/simpleform', - component: () => import('@/views/form/simpleForm/simpleForm.vue'), - meta: { nametranslate: 'SimpleForm' } - }, - { - path: '/embeeded', - component: () => import('@/views/form/embeeded/embeeded.vue'), - meta: { nametranslate: 'Embeeded' } - }*/ - ], - - getmenu() { - const arrlista = GlobalStore.state.listatodo - const lista: IListRoutes[] = [] - - arrlista.forEach((elem: IMenuList) => { - const item: IListRoutes = { - faIcon: 'fa fa-list-alt', - materialIcon: 'todo', - name: 'pages.' + elem.description, - route: '/todo/' + elem.nametranslate - } - lista.push(item) - }) - - const SHOW_PROJINTHEMENU = false - - let arrlistafavourite = [] - let arrlistaprojtutti = [] - let arrlistaprojmiei = [] - if (SHOW_PROJINTHEMENU) { - arrlistaprojtutti = Projects.getters.listaprojects(RouteNames.projectsall) - arrlistaprojmiei = Projects.getters.listaprojects(RouteNames.myprojects) - arrlistafavourite = Projects.getters.listaprojects(RouteNames.favouriteprojects) - } - - const arrMenu: IMenuList[] = [] - - // PROGETTI -> FAVORITI : - if (arrlistafavourite.length > 0) { - arrMenu.push({ - icon: 'favorite_border', - nametranslate: 'pages.' + RouteNames.favouriteprojects, - urlroute: RouteNames.favouriteprojects, - level_parent: 0.0, - level_child: 0.5, - routes2: arrlistafavourite, - idelem: '' - }) - } - - // PROGETTI -> TUTTI : - arrMenu.push({ - icon: 'accessibility_new', - nametranslate: 'pages.' + RouteNames.projectsall, - urlroute: RouteNames.projectsall, - level_parent: 0.0, - level_child: 0.5, - routes2: [], - idelem: process.env.PROJECT_ID_MAIN - }) - - // PROGETTI -> CONDIVISI : - arrMenu.push({ - icon: 'people_outline', - nametranslate: 'pages.' + RouteNames.projectsshared, - urlroute: RouteNames.projectsshared, - level_parent: 0.0, - level_child: 0.5, - routes2: arrlistaprojtutti, - idelem: process.env.PROJECT_ID_MAIN - }) - - // PROGETTI -> PERSONALI : - arrMenu.push({ - icon: 'person', - nametranslate: 'pages.' + RouteNames.myprojects, - urlroute: RouteNames.myprojects, - level_parent: 0.0, - level_child: 0.5, - routes2: arrlistaprojmiei, - idelem: process.env.PROJECT_ID_MAIN - }) - - const listaprojectMenu: IListRoutes[] = tools.convertMenuListInListRoutes(arrMenu) - - const arrroutes: IListRoutes[] = [] - - tools.addRoute(arrroutes, { route: '/', faIcon: 'fa fa-home', materialIcon: 'home', name: 'pages.home' }) // HOME - - tools.addRoute(arrroutes, { - route: '/todo', faIcon: 'fa fa-list-alt', materialIcon: 'format_list_numbered', name: 'pages.Todo', - routes2: lista, - level_parent: 0.5, - level_child: 0.5 - }) - - const myarrproj = [] - for (const myitem of listaprojectMenu) { - tools.addRoute(myarrproj, myitem) - } - - tools.addRoute(arrroutes, { - route: '', faIcon: 'fa fa-list-alt', materialIcon: 'next_week', name: 'pages.projects', - routes2: myarrproj, - level_parent: 0.0, - level_child: 0.5 - }) - - console.log('arrroutes', arrroutes) - console.log('listaprojectMenu', listaprojectMenu) - // console.log('arrlistaprojmiei', arrlistaprojmiei) - - if (UserStore.state.isAdmin) { - tools.addRoute(arrroutes, { - route: '/category', - faIcon: 'fa fa-list-alt', - materialIcon: 'category', - name: 'pages.Category', - level_parent: 0.0, - level_child: 0.0 - }) - tools.addRoute(arrroutes, { - route: '/admin/cfgserv', - faIcon: 'fa fa-database', - materialIcon: 'event_seat', - name: 'pages.Admin', - level_parent: 0.0, - level_child: 0.0 - }) - tools.addRoute(arrroutes, { - route: '/admin/testp1/par1', - faIcon: 'fa fa-database', - materialIcon: 'restore', - name: 'pages.Test1', - level_parent: 0.0, - level_child: 0.0 - }) - tools.addRoute(arrroutes, { - route: '/admin/testp1/par2', - faIcon: 'fa fa-database', - materialIcon: 'restore', - name: 'pages.Test2', - level_parent: 0.0, - level_child: 0.0 - }) - } - - return arrroutes - } -} diff --git a/cfg_locale b/cfg_locale new file mode 120000 index 0000000..73cc88f --- /dev/null +++ b/cfg_locale @@ -0,0 +1 @@ +cfg_freeplanet.app/ \ No newline at end of file diff --git a/src/layouts/drawer/drawer.ts b/src/layouts/drawer/drawer.ts index 84d70c2..f979618 100644 --- a/src/layouts/drawer/drawer.ts +++ b/src/layouts/drawer/drawer.ts @@ -5,7 +5,7 @@ import { GlobalStore } from '@modules' import Vue from 'vue' import { Component, Prop } from 'vue-property-decorator' -const namespace: string = 'GlobalModule' +const namespace: string = 'Drawer' @Component({ components: { diff --git a/src/root/home/home.ts b/src/root/home/home.ts index 97ba0d7..08d2738 100644 --- a/src/root/home/home.ts +++ b/src/root/home/home.ts @@ -69,6 +69,10 @@ export default class Home extends Vue { GlobalStore.actions.prova() } + get tools() { + return tools + } + get isLogged() { return UserStore.state.isLogged } @@ -116,7 +120,7 @@ export default class Home extends Vue { } public initprompt() { - window.addEventListener('beforeinstallprompt', function(event) { + window.addEventListener('beforeinstallprompt', (event) => { // console.log('******************************** beforeinstallprompt fired') event.preventDefault() // console.log('§§§§§§§§§§§§§§§§§§§§ IMPOSTA DEFERRED PROMPT !!!!!!!!!!!!!!!!! ') @@ -146,128 +150,31 @@ export default class Home extends Vue { this.$router.replace('/signup') } - public displayConfirmNotification() { - let options = null - if ('serviceWorker' in navigator) { - options = { - body: 'You successfully subscribed to our Notification service!', - icon: '/statics/icons/app-icon-96x96.png', - image: '/statics/images/sf-boat.jpg', - dir: 'ltr', - lang: 'enUs', // BCP 47, - vibrate: [100, 50, 200], - badge: '/statics/icons/app-icon-96x96.png', - tag: 'confirm-notification', - renotify: true, // if it's already sent, will Vibrate anyway - actions: [ - { action: 'confirm', title: 'Okay', icon: '/statics/icons/app-icon-96x96.png' }, - { action: 'cancel', title: 'Cancel', icon: '/statics/icons/app-icon-96x96.png' } - ] - } - - if ('serviceWorker' in navigator) { - navigator.serviceWorker.ready - .then(function(swreg) { - swreg.showNotification('Successfully subscribed!', options) - }) - } - } - } - - public urlBase64ToUint8Array(base64String) { - const padding = '='.repeat((4 - base64String.length % 4) % 4) - const base64 = (base64String + padding) - .replace(/\-/g, '+') - .replace(/_/g, '/') - - const rawData = window.atob(base64) - const outputArray = new Uint8Array(rawData.length) - - for (let i = 0; i < rawData.length; ++i) { - outputArray[i] = rawData.charCodeAt(i) - } - return outputArray - } - - public dataURItoBlob(dataURI) { - const byteString = atob(dataURI.split(',')[1]) - const mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0] - const ab = new ArrayBuffer(byteString.length) - const ia = new Uint8Array(ab) - for (let i = 0; i < byteString.length; i++) { - ia[i] = byteString.charCodeAt(i) - } - const blob = new Blob([ab], { type: mimeString }) - return blob - } - - public showNotificationExample() { - let options = null - const mythis = this - if ('serviceWorker' in navigator) { - options = { - body: mythis.$t('notification.subscribed'), - icon: '/statics/icons/android-chrome-192x192.png', - image: '/statics/images/imglogonotif.png', - dir: 'ltr', - lang: 'enUs', // BCP 47, - vibrate: [100, 50, 200], - badge: '/statics/icons/android-chrome-192x192.png', - tag: 'confirm-notification', - renotify: true, // if it's already sent, will Vibrate anyway - actions: [ - { action: 'confirm', title: mythis.$t('dialog.ok'), icon: '/statics/icons/android-chrome-192x192.png' } - // { action: 'cancel', title: 'Cancel', icon: '/statics/icons/android-chrome-192x192.png', } - ] - } - - navigator.serviceWorker.ready - .then(function(swreg) { - swreg.showNotification('aaa', options) - }) - } - } - - public askfornotification() { - tools.showNotif(this.$q, this.$t('notification.waitingconfirm'), {color: 'positive', icon: 'notifications'}) - - Notification.requestPermission((result) => { - console.log('User Choice', result) - if (result === 'granted') { - tools.showNotif(this.$q, this.$t('notification.confirmed'), {color: 'positive', icon: 'notifications'}) - } else { - tools.showNotif(this.$q, this.$t('notification.denied'), {color: 'negative', icon: 'notifications'}) - - // displayConfirmNotification(); - } - }) - - } - - public test_fetch() { - fetch('https:/httpbin.org/post', { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'Accept': 'application/json' - }, - // mode: 'no-cors', - mode: 'cors', - body: JSON.stringify({ message: 'Does this work?' }) - }).then(function(response) { - console.log(response) - if (response) { - return response.json() - } - else { - return null - } - }).then(function(data) { - console.log(data) - }).catch(function(err) { - console.log(err) - }) - } + // public test_fetch() { + // fetch('https:/httpbin.org/post', { + // method: 'POST', + // headers: { + // 'Content-Type': 'application/json', + // 'Accept': 'application/json' + // }, + // // mode: 'no-cors', + // mode: 'cors', + // body: JSON.stringify({ message: 'Does this work?' }) + // }).then(function(response) { + // console.log(response) + // if (response) { + // return response.json() + // } + // else { + // return null + // } + // }).then(function(data) { + // console.log(data) + // }).catch(function(err) { + // console.log(err) + // }) + // } + // public openCreatePostModal() { console.log('APERTO ! openCreatePostModal') diff --git a/src/root/home/home.vue b/src/root/home/home.vue index 8e39424..fdba479 100644 --- a/src/root/home/home.vue +++ b/src/root/home/home.vue @@ -83,7 +83,7 @@ class="enable-notifications shadow" color="primary" rounded size="md" - icon="notifications" @click="askfornotification" + icon="notifications" @click="tools.askfornotification" :label="$t('notification.ask')"/> @@ -170,7 +170,7 @@ class="enable-notifications shadow" color="primary" rounded size="md" - icon="notifications" @click="askfornotification" + icon="notifications" @click="tools.askfornotification" :label="$t('notification.ask')"/> @@ -261,7 +261,7 @@ class="enable-notifications shadow" color="primary" rounded size="md" - icon="notifications" @click="askfornotification" + icon="notifications" @click="tools.askfornotification" :label="$t('notification.ask')"/> diff --git a/src/router/index.ts b/src/router/index.ts index 45e2825..771eda3 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -2,14 +2,12 @@ import Vue from 'vue' import VueRouter, { RouterMode } from 'vue-router' import { PositionResult } from 'vue-router/types/router' -import { IMyRoute, IMyRouteRecord } from './route-config' +import { IMyRoute, IMyRouteRecord, cfgrouter } from './route-config' import { ProgressBar } from '@src/store/Modules/Interface' import { isEqual } from 'lodash' import { UserStore } from '@store' import { tools } from '@src/store/Modules/tools' -import { cfgrouter } from '../../cfg_locale' - Vue.use(VueRouter) /* * If not building with SSR mode, you can diff --git a/src/router/route-config.ts b/src/router/route-config.ts index 347eaa7..9f30a1b 100644 --- a/src/router/route-config.ts +++ b/src/router/route-config.ts @@ -3,7 +3,9 @@ import { RouteConfig, Route, RouteRecord } from 'vue-router/types' import { tools } from '@src/store/Modules/tools' import auth from '../middleware/auth' -import { Projects, Todos } from '@store' +import { GlobalStore, Projects, Todos, UserStore } from '@store' +import { RouteNames } from '@src/router/route-names' +import { IListRoutes, IMenuList } from '@src/model' interface IMyMeta { title?: string, @@ -32,3 +34,297 @@ export interface IMyRouteConfig extends RouteConfig { children?: IMyRouteConfig[], meta?: IMyMeta } + +export const cfgrouter = { + routes: [ + { + path: '/', + name: RouteNames.home, + component: () => import('@/root/home/home.vue') + }, + { + path: '/signup', + name: 'Registration', + component: () => import('@/views/login/signup/signup.vue') + }, + { + path: '/signin', + name: RouteNames.login, + component: () => import('@/views/login/signin/signin.vue') + }, + { + path: '/vreg', + name: 'Verify Reg', + component: () => import('@/views/login/vreg/vreg.vue') + }, + { + path: '/todo/:category', + name: 'Todos', + component: () => import('@/views/todo-list/todo-list.vue'), + meta: { + requiresAuth: true, + async asyncData() { + await Todos.actions.dbLoad({ checkPending: false }) + } + // middleware: [auth] + } + }, + { + path: '/category', + name: 'category', + component: () => import('@/views/categories/category/category.vue') + }, + { + path: '/admin/cfgserv', + name: 'cfgserv', + component: () => import('@/views/admin/cfgServer/cfgServer.vue'), + meta: { + requiresAuth: true + // middleware: [auth] + } + }, + { + path: '/admin/testp1/:category', + name: 'Categories', + component: () => import('@/views/admin/testp1/testp1.vue') + }, + { + path: '/offline', + name: 'Offline', + component: () => import('@/views/offline/offline.vue') + }, + // { + // path: '/malaga', + // name: 'malaga', + // component: () => import('@/root/malaga/malaga.vue') + // }, + { + path: '/' + RouteNames.projectsall + '/:idProj', + name: RouteNames.projectsall, + component: () => import('@/views/projects/proj-list/proj-list.vue'), + meta: { + requiresAuth: false, + async asyncData() { + // await Todos.actions.dbLoad({ checkPending: false }) + await Projects.actions.dbLoad({ checkPending: false, onlyiffirsttime: true }) + } + // middleware: [auth] + } + }, + { + path: '/' + RouteNames.myprojects + '/:idProj', + name: RouteNames.myprojects, + component: () => import('@/views/projects/proj-list/proj-list.vue'), + meta: { + requiresAuth: true, + async asyncData() { + // await Todos.actions.dbLoad({ checkPending: false }) + await Projects.actions.dbLoad({ checkPending: false, onlyiffirsttime: true }) + } + // middleware: [auth] + } + }, + { + path: '/' + RouteNames.projectsshared + '/:idProj', + name: RouteNames.projectsshared, + component: () => import('@/views/projects/proj-list/proj-list.vue'), + meta: { + requiresAuth: true, + async asyncData() { + // await Todos.actions.dbLoad({ checkPending: false }) + await Projects.actions.dbLoad({ checkPending: false, onlyiffirsttime: true }) + } + // middleware: [auth] + } + }, + { + path: '/' + RouteNames.listprojects, + name: RouteNames.listprojects, + component: () => import('@/views/projects/proj-list/proj-list.vue'), + meta: { + requiresAuth: true, + async asyncData() { + // await Todos.actions.dbLoad({ checkPending: false }) + await Projects.actions.dbLoad({ checkPending: false, onlyiffirsttime: true }) + } + // middleware: [auth] + } + }, + { + path: '/' + RouteNames.favouriteprojects, + name: RouteNames.favouriteprojects, + component: () => import('@/views/projects/proj-list/proj-list.vue'), + meta: { + requiresAuth: true, + async asyncData() { + // await Todos.actions.dbLoad({ checkPending: false }) + await Projects.actions.dbLoad({ checkPending: false, onlyiffirsttime: true }) + } + // middleware: [auth] + } + } + /* + + { + path: '/requestresetpwd', + component: () => import('@/views/login/requestresetpwd.vue'), + meta: { nametranslate: 'Reset your Password' } + }, + { + path: '/updatepwd', + component: () => import('@/views/login/updatepassword.vue'), + meta: { nametranslate: 'Update your Password' } + } + + { + path: '/simpleform', + component: () => import('@/views/form/simpleForm/simpleForm.vue'), + meta: { nametranslate: 'SimpleForm' } + }, + { + path: '/embeeded', + component: () => import('@/views/form/embeeded/embeeded.vue'), + meta: { nametranslate: 'Embeeded' } + }*/ + ], + + getmenu() { + const arrlista = GlobalStore.state.listatodo + const lista: IListRoutes[] = [] + + arrlista.forEach((elem: IMenuList) => { + const item: IListRoutes = { + faIcon: 'fa fa-list-alt', + materialIcon: 'todo', + name: 'pages.' + elem.description, + route: '/todo/' + elem.nametranslate + } + lista.push(item) + }) + + const SHOW_PROJINTHEMENU = false + + let arrlistafavourite = [] + let arrlistaprojtutti = [] + let arrlistaprojmiei = [] + if (SHOW_PROJINTHEMENU) { + arrlistaprojtutti = Projects.getters.listaprojects(RouteNames.projectsall) + arrlistaprojmiei = Projects.getters.listaprojects(RouteNames.myprojects) + arrlistafavourite = Projects.getters.listaprojects(RouteNames.favouriteprojects) + } + + const arrMenu: IMenuList[] = [] + + // PROGETTI -> FAVORITI : + if (arrlistafavourite.length > 0) { + arrMenu.push({ + icon: 'favorite_border', + nametranslate: 'pages.' + RouteNames.favouriteprojects, + urlroute: RouteNames.favouriteprojects, + level_parent: 0.0, + level_child: 0.5, + routes2: arrlistafavourite, + idelem: '' + }) + } + + // PROGETTI -> TUTTI : + arrMenu.push({ + icon: 'accessibility_new', + nametranslate: 'pages.' + RouteNames.projectsall, + urlroute: RouteNames.projectsall, + level_parent: 0.0, + level_child: 0.5, + routes2: [], + idelem: process.env.PROJECT_ID_MAIN + }) + + // PROGETTI -> CONDIVISI : + arrMenu.push({ + icon: 'people_outline', + nametranslate: 'pages.' + RouteNames.projectsshared, + urlroute: RouteNames.projectsshared, + level_parent: 0.0, + level_child: 0.5, + routes2: arrlistaprojtutti, + idelem: process.env.PROJECT_ID_MAIN + }) + + // PROGETTI -> PERSONALI : + arrMenu.push({ + icon: 'person', + nametranslate: 'pages.' + RouteNames.myprojects, + urlroute: RouteNames.myprojects, + level_parent: 0.0, + level_child: 0.5, + routes2: arrlistaprojmiei, + idelem: process.env.PROJECT_ID_MAIN + }) + + const listaprojectMenu: IListRoutes[] = tools.convertMenuListInListRoutes(arrMenu) + + const arrroutes: IListRoutes[] = [] + + tools.addRoute(arrroutes, { route: '/', faIcon: 'fa fa-home', materialIcon: 'home', name: 'pages.home' }) // HOME + + tools.addRoute(arrroutes, { + route: '/todo', faIcon: 'fa fa-list-alt', materialIcon: 'format_list_numbered', name: 'pages.Todo', + routes2: lista, + level_parent: 0.5, + level_child: 0.5 + }) + + const myarrproj = [] + for (const myitem of listaprojectMenu) { + tools.addRoute(myarrproj, myitem) + } + + tools.addRoute(arrroutes, { + route: '', faIcon: 'fa fa-list-alt', materialIcon: 'next_week', name: 'pages.projects', + routes2: myarrproj, + level_parent: 0.0, + level_child: 0.5 + }) + + console.log('arrroutes', arrroutes) + console.log('listaprojectMenu', listaprojectMenu) + // console.log('arrlistaprojmiei', arrlistaprojmiei) + + if (UserStore.state.isAdmin) { + tools.addRoute(arrroutes, { + route: '/category', + faIcon: 'fa fa-list-alt', + materialIcon: 'category', + name: 'pages.Category', + level_parent: 0.0, + level_child: 0.0 + }) + tools.addRoute(arrroutes, { + route: '/admin/cfgserv', + faIcon: 'fa fa-database', + materialIcon: 'event_seat', + name: 'pages.Admin', + level_parent: 0.0, + level_child: 0.0 + }) + tools.addRoute(arrroutes, { + route: '/admin/testp1/par1', + faIcon: 'fa fa-database', + materialIcon: 'restore', + name: 'pages.Test1', + level_parent: 0.0, + level_child: 0.0 + }) + tools.addRoute(arrroutes, { + route: '/admin/testp1/par2', + faIcon: 'fa fa-database', + materialIcon: 'restore', + name: 'pages.Test2', + level_parent: 0.0, + level_child: 0.0 + }) + } + + return arrroutes + } +} diff --git a/src/statics/i18n.js b/src/statics/i18n.js index d1d2ca3..ac007ae 100644 --- a/src/statics/i18n.js +++ b/src/statics/i18n.js @@ -1,4 +1,6 @@ -const messages = { +import msg_website from './i18n_website' + +const msgglobal = { it: { dialog: { ok: 'Ok', @@ -14,125 +16,6 @@ const messages = { comp: { Conta: "Conta", }, - msg: { - hello: 'Buongiorno', - myAppName: 'FreePlanet', - underconstruction: 'App in costruzione...', - myDescriz: '', - sottoTitoloApp: 'Il primo Vero Social', - sottoTitoloApp2: 'Libero, Equo e Solidale', - sottoTitoloApp3: 'dove Vive Consapevolezza e Aiuto Comunitario', - sottoTitoloApp4: 'Gratuito e senza Pubblicità', - }, - homepage: { - descrapp_title1: 'Uniti per Evolvere e Sperimentare', - descrapp_pag1: 'Riscopri come il valore della Condivisione e della Cooperazione, possa aiutarci a ritrovare il profondo ' + - 'senso della Vita, perduto in questa società consumista, e riporti quei Sani Pricìpi Naturali ed Umani di Fratellanza' + - ' che intere popolazioni antiche conoscevano bene.', - descrapp_pag2: 'E\' giunta l\'ora di utilizzare i nuovi strumenti Tecnologici a nostro favore, per Liberarci ' + - 'così piano piano dalla schiavitù del "Lavoro per generare Denaro" e trasformando le nostre Capacitá in ' + - 'Risorse Umane per poterci sostenere e vivere in Armonia con gli altri.', - freesocial: { - title: 'Free Social', - descr: 'Una Community organizzata per Categorie, dove potrai unirti a Gruppi Tematici, ' + - 'Condividere Esperienze e unire Competenze per organizzare e sostenere Progetti Innovativi per il Popolo.

' + - 'Verranno evidenziati sviluppi Etici come l\'Auto-Produzione, la Sostenibilitá, ' + - 'la Buona Salute Naturale e il Rispetto per l\'Ambiente e per tutti gli Esseri Viventi di questo ' + - 'Pianeta. Chiunque potrá esprimere il proprio Consenso o Dissenso partecipando a Sondaggi Interattivi' + - ' e realizzare insieme i Cambiamenti necessari alla nostra Società.', - }, - freetalent: { - title: 'Free Talent', - descr: 'Condividi i tuoi Talenti e Abilità, ' + - 'al posto del denaro guadagnagnerai Tempo.
' + - '"1 ora" diventa moneta di scambio, uguale per tutti.
' + - 'Potrai utilizzare questi tuoi "Crediti Tempo" per soddisfare le tue necessità, cercando nelle Competenze Disponibili.
' + - 'Nel Dare e Ricevere, si creeranno così legami di Amicizia, Solidarietà, Cooperazione e Divertimento

' + - 'Questo progetto vuole diffondere, ora in maniera informatizzata, questa realtà che gia esiste da tanti anni, e viene chiamata "Banca del Tempo". ' + - 'Le segreterie sparse in tutto il mondo, serviranno a dare maggiore affidabilità e fiducia negli scambi di talenti tra persone sconosciute. ' + - 'Creeremo così una rete di fiducia nel vicinato, come giá viene praticato in numerosi Ecovillaggi e Comunità del mondo.', - }, - freegas: { - title: 'Free G.A.S.', - descr: 'Ti piacerebbe utilizzare una App che ti permetta facilmente di acquistare Prodotti Locali direttamente dal Produttore?
' + - 'Con i Gruppi di Acquisto Solidale si evitano intermediazioni inutili, ottenendo parecchi benefici tra cui:
' + - '', - }, - freeliving: { - title: 'Free Co-Living', - descr: 'Unire più realtà, condividendo l\'esperienza di abitare insieme, per un periodo definito:
' + - '1) C\'è chi Vive solo ed ha una casa.
' + - '2) Chi ha bisogno di un alloggio temporaneo.

' + - 'Oggi sempre più persone abitano da sole e vorrebbero continuare a vivere nella propria abitazione.
' + - 'Altre persone invece hanno bisogno di una stanza, per scelta o per necessita, ed in cambio sono disponibili a ' + - 'contribuire alle spese per le utenze domestiche o magari aiutare la persona a fare la spesa, cucinare, pulire casa oppure offrendogli semplicemente compagnia.

' + - 'Tramite questo strumento, le persone potranno trovarsi, mettersi in contatto e decidere in che forma co-abitare e per quanto tempo. Le recensioni rilasciate ed il dettaglio dei profili utenti, ' + - 'aiuterà nella scelta della persona più in sintonia.' - - }, - freecollabora: { - title: 'Chi può Collaborare?', - descr: 'Tutti coloro che sono in linea con Princìpi Etici e ricerca del Benessere Globale del Pianeta
' + - 'Pertanto sono i benvenuti:' + - '', - }, - freesostieni: { - title: 'Come Sostenere il progetto?', - descr: '' + - 'Vedo un futuro dove non si utilizzerà più denaro. Dove le persone si aiuteranno a vicenda e non avranno bisogno di "possedere" cose, ma le condivideranno con gli altri.
', - }, - multiplatform: { - title: 'Multi-piattaforma', - descr: 'E\' compatibile con Google Chrome, Firefox, Safari, iOS, Android e PC. L\'Applicazione s\'installa facilmente, senza passare dallo store. ' + - 'basta condividere il nome del sito www.freeplanet.app.
' + - 'Dopo la registrazione chiederà di aggiungerlo alla lista delle applicazioni e sullo sfondo', - }, - free: { - title: 'Gratuita, Open Source e Niente Pubblicità', - descr: 'Questa App non è in vendita, non ha scopi commerciali, non ha prezzo ed appartiene al Popolo del Nuovo Mondo.
Chiunque potrá utilizzarla e beneficiarne.
A me il compito di gestirla e proteggerla. ' + - 'Verranno accettate solo donazioni Libere di privati ed Associazioni no-profit, in linea con i Principi, che serviranno per coprire le spese.
' + - 'Grazie a Tutti per il sostegno. ' - }, - contacts: 'Contatti' - }, - pages: { - home: 'Principale', - SignUp: 'Registrazione', - SignIn: 'Login', - vreg: 'Verifica Reg', - Test: 'Test', - Category: 'Categorie', - Todo: 'Todo', - personal: 'Personale', - work: 'Lavoro', - shopping: 'Spesa', - Admin: 'Admin', - Test1: 'Test1', - Test2: 'Test2', - projects: 'Progetti', - favproj: 'Favoriti', - projall: 'Tutti', - projectsShared: 'Miei Condivisi', - myprojects: 'Miei Personali' - }, components: { authentication: { login: { @@ -280,126 +163,6 @@ const messages = { comp: { Conta: "Conta", }, - msg: { - hello: 'Buenos Días', - myAppName: 'FreePlanet', - underconstruction: 'App en construcción...', - myDescriz: '', - sottoTitoloApp: 'El primer Verdadero Social', - sottoTitoloApp2: 'Libre, justo y Solidario', - sottoTitoloApp3: 'Donde vive Conciencia y Ayuda comunitaria', - sottoTitoloApp4: 'Gratis y sin publicidad', - }, - homepage: { - descrapp_title1: 'Unidos para evolucionar y experimentar', - descrapp_pag1: 'Redescubra cómo el valor de Compartir y Cooperación puede ayudarnos a encontrar el profundo ' + - 'sentido de la Vida, perdido en esta sociedad consumista, y mostrando esos Principios Naturales Saludables y la Hermandad Humana' + - 'que toda la población antigua conocía bien.', - descrapp_pag2: 'Ha llegado el momento de utilizar las nuevas herramientas tecnológicas en nuestro favor, para liberarnos ' + - 'tan lentamente desde la esclavitud de "Trabaja para generar dinero" y transformando nuestra Capacidad en' + - 'Recursos humanos para poder apoyar y vivir en Armonia con otros.', - freesocial: { - title: 'Free Social', - descr: 'Una comunidad organizada por Categorías, donde puedes unirte a Grupos temáticos, ' + - 'Compartir experiencias y combinar habilidades para organizar y apoyar proyectos innovadores para la gente.

' + - 'Los desarrollos éticos como :
Auto-producción
, Sostenibilidad, ' + - 'la Buena Salud natural y Respeto por el Medio Ambiente y para todos los Seres vivos de este' + - 'Planeta. Cualquiera puede expresar su consentimiento o disidencia participando en Encuestas Interactivas ' + - 'y llevar a cabo juntos los Cambios necesarios para nuestra sociedad.', - }, - freetalent: { - title: 'Free Talent', - descr: 'Comparte tus Talentos y Habilidades, ' + - 'en lugar de dinero, ganarás Tiempo.
' + - '"1 hora" se convierte en una moneda de intercambio, igual para todos.
' + - 'Puedes usar estos "Créditos de tiempo" para satisfacer tus necesidades, buscando en Habilidades disponibles.
' + - 'En Dar y Recibir, crearemos así vínculos de Amistad, Solidaridad, Cooperación y Diversión.

' + - 'Este proyecto apunta a difundir esta realidad, que ya existe desde hace muchos años y se llama "Banco de tiempo". ' + - 'Las secretarías dispersas por todo el mundo, servirán para dar mayor fiabilidad y confianza en el intercambio de talentos entre personas desconocidas. ' + - 'Así crearemos una red de confianza en el vecindario, como ya se practica en numerosos Ecoaldeas y en la Comunidades del mundo.', - }, - freegas: { - title: 'Free G.A.S. (G.C.S.)', - descr: '¿Le gustaría usar una aplicación que le permita comprar productos locales directamente desde el Productor?
' + - 'Con Grupos de Compra Solidarios evitamos intermediarios innecesarios, obteniendo muchos beneficios, incluyendo:
' + - '', - }, - freeliving: { - title: 'Free Co-Living', - descr: 'Para unir más realidad, compartiendo la experiencia de vivir juntos, por un período definido:
' + - '1) Hay quien vive solo y tiene un hogar.
' + - '2) Quién necesita un alojamiento temporal.

' + - 'Hoy en día, más y más personas viven solas y les gustaría seguir viviendo en sus propios hogares.
' + - 'Otras personas necesitan una Habitación, por elección o por necesidad, y a cambio están disponibles en' + - 'contribuir a los gastos para los billetes de casa o tal vez ayuda a la persona mayor para ir de compras, cocinar, limpiar casa o simplemente ofreciéndole compañía.

' + - 'A través de esta herramienta, las personas pueden ponerse en contacto y decidir en qué forma co-habitar. Los comentarios publicados y el detalle de los perfiles de usuario, ' + - 'ayudará a elegir a la persona más en armonía.' - - }, - freecollabora: { - title: '¿Quién puede colaborar?', - descr: 'Todos aquellos que están en línea con Principios éticos y la investigación de Bienestar Global del Planeta
' + - 'Por eso son bienvenidos:' + - '', - }, - freesostieni: { - title: '¿Cómo apoyar el proyecto?', - descr: '' + - '
Veo un futuro en el que ya no usarás dinero. Donde las personas se ayudarán unos a otros y no necesiten "poseer" cosas, pero compartirán con otros.
', - }, - multiplatform: { - title: 'Multi-plataforma', - descr: 'Compatible con Google Chrome, Firefox, Safari, iOS, Android y PC. La aplicación se instala fácilmente, sin pasar por el store. ' + - 'para compartirlo, necesita solo el nombre del sitio web: www.freeplanet.app.
' + - 'Después del registro, le pedirá que lo agregue a la lista de aplicaciones y en la pantalla.', - }, - free: { - title: 'Libre, Código Abierto y Sin Publicidad', - descr: 'Esta aplicación no está a la venta, no tiene un propósito comercial, no tiene precio y pertenece a la Gente del Nuevo Mundo.
' + - 'Cualquiera puede usarla y beneficiarse.
A mí la tarea de gestionarlo y protegerlo. ' + - 'Solo se aceptarán donaciones de particulares y asociaciones sin änimo de lucro, en línea con los Principios, que se utilizarán para cubrir los gastos.
' + - 'Gracias a todos por el apoyo. ' - }, - contacts: 'Contactos' - }, - pages: { - home: 'Principal', - SignUp: 'Nueva Cuenta', - SignIn: 'Entrar', - vreg: 'Verifica Reg', - Test: 'Test', - Category: 'Categorías', - Todo: 'Tareas', - personal: 'Personal', - work: 'Trabajo', - shopping: 'Compras', - Admin: 'Administración', - Test1: 'Test1', - Test2: 'Test2', - projects: 'Proyectos', - favproj: 'Favoritos', - projall: 'Todos', - projectsShared: 'Mis Compartidos', - myprojects: 'Mis Personales', - }, components: { authentication: { login: { @@ -541,126 +304,6 @@ const messages = { comp: { Conta: "Count", }, - msg: { - hello: 'Hello!', - myAppName: 'FreePlanet', - underconstruction: 'App in construction...', - myDescriz: '', - sottoTitoloApp: 'The first Real Social', - sottoTitoloApp2: 'Free, Fair and Equitable', - sottoTitoloApp3: 'Where the conscience and community help live', - sottoTitoloApp4: 'Free and without advertising', - }, - homepage: { - descrapp_title1: 'Together to Evolve and Experiment', - descrapp_pag1: 'Rediscover how the value of Sharing and Cooperation, can help us find the deep meaning of' + - 'Life, lost in this consumer society, and showing those Healthy Natural Principles and Human Brotherhood' + - 'that entire ancient populations knew well.', - descrapp_pag2: 'The time has come to use the new Technological tools in our favor, to Free ourselves ' + - 'so slowly from the slavery of the "Work to generate Money" and transforming our Capacity into' + - 'Human Resources to be able to support and live in Harmony with others.', - freesocial: { - title: 'Free Social', - descr: 'A Community organized by Categories, where you can join Thematic Groups, ' + - 'Share Experiences and combine Skills to organize and support Innovative Projects for the People.

' + - 'Ethical developments such as Auto-Production, Sustainability, ' + - 'Good Natural Health and Respect for the Environment and for all Living Beings of this' + - 'Planet. Anyone can express their Consent or Dissent by participating in Interactive Surveys ' + - 'and carry out together the Changes needed for our society.', - }, - freetalent: { - title: 'Free Talent', - descr: 'Share your Talents and Skills, ' + - 'instead of money, you\'ll earn Time.
' + - '"1 hour" becomes a currency of exchange, equal for all.
' + - 'You can use these "Time Credits" to meet your needs, looking in Available Skills.
' + - 'In Giving and Receiving, we will thus create bonds of Friendship, Solidarity, Cooperation and Enjoyment

' + - 'This project aims to spread this reality, which already exists for many years and is called "Time Bank". ' + - 'The secretariats in all over the world, will serve an extra to give greater reliability and trust in the exchange of talents between unknown people. ' + - 'We will thus create a trust network in the neighborhood, as is already practiced in numerous Ecovillages and Community of the world. ', - }, - freegas: { - title: 'Free G.A.S.', - descr: 'Would you like to use an App that allows you to easily Buy Local Products directly from Manufacturer?
' + - 'With Solidarity Purchase Groups (in Italian: "Gruppo di Aacquisto Solidale") we avoid unnecessary intermediaries, obtaining many benefits including:
' + - '' - }, - freeliving: { - title: 'Free Co-Living', - descr: 'Join more reality, sharing the experience of living together, for a defined period:
' + - '1) Someone Lives alone and has a house.
' + - '2) Who needs a temporary accommodation .

' + - 'Today more and more people live alone and would like to continue living in their own house.
' + - 'Other people instead need a room, by choice or by necessity, and in return they are available to' + - 'contribute to expenses for households or maybe help to go shopping, cooking, cleaning house or simply offering him companionship.
' + - 'Through this tool, people can get in touch and decide in which way co-living. The reviews released and the detail of user profiles, ' + - 'will help in choosing the person more in tune.' - - }, - freecollabora: { - title: 'Who can collaborate?', - descr: 'All those who are in line with Ethical Principles and research of Global Wellness of the Planet
' + - 'Therefore they are welcome:' + - '', - }, - freesostieni: { - title: 'How to support the project?', - descr: '
' + - 'I see a future where you will no longer use money. Where people will help each other and won\'t need to "own" things, but will share with others.
', - }, - multiplatform: { - title: 'Multi-platform', - descr: 'It is compatible with Google Chrome, Firefox, Safari, iOS, Android and PC. The Application is easily installed, without going through the store. ' + - 'just share the nametranslate of this site www.freeplanet.app.
' + - 'After registration it will ask to be added to the application list and in the screen', - }, - free: { - title: 'Free, Open Source and No Advertising', - descr: 'This App is not for sale, has no commercial purpose, is priceless and belongs to the New World People.' + - '
Anyone can use it and benefit from it.
To me the task of managing it and protecting it. ' + - 'Only donations from private individuals and non-profit associations will be accepted, in line with the Principles, which will be used to cover the expenses.
' + - 'Thanks all for the support. ' - }, - contacts: 'Contacts' - }, - pages: { - home: 'Dashboard', - SignUp: 'SignUp', - SignIn: 'SignIn', - vreg: 'Verify Reg', - Test: 'Test', - Category: 'Category', - Todo: 'Todo', - personal: 'Personal', - work: 'Work', - shopping: 'Shopping', - Admin: 'Admin', - Test1: 'Test1', - Test2: 'Test2', - projects: 'Projects', - favproj: 'Favorite', - projall: 'All', - projectsShared: 'My Shared', - myprojects: 'My Personals', - }, components: { authentication: { login: { @@ -789,4 +432,28 @@ const messages = { }, }; + +const msgit = { ...msg_website.it, ...msgglobal.it } +const msges = { ...msg_website.es, ...msgglobal.es } +const msgenUs = { ...msg_website.enUs, ...msgglobal.enUs } + + +const messages = { + it: { ...msgit, + pages: { ...msg_website.it.pages, ...msgglobal.it.pages }, + msg: { ...msg_website.it.msg, ...msgglobal.it.msg }, + homepage: { ...msg_website.it.homepage, ...msgglobal.it.homepage }, + }, + es: { ...msges , + pages: { ...msg_website.es.pages, ...msgglobal.es.pages }, + msg: { ...msg_website.es.msg, ...msgglobal.es.msg }, + homepage: { ...msg_website.es.homepage, ...msgglobal.es.homepage } + }, + enUs: { ...msgenUs , + pages: { ...msg_website.enUs.pages, ...msgglobal.enUs.pages }, + msg: { ...msg_website.enUs.msg, ...msgglobal.enUs.msg }, + homepage: { ...msg_website.enUs.homepage, ...msgglobal.enUs.homepage } + }, +} + export default messages; diff --git a/src/statics/i18n_website.js b/src/statics/i18n_website.js new file mode 100644 index 0000000..04268e0 --- /dev/null +++ b/src/statics/i18n_website.js @@ -0,0 +1,369 @@ +const msg_website = { + it: { + pages: { + home: 'Principale', + SignUp: 'Registrazione', + SignIn: 'Login', + vreg: 'Verifica Reg', + Test: 'Test', + Category: 'Categorie', + Todo: 'Todo', + personal: 'Personale', + work: 'Lavoro', + shopping: 'Spesa', + Admin: 'Admin', + Test1: 'Test1', + Test2: 'Test2', + projects: 'Progetti', + favproj: 'Favoriti', + projall: 'Tutti', + projectsShared: 'Miei Condivisi', + myprojects: 'Miei Personali' + }, + msg: { + hello: 'Buongiorno', + myAppName: 'FreePlanet', + underconstruction: 'App in costruzione...', + myDescriz: '', + sottoTitoloApp: 'Il primo Vero Social', + sottoTitoloApp2: 'Libero, Equo e Solidale', + sottoTitoloApp3: 'dove Vive Consapevolezza e Aiuto Comunitario', + sottoTitoloApp4: 'Gratuito e senza Pubblicità', + }, + homepage: { + descrapp_title1: 'Uniti per Evolvere e Sperimentare', + descrapp_pag1: 'Riscopri come il valore della Condivisione e della Cooperazione, possa aiutarci a ritrovare il profondo ' + + 'senso della Vita, perduto in questa società consumista, e riporti quei Sani Pricìpi Naturali ed Umani di Fratellanza' + + ' che intere popolazioni antiche conoscevano bene.', + descrapp_pag2: 'E\' giunta l\'ora di utilizzare i nuovi strumenti Tecnologici a nostro favore, per Liberarci ' + + 'così piano piano dalla schiavitù del "Lavoro per generare Denaro" e trasformando le nostre Capacitá in ' + + 'Risorse Umane per poterci sostenere e vivere in Armonia con gli altri.', + freesocial: { + title: 'Free Social', + descr: 'Una Community organizzata per Categorie, dove potrai unirti a Gruppi Tematici, ' + + 'Condividere Esperienze e unire Competenze per organizzare e sostenere Progetti Innovativi per il Popolo.

' + + 'Verranno evidenziati sviluppi Etici come l\'Auto-Produzione, la Sostenibilitá, ' + + 'la Buona Salute Naturale e il Rispetto per l\'Ambiente e per tutti gli Esseri Viventi di questo ' + + 'Pianeta. Chiunque potrá esprimere il proprio Consenso o Dissenso partecipando a Sondaggi Interattivi' + + ' e realizzare insieme i Cambiamenti necessari alla nostra Società.', + }, + freetalent: { + title: 'Free Talent', + descr: 'Condividi i tuoi Talenti e Abilità, ' + + 'al posto del denaro guadagnagnerai Tempo.
' + + '"1 ora" diventa moneta di scambio, uguale per tutti.
' + + 'Potrai utilizzare questi tuoi "Crediti Tempo" per soddisfare le tue necessità, cercando nelle Competenze Disponibili.
' + + 'Nel Dare e Ricevere, si creeranno così legami di Amicizia, Solidarietà, Cooperazione e Divertimento

' + + 'Questo progetto vuole diffondere, ora in maniera informatizzata, questa realtà che gia esiste da tanti anni, e viene chiamata "Banca del Tempo". ' + + 'Le segreterie sparse in tutto il mondo, serviranno a dare maggiore affidabilità e fiducia negli scambi di talenti tra persone sconosciute. ' + + 'Creeremo così una rete di fiducia nel vicinato, come giá viene praticato in numerosi Ecovillaggi e Comunità del mondo.', + }, + freegas: { + title: 'Free G.A.S.', + descr: 'Ti piacerebbe utilizzare una App che ti permetta facilmente di acquistare Prodotti Locali direttamente dal Produttore?
' + + 'Con i Gruppi di Acquisto Solidale si evitano intermediazioni inutili, ottenendo parecchi benefici tra cui:
' + + '', + }, + freeliving: { + title: 'Free Co-Living', + descr: 'Unire più realtà, condividendo l\'esperienza di abitare insieme, per un periodo definito:
' + + '1) C\'è chi Vive solo ed ha una casa.
' + + '2) Chi ha bisogno di un alloggio temporaneo.

' + + 'Oggi sempre più persone abitano da sole e vorrebbero continuare a vivere nella propria abitazione.
' + + 'Altre persone invece hanno bisogno di una stanza, per scelta o per necessita, ed in cambio sono disponibili a ' + + 'contribuire alle spese per le utenze domestiche o magari aiutare la persona a fare la spesa, cucinare, pulire casa oppure offrendogli semplicemente compagnia.

' + + 'Tramite questo strumento, le persone potranno trovarsi, mettersi in contatto e decidere in che forma co-abitare e per quanto tempo. Le recensioni rilasciate ed il dettaglio dei profili utenti, ' + + 'aiuterà nella scelta della persona più in sintonia.' + + }, + freecollabora: { + title: 'Chi può Collaborare?', + descr: 'Tutti coloro che sono in linea con Princìpi Etici e ricerca del Benessere Globale del Pianeta
' + + 'Pertanto sono i benvenuti:' + + '', + }, + freesostieni: { + title: 'Come Sostenere il progetto?', + descr: '' + + 'Vedo un futuro dove non si utilizzerà più denaro. Dove le persone si aiuteranno a vicenda e non avranno bisogno di "possedere" cose, ma le condivideranno con gli altri.
', + }, + multiplatform: { + title: 'Multi-piattaforma', + descr: 'E\' compatibile con Google Chrome, Firefox, Safari, iOS, Android e PC. L\'Applicazione s\'installa facilmente, senza passare dallo store. ' + + 'basta condividere il nome del sito www.freeplanet.app.
' + + 'Dopo la registrazione chiederà di aggiungerlo alla lista delle applicazioni e sullo sfondo', + }, + free: { + title: 'Gratuita, Open Source e Niente Pubblicità', + descr: 'Questa App non è in vendita, non ha scopi commerciali, non ha prezzo ed appartiene al Popolo del Nuovo Mondo.
Chiunque potrá utilizzarla e beneficiarne.
A me il compito di gestirla e proteggerla. ' + + 'Verranno accettate solo donazioni Libere di privati ed Associazioni no-profit, in linea con i Principi, che serviranno per coprire le spese.
' + + 'Grazie a Tutti per il sostegno. ' + }, + contacts: 'Contatti' + }, + }, + es: { + pages: { + home: 'Principal', + SignUp: 'Nueva Cuenta', + SignIn: 'Entrar', + vreg: 'Verifica Reg', + Test: 'Test', + Category: 'Categorías', + Todo: 'Tareas', + personal: 'Personal', + work: 'Trabajo', + shopping: 'Compras', + Admin: 'Administración', + Test1: 'Test1', + Test2: 'Test2', + projects: 'Proyectos', + favproj: 'Favoritos', + projall: 'Todos', + projectsShared: 'Mis Compartidos', + myprojects: 'Mis Personales', + }, + msg: { + hello: 'Buenos Días', + myAppName: 'FreePlanet', + underconstruction: 'App en construcción...', + myDescriz: '', + sottoTitoloApp: 'El primer Verdadero Social', + sottoTitoloApp2: 'Libre, justo y Solidario', + sottoTitoloApp3: 'Donde vive Conciencia y Ayuda comunitaria', + sottoTitoloApp4: 'Gratis y sin publicidad', + }, + homepage: { + descrapp_title1: 'Unidos para evolucionar y experimentar', + descrapp_pag1: 'Redescubra cómo el valor de Compartir y Cooperación puede ayudarnos a encontrar el profundo ' + + 'sentido de la Vida, perdido en esta sociedad consumista, y mostrando esos Principios Naturales Saludables y la Hermandad Humana' + + 'que toda la población antigua conocía bien.', + descrapp_pag2: 'Ha llegado el momento de utilizar las nuevas herramientas tecnológicas en nuestro favor, para liberarnos ' + + 'tan lentamente desde la esclavitud de "Trabaja para generar dinero" y transformando nuestra Capacidad en' + + 'Recursos humanos para poder apoyar y vivir en Armonia con otros.', + freesocial: { + title: 'Free Social', + descr: 'Una comunidad organizada por Categorías, donde puedes unirte a Grupos temáticos, ' + + 'Compartir experiencias y combinar habilidades para organizar y apoyar proyectos innovadores para la gente.

' + + 'Los desarrollos éticos como :
Auto-producción
, Sostenibilidad, ' + + 'la Buena Salud natural y Respeto por el Medio Ambiente y para todos los Seres vivos de este' + + 'Planeta. Cualquiera puede expresar su consentimiento o disidencia participando en Encuestas Interactivas ' + + 'y llevar a cabo juntos los Cambios necesarios para nuestra sociedad.', + }, + freetalent: { + title: 'Free Talent', + descr: 'Comparte tus Talentos y Habilidades, ' + + 'en lugar de dinero, ganarás Tiempo.
' + + '"1 hora" se convierte en una moneda de intercambio, igual para todos.
' + + 'Puedes usar estos "Créditos de tiempo" para satisfacer tus necesidades, buscando en Habilidades disponibles.
' + + 'En Dar y Recibir, crearemos así vínculos de Amistad, Solidaridad, Cooperación y Diversión.

' + + 'Este proyecto apunta a difundir esta realidad, que ya existe desde hace muchos años y se llama "Banco de tiempo". ' + + 'Las secretarías dispersas por todo el mundo, servirán para dar mayor fiabilidad y confianza en el intercambio de talentos entre personas desconocidas. ' + + 'Así crearemos una red de confianza en el vecindario, como ya se practica en numerosos Ecoaldeas y en la Comunidades del mundo.', + }, + freegas: { + title: 'Free G.A.S. (G.C.S.)', + descr: '¿Le gustaría usar una aplicación que le permita comprar productos locales directamente desde el Productor?
' + + 'Con Grupos de Compra Solidarios evitamos intermediarios innecesarios, obteniendo muchos beneficios, incluyendo:
' + + '', + }, + freeliving: { + title: 'Free Co-Living', + descr: 'Para unir más realidad, compartiendo la experiencia de vivir juntos, por un período definido:
' + + '1) Hay quien vive solo y tiene un hogar.
' + + '2) Quién necesita un alojamiento temporal.

' + + 'Hoy en día, más y más personas viven solas y les gustaría seguir viviendo en sus propios hogares.
' + + 'Otras personas necesitan una Habitación, por elección o por necesidad, y a cambio están disponibles en' + + 'contribuir a los gastos para los billetes de casa o tal vez ayuda a la persona mayor para ir de compras, cocinar, limpiar casa o simplemente ofreciéndole compañía.

' + + 'A través de esta herramienta, las personas pueden ponerse en contacto y decidir en qué forma co-habitar. Los comentarios publicados y el detalle de los perfiles de usuario, ' + + 'ayudará a elegir a la persona más en armonía.' + + }, + freecollabora: { + title: '¿Quién puede colaborar?', + descr: 'Todos aquellos que están en línea con Principios éticos y la investigación de Bienestar Global del Planeta
' + + 'Por eso son bienvenidos:' + + '', + }, + freesostieni: { + title: '¿Cómo apoyar el proyecto?', + descr: '' + + '
Veo un futuro en el que ya no usarás dinero. Donde las personas se ayudarán unos a otros y no necesiten "poseer" cosas, pero compartirán con otros.
', + }, + multiplatform: { + title: 'Multi-plataforma', + descr: 'Compatible con Google Chrome, Firefox, Safari, iOS, Android y PC. La aplicación se instala fácilmente, sin pasar por el store. ' + + 'para compartirlo, necesita solo el nombre del sitio web: www.freeplanet.app.
' + + 'Después del registro, le pedirá que lo agregue a la lista de aplicaciones y en la pantalla.', + }, + free: { + title: 'Libre, Código Abierto y Sin Publicidad', + descr: 'Esta aplicación no está a la venta, no tiene un propósito comercial, no tiene precio y pertenece a la Gente del Nuevo Mundo.
' + + 'Cualquiera puede usarla y beneficiarse.
A mí la tarea de gestionarlo y protegerlo. ' + + 'Solo se aceptarán donaciones de particulares y asociaciones sin änimo de lucro, en línea con los Principios, que se utilizarán para cubrir los gastos.
' + + 'Gracias a todos por el apoyo. ' + }, + contacts: 'Contactos' + }, + }, + enUs:{ + pages: { + home: 'Dashboard', + SignUp: 'SignUp', + SignIn: 'SignIn', + vreg: 'Verify Reg', + Test: 'Test', + Category: 'Category', + Todo: 'Todo', + personal: 'Personal', + work: 'Work', + shopping: 'Shopping', + Admin: 'Admin', + Test1: 'Test1', + Test2: 'Test2', + projects: 'Projects', + favproj: 'Favorite', + projall: 'All', + projectsShared: 'My Shared', + myprojects: 'My Personals', + }, + msg: { + hello: 'Hello!', + myAppName: 'FreePlanet', + underconstruction: 'App in construction...', + myDescriz: '', + sottoTitoloApp: 'The first Real Social', + sottoTitoloApp2: 'Free, Fair and Equitable', + sottoTitoloApp3: 'Where the conscience and community help live', + sottoTitoloApp4: 'Free and without advertising', + }, + homepage: { + descrapp_title1: 'Together to Evolve and Experiment', + descrapp_pag1: 'Rediscover how the value of Sharing and Cooperation, can help us find the deep meaning of' + + 'Life, lost in this consumer society, and showing those Healthy Natural Principles and Human Brotherhood' + + 'that entire ancient populations knew well.', + descrapp_pag2: 'The time has come to use the new Technological tools in our favor, to Free ourselves ' + + 'so slowly from the slavery of the "Work to generate Money" and transforming our Capacity into' + + 'Human Resources to be able to support and live in Harmony with others.', + freesocial: { + title: 'Free Social', + descr: 'A Community organized by Categories, where you can join Thematic Groups, ' + + 'Share Experiences and combine Skills to organize and support Innovative Projects for the People.

' + + 'Ethical developments such as Auto-Production, Sustainability, ' + + 'Good Natural Health and Respect for the Environment and for all Living Beings of this' + + 'Planet. Anyone can express their Consent or Dissent by participating in Interactive Surveys ' + + 'and carry out together the Changes needed for our society.', + }, + freetalent: { + title: 'Free Talent', + descr: 'Share your Talents and Skills, ' + + 'instead of money, you\'ll earn Time.
' + + '"1 hour" becomes a currency of exchange, equal for all.
' + + 'You can use these "Time Credits" to meet your needs, looking in Available Skills.
' + + 'In Giving and Receiving, we will thus create bonds of Friendship, Solidarity, Cooperation and Enjoyment

' + + 'This project aims to spread this reality, which already exists for many years and is called "Time Bank". ' + + 'The secretariats in all over the world, will serve an extra to give greater reliability and trust in the exchange of talents between unknown people. ' + + 'We will thus create a trust network in the neighborhood, as is already practiced in numerous Ecovillages and Community of the world. ', + }, + freegas: { + title: 'Free G.A.S.', + descr: 'Would you like to use an App that allows you to easily Buy Local Products directly from Manufacturer?
' + + 'With Solidarity Purchase Groups (in Italian: "Gruppo di Aacquisto Solidale") we avoid unnecessary intermediaries, obtaining many benefits including:
' + + '' + }, + freeliving: { + title: 'Free Co-Living', + descr: 'Join more reality, sharing the experience of living together, for a defined period:
' + + '1) Someone Lives alone and has a house.
' + + '2) Who needs a temporary accommodation .

' + + 'Today more and more people live alone and would like to continue living in their own house.
' + + 'Other people instead need a room, by choice or by necessity, and in return they are available to' + + 'contribute to expenses for households or maybe help to go shopping, cooking, cleaning house or simply offering him companionship.
' + + 'Through this tool, people can get in touch and decide in which way co-living. The reviews released and the detail of user profiles, ' + + 'will help in choosing the person more in tune.' + + }, + freecollabora: { + title: 'Who can collaborate?', + descr: 'All those who are in line with Ethical Principles and research of Global Wellness of the Planet
' + + 'Therefore they are welcome:' + + '', + }, + freesostieni: { + title: 'How to support the project?', + descr: '
' + + 'I see a future where you will no longer use money. Where people will help each other and won\'t need to "own" things, but will share with others.
', + }, + multiplatform: { + title: 'Multi-platform', + descr: 'It is compatible with Google Chrome, Firefox, Safari, iOS, Android and PC. The Application is easily installed, without going through the store. ' + + 'just share the nametranslate of this site www.freeplanet.app.
' + + 'After registration it will ask to be added to the application list and in the screen', + }, + free: { + title: 'Free, Open Source and No Advertising', + descr: 'This App is not for sale, has no commercial purpose, is priceless and belongs to the New World People.' + + '
Anyone can use it and benefit from it.
To me the task of managing it and protecting it. ' + + 'Only donations from private individuals and non-profit associations will be accepted, in line with the Principles, which will be used to cover the expenses.
' + + 'Thanks all for the support. ' + }, + contacts: 'Contacts' + }, + } +} + +export default msg_website; diff --git a/src/store/Modules/GlobalStore.ts b/src/store/Modules/GlobalStore.ts index 8303f66..c9ca8ec 100644 --- a/src/store/Modules/GlobalStore.ts +++ b/src/store/Modules/GlobalStore.ts @@ -16,7 +16,7 @@ import { GlobalStore, Projects, Todos, UserStore } from '@store' import messages from '../../statics/i18n' import globalroutines from './../../globalroutines/index' -import { cfgrouter } from '../../../cfg_locale/index' +import { cfgrouter } from '../../router/route-config' let stateConnDefault = 'online' @@ -114,7 +114,7 @@ namespace Getters { }, 'showtype') const getmenu = b.read((state) => { - console.log('getmenu', cfgrouter.getmenu()) + // console.log('getmenu', cfgrouter.getmenu()) state.menulinks = { Dashboard: { diff --git a/src/store/Modules/Projects.ts b/src/store/Modules/Projects.ts index 339282d..d67a03f 100644 --- a/src/store/Modules/Projects.ts +++ b/src/store/Modules/Projects.ts @@ -11,6 +11,8 @@ import globalroutines from './../../globalroutines/index' import objectId from '@src/js/objectId' import { costanti } from '@src/store/Modules/costanti' import { RouteNames } from '@src/router/route-names' +import * as Types from '@src/store/Api/ApiTypes' +import { serv_constants } from '@src/store/Modules/serv_constants' const nametable = 'projects' @@ -272,7 +274,7 @@ namespace Actions { if (onlyiffirsttime) { if (stateglob.projects.length > 0) { // if already set, then exit. - return false + return new Types.AxiosError(0, null, 0, '') } } @@ -304,7 +306,7 @@ namespace Actions { .catch((error) => { console.log('error dbLoad', error) UserStore.mutations.setErrorCatch(error) - return error + return new Types.AxiosError(serv_constants.RIS_CODE_ERR, null, tools.ERR_GENERICO, error) }) ApiTables.aftercalling(ris, checkPending, nametable) diff --git a/src/store/Modules/Todos.ts b/src/store/Modules/Todos.ts index ca1a4c8..21aed3e 100644 --- a/src/store/Modules/Todos.ts +++ b/src/store/Modules/Todos.ts @@ -13,6 +13,7 @@ import { GetterTree } from 'vuex' import objectId from '@src/js/objectId' import { costanti } from '@src/store/Modules/costanti' import { IAction } from '@src/model' +import * as Types from '@src/store/Api/ApiTypes' const nametable = 'todos' @@ -240,9 +241,9 @@ namespace Actions { async function dbLoad(context, { checkPending }) { console.log('dbLoad', nametable, checkPending, 'userid=', UserStore.state.userId) - if (UserStore.state.userId === '') { - return false // Login not made - } + // if (UserStore.state.userId === '') { + // return new Types.AxiosError(0, null, 0, '') + // } const ris = await Api.SendReq('/todos/' + UserStore.state.userId, 'GET', null) .then((res) => { @@ -268,10 +269,12 @@ namespace Actions { .catch((error) => { console.log('error dbLoad', error) UserStore.mutations.setErrorCatch(error) - return error + return new Types.AxiosError(serv_constants.RIS_CODE_ERR, null, tools.ERR_GENERICO, error) }) ApiTables.aftercalling(ris, checkPending, 'categories') + + return ris } async function deleteItemtodo(context, { cat, idobj }) { diff --git a/src/store/Modules/UserStore.ts b/src/store/Modules/UserStore.ts index df997da..27963c2 100644 --- a/src/store/Modules/UserStore.ts +++ b/src/store/Modules/UserStore.ts @@ -520,10 +520,11 @@ namespace Actions { GlobalStore.actions.checkUpdates() } - await GlobalStore.actions.loadAfterLogin() + return await GlobalStore.actions.loadAfterLogin() .then(() => { - Todos.actions.dbLoad({ checkPending: true }) - Projects.actions.dbLoad({ checkPending: true, onlyiffirsttime: true }) + return Todos.actions.dbLoad({ checkPending: true }) + }).then(() => { + return Projects.actions.dbLoad({ checkPending: true, onlyiffirsttime: true }) }) } diff --git a/src/store/Modules/tools.ts b/src/store/Modules/tools.ts index 0be551d..e3f185f 100644 --- a/src/store/Modules/tools.ts +++ b/src/store/Modules/tools.ts @@ -1572,5 +1572,86 @@ export const tools = { addRoute(myarr, values) { myarr.push(values) }, + displayConfirmNotification() { + let options = null + if ('serviceWorker' in navigator) { + options = { + body: 'You successfully subscribed to our Notification service!', + icon: '/statics/icons/app-icon-96x96.png', + image: '/statics/images/sf-boat.jpg', + dir: 'ltr', + lang: 'enUs', // BCP 47, + vibrate: [100, 50, 200], + badge: '/statics/icons/app-icon-96x96.png', + tag: 'confirm-notification', + renotify: true, // if it's already sent, will Vibrate anyway + actions: [ + { action: 'confirm', title: 'Okay', icon: '/statics/icons/app-icon-96x96.png' }, + { action: 'cancel', title: 'Cancel', icon: '/statics/icons/app-icon-96x96.png' } + ] + } + if ('serviceWorker' in navigator) { + navigator.serviceWorker.ready + .then(function (swreg) { + swreg.showNotification('Successfully subscribed!', options) + }) + } + } + }, + + dataURItoBlob(dataURI) { + const byteString = atob(dataURI.split(',')[1]) + const mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0] + const ab = new ArrayBuffer(byteString.length) + const ia = new Uint8Array(ab) + for (let i = 0; i < byteString.length; i++) { + ia[i] = byteString.charCodeAt(i) + } + const blob = new Blob([ab], { type: mimeString }) + return blob + }, + + showNotificationExample() { + let options = null + const mythis = this + if ('serviceWorker' in navigator) { + options = { + body: mythis.$t('notification.subscribed'), + icon: '/statics/icons/android-chrome-192x192.png', + image: '/statics/images/imglogonotif.png', + dir: 'ltr', + lang: 'enUs', // BCP 47, + vibrate: [100, 50, 200], + badge: '/statics/icons/android-chrome-192x192.png', + tag: 'confirm-notification', + renotify: true, // if it's already sent, will Vibrate anyway + actions: [ + { action: 'confirm', title: mythis.$t('dialog.ok'), icon: '/statics/icons/android-chrome-192x192.png' } + // { action: 'cancel', title: 'Cancel', icon: '/statics/icons/android-chrome-192x192.png', } + ] + } + + navigator.serviceWorker.ready + .then(function (swreg) { + swreg.showNotification('aaa', options) + }) + } + }, + + askfornotification() { + tools.showNotif(this.$q, this.$t('notification.waitingconfirm'), { color: 'positive', icon: 'notifications' }) + + Notification.requestPermission((result) => { + console.log('User Choice', result) + if (result === 'granted') { + tools.showNotif(this.$q, this.$t('notification.confirmed'), { color: 'positive', icon: 'notifications' }) + } else { + tools.showNotif(this.$q, this.$t('notification.denied'), { color: 'negative', icon: 'notifications' }) + + // displayConfirmNotification(); + } + }) + + } } diff --git a/src/views/admin/testp1/testp1.ts b/src/views/admin/testp1/testp1.ts index e7d18e8..9885074 100644 --- a/src/views/admin/testp1/testp1.ts +++ b/src/views/admin/testp1/testp1.ts @@ -5,7 +5,7 @@ import { GlobalStore, UserStore } from '@store' import { Getter } from 'vuex-class' import { ICfgServer, IGlobalState, ITodo, ITodosState } from '../../../model/index' -const namespace: string = 'GlobalModule' +const namespace: string = 'Testp1' @Component({}) export default class Testp1 extends Vue { diff --git a/tsconfig.json b/tsconfig.json index d645403..7338702 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,6 +23,7 @@ "es2015.promise", "es2017", "es2017.object", + "es2018", "es7" ], "baseUrl": "./src",