feat: support pwa

This commit is contained in:
vben
2024-06-16 15:45:15 +08:00
parent 222c73963d
commit 382652e0f4
24 changed files with 1787 additions and 128 deletions

View File

@@ -125,6 +125,10 @@ const { copy } = useClipboard();
const tabs = computed((): SegmentedItem[] => {
return [
{
label: $t('preferences.general'),
value: 'general',
},
{
label: $t('preferences.appearance'),
value: 'appearance',
@@ -133,10 +137,7 @@ const tabs = computed((): SegmentedItem[] => {
label: $t('preferences.layout'),
value: 'layout',
},
{
label: $t('preferences.general'),
value: 'general',
},
{
label: $t('preferences.shortcut-keys.title'),
value: 'shortcutKey',
@@ -171,7 +172,7 @@ function handleReset() {
</script>
<template>
<div class="z-100 fixed right-0 top-1/3">
<div class="z-100 fixed right-0 top-2/3">
<VbenSheet
v-model:open="openPreferences"
:description="$t('preferences.preferences-subtitle')"
@@ -194,8 +195,8 @@ function handleReset() {
</VbenIconButton>
</template>
<div class="p-5 pt-4">
<VbenSegmented :tabs="tabs" default-value="appearance">
<div class="p-4 pt-4">
<VbenSegmented :tabs="tabs" default-value="general">
<template #appearance>
<Block :title="$t('preferences.theme')">
<Theme