refactor(client): Refine routing (#8846)

This commit is contained in:
syuilo 2022-06-20 17:38:49 +09:00 committed by GitHub
parent 30a39a296d
commit 699f24f3dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
149 changed files with 6312 additions and 6670 deletions

View file

@ -1,5 +1,6 @@
<template>
<MkSpacer :content-max="800" :margin-min="16" :margin-max="32">
<template><MkStickyContainer>
<template #header><MkPageHeader :actions="headerActions" :tabs="headerTabs"/></template>
<MkSpacer :content-max="800" :margin-min="16" :margin-max="32">
<div class="cwepdizn _formRoot">
<FormFolder :default-open="true" class="_formBlock">
<template #label>{{ i18n.ts.backgroundColor }}</template>
@ -61,7 +62,7 @@
</div>
</FormFolder>
</div>
</MkSpacer>
</MkSpacer></MkStickyContainer>
</template>
<script lang="ts" setup>
@ -82,7 +83,6 @@ import { host } from '@/config';
import * as os from '@/os';
import { ColdDeviceStorage, defaultStore } from '@/store';
import { addTheme } from '@/theme-store';
import * as symbols from '@/symbols';
import { i18n } from '@/i18n';
import { useLeaveGuard } from '@/scripts/use-leave-guard';
@ -204,23 +204,25 @@ async function saveAs() {
watch($$(theme), apply, { deep: true });
defineExpose({
[symbols.PAGE_INFO]: {
title: i18n.ts.themeEditor,
icon: 'fas fa-palette',
bg: 'var(--bg)',
actions: [{
asFullButton: true,
icon: 'fas fa-eye',
text: i18n.ts.preview,
handler: showPreview,
}, {
asFullButton: true,
icon: 'fas fa-check',
text: i18n.ts.saveAs,
handler: saveAs,
}],
},
const headerActions = $computed(() => []);
const headerTabs = $computed(() => []);
definePageMetadata({
title: i18n.ts.themeEditor,
icon: 'fas fa-palette',
bg: 'var(--bg)',
actions: [{
asFullButton: true,
icon: 'fas fa-eye',
text: i18n.ts.preview,
handler: showPreview,
}, {
asFullButton: true,
icon: 'fas fa-check',
text: i18n.ts.saveAs,
handler: saveAs,
}],
});
</script>