Form Newsletter and others fix

This commit is contained in:
Paolo Arena
2019-07-12 14:09:44 +02:00
parent 7f5076d8f2
commit b11dd46f9f
33 changed files with 119 additions and 47 deletions

View File

@@ -2,7 +2,7 @@
import VueI18n from 'vue-i18n' import VueI18n from 'vue-i18n'
import messages from '../statics/i18n' import messages from '../statics/i18n'
import { tools } from '../store/Modules/tools' import { tools } from '../store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
export default ({ app, store, Vue }) => { export default ({ app, store, Vue }) => {
Vue.use(VueI18n) Vue.use(VueI18n)

View File

@@ -1,6 +1,7 @@
import Vue from 'vue' import Vue from 'vue'
import { Component, Prop, Watch } from 'vue-property-decorator' import { Component, Prop, Watch } from 'vue-property-decorator'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { date } from 'quasar' import { date } from 'quasar'

View File

@@ -2,6 +2,7 @@ import Vue from 'vue'
import { Component, Prop, Watch } from 'vue-property-decorator' import { Component, Prop, Watch } from 'vue-property-decorator'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
@Component({ @Component({
name: 'CProgress' name: 'CProgress'

View File

@@ -8,6 +8,7 @@ import { GlobalStore, UserStore } from '@modules'
// import { StateConnection } from '../../model' // import { StateConnection } from '../../model'
import { Watch } from 'vue-property-decorator' import { Watch } from 'vue-property-decorator'
import { tools } from '../../store/Modules/tools' import { tools } from '../../store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import Quasar, { Screen } from 'quasar' import Quasar, { Screen } from 'quasar'

View File

@@ -6,3 +6,6 @@ export * from './CCard'
export * from './CPage' export * from './CPage'
export * from './CTitle' export * from './CTitle'
export * from './CDate' export * from './CDate'
export * from './BannerCookies'
export * from './PagePolicy'
export * from './FormNewsletter'

View File

@@ -1,6 +1,7 @@
import Vue from 'vue' import Vue from 'vue'
import { Component } from 'vue-property-decorator' import { Component } from 'vue-property-decorator'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
@Component({ @Component({
name: 'Logo' name: 'Logo'

View File

@@ -3,6 +3,7 @@ import { Component, Prop, Watch } from 'vue-property-decorator'
import { Projects, UserStore } from '@modules' import { Projects, UserStore } from '@modules'
import { tools } from '../../../store/Modules/tools' import { tools } from '../../../store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { lists } from '../../../store/Modules/lists' import { lists } from '../../../store/Modules/lists'
import { IProject } from '../../../model/index' import { IProject } from '../../../model/index'
@@ -208,11 +209,11 @@ export default class SingleProject extends Vue {
} }
if (this.isProject()) { if (this.isProject()) {
this.menuPopupProj = tools.menuPopupProj[UserStore.state.lang] this.menuPopupProj = tools.menuPopupProj[toolsext.getLocale()]
} }
else { else {
this.menuPopupProj = [] this.menuPopupProj = []
this.menuPopupProj.push(tools.menuPopupProj[UserStore.state.lang][tools.INDEX_MENU_DELETE]) this.menuPopupProj.push(tools.menuPopupProj[toolsext.getLocale()][tools.INDEX_MENU_DELETE])
} }
} }

View File

@@ -2,6 +2,7 @@ import Vue from 'vue'
import { Component, Prop, Watch } from 'vue-property-decorator' import { Component, Prop, Watch } from 'vue-property-decorator'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { lists } from '@src/store/Modules/lists' import { lists } from '@src/store/Modules/lists'
import { UserStore } from '@store' import { UserStore } from '@store'
import { IProject } from '../../../model/index' import { IProject } from '../../../model/index'

View File

@@ -4,6 +4,7 @@ import { Component, Prop, Watch } from 'vue-property-decorator'
import { IDrag, IProject, ITodo, ITodosState } from '../../../model/index' import { IDrag, IProject, ITodo, ITodosState } from '../../../model/index'
import { tools } from '../../../store/Modules/tools' import { tools } from '../../../store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { lists } from '../../../store/Modules/lists' import { lists } from '../../../store/Modules/lists'
import * as ApiTables from '../../../store/Modules/ApiTables' import * as ApiTables from '../../../store/Modules/ApiTables'
@@ -63,11 +64,11 @@ export default class CTodo extends Vue {
} }
get menuPopupConfigTodo() { get menuPopupConfigTodo() {
return tools.menuPopupConfigTodo[UserStore.state.lang] return tools.menuPopupConfigTodo[toolsext.getLocale()]
} }
get listOptionShowTask() { get listOptionShowTask() {
return tools.listOptionShowTask[UserStore.state.lang] return tools.listOptionShowTask[toolsext.getLocale()]
} }
get TodosCount() { get TodosCount() {

View File

@@ -3,6 +3,7 @@ import { Component, Prop, Watch } from 'vue-property-decorator'
import { Projects, UserStore } from '@modules' import { Projects, UserStore } from '@modules'
import { tools } from '../../../store/Modules/tools' import { tools } from '../../../store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { lists } from '../../../store/Modules/lists' import { lists } from '../../../store/Modules/lists'
import { ITodo } from '../../../model/index' import { ITodo } from '../../../model/index'
@@ -193,11 +194,11 @@ export default class SingleTodo extends Vue {
} }
if (this.isTodo()) { if (this.isTodo()) {
this.menuPopupTodo = tools.menuPopupTodo[UserStore.state.lang] this.menuPopupTodo = tools.menuPopupTodo[toolsext.getLocale()]
} }
else { else {
this.menuPopupTodo = [] this.menuPopupTodo = []
this.menuPopupTodo.push(tools.menuPopupTodo[UserStore.state.lang][tools.INDEX_MENU_DELETE]) this.menuPopupTodo.push(tools.menuPopupTodo[toolsext.getLocale()][tools.INDEX_MENU_DELETE])
} }
} }

View File

@@ -2,6 +2,7 @@ import Vue from 'vue'
import { Component, Prop, Watch } from 'vue-property-decorator' import { Component, Prop, Watch } from 'vue-property-decorator'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { lists } from '@src/store/Modules/lists' import { lists } from '@src/store/Modules/lists'
import { UserStore } from '@store' import { UserStore } from '@store'
import { ITodo } from '../../../model/index' import { ITodo } from '../../../model/index'

View File

@@ -6,12 +6,14 @@ import { idbKeyval as storage } from '../js/storage.js'
import { costanti } from '../store/Modules/costanti' import { costanti } from '../store/Modules/costanti'
import { ICfgData, IGlobalState } from '@src/model' import { ICfgData, IGlobalState } from '@src/model'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
function saveConfigIndexDb(context) { function saveConfigIndexDb(context) {
const data: ICfgData = { const data: ICfgData = {
_id: costanti.CONFIG_ID_CFG, _id: costanti.CONFIG_ID_CFG,
lang: UserStore.state.lang, lang: toolsext.getLocale(),
token: UserStore.state.x_auth_token, token: UserStore.state.x_auth_token,
userId: UserStore.state.userId userId: UserStore.state.userId
} }

View File

@@ -1,9 +1,9 @@
import { UserStore } from '@modules' import { toolsext } from '@src/store/Modules/toolsext'
import messages from '../statics/i18n' import messages from '../statics/i18n'
function translate(params) { function translate(params) {
const msg = params.split('.') const msg = params.split('.')
const lang = UserStore.state.lang const lang = toolsext.getLocale()
const stringa = messages[lang] const stringa = messages[lang]

View File

@@ -6,6 +6,7 @@ import { IPost } from '../../../model/index'
import './messagePopover.scss' import './messagePopover.scss'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
@Component({ @Component({
}) })

View File

@@ -1,6 +1,7 @@
import objectId from '@src/js/objectId' import objectId from '@src/js/objectId'
import { UserStore } from '@store' import { UserStore } from '@store'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
export interface IAction { export interface IAction {
table: string table: string

View File

@@ -153,14 +153,26 @@ const msgglobal = {
endtime: 'alle', endtime: 'alle',
duration: 'Durata', duration: 'Durata',
hours: 'Orario', hours: 'Orario',
when: 'Quando',
where: 'Dove', where: 'Dove',
teacher: 'Insegnante', teacher: 'Con',
enterdate: 'Inserisci data', enterdate: 'Inserisci data',
details: 'Dettagli', details: 'Dettagli',
infoextra: 'Date e Ora Extra:', infoextra: 'Date e Ora Extra:',
alldayevent: 'Tutto il giorno', alldayevent: 'Tutto il giorno',
eventstartdatetime: 'Data e Ora Inizio Evento', eventstartdatetime: 'Data e Ora Inizio Evento',
enterEndDateTime: 'Data e Ora Fine Evento' enterEndDateTime: 'Data e Ora Fine Evento'
},
newsletter: {
name: 'Il tuo Nome',
namehint: 'Nome e Cognome',
email: 'La tua Email',
submit: 'Iscriviti',
reset: 'Cancella',
typesomething: 'Compilare correttamente il campo',
acceptlicense: 'Accetto la licenza e i termini',
license: 'Devi prima accettare la licenza e i termini',
submitted: 'Iscritto'
} }
}, },
'es': { 'es': {
@@ -309,14 +321,26 @@ const msgglobal = {
endtime: 'fin', endtime: 'fin',
duration: 'Duración', duration: 'Duración',
hours: 'Tiempo', hours: 'Tiempo',
when: 'Cuando',
where: 'Donde', where: 'Donde',
teacher: 'Maestro', teacher: 'Con',
enterdate: 'Ingresar la fecha', enterdate: 'Ingresar la fecha',
details: 'Detalles', details: 'Detalles',
infoextra: 'Fecha y Hora Extras:', infoextra: 'Fecha y Hora Extras:',
alldayevent: 'Todo el dia', alldayevent: 'Todo el dia',
eventstartdatetime: 'Evento de inicio de fecha y hora', eventstartdatetime: 'Evento de inicio de fecha y hora',
enterEndDateTime: 'Fecha y hora del evento final' enterEndDateTime: 'Fecha y hora del evento final'
},
newsletter: {
name: 'Tu Nombre',
namehint: 'Nombre y Apellido',
email: 'tu correo',
submit: 'Subscribete',
reset: 'Reiniciar',
typesomething: 'Llenar el campo',
acceptlicense: 'Acepto la licencia y los términos',
license: 'Necesitas aceptar la licencia y los términos primero',
submitted: 'Subscrito'
} }
}, },
'enUs': { 'enUs': {
@@ -465,14 +489,26 @@ const msgglobal = {
endtime: 'to', endtime: 'to',
duration: 'Duration', duration: 'Duration',
hours: 'Hours', hours: 'Hours',
when: 'When',
where: 'Where', where: 'Where',
teacher: 'Teacher', teacher: 'With',
enterdate: 'Enter date', enterdate: 'Enter date',
details: 'Details', details: 'Details',
infoextra: 'Extra Info DateTime', infoextra: 'Extra Info DateTime',
alldayevent: 'All-Day event', alldayevent: 'All-Day event',
eventstartdatetime: 'Event start date and time', eventstartdatetime: 'Event start date and time',
enterEndDateTime: 'Event end date and time' enterEndDateTime: 'Event end date and time'
},
newsletter: {
name: 'Your name',
namehint: 'Name and surname',
email: 'Your email',
submit: 'Subscribe',
reset: 'Reset',
typesomething: 'Please type something',
acceptlicense: 'I accept the license and terms',
license: 'You need to accept the license and terms first',
submitted: 'Subscribed'
} }
}, },
}; };

View File

@@ -5,6 +5,7 @@ import { clone } from 'lodash'
import * as Types from './ApiTypes' import * as Types from './ApiTypes'
import { GlobalStore, UserStore } from '@store' import { GlobalStore, UserStore } from '@store'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { serv_constants } from '@src/store/Modules/serv_constants' import { serv_constants } from '@src/store/Modules/serv_constants'
export const API_URL = process.env.MONGODB_HOST export const API_URL = process.env.MONGODB_HOST

View File

@@ -8,6 +8,7 @@ export { addAuthHeaders, removeAuthHeaders, API_URL } from './Instance'
// import {AlgoliaSearch} from './AlgoliaController' // import {AlgoliaSearch} from './AlgoliaController'
import Paths from '@paths' import Paths from '@paths'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { GlobalStore, Projects, UserStore } from '@modules' import { GlobalStore, Projects, UserStore } from '@modules'
import globalroutines from './../../globalroutines/index' import globalroutines from './../../globalroutines/index'

View File

@@ -4,6 +4,7 @@ import { GlobalStore, Todos, Projects, UserStore } from '@store'
import globalroutines from './../../globalroutines/index' import globalroutines from './../../globalroutines/index'
import { serv_constants } from '@src/store/Modules/serv_constants' import { serv_constants } from '@src/store/Modules/serv_constants'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
export const OtherTables = ['categories', 'config', 'swmsg'] export const OtherTables = ['categories', 'config', 'swmsg']
export const MainTables = ['todos', 'projects'] export const MainTables = ['todos', 'projects']
@@ -126,7 +127,7 @@ async function Sync_Execute(cmd, tablesync, nametab, method, item: ITodo, id, ms
console.log('ris write:', ris) console.log('ris write:', ris)
const sep = '|' const sep = '|'
const multiparams = cmdSw + sep + tablesync + sep + nametab + sep + method + sep + UserStore.state.x_auth_token + sep + UserStore.state.lang const multiparams = cmdSw + sep + tablesync + sep + nametab + sep + method + sep + UserStore.state.x_auth_token + sep + toolsext.getLocale()
const mymsgkey = { const mymsgkey = {
_id: multiparams, _id: multiparams,
value: multiparams value: multiparams

View File

@@ -11,6 +11,7 @@ import Api from '@api'
import * as Types from '@src/store/Api/ApiTypes' import * as Types from '@src/store/Api/ApiTypes'
import { costanti } from '@src/store/Modules/costanti' import { costanti } from '@src/store/Modules/costanti'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import * as ApiTables from '@src/store/Modules/ApiTables' import * as ApiTables from '@src/store/Modules/ApiTables'
import { GlobalStore, Projects, Todos, UserStore } from '@store' import { GlobalStore, Projects, Todos, UserStore } from '@store'
import messages from '../../statics/i18n' import messages from '../../statics/i18n'
@@ -132,7 +133,7 @@ namespace Getters {
const t = b.read((state) => (params) => { const t = b.read((state) => (params) => {
const msg = params.split('.') const msg = params.split('.')
const lang = UserStore.state.lang const lang = toolsext.getLocale()
const stringa = messages[lang] const stringa = messages[lang]

View File

@@ -4,6 +4,7 @@ import { storeBuilder } from './Store/Store'
import Api from '@api' import Api from '@api'
import { tools } from './tools' import { tools } from './tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { lists } from './lists' import { lists } from './lists'
import * as ApiTables from './ApiTables' import * as ApiTables from './ApiTables'
import { GlobalStore, UserStore } from '@store' import { GlobalStore, UserStore } from '@store'

View File

@@ -3,6 +3,7 @@ import { storeBuilder } from './Store/Store'
import Api from '@api' import Api from '@api'
import { tools } from './tools' import { tools } from './tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { lists } from './lists' import { lists } from './lists'
import * as ApiTables from './ApiTables' import * as ApiTables from './ApiTables'
import { GlobalStore, Todos, UserStore } from '@store' import { GlobalStore, Todos, UserStore } from '@store'

View File

@@ -6,6 +6,7 @@ import router from '@router'
import { serv_constants } from '../Modules/serv_constants' import { serv_constants } from '../Modules/serv_constants'
import { tools } from '../Modules/tools' import { tools } from '../Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { GlobalStore, UserStore, Todos, Projects } from '@store' import { GlobalStore, UserStore, Todos, Projects } from '@store'
import globalroutines from './../../globalroutines/index' import globalroutines from './../../globalroutines/index'
@@ -20,7 +21,7 @@ const state: IUserState = {
email: '', email: '',
username: '', username: '',
password: '', password: '',
lang: '', lang: process.env.LANG_DEFAULT,
repeatPassword: '', repeatPassword: '',
tokens: [], tokens: [],
verified_email: false, verified_email: false,

View File

@@ -1,3 +1,5 @@
import { UserStore } from '@store'
export const costanti = { export const costanti = {
ShowTypeTask: { ShowTypeTask: {
SHOW_LAST_N_COMPLETED: 200, SHOW_LAST_N_COMPLETED: 200,
@@ -8,5 +10,5 @@ export const costanti = {
CONFIG_ID_STATE_CONN: '2', CONFIG_ID_STATE_CONN: '2',
CONFIG_ID_SHOW_TYPE_TODOS: '3', CONFIG_ID_SHOW_TYPE_TODOS: '3',
MAX_PHASES: 5 MAX_PHASES: 5,
} }

View File

@@ -1,6 +1,7 @@
import { Todos, Projects, UserStore } from '@store' import { Todos, Projects, UserStore } from '@store'
import globalroutines from './../../globalroutines/index' import globalroutines from './../../globalroutines/index'
import { costanti } from './costanti' import { costanti } from './costanti'
import { toolsext } from './toolsext'
import { translation } from './translation' import { translation } from './translation'
import Quasar, { date, Screen } from 'quasar' import Quasar, { date, Screen } from 'quasar'
import { IListRoutes, IMenuList, IProject, ITodo, Privacy } from '@src/model' import { IListRoutes, IMenuList, IProject, ITodo, Privacy } from '@src/model'
@@ -9,6 +10,7 @@ import translate from '@src/globalroutines/util'
import { RouteNames } from '@src/router/route-names' import { RouteNames } from '@src/router/route-names'
import { lists } from './lists' import { lists } from './lists'
import { shen } from '@src/database/shen'
export interface INotify { export interface INotify {
color?: string | 'primary' color?: string | 'primary'
@@ -65,14 +67,6 @@ export const tools = {
COMPLETED: 10 COMPLETED: 10
}, },
DateFormatter: new Intl.DateTimeFormat(this.getLocale() || void 0, {
weekday: 'long',
day: 'numeric',
month: 'long',
year: 'numeric'
// timeZone: 'UTC'
}),
selectPhase: { selectPhase: {
it: [ it: [
{ {
@@ -931,7 +925,7 @@ export const tools = {
getStatusListByInd(index) { getStatusListByInd(index) {
try { try {
const arr = tools.selectStatus[UserStore.state.lang] const arr = tools.selectStatus[toolsext.getLocale()]
for (const rec of arr) { for (const rec of arr) {
if (rec.value === index) { if (rec.value === index) {
return rec.label return rec.label
@@ -945,9 +939,9 @@ export const tools = {
, ,
getPriorityByInd(index) { getPriorityByInd(index) {
// console.log('LANG in PRIOR', UserStore.state.lang) // console.log('LANG in PRIOR', toolsext.getLocale())
try { try {
const arr = lists.selectPriority[UserStore.state.lang] const arr = lists.selectPriority[toolsext.getLocale()]
for (const rec of arr) { for (const rec of arr) {
if (rec.value === index) { if (rec.value === index) {
return rec.label return rec.label
@@ -1316,6 +1310,7 @@ export const tools = {
, ,
checkLangPassed(mylang) { checkLangPassed(mylang) {
console.log('checkLangPassed')
const mybrowserLang = Quasar.lang.isoName const mybrowserLang = Quasar.lang.isoName
@@ -1339,11 +1334,15 @@ export const tools = {
if (!mylang) { if (!mylang) {
mylang = process.env.LANG_DEFAULT mylang = process.env.LANG_DEFAULT
} }
if (toolsext.getLocale(true) === '') {
UserStore.mutations.setlang(mylang)
}
console.log('mylang calc : ', mylang) console.log('mylang calc : ', mylang)
return mylang return mylang
} },
,
getimglogo() { getimglogo() {
return 'statics/images/' + process.env.LOGO_REG return 'statics/images/' + process.env.LOGO_REG
@@ -1816,16 +1815,20 @@ export const tools = {
return val + '' return val + ''
}, },
getLocale() { getLocale(vero?: boolean) {
return UserStore.state.lang if (UserStore) {
if (UserStore.state) {
return UserStore.state.lang
}
}
if (!vero)
return process.env.LANG_DEFAULT
else
return ''
}, },
getDateStr(mydate) { addDays(mydate, days) {
if (this.DateFormatter && this.getLocale()) { return date.addToDate(mydate, { days })
const date = new Date(mydate)
return this.titleFormatter.format(date)
}
return ''
} }
// getLocale() { // getLocale() {

View File

@@ -3,6 +3,7 @@ import { Component, Watch } from 'vue-property-decorator'
import { ICategory } from '../../../model/index' import { ICategory } from '../../../model/index'
import { tools } from '../../../store/Modules/tools' import { tools } from '../../../store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
@Component({ @Component({
}) })

View File

@@ -4,6 +4,7 @@ import { Component, Watch } from 'vue-property-decorator'
import { SingleCat } from '../SingleCat/index' import { SingleCat } from '../SingleCat/index'
import { ICategory } from '../../../model/index' import { ICategory } from '../../../model/index'
import { tools } from '../../../store/Modules/tools' import { tools } from '../../../store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
@Component({ @Component({

View File

@@ -64,6 +64,7 @@
import { UserStore } from "../../store/Modules"; import { UserStore } from "../../store/Modules";
import { IUserState } from "../../model"; import { IUserState } from "../../model";
import { tools } from "../../store/Modules/tools"; import { tools } from "../../store/Modules/tools";
import { toolsext } from '@src/store/Modules/toolsext'
export default class RequestResetPwd extends Vue{ export default class RequestResetPwd extends Vue{
emailsent = false emailsent = false
form: IUserState = { form: IUserState = {

View File

@@ -3,6 +3,7 @@ import Vue from 'vue'
import { Component, Prop, Watch } from 'vue-property-decorator' import { Component, Prop, Watch } from 'vue-property-decorator'
import { serv_constants } from '../../../store/Modules/serv_constants' import { serv_constants } from '../../../store/Modules/serv_constants'
import { tools } from '../../../store/Modules/tools' import { tools } from '../../../store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { ISigninOptions, IUserState } from 'model' import { ISigninOptions, IUserState } from 'model'
import { TSignin, validations } from './signin-validate' import { TSignin, validations } from './signin-validate'
@@ -161,14 +162,14 @@ export default class Signin extends Vue {
} }
return riscode return riscode
}).then((riscode) => { }).then((riscode) => {
if (UserStore.state.lang !== '') { if (toolsext.getLocale() !== '') {
this.$i18n.locale = UserStore.state.lang this.$i18n.locale = toolsext.getLocale()
} // Set Lang } // Set Lang
else { else {
UserStore.mutations.setlang(this.$i18n.locale) UserStore.mutations.setlang(this.$i18n.locale)
} // Set Lang } // Set Lang
// console.log('LANG ORA=', UserStore.state.lang) // console.log('LANG ORA=', toolsext.getLocale())
globalroutines(this, 'loadapp', '') globalroutines(this, 'loadapp', '')
return riscode return riscode

View File

@@ -2,6 +2,7 @@ import Vue from 'vue'
import { Component, Prop, Watch } from 'vue-property-decorator' import { Component, Prop, Watch } from 'vue-property-decorator'
import { UserStore } from '@store' import { UserStore } from '@store'
import { tools } from '../../../store/Modules/tools' import { tools } from '../../../store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { ISignupOptions, IUserState } from 'model' import { ISignupOptions, IUserState } from 'model'
import { validations, TSignup } from './signup-validate' import { validations, TSignup } from './signup-validate'

View File

@@ -76,6 +76,7 @@
import { UserStore } from "../../store/Modules"; import { UserStore } from "../../store/Modules";
import { IUserState } from "../../model"; import { IUserState } from "../../model";
import { tools } from "../../store/Modules/tools"; import { tools } from "../../store/Modules/tools";
import { toolsext } from '@src/store/Modules/toolsext'
export default class UpdatePassword extends Vue { export default class UpdatePassword extends Vue {
emailsent = false emailsent = false

View File

@@ -6,6 +6,7 @@ import { SingleProject } from '../../../components/projects/SingleProject/index'
import { CTodo } from '../../../components/todos/CTodo' import { CTodo } from '../../../components/todos/CTodo'
import { tools } from '../../../store/Modules/tools' import { tools } from '../../../store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
import { lists } from '../../../store/Modules/lists' import { lists } from '../../../store/Modules/lists'
import * as ApiTables from '../../../store/Modules/ApiTables' import * as ApiTables from '../../../store/Modules/ApiTables'
@@ -56,9 +57,9 @@ export default class ProjList extends Vue {
public percProgress: string = 'percProgress' public percProgress: string = 'percProgress'
public readonly: boolean = false public readonly: boolean = false
public selectStatus: [] = tools.selectStatus[UserStore.state.lang] public selectStatus: [] = tools.selectStatus[toolsext.getLocale()]
public selectPhase: [] = tools.selectPhase[UserStore.state.lang] public selectPhase: [] = tools.selectPhase[toolsext.getLocale()]
public selectPrivacy: [] = tools.selectPrivacy[UserStore.state.lang] public selectPrivacy: [] = tools.selectPrivacy[toolsext.getLocale()]
public $refs: { public $refs: {
singleproject: SingleProject[], singleproject: SingleProject[],
@@ -203,9 +204,9 @@ export default class ProjList extends Vue {
get menuPopupConfigProject() { get menuPopupConfigProject() {
let mymenu = null let mymenu = null
if (this.isMainProject) if (this.isMainProject)
mymenu = tools.menuPopupConfigMAINProject[UserStore.state.lang] mymenu = tools.menuPopupConfigMAINProject[toolsext.getLocale()]
else else
mymenu = tools.menuPopupConfigProject[UserStore.state.lang] mymenu = tools.menuPopupConfigProject[toolsext.getLocale()]
if (mymenu.length > 0) if (mymenu.length > 0)
mymenu[0].disable = !(GlobalStore.state.lastaction.type === lists.MenuAction.CUT) mymenu[0].disable = !(GlobalStore.state.lastaction.type === lists.MenuAction.CUT)
@@ -214,7 +215,7 @@ export default class ProjList extends Vue {
} }
get listOptionShowTask() { get listOptionShowTask() {
return tools.listOptionShowTask[UserStore.state.lang] return tools.listOptionShowTask[toolsext.getLocale()]
} }
get descrProject() { get descrProject() {

View File

@@ -2,6 +2,7 @@ import Vue from 'vue'
import { Component, Watch } from 'vue-property-decorator' import { Component, Watch } from 'vue-property-decorator'
import { CTodo } from '@src/components/todos/CTodo' import { CTodo } from '@src/components/todos/CTodo'
import { tools } from '@src/store/Modules/tools' import { tools } from '@src/store/Modules/tools'
import { toolsext } from '@src/store/Modules/toolsext'
@Component({ @Component({
components: { CTodo }, components: { CTodo },