From e772587fbc7b277048fc63e659d193ae79282702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Fri, 9 Dec 2022 23:47:50 +0300 Subject: [PATCH] lint fix --- pages/index.vue | 3 +++ plugins/appState.js | 1 + 2 files changed, 4 insertions(+) diff --git a/pages/index.vue b/pages/index.vue index f91db0e46..2c2a6d9e8 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -45,9 +45,11 @@ export default { themeChangeListener: null, mounted() { let afId = this.$route.query['af_id']; + if (afId) { let today = new Date(); let expire = new Date(); + expire.setTime(today.getTime() + 3600000 * 24 * 7); 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 cloneLinkElement = linkElement.cloneNode(true); + cloneLinkElement.setAttribute('id', elementId + '-clone'); cloneLinkElement.setAttribute('href', newThemeUrl); cloneLinkElement.addEventListener('load', () => { diff --git a/plugins/appState.js b/plugins/appState.js index 56d37e726..d0474b21d 100644 --- a/plugins/appState.js +++ b/plugins/appState.js @@ -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: {} }); } }; + export default defineNuxtPlugin((nuxtApp) => { nuxtApp.vueApp.use($appState); });