mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-14 18:43:08 +02:00
fix #8861
This commit is contained in:
parent
5ee53c222b
commit
c9e9129373
2 changed files with 72 additions and 68 deletions
|
@ -1,4 +1,5 @@
|
||||||
<template><MkStickyContainer>
|
<template>
|
||||||
|
<MkStickyContainer>
|
||||||
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
|
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
|
||||||
<MkSpacer :content-max="800" :margin-min="16" :margin-max="32">
|
<MkSpacer :content-max="800" :margin-min="16" :margin-max="32">
|
||||||
<div class="cwepdizn _formRoot">
|
<div class="cwepdizn _formRoot">
|
||||||
|
@ -62,7 +63,8 @@
|
||||||
</div>
|
</div>
|
||||||
</FormFolder>
|
</FormFolder>
|
||||||
</div>
|
</div>
|
||||||
</MkSpacer></MkStickyContainer>
|
</MkSpacer>
|
||||||
|
</MkStickyContainer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
@ -85,6 +87,7 @@ import { ColdDeviceStorage, defaultStore } from '@/store';
|
||||||
import { addTheme } from '@/theme-store';
|
import { addTheme } from '@/theme-store';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import { useLeaveGuard } from '@/scripts/use-leave-guard';
|
import { useLeaveGuard } from '@/scripts/use-leave-guard';
|
||||||
|
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||||
|
|
||||||
const bgColors = [
|
const bgColors = [
|
||||||
{ color: '#f5f5f5', kind: 'light', forPreview: '#f5f5f5' },
|
{ color: '#f5f5f5', kind: 'light', forPreview: '#f5f5f5' },
|
||||||
|
@ -204,15 +207,7 @@ async function saveAs() {
|
||||||
|
|
||||||
watch($$(theme), apply, { deep: true });
|
watch($$(theme), apply, { deep: true });
|
||||||
|
|
||||||
const headerActions = $computed(() => []);
|
const headerActions = $computed(() => [{
|
||||||
|
|
||||||
const headerTabs = $computed(() => []);
|
|
||||||
|
|
||||||
definePageMetadata({
|
|
||||||
title: i18n.ts.themeEditor,
|
|
||||||
icon: 'fas fa-palette',
|
|
||||||
bg: 'var(--bg)',
|
|
||||||
actions: [{
|
|
||||||
asFullButton: true,
|
asFullButton: true,
|
||||||
icon: 'fas fa-eye',
|
icon: 'fas fa-eye',
|
||||||
text: i18n.ts.preview,
|
text: i18n.ts.preview,
|
||||||
|
@ -222,7 +217,14 @@ definePageMetadata({
|
||||||
icon: 'fas fa-check',
|
icon: 'fas fa-check',
|
||||||
text: i18n.ts.saveAs,
|
text: i18n.ts.saveAs,
|
||||||
handler: saveAs,
|
handler: saveAs,
|
||||||
}],
|
}]);
|
||||||
|
|
||||||
|
const headerTabs = $computed(() => []);
|
||||||
|
|
||||||
|
definePageMetadata({
|
||||||
|
title: i18n.ts.themeEditor,
|
||||||
|
icon: 'fas fa-palette',
|
||||||
|
bg: 'var(--bg)',
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { i18n } from '@/i18n';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
|
||||||
export function useLeaveGuard(enabled: Ref<boolean>) {
|
export function useLeaveGuard(enabled: Ref<boolean>) {
|
||||||
|
/* TODO
|
||||||
const setLeaveGuard = inject('setLeaveGuard');
|
const setLeaveGuard = inject('setLeaveGuard');
|
||||||
|
|
||||||
if (setLeaveGuard) {
|
if (setLeaveGuard) {
|
||||||
|
@ -28,6 +29,7 @@ export function useLeaveGuard(enabled: Ref<boolean>) {
|
||||||
return !canceled;
|
return !canceled;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
function onBeforeLeave(ev: BeforeUnloadEvent) {
|
function onBeforeLeave(ev: BeforeUnloadEvent) {
|
||||||
|
|
Loading…
Reference in a new issue