lint fix
parent
9d2402658a
commit
e772587fbc
|
@ -45,9 +45,11 @@ export default {
|
||||||
themeChangeListener: null,
|
themeChangeListener: null,
|
||||||
mounted() {
|
mounted() {
|
||||||
let afId = this.$route.query['af_id'];
|
let afId = this.$route.query['af_id'];
|
||||||
|
|
||||||
if (afId) {
|
if (afId) {
|
||||||
let today = new Date();
|
let today = new Date();
|
||||||
let expire = new Date();
|
let expire = new Date();
|
||||||
|
|
||||||
expire.setTime(today.getTime() + 3600000 * 24 * 7);
|
expire.setTime(today.getTime() + 3600000 * 24 * 7);
|
||||||
document.cookie = 'primeaffiliateid=' + afId + ';expires=' + expire.toUTCString() + ';path=/; domain:primefaces.org';
|
document.cookie = 'primeaffiliateid=' + afId + ';expires=' + expire.toUTCString() + ';path=/; domain:primefaces.org';
|
||||||
}
|
}
|
||||||
|
@ -75,6 +77,7 @@ export default {
|
||||||
const newThemeUrl = linkElement.getAttribute('href').replace(currentTableTheme, newTheme);
|
const newThemeUrl = linkElement.getAttribute('href').replace(currentTableTheme, newTheme);
|
||||||
|
|
||||||
const cloneLinkElement = linkElement.cloneNode(true);
|
const cloneLinkElement = linkElement.cloneNode(true);
|
||||||
|
|
||||||
cloneLinkElement.setAttribute('id', elementId + '-clone');
|
cloneLinkElement.setAttribute('id', elementId + '-clone');
|
||||||
cloneLinkElement.setAttribute('href', newThemeUrl);
|
cloneLinkElement.setAttribute('href', newThemeUrl);
|
||||||
cloneLinkElement.addEventListener('load', () => {
|
cloneLinkElement.addEventListener('load', () => {
|
||||||
|
|
|
@ -3,6 +3,7 @@ const $appState = {
|
||||||
Vue.config.globalProperties.$appState = reactive({ theme: 'lara-light-blue', darkTheme: false, codeSandbox: false, sourceType: 'options-api', newsActive: process.env.NODE_ENV === 'production', announcement: {} });
|
Vue.config.globalProperties.$appState = reactive({ theme: 'lara-light-blue', darkTheme: false, codeSandbox: false, sourceType: 'options-api', newsActive: process.env.NODE_ENV === 'production', announcement: {} });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default defineNuxtPlugin((nuxtApp) => {
|
export default defineNuxtPlugin((nuxtApp) => {
|
||||||
nuxtApp.vueApp.use($appState);
|
nuxtApp.vueApp.use($appState);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue