feat: richer copyright and sidebar preferences

This commit is contained in:
vben
2024-07-06 17:25:38 +08:00
parent 13f3af96b7
commit 5976e255fb
23 changed files with 422 additions and 19 deletions

View File

@@ -1,6 +1,7 @@
<script setup lang="ts">
import { $t } from '@vben/locales';
import NumberFieldItem from '../number-field-item.vue';
import SwitchItem from '../switch-item.vue';
defineOptions({
@@ -10,6 +11,7 @@ defineOptions({
defineProps<{ disabled: boolean }>();
const sidebarEnable = defineModel<boolean>('sidebarEnable');
const sidebarWidth = defineModel<number>('sidebarWidth');
const sidebarCollapsedShowTitle = defineModel<boolean>(
'sidebarCollapsedShowTitle',
);
@@ -18,15 +20,24 @@ const sidebarCollapsed = defineModel<boolean>('sidebarCollapsed');
<template>
<SwitchItem v-model="sidebarEnable" :disabled="disabled">
{{ $t('preferences.side-visible') }}
{{ $t('preferences.sidebar.visible') }}
</SwitchItem>
<SwitchItem v-model="sidebarCollapsed" :disabled="!sidebarEnable || disabled">
{{ $t('preferences.collapse') }}
{{ $t('preferences.sidebar.collapsed') }}
</SwitchItem>
<SwitchItem
v-model="sidebarCollapsedShowTitle"
:disabled="!sidebarEnable || disabled"
>
{{ $t('preferences.collapse-show-title') }}
{{ $t('preferences.sidebar.collapsed-show-title') }}
</SwitchItem>
<NumberFieldItem
v-model="sidebarWidth"
:disabled="!sidebarEnable || disabled"
:max="320"
:min="160"
:step="10"
>
{{ $t('preferences.sidebar.width') }}
</NumberFieldItem>
</template>