primevue-mirror/layouts/AppConfigurator.vue

479 lines
26 KiB
Vue
Raw Normal View History

2019-12-20 13:49:40 +00:00
<template>
<div :class="containerClass">
<div class="layout-config-content-wrapper">
2022-12-08 19:24:21 +00:00
<a href="#" class="layout-config-button" @click="toggleConfigurator">
2019-12-20 13:49:40 +00:00
<i class="pi pi-cog"></i>
2022-09-14 12:04:18 +00:00
</a>
2022-12-08 19:24:21 +00:00
<a href="#" class="layout-config-close" @click="hideConfigurator">
2019-12-20 13:49:40 +00:00
<i class="pi pi-times"></i>
2022-09-14 12:04:18 +00:00
</a>
2019-12-20 13:49:40 +00:00
<div class="layout-config-content">
2020-06-19 09:41:05 +00:00
<div>
2020-06-17 19:29:33 +00:00
<h4>Component Scale</h4>
2020-05-14 08:37:01 +00:00
<div class="config-scale">
2022-09-14 14:26:41 +00:00
<Button icon="pi pi-minus" @click="decrementScale()" class="p-button-text" :disabled="scale === scales[0]" />
2022-12-08 19:24:21 +00:00
<i v-for="s of scales" :key="s" class="pi pi-circle-fill" :class="{ 'scale-active': s === scale }" />
2022-09-14 14:26:41 +00:00
<Button icon="pi pi-plus" @click="incrementScale()" class="p-button-text" :disabled="scale === scales[scales.length - 1]" />
2020-05-14 08:37:01 +00:00
</div>
2020-06-20 09:40:01 +00:00
<AppInputStyleSwitch />
2020-06-25 13:04:00 +00:00
<h4>Ripple Effect</h4>
2022-09-14 14:26:41 +00:00
<InputSwitch :modelValue="rippleActive" @update:modelValue="onRippleChange" />
2020-06-25 13:04:00 +00:00
2020-06-17 19:29:33 +00:00
<h4>Free Themes</h4>
2022-12-08 19:24:21 +00:00
<p>Built-in component themes created by the <a href="https://www.primefaces.org/designer/primevue">PrimeVue Theme Designer</a>.</p>
2020-05-07 19:16:41 +00:00
2020-06-19 09:16:03 +00:00
<h5>Bootstrap</h5>
2022-01-13 11:03:59 +00:00
<div class="grid free-themes">
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'bootstrap4-light-blue')">
<img src="https://primefaces.org/cdn/primevue/images/themes/bootstrap4-light-blue.svg" alt="Bootstrap Light Blue" />
2020-06-25 09:49:23 +00:00
</button>
2020-06-26 13:37:03 +00:00
<span>Blue</span>
2020-06-25 09:49:23 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'bootstrap4-light-purple')">
<img src="https://primefaces.org/cdn/primevue/images/themes/bootstrap4-light-purple.svg" alt="Bootstrap Light Blue" />
2020-06-19 09:16:03 +00:00
</button>
2020-06-26 13:37:03 +00:00
<span>Purple</span>
2020-06-19 09:16:03 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'bootstrap4-dark-blue', true)">
<img src="https://primefaces.org/cdn/primevue/images/themes/bootstrap4-dark-blue.svg" alt="Bootstrap Dark Blue" />
2020-06-19 09:16:03 +00:00
</button>
2020-06-26 13:37:03 +00:00
<span>Blue</span>
2020-06-25 09:49:23 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'bootstrap4-dark-purple', true)">
<img src="https://primefaces.org/cdn/primevue/images/themes/bootstrap4-dark-purple.svg" alt="Bootstrap Dark Blue" />
2020-06-25 09:49:23 +00:00
</button>
2020-06-26 13:37:03 +00:00
<span>Purple</span>
2020-06-19 09:16:03 +00:00
</div>
</div>
2020-06-25 09:49:23 +00:00
<h5>Material Design</h5>
2022-01-13 11:03:59 +00:00
<div class="grid free-themes">
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'md-light-indigo')">
<img src="https://primefaces.org/cdn/primevue/images/themes/md-light-indigo.svg" alt="Material Light Indigo" />
2020-06-19 09:16:03 +00:00
</button>
2020-06-26 12:24:56 +00:00
<span>Indigo</span>
2020-06-19 09:16:03 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'md-light-deeppurple')">
<img src="https://primefaces.org/cdn/primevue/images/themes/md-light-deeppurple.svg" alt="Material Light Deep Purple" />
2020-06-19 09:16:03 +00:00
</button>
2020-06-26 12:24:56 +00:00
<span>Deep Purple</span>
2020-06-25 09:19:23 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'md-dark-indigo', true)">
<img src="https://primefaces.org/cdn/primevue/images/themes/md-dark-indigo.svg" alt="Material Dark Indigo" />
2020-06-25 09:19:23 +00:00
</button>
2020-06-26 12:24:56 +00:00
<span>Indigo</span>
2020-06-25 09:19:23 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'md-dark-deeppurple', true)">
<img src="https://primefaces.org/cdn/primevue/images/themes/md-dark-deeppurple.svg" alt="Material Dark Deep Purple" />
2020-06-25 09:19:23 +00:00
</button>
2020-06-26 12:24:56 +00:00
<span>Deep Purple</span>
2020-06-25 09:19:23 +00:00
</div>
</div>
2020-06-25 09:49:23 +00:00
<h5>Material Design Compact</h5>
2022-01-13 11:03:59 +00:00
<div class="grid free-themes">
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'mdc-light-indigo')">
<img src="https://primefaces.org/cdn/primevue/images/themes/md-light-indigo.svg" alt="Material Compact Light Indigo" />
2020-06-25 09:19:23 +00:00
</button>
2020-06-26 12:24:56 +00:00
<span>Indigo</span>
2020-06-25 09:19:23 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'mdc-light-deeppurple')">
<img src="https://primefaces.org/cdn/primevue/images/themes/md-light-deeppurple.svg" alt="Material Compact Deep Purple" />
2020-06-25 09:19:23 +00:00
</button>
2020-06-26 12:24:56 +00:00
<span>Deep Purple</span>
2020-06-25 09:19:23 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'mdc-dark-indigo', true)">
<img src="https://primefaces.org/cdn/primevue/images/themes/md-dark-indigo.svg" alt="Material Compact Dark Indigo" />
2020-06-25 09:19:23 +00:00
</button>
2020-06-26 12:24:56 +00:00
<span>Indigo</span>
2020-06-25 09:19:23 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'mdc-dark-deeppurple', true)">
<img src="https://primefaces.org/cdn/primevue/images/themes/md-dark-deeppurple.svg" alt="Material Compact Dark Deep Purple" />
2020-06-25 09:19:23 +00:00
</button>
2020-06-26 12:24:56 +00:00
<span>Deep Purple</span>
2020-06-19 09:16:03 +00:00
</div>
</div>
2021-09-06 08:54:28 +00:00
<h5>Tailwind</h5>
2022-01-13 11:03:59 +00:00
<div class="grid free-themes">
<div class="col-3">
2021-09-06 08:54:28 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'tailwind-light')">
<img src="https://primefaces.org/cdn/primevue/images/themes/tailwind-light.png" alt="Tailwind Light" />
2021-09-06 08:54:28 +00:00
</button>
<span>Tailwind Light</span>
</div>
</div>
2020-10-10 10:32:08 +00:00
<h5>Fluent UI</h5>
2022-01-13 11:03:59 +00:00
<div class="grid free-themes">
<div class="col-3">
2020-10-10 10:32:08 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'fluent-light')">
<img src="https://primefaces.org/cdn/primevue/images/themes/fluent-light.png" alt="Fluent Light" />
2020-10-10 10:32:08 +00:00
</button>
<span>Fluent Light</span>
</div>
</div>
2023-01-27 11:56:16 +00:00
<h5 class="flex align-items-center">PrimeOne Design</h5>
2022-01-13 11:03:59 +00:00
<div class="grid free-themes">
<div class="col-3">
2021-11-08 10:44:13 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'lara-light-indigo')">
<img src="https://primefaces.org/cdn/primevue/images/themes/lara-light-indigo.png" alt="Lara Light Indigo" />
2021-11-08 10:44:13 +00:00
</button>
2021-11-08 14:30:55 +00:00
<span>Lara Light Indigo</span>
2021-11-08 10:44:13 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2021-11-16 07:06:27 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'lara-light-blue')">
<img src="https://primefaces.org/cdn/primevue/images/themes/lara-light-blue.png" alt="Lara Light Blue" />
2021-11-08 10:44:13 +00:00
</button>
2021-11-16 07:06:27 +00:00
<span>Lara Light Blue</span>
2021-11-08 10:44:13 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2021-11-08 14:24:48 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'lara-light-purple')">
<img src="https://primefaces.org/cdn/primevue/images/themes/lara-light-purple.png" alt="Lara Light Purple" />
2021-11-08 10:44:13 +00:00
</button>
2021-11-08 14:30:55 +00:00
<span>Lara Light Purple</span>
2021-11-08 10:44:13 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2021-11-16 07:06:27 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'lara-light-teal')">
<img src="https://primefaces.org/cdn/primevue/images/themes/lara-light-teal.png" alt="Lara Light Teal" />
2021-11-08 10:44:13 +00:00
</button>
2021-11-16 07:06:27 +00:00
<span>Lara Light Teal</span>
2021-11-08 10:44:13 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2021-11-16 07:06:27 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'lara-dark-indigo', true)">
<img src="https://primefaces.org/cdn/primevue/images/themes/lara-dark-indigo.png" alt="Lara Dark Indigo" />
2021-11-12 15:13:06 +00:00
</button>
2021-11-16 07:06:27 +00:00
<span>Lara Dark Indigo</span>
2021-11-12 15:13:06 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2021-11-15 07:52:45 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'lara-dark-blue', true)">
<img src="https://primefaces.org/cdn/primevue/images/themes/lara-dark-blue.png" alt="Lara Dark Blue" />
2021-11-12 15:13:06 +00:00
</button>
2021-11-15 07:52:45 +00:00
<span>Lara Dark Blue</span>
2021-11-12 15:13:06 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2021-11-16 07:06:27 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'lara-dark-purple', true)">
<img src="https://primefaces.org/cdn/primevue/images/themes/lara-dark-purple.png" alt="Lara Dark Purple" />
2021-11-12 15:13:06 +00:00
</button>
2021-11-16 07:06:27 +00:00
<span>Lara Dark Purple</span>
2021-11-12 15:13:06 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2021-11-15 07:52:45 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'lara-dark-teal', true)">
<img src="https://primefaces.org/cdn/primevue/images/themes/lara-dark-teal.png" alt="Lara Dark Teal" />
2021-11-12 15:13:06 +00:00
</button>
2021-11-15 07:52:45 +00:00
<span>Lara Dark Teal</span>
2021-11-12 15:13:06 +00:00
</div>
2021-11-15 07:22:31 +00:00
</div>
2023-01-27 11:56:16 +00:00
<h5 class="flex align-items-center">Misc</h5>
<div class="grid free-themes">
<div class="col-3">
<button class="p-link" type="button" @click="changeTheme($event, 'soho-light')">
<img src="https://primefaces.org/cdn/primevue/images/themes/soho-light.png" alt="Soho Light" />
2023-01-27 11:56:16 +00:00
</button>
<span>Soho Light</span>
</div>
<div class="col-3">
<button class="p-link" type="button" @click="changeTheme($event, 'soho-dark', true)">
<img src="https://primefaces.org/cdn/primevue/images/themes/soho-dark.png" alt="Soho Dark" />
2023-01-27 11:56:16 +00:00
</button>
<span>Soho Dark</span>
</div>
<div class="col-3">
<button class="p-link" type="button" @click="changeTheme($event, 'viva-light')">
<img src="https://primefaces.org/cdn/primevue/images/themes/viva-light.svg" alt="Viva Light" />
2023-01-27 11:56:16 +00:00
</button>
<span>Viva Light</span>
</div>
<div class="col-3">
<button class="p-link" type="button" @click="changeTheme($event, 'viva-dark', true)">
<img src="https://primefaces.org/cdn/primevue/images/themes/viva-dark.svg" alt="Viva Dark" />
2023-01-27 11:56:16 +00:00
</button>
<span>Viva Dark</span>
</div>
<div class="col-3">
<button class="p-link" type="button" @click="changeTheme($event, 'mira')">
<img src="https://primefaces.org/cdn/primevue/images/themes/mira.jpg" alt="Mira" />
2023-01-27 11:56:16 +00:00
</button>
<span>Mira</span>
</div>
<div class="col-3">
<button class="p-link" type="button" @click="changeTheme($event, 'nano')">
<img src="https://primefaces.org/cdn/primevue/images/themes/nano.jpg" alt="Mira" />
2023-01-27 11:56:16 +00:00
</button>
<span>Nano</span>
</div>
</div>
2023-01-18 21:11:26 +00:00
<h5>PrimeOne Design - Legacy</h5>
2022-01-13 11:03:59 +00:00
<div class="grid free-themes">
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'saga-blue')">
<img src="https://primefaces.org/cdn/primevue/images/themes/saga-blue.png" alt="Saga Blue" />
</button>
2020-05-12 22:46:48 +00:00
<span>Saga Blue</span>
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'saga-green')">
<img src="https://primefaces.org/cdn/primevue/images/themes/saga-green.png" alt="Saga Green" />
</button>
2020-05-12 22:46:48 +00:00
<span>Saga Green</span>
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'saga-orange')">
<img src="https://primefaces.org/cdn/primevue/images/themes/saga-orange.png" alt="Saga Orange" />
</button>
2020-05-12 22:46:48 +00:00
<span>Saga Orange</span>
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'saga-purple')">
<img src="https://primefaces.org/cdn/primevue/images/themes/saga-purple.png" alt="Saga Purple" />
2020-05-08 10:30:55 +00:00
</button>
2020-05-12 22:46:48 +00:00
<span>Saga Purple</span>
2020-05-08 10:30:55 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'vela-blue', true)">
<img src="https://primefaces.org/cdn/primevue/images/themes/vela-blue.png" alt="Vela Blue" />
</button>
2020-05-12 22:46:48 +00:00
<span>Vela Blue</span>
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'vela-green', true)">
<img src="https://primefaces.org/cdn/primevue/images/themes/vela-green.png" alt="Vela Green" />
</button>
2020-05-12 22:46:48 +00:00
<span>Vela Green</span>
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'vela-orange', true)">
<img src="https://primefaces.org/cdn/primevue/images/themes/vela-orange.png" alt="Vela Orange" />
</button>
2020-05-12 22:46:48 +00:00
<span>Vela Orange</span>
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'vela-purple', true)">
<img src="https://primefaces.org/cdn/primevue/images/themes/vela-purple.png" alt="Vela Purple" />
2020-05-08 10:30:55 +00:00
</button>
2020-05-12 22:46:48 +00:00
<span>Vela Purple</span>
2020-05-08 10:30:55 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'arya-blue', true)">
<img src="https://primefaces.org/cdn/primevue/images/themes/arya-blue.png" alt="Arya Blue" />
2020-06-17 14:09:39 +00:00
</button>
2020-06-18 09:01:31 +00:00
<span>Arya Blue</span>
2020-06-17 14:09:39 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'arya-green', true)">
<img src="https://primefaces.org/cdn/primevue/images/themes/arya-green.png" alt="Arya Green" />
2020-06-17 14:09:39 +00:00
</button>
2020-06-18 09:01:31 +00:00
<span>Arya Green</span>
2020-06-17 14:09:39 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'arya-orange', true)">
<img src="https://primefaces.org/cdn/primevue/images/themes/arya-orange.png" alt="Arya Orange" />
2020-06-17 14:09:39 +00:00
</button>
2020-06-18 09:01:31 +00:00
<span>Arya Orange</span>
2020-06-17 14:09:39 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-3">
2020-07-23 08:36:58 +00:00
<button class="p-link" type="button" @click="changeTheme($event, 'arya-purple', true)">
<img src="https://primefaces.org/cdn/primevue/images/themes/arya-purple.png" alt="Arya Purple" />
2020-06-17 14:09:39 +00:00
</button>
2020-06-18 09:01:31 +00:00
<span>Arya Purple</span>
2020-06-17 14:09:39 +00:00
</div>
2020-06-19 09:16:03 +00:00
</div>
2021-09-13 16:05:18 +00:00
<h4>Admin Templates</h4>
2023-01-18 21:11:26 +00:00
<p>Beautifully crafted application templates by PrimeTek.</p>
2022-01-13 11:03:59 +00:00
<div class="grid premium-themes">
<div class="col-12 md:col-6">
2022-12-08 19:24:21 +00:00
<a href="https://www.primefaces.org/sakai-vue">
<img alt="Ultima" src="https://primefaces.org/cdn/primevue/images/layouts/sakai-vue.jpg" />
2022-12-08 19:24:21 +00:00
</a>
2021-09-13 16:05:18 +00:00
</div>
2023-01-16 17:38:20 +00:00
<div class="col-12 md:col-6">
<a href="https://www.primefaces.org/layouts/apollo-vue">
<img alt="Apollo" src="https://primefaces.org/cdn/primevue/images/layouts/apollo-vue.jpg" />
2023-01-16 17:38:20 +00:00
</a>
</div>
2022-01-13 11:03:59 +00:00
<div class="col-12 md:col-6">
2022-12-08 19:24:21 +00:00
<a href="https://www.primefaces.org/layouts/atlantis-vue">
<img alt="Atlantis" src="https://primefaces.org/cdn/primevue/images/layouts/atlantis-vue.jpg" />
2022-12-08 19:24:21 +00:00
</a>
2021-09-21 07:05:08 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-12 md:col-6">
2022-12-08 19:24:21 +00:00
<a href="https://www.primefaces.org/layouts/freya-vue">
<img alt="Freya" src="https://primefaces.org/cdn/primevue/images/layouts/freya-vue.png" />
2022-12-08 19:24:21 +00:00
</a>
2021-05-06 13:12:18 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-12 md:col-6">
2022-12-08 19:24:21 +00:00
<a href="https://www.primefaces.org/layouts/ultima-vue">
<img alt="Ultima" src="https://primefaces.org/cdn/primevue/images/layouts/ultima-vue.jpg" />
2022-12-08 19:24:21 +00:00
</a>
2020-10-22 10:45:59 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-12 md:col-6">
2022-12-08 19:24:21 +00:00
<a href="https://www.primefaces.org/layouts/diamond-vue">
<img alt="Diamond" src="https://primefaces.org/cdn/primevue/images/layouts/diamond-vue.jpg" />
2022-12-08 19:24:21 +00:00
</a>
2020-03-23 12:31:25 +00:00
</div>
2022-05-26 13:53:30 +00:00
<div class="col-12 md:col-6">
2022-12-08 19:24:21 +00:00
<a href="https://www.primefaces.org/layouts/verona-vue">
<img alt="Verona" src="https://primefaces.org/cdn/primevue/images/layouts/verona-vue.jpg" />
2022-12-08 19:24:21 +00:00
</a>
2022-05-26 13:53:30 +00:00
</div>
<div class="col-12 md:col-6">
2022-12-08 19:24:21 +00:00
<a href="https://www.primefaces.org/layouts/poseidon-vue">
<img alt="Poseidon" src="https://primefaces.org/cdn/primevue/images/layouts/poseidon-vue.jpg" />
2022-12-08 19:24:21 +00:00
</a>
2022-05-26 13:53:30 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-12 md:col-6">
2022-12-08 19:24:21 +00:00
<a href="https://www.primefaces.org/layouts/sapphire-vue">
<img alt="Sapphire" src="https://primefaces.org/cdn/primevue/images/layouts/sapphire-vue.jpg" />
2022-12-08 19:24:21 +00:00
</a>
2019-12-20 13:49:40 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-12 md:col-6">
2022-12-08 19:24:21 +00:00
<a href="https://www.primefaces.org/layouts/serenity-vue">
<img alt="Serenity" src="https://primefaces.org/cdn/primevue/images/layouts/serenity-vue.jpg" />
2022-12-08 19:24:21 +00:00
</a>
2020-01-10 11:56:46 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-12 md:col-6">
2022-12-08 19:24:21 +00:00
<a href="https://www.primefaces.org/layouts/babylon-vue">
<img alt="Babylon" src="https://primefaces.org/cdn/primevue/images/layouts/babylon-vue.jpg" />
2022-12-08 19:24:21 +00:00
</a>
2019-12-20 13:49:40 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-12 md:col-6">
2022-12-08 19:24:21 +00:00
<a href="https://www.primefaces.org/layouts/avalon-vue">
<img alt="Avalon" src="https://primefaces.org/cdn/primevue/images/layouts/avalon-vue.jpg" />
2022-12-08 19:24:21 +00:00
</a>
2019-12-20 13:49:40 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-12 md:col-6">
2022-12-08 19:24:21 +00:00
<a href="https://www.primefaces.org/layouts/roma-vue">
<img alt="Roma" src="https://primefaces.org/cdn/primevue/images/layouts/roma-vue.jpg" />
2022-12-08 19:24:21 +00:00
</a>
2020-01-07 15:38:02 +00:00
</div>
2022-01-13 11:03:59 +00:00
<div class="col-12 md:col-6">
2022-12-08 19:24:21 +00:00
<a href="https://www.primefaces.org/layouts/prestige-vue">
<img alt="Prestige" src="https://primefaces.org/cdn/primevue/images/layouts/prestige-vue.jpg" />
2022-12-08 19:24:21 +00:00
</a>
2020-07-05 11:07:29 +00:00
</div>
2019-12-20 13:49:40 +00:00
</div>
</div>
</div>
</div>
</div>
</template>
<script>
2022-12-08 19:24:21 +00:00
import EventBus from '@/layouts/AppEventBus';
2020-11-26 08:53:02 +00:00
2019-12-20 13:49:40 +00:00
export default {
props: {
2020-06-20 09:40:01 +00:00
inputStyle: String
},
2019-12-20 13:49:40 +00:00
data() {
return {
2020-05-14 08:37:01 +00:00
active: false,
scale: 14,
2022-09-14 14:26:41 +00:00
scales: [12, 13, 14, 15, 16]
};
2019-12-20 13:49:40 +00:00
},
outsideClickListener: null,
2021-04-15 14:53:33 +00:00
themeChangeListener: null,
2019-12-20 13:49:40 +00:00
watch: {
$route() {
if (this.active) {
this.active = false;
this.unbindOutsideClickListener();
}
}
},
2021-04-15 14:53:33 +00:00
beforeUnmount() {
2022-02-23 19:52:21 +00:00
EventBus.off('theme-change', this.themeChangeListener);
2021-04-15 14:53:33 +00:00
},
2020-11-26 08:53:02 +00:00
mounted() {
2021-04-15 14:53:33 +00:00
this.themeChangeListener = (event) => {
2022-09-14 14:26:41 +00:00
if (event.theme === 'nano') this.scale = 12;
else this.scale = 14;
2020-11-26 08:53:02 +00:00
this.applyScale();
2021-04-15 14:53:33 +00:00
};
2022-02-23 19:52:21 +00:00
EventBus.on('theme-change', this.themeChangeListener);
2020-11-26 08:53:02 +00:00
},
2019-12-20 13:49:40 +00:00
methods: {
toggleConfigurator(event) {
this.active = !this.active;
event.preventDefault();
2022-09-14 14:26:41 +00:00
if (this.active) this.bindOutsideClickListener();
else this.unbindOutsideClickListener();
2019-12-20 13:49:40 +00:00
},
hideConfigurator(event) {
this.active = false;
this.unbindOutsideClickListener();
event.preventDefault();
},
changeTheme(event, theme, dark) {
2022-02-23 19:52:21 +00:00
EventBus.emit('theme-change', { theme: theme, dark: dark });
2019-12-20 13:49:40 +00:00
event.preventDefault();
},
bindOutsideClickListener() {
if (!this.outsideClickListener) {
this.outsideClickListener = (event) => {
if (this.active && this.isOutsideClicked(event)) {
this.active = false;
}
};
2022-12-08 19:24:21 +00:00
2019-12-20 13:49:40 +00:00
document.addEventListener('click', this.outsideClickListener);
}
},
unbindOutsideClickListener() {
if (this.outsideClickListener) {
document.removeEventListener('click', this.outsideClickListener);
this.outsideClickListener = null;
}
},
isOutsideClicked(event) {
return !(this.$el.isSameNode(event.target) || this.$el.contains(event.target));
2020-05-14 08:37:01 +00:00
},
decrementScale() {
this.scale--;
2020-11-26 08:53:02 +00:00
this.applyScale();
2020-05-14 08:37:01 +00:00
},
incrementScale() {
this.scale++;
2020-11-26 08:53:02 +00:00
this.applyScale();
},
applyScale() {
2020-05-14 08:37:01 +00:00
document.documentElement.style.fontSize = this.scale + 'px';
2020-06-25 13:04:00 +00:00
},
onRippleChange(value) {
2020-12-09 12:24:11 +00:00
this.$primevue.config.ripple = value;
}
2020-06-27 22:43:07 +00:00
},
computed: {
containerClass() {
2022-09-14 14:26:41 +00:00
return ['layout-config', { 'layout-config-active': this.active }];
2020-06-27 22:43:07 +00:00
},
rippleActive() {
2020-12-09 12:24:11 +00:00
return this.$primevue.config.ripple;
2020-06-27 22:43:07 +00:00
}
2020-07-10 11:47:18 +00:00
}
2022-09-14 14:26:41 +00:00
};
2019-12-20 14:22:50 +00:00
</script>