2024-09-23 10:43:23 +00:00
|
|
|
import AppTheme from '@/themes/app-theme';
|
|
|
|
import PrimeVue from 'primevue/config';
|
2024-03-31 04:44:48 +00:00
|
|
|
import { reactive } from 'vue';
|
|
|
|
|
2022-09-06 11:52:18 +00:00
|
|
|
const $appState = {
|
2023-02-28 08:29:30 +00:00
|
|
|
install: (Vue, options) => {
|
2023-12-30 22:26:14 +00:00
|
|
|
Vue.config.globalProperties.$appState = reactive({
|
2024-05-15 10:05:13 +00:00
|
|
|
preset: 'Aura',
|
2024-05-26 00:28:48 +00:00
|
|
|
primary: 'noir',
|
|
|
|
surface: null,
|
2023-12-30 22:26:14 +00:00
|
|
|
darkTheme: false,
|
|
|
|
codeSandbox: false,
|
|
|
|
sourceType: 'options-api',
|
|
|
|
newsActive: false,
|
|
|
|
announcement: null,
|
2024-11-10 15:24:15 +00:00
|
|
|
storageKey: 'primevue',
|
2024-11-12 12:38:29 +00:00
|
|
|
designerKey: 'primevue-designer-theme',
|
2024-11-10 15:24:15 +00:00
|
|
|
designerActive: false
|
2023-12-30 22:26:14 +00:00
|
|
|
});
|
2022-09-14 14:26:41 +00:00
|
|
|
}
|
|
|
|
};
|
2022-12-09 20:47:50 +00:00
|
|
|
|
2024-09-20 21:30:51 +00:00
|
|
|
export default defineNuxtPlugin(async (nuxtApp) => {
|
2024-09-17 21:55:40 +00:00
|
|
|
const runtimeConfig = useRuntimeConfig();
|
|
|
|
|
2022-09-14 14:26:41 +00:00
|
|
|
nuxtApp.vueApp.use($appState);
|
2024-09-17 21:55:40 +00:00
|
|
|
|
|
|
|
if (runtimeConfig.public.DEV_ENV === 'hot') {
|
2024-09-20 19:54:43 +00:00
|
|
|
nuxtApp.vueApp.use(PrimeVue, {
|
2024-09-23 10:43:23 +00:00
|
|
|
theme: AppTheme
|
2024-09-20 19:54:43 +00:00
|
|
|
});
|
2024-09-17 21:55:40 +00:00
|
|
|
}
|
2022-09-14 14:26:41 +00:00
|
|
|
});
|