mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 09:22:34 +00:00
Adjustments to API updates
This commit is contained in:
parent
b76e39faa6
commit
1c7e4f9baf
6 changed files with 129 additions and 77 deletions
|
@ -25,24 +25,7 @@
|
|||
<DesignEditor v-else-if="$appState.designer.activeView === 'editor'" :deferred="deferredTabs" />
|
||||
|
||||
<template #footer>
|
||||
<div v-if="$appState.designer.active.view === 'editor'" class="flex justify-between gap-2">
|
||||
<button
|
||||
type="button"
|
||||
@click="download"
|
||||
icon="pi pi-download"
|
||||
class="px-3 py-2 bg-transparent border border-gray-200 dark:border-gray-700 hover:border-gray-800 dark:hover:border-gray-500 text-black dark:text-white rounded-md font-medium cursor-pointer transition-colors duration-200 focus:outline focus:outline-offset-2 focus:outline-zinc-950 focus:dark:outline-white"
|
||||
>
|
||||
Download
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
@click="apply"
|
||||
icon="pi pi-download"
|
||||
class="px-3 py-2 bg-zinc-950 hover:bg-zinc-800 text-white dark:bg-white dark:hover:bg-gray-100 dark:text-black rounded-md font-medium cursor-pointer transition-colors duration-200 focus:outline focus:outline-offset-2 focus:outline-zinc-950 focus:dark:outline-white"
|
||||
>
|
||||
Apply
|
||||
</button>
|
||||
</div>
|
||||
<DesignEditorFooter v-if="$appState.designer.activeView === 'editor'" />
|
||||
</template>
|
||||
</Drawer>
|
||||
</template>
|
||||
|
@ -53,9 +36,10 @@ import { $dt } from '@primevue/themes';
|
|||
export default {
|
||||
provide() {
|
||||
return {
|
||||
designerUtils: {
|
||||
designerService: {
|
||||
refreshACTokens: this.refreshACTokens,
|
||||
saveTheme: this.saveTheme
|
||||
saveTheme: this.saveTheme,
|
||||
downloadTheme: this.downloadTheme
|
||||
}
|
||||
};
|
||||
},
|
||||
|
@ -71,18 +55,9 @@ export default {
|
|||
onHide() {
|
||||
this.deferredTabs = true;
|
||||
},
|
||||
download() {
|
||||
downloadTheme(theme) {
|
||||
// TODO: Fetch from endpoint
|
||||
},
|
||||
apply() {
|
||||
saveTheme();
|
||||
updatePreset(this.$appState.designer.theme.preset);
|
||||
EventBus.emit('theme-palette-change');
|
||||
},
|
||||
saveTheme() {
|
||||
// TODO: Save to DB or Local Storage
|
||||
console.log('theme saved');
|
||||
},
|
||||
camelCaseToDotCase(name) {
|
||||
return name.replace(/([a-z])([A-Z])/g, '$1.$2').toLowerCase();
|
||||
},
|
||||
|
@ -111,7 +86,6 @@ export default {
|
|||
refreshACTokens() {
|
||||
this.$appState.designer.theme.acTokens = [];
|
||||
this.generateACTokens(null, this.$appState.designer.theme.preset);
|
||||
console.log('refresh tokens');
|
||||
},
|
||||
openDashboard() {
|
||||
this.$appState.designer.activeView = 'dashboard';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue