pull/3420/head
Tuğçe Küçükoğlu 2022-12-09 23:47:50 +03:00
parent 9d2402658a
commit e772587fbc
2 changed files with 4 additions and 0 deletions

View File

@ -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', () => {

View File

@ -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);
}); });