Adding MailChimp Suport Newsletter component (Server Side)
This commit is contained in:
@@ -28,7 +28,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/plugin-transform-runtime": "^7.4.0",
|
"@babel/plugin-transform-runtime": "^7.4.0",
|
||||||
"@babel/runtime": "^7.0.0",
|
"@babel/runtime": "^7.0.0",
|
||||||
"@quasar/extras": "^1.2.0",
|
"@quasar/extras": "^1.3.1",
|
||||||
"@types/vuelidate": "^0.7.0",
|
"@types/vuelidate": "^0.7.0",
|
||||||
"@vue/eslint-config-standard": "^4.0.0",
|
"@vue/eslint-config-standard": "^4.0.0",
|
||||||
"acorn": "^6.0.0",
|
"acorn": "^6.0.0",
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
"normalize.css": "^8.0.0",
|
"normalize.css": "^8.0.0",
|
||||||
"npm": "^6.10.1",
|
"npm": "^6.10.1",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"quasar": "^1.0.4",
|
"quasar": "^1.1.0",
|
||||||
"quasar-extras": "^2.0.8",
|
"quasar-extras": "^2.0.8",
|
||||||
"register-service-worker": "^1.0.0",
|
"register-service-worker": "^1.0.0",
|
||||||
"vee-validate": "^2.1.2",
|
"vee-validate": "^2.1.2",
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
||||||
"@babel/plugin-syntax-import-meta": "^7.2.0",
|
"@babel/plugin-syntax-import-meta": "^7.2.0",
|
||||||
"@babel/preset-env": "^7.4.2",
|
"@babel/preset-env": "^7.4.2",
|
||||||
"@quasar/app": "^1.0.4",
|
"@quasar/app": "^1.0.6",
|
||||||
"@quasar/quasar-app-extension-typescript": "^1.0.0-alpha.11",
|
"@quasar/quasar-app-extension-typescript": "^1.0.0-alpha.11",
|
||||||
"@types/dotenv": "^4.0.3",
|
"@types/dotenv": "^4.0.3",
|
||||||
"@types/jest": "^23.1.4",
|
"@types/jest": "^23.1.4",
|
||||||
|
|||||||
@@ -15,3 +15,9 @@
|
|||||||
.slideFromBottom-leave-active {
|
.slideFromBottom-leave-active {
|
||||||
transition: transform .2s ease-in;
|
transition: transform .2s ease-in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tothebottomfixed {
|
||||||
|
position: fixed;
|
||||||
|
top: 100px;
|
||||||
|
height: 50px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="isOpen">
|
<div v-if="isOpen">
|
||||||
<div class="q-pa-md q-gutter-sm tothebottomfixed">
|
<div class="q-pa-md q-gutter-sm">
|
||||||
<transition appear name="slide-up" mode="out-in" :duration="2000">
|
<transition appear name="slide-up" mode="out-in" :duration="2000">
|
||||||
<q-banner class="bg-primary text-white" transition-show="jump-down">
|
<q-banner class="bg-primary text-white" transition-show="jump-down">
|
||||||
Usiamo i Cookie per una migliore prestazione web.
|
Usiamo i Cookie per una migliore prestazione web.
|
||||||
|
|||||||
@@ -31,6 +31,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1600px) {
|
||||||
|
.myclimg {
|
||||||
|
height: 550px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 1000px) {
|
||||||
|
.myclimg {
|
||||||
|
height: 450px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 800px) {
|
||||||
|
.myclimg {
|
||||||
|
height: 400px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@media (max-width: 718px) {
|
@media (max-width: 718px) {
|
||||||
// PER VERSIONE MOBILE
|
// PER VERSIONE MOBILE
|
||||||
.landing > section.padding_testo {
|
.landing > section.padding_testo {
|
||||||
|
|||||||
@@ -25,6 +25,6 @@ import { Screen } from 'quasar'
|
|||||||
})
|
})
|
||||||
export default class CImgText extends Vue {
|
export default class CImgText extends Vue {
|
||||||
@Prop({ required: false, default: '' }) public src: string
|
@Prop({ required: false, default: '' }) public src: string
|
||||||
@Prop({ required: false, default: '' }) public class1: string
|
@Prop({ required: false, default: 'myclimg' }) public class1: string
|
||||||
@Prop({ required: false, default: '' }) public style1: string
|
@Prop({ required: false, default: '' }) public style1: string
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<section class="padding_testo bg-white text-grey-10 text-justify" > <!-- v-scroll-reveal.reset -->
|
<section class="padding_testo bg-white text-grey-10 text-justify" > <!-- v-scroll-reveal.reset -->
|
||||||
<div class="row items-start q-col-gutter-xs imgtext">
|
<div class="row items-start q-col-gutter-xs imgtext">
|
||||||
<div class="imgtext__img">
|
<div class="imgtext__img">
|
||||||
<img v-if="src" :src="src" :class="class1" :style="style1">
|
<img v-if="src" :src="src" class="myclimg" :style="style1">
|
||||||
<div class="section_text">
|
<div class="section_text">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -23,6 +23,10 @@ export default class Footer extends Vue {
|
|||||||
public $v
|
public $v
|
||||||
public $q
|
public $q
|
||||||
|
|
||||||
|
get tools() {
|
||||||
|
return tools
|
||||||
|
}
|
||||||
|
|
||||||
get TelegramSupport() {
|
get TelegramSupport() {
|
||||||
return db_data.TELEGRAM_SUPPORT
|
return db_data.TELEGRAM_SUPPORT
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<!--</span>-->
|
<!--</span>-->
|
||||||
|
|
||||||
|
|
||||||
<FormNewsletter v-if="static_data.SHOW_NEWSLETTER">
|
<FormNewsletter v-if="static_data.SHOW_NEWSLETTER" :idwebsite="tools.appid()" :locale="tools.getLocale()">
|
||||||
</FormNewsletter>
|
</FormNewsletter>
|
||||||
|
|
||||||
<div class="q-mt-xs copyrights">
|
<div class="q-mt-xs copyrights">
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import Component from 'vue-class-component'
|
import Component from 'vue-class-component'
|
||||||
|
|
||||||
import { tools } from '../../store/Modules/tools'
|
import { tools } from '@src/store/Modules/tools'
|
||||||
import { toolsext } from '@src/store/Modules/toolsext'
|
import { toolsext } from '@src/store/Modules/toolsext'
|
||||||
|
|
||||||
import Quasar, { Screen } from 'quasar'
|
import Quasar, { Screen } from 'quasar'
|
||||||
import { Prop } from 'vue-property-decorator'
|
import { Prop } from 'vue-property-decorator'
|
||||||
|
import { Api } from '../../store'
|
||||||
|
import { serv_constants } from '../../store/Modules/serv_constants'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
name: 'FormNewsletter'
|
name: 'FormNewsletter'
|
||||||
@@ -15,12 +17,20 @@ export default class FormNewsletter extends Vue {
|
|||||||
public $t
|
public $t
|
||||||
public $q
|
public $q
|
||||||
public name: string = null
|
public name: string = null
|
||||||
|
public surname: string = null
|
||||||
public email: string = null
|
public email: string = null
|
||||||
public accept: boolean = false
|
public accept: boolean = false
|
||||||
|
|
||||||
public onSubmit() {
|
@Prop() public idwebsite: string
|
||||||
if (this.accept !== true) {
|
@Prop() public locale: string
|
||||||
|
|
||||||
|
get tools() {
|
||||||
|
return tools
|
||||||
|
}
|
||||||
|
|
||||||
|
public async onSubmit() {
|
||||||
|
|
||||||
|
if (this.accept !== true) {
|
||||||
this.$q.notify({
|
this.$q.notify({
|
||||||
color: 'red-5',
|
color: 'red-5',
|
||||||
textColor: 'white',
|
textColor: 'white',
|
||||||
@@ -29,19 +39,58 @@ export default class FormNewsletter extends Vue {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.$q.notify({
|
const usertosend = {
|
||||||
color: 'green-4',
|
email: this.email,
|
||||||
textColor: 'white',
|
firstName: this.name,
|
||||||
icon: 'fas fa-check-circle',
|
lastName: this.surname,
|
||||||
message: this.$t('newsletter.submitted')
|
idwebsite: this.idwebsite,
|
||||||
})
|
locale: this.locale
|
||||||
|
}
|
||||||
|
console.log(usertosend)
|
||||||
|
|
||||||
|
return await Api.SendReq('/signup_news', 'POST', usertosend, false)
|
||||||
|
.then((res) => {
|
||||||
|
|
||||||
|
if (res.data.result === serv_constants.RIS_SUBSCRIBED_OK) {
|
||||||
|
this.$q.notify({
|
||||||
|
color: 'green-4',
|
||||||
|
textColor: 'white',
|
||||||
|
icon: 'fas fa-check-circle',
|
||||||
|
// message: this.$t('newsletter.submitted')
|
||||||
|
message: res.data.msg
|
||||||
|
})
|
||||||
|
} else if (res.data.result === serv_constants.RIS_SUBSCRIBED_ALREADYEXIST) {
|
||||||
|
this.$q.notify({
|
||||||
|
color: 'orange-4',
|
||||||
|
textColor: 'white',
|
||||||
|
icon: 'fas fa-check-circle',
|
||||||
|
// message: this.$t('newsletter.submitted')
|
||||||
|
message: res.data.msg
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$q.notify({
|
||||||
|
color: 'red-5',
|
||||||
|
textColor: 'white',
|
||||||
|
icon: 'fas fa-exclamation-triangle',
|
||||||
|
message: res.data.msg
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error(error)
|
||||||
|
// UserStore.mutations.setErrorCatch(error)
|
||||||
|
return false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public onReset() {
|
public onReset() {
|
||||||
this.name = null
|
this.name = null
|
||||||
|
this.surname = null
|
||||||
this.email = null
|
this.email = null
|
||||||
this.accept = false
|
this.accept = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
>
|
>
|
||||||
<q-input
|
<q-input
|
||||||
filled
|
filled
|
||||||
|
name="firstName"
|
||||||
dark standout
|
dark standout
|
||||||
v-model="name"
|
v-model="name"
|
||||||
:label="$t('newsletter.name') + `*`"
|
:label="$t('newsletter.name') + `*`"
|
||||||
@@ -18,6 +19,18 @@
|
|||||||
|
|
||||||
</q-input>
|
</q-input>
|
||||||
|
|
||||||
|
<q-input
|
||||||
|
filled
|
||||||
|
dark standout
|
||||||
|
v-model="surname"
|
||||||
|
name="lastName"
|
||||||
|
:label="$t('newsletter.surname') + `*`"
|
||||||
|
:hint="$t('newsletter.surnamehint')"
|
||||||
|
lazy-rules
|
||||||
|
:rules="[ val => val && val.length > 0 || $t('newsletter.typesomething')]">
|
||||||
|
|
||||||
|
</q-input>
|
||||||
|
|
||||||
<q-input
|
<q-input
|
||||||
filled
|
filled
|
||||||
dark standout
|
dark standout
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ export * from './CCard'
|
|||||||
export * from './CBook'
|
export * from './CBook'
|
||||||
export * from './CPage'
|
export * from './CPage'
|
||||||
export * from './CTitle'
|
export * from './CTitle'
|
||||||
|
export * from './CImgText'
|
||||||
|
export * from './CImgTitle'
|
||||||
export * from './CDate'
|
export * from './CDate'
|
||||||
export * from './BannerCookies'
|
export * from './BannerCookies'
|
||||||
export * from './PagePolicy'
|
export * from './PagePolicy'
|
||||||
|
|||||||
@@ -149,3 +149,19 @@ export interface IGallery {
|
|||||||
width?: number
|
width?: number
|
||||||
height?: number
|
height?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IColl {
|
||||||
|
title: IAllLang
|
||||||
|
date: string
|
||||||
|
subtitle?: IAllLang
|
||||||
|
img: string
|
||||||
|
linkagg?: string
|
||||||
|
linkagg_type?: number
|
||||||
|
width?: number
|
||||||
|
height?: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ICollaborations {
|
||||||
|
withwhom_title: IAllLang
|
||||||
|
list: IColl[]
|
||||||
|
}
|
||||||
|
|||||||
@@ -167,7 +167,9 @@ const msgglobal = {
|
|||||||
},
|
},
|
||||||
newsletter: {
|
newsletter: {
|
||||||
name: 'Il tuo Nome',
|
name: 'Il tuo Nome',
|
||||||
namehint: 'Nome e Cognome',
|
surname: 'Il tuo Cognome',
|
||||||
|
namehint: 'Nome',
|
||||||
|
surnamehint: 'Cognome',
|
||||||
email: 'La tua Email',
|
email: 'La tua Email',
|
||||||
submit: 'Iscriviti',
|
submit: 'Iscriviti',
|
||||||
reset: 'Cancella',
|
reset: 'Cancella',
|
||||||
@@ -337,7 +339,9 @@ const msgglobal = {
|
|||||||
},
|
},
|
||||||
newsletter: {
|
newsletter: {
|
||||||
name: 'Tu Nombre',
|
name: 'Tu Nombre',
|
||||||
namehint: 'Nombre y Apellido',
|
surname: 'Tu Apellido',
|
||||||
|
namehint: 'Nombre',
|
||||||
|
surnamehint: 'Apellido',
|
||||||
email: 'tu correo',
|
email: 'tu correo',
|
||||||
submit: 'Subscribete',
|
submit: 'Subscribete',
|
||||||
reset: 'Reiniciar',
|
reset: 'Reiniciar',
|
||||||
@@ -506,7 +510,9 @@ const msgglobal = {
|
|||||||
},
|
},
|
||||||
newsletter: {
|
newsletter: {
|
||||||
name: 'Ton nom',
|
name: 'Ton nom',
|
||||||
namehint: 'Nom et prénom',
|
surname: 'Tu prénom',
|
||||||
|
namehint: 'Nom',
|
||||||
|
surnamehint: 'Prénom',
|
||||||
email: 'votre e-mail',
|
email: 'votre e-mail',
|
||||||
submit: 'S\'abonner',
|
submit: 'S\'abonner',
|
||||||
reset: 'Redémarrer',
|
reset: 'Redémarrer',
|
||||||
@@ -674,7 +680,9 @@ const msgglobal = {
|
|||||||
},
|
},
|
||||||
newsletter: {
|
newsletter: {
|
||||||
name: 'Your name',
|
name: 'Your name',
|
||||||
namehint: 'Name and surname',
|
surname: 'Your surname',
|
||||||
|
namehint: 'Name',
|
||||||
|
surnamehint: 'Surname',
|
||||||
email: 'Your email',
|
email: 'Your email',
|
||||||
submit: 'Subscribe',
|
submit: 'Subscribe',
|
||||||
reset: 'Reset',
|
reset: 'Reset',
|
||||||
@@ -844,7 +852,9 @@ const msgglobal = {
|
|||||||
},
|
},
|
||||||
newsletter: {
|
newsletter: {
|
||||||
name: 'Your name',
|
name: 'Your name',
|
||||||
namehint: 'Name and surname',
|
surname: 'Your surname',
|
||||||
|
namehint: 'Name',
|
||||||
|
surnamehint: 'Surname',
|
||||||
email: 'Your email',
|
email: 'Your email',
|
||||||
submit: 'Subscribe',
|
submit: 'Subscribe',
|
||||||
reset: 'Reset',
|
reset: 'Reset',
|
||||||
|
|||||||
@@ -341,6 +341,10 @@ namespace Actions {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (UserStore.state.userId === undefined) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// console.log('saveSubscriptionToServer: ', newSub)
|
// console.log('saveSubscriptionToServer: ', newSub)
|
||||||
// console.log('context', context)
|
// console.log('context', context)
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,10 @@ export const serv_constants = {
|
|||||||
RIS_CODE_OK: 1,
|
RIS_CODE_OK: 1,
|
||||||
RIS_CODE_LOGIN_OK: 1,
|
RIS_CODE_LOGIN_OK: 1,
|
||||||
|
|
||||||
RIS_CODE__HTTP_FORBIDDEN_INVALID_TOKEN: 403
|
RIS_CODE__HTTP_FORBIDDEN_INVALID_TOKEN: 403,
|
||||||
|
|
||||||
|
RIS_SUBSCRIBED_OK: 1,
|
||||||
|
RIS_SUBSCRIBED_ALREADYEXIST: 2,
|
||||||
|
RIS_SUBSCRIBED_ERR: -1
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,13 +4,14 @@ import { costanti } from './costanti'
|
|||||||
import { toolsext } from './toolsext'
|
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 { ICollaborations, IListRoutes, IMenuList, IProject, ITodo, Privacy } from '@src/model'
|
||||||
import * as ApiTables from '@src/store/Modules/ApiTables'
|
import * as ApiTables from '@src/store/Modules/ApiTables'
|
||||||
import translate from '@src/globalroutines/util'
|
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 { static_data } from '@src/db/static_data'
|
import { static_data } from '@src/db/static_data'
|
||||||
|
import { IColl, ITimeLineEntry, ITimeLineMain } from '@src/model/GlobalStore'
|
||||||
|
|
||||||
export interface INotify {
|
export interface INotify {
|
||||||
color?: string | 'primary'
|
color?: string | 'primary'
|
||||||
@@ -30,6 +31,8 @@ export const tools = {
|
|||||||
DUPLICATE_EMAIL_ID: 11000,
|
DUPLICATE_EMAIL_ID: 11000,
|
||||||
DUPLICATE_USERNAME_ID: 11100,
|
DUPLICATE_USERNAME_ID: 11100,
|
||||||
|
|
||||||
|
TYPE_AUDIO: 1,
|
||||||
|
|
||||||
NUMSEC_CHECKUPDATE: 20000,
|
NUMSEC_CHECKUPDATE: 20000,
|
||||||
|
|
||||||
FIRST_PROJ: '5ca8f17fcd40dc5012f53346',
|
FIRST_PROJ: '5ca8f17fcd40dc5012f53346',
|
||||||
@@ -1735,13 +1738,21 @@ export const tools = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
myheight_imgtitle() {
|
myheight_imgtitle(myheight?) {
|
||||||
|
if (!!myheight) {
|
||||||
|
if (myheight > 0)
|
||||||
|
return myheight
|
||||||
|
}
|
||||||
if (Screen.width < 400) {
|
if (Screen.width < 400) {
|
||||||
return '250'
|
return 350
|
||||||
} else if (Screen.width < 600) {
|
} else if (Screen.width < 600) {
|
||||||
return '350'
|
return 400
|
||||||
|
} else if (Screen.width < 800) {
|
||||||
|
return 450
|
||||||
|
} else if (Screen.width < 1000) {
|
||||||
|
return 500
|
||||||
} else {
|
} else {
|
||||||
return '350'
|
return 500
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -1843,8 +1854,77 @@ export const tools = {
|
|||||||
|
|
||||||
addDays(mydate, days) {
|
addDays(mydate, days) {
|
||||||
return date.addToDate(mydate, { days })
|
return date.addToDate(mydate, { days })
|
||||||
|
},
|
||||||
|
|
||||||
|
gettitlemain(datamain: ITimeLineMain) {
|
||||||
|
if (datamain.titlemain[toolsext.getLocale()])
|
||||||
|
return datamain.titlemain[toolsext.getLocale()]
|
||||||
|
else {
|
||||||
|
return datamain.titlemain[static_data.arrLangUsed[0]]
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
getwwithwhocoll(datamain: ICollaborations) {
|
||||||
|
if (datamain.withwhom_title[toolsext.getLocale()])
|
||||||
|
return datamain.withwhom_title[toolsext.getLocale()]
|
||||||
|
else {
|
||||||
|
return datamain.withwhom_title[static_data.arrLangUsed[0]]
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
gettextcoll(data: IColl) {
|
||||||
|
if (data.subtitle[toolsext.getLocale()])
|
||||||
|
return data.subtitle[toolsext.getLocale()]
|
||||||
|
else {
|
||||||
|
return data.subtitle[static_data.arrLangUsed[0]]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
gettitlecoll(data: IColl) {
|
||||||
|
if (data.title[toolsext.getLocale()])
|
||||||
|
return data.title[toolsext.getLocale()]
|
||||||
|
else {
|
||||||
|
return data.title[static_data.arrLangUsed[0]]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
gettextdescr(data: ITimeLineEntry, numdescr = 'description') {
|
||||||
|
if (!!data[numdescr]) {
|
||||||
|
if (data[numdescr][toolsext.getLocale()])
|
||||||
|
return data[numdescr][toolsext.getLocale()]
|
||||||
|
else {
|
||||||
|
return data[numdescr][static_data.arrLangUsed[0]]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getlink(data: ITimeLineEntry) {
|
||||||
|
if (data.link_text[toolsext.getLocale()])
|
||||||
|
return data.link_text[toolsext.getLocale()]
|
||||||
|
else {
|
||||||
|
return data.link_text[static_data.arrLangUsed[0]]
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
getlinkurl(data: ITimeLineEntry) {
|
||||||
|
if (data.link_url_lang) {
|
||||||
|
if (data.link_url_lang[toolsext.getLocale()]) {
|
||||||
|
return data.link_url_lang[toolsext.getLocale()]
|
||||||
|
} else {
|
||||||
|
return data.link_url
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return data.link_url
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
appid() {
|
||||||
|
return process.env.APP_ID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// getLocale() {
|
// getLocale() {
|
||||||
// if (navigator.languages && navigator.languages.length > 0) {
|
// if (navigator.languages && navigator.languages.length > 0) {
|
||||||
// return navigator.languages[0]
|
// return navigator.languages[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user