update ThemeSetting.vue style
This commit is contained in:
@@ -1,24 +1,18 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<section class="card">
|
||||
<div class="head">
|
||||
<p class="tag">主题</p>
|
||||
<h2 class="header">界面模式</h2>
|
||||
<p class="desc">当前提供浅色、深色和跟随系统三种模式。</p>
|
||||
</div>
|
||||
|
||||
<div class="modes">
|
||||
<t-button
|
||||
<div class="theme-setting">
|
||||
<t-cell-group theme="card">
|
||||
<t-radio
|
||||
v-for="item in themeModeList"
|
||||
:key="item.value"
|
||||
theme="primary"
|
||||
:variant="globalUIStore.themeMode === item.value ? 'base' : 'outline'"
|
||||
class="block"
|
||||
default-checked
|
||||
allow-uncheck
|
||||
:label="item.label"
|
||||
icon="line"
|
||||
:checked="globalUIStore.themeMode === item.value"
|
||||
@click="globalUIStore.setThemeMode(item.value)"
|
||||
>
|
||||
<span v-text="item.label" />
|
||||
</t-button>
|
||||
</div>
|
||||
</section>
|
||||
/>
|
||||
</t-cell-group>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -39,49 +33,14 @@ const themeModeList: Array<{ label: string; value: ThemeMode }> = [
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.page {
|
||||
padding: 1rem;
|
||||
.theme-setting {
|
||||
padding-top: calc(var(--app-nav-offset) + 1rem);
|
||||
|
||||
.card {
|
||||
gap: 1rem;
|
||||
display: flex;
|
||||
padding: 1rem;
|
||||
border-radius: 1rem;
|
||||
flex-direction: column;
|
||||
border: 1px solid var(--app-line);
|
||||
background: var(--app-card);
|
||||
box-shadow: 0 .35rem 1rem rgba(17, 32, 56, .05);
|
||||
:deep(.t-radio:last-child) {
|
||||
|
||||
.t-radio__border {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.head {
|
||||
gap: .5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.tag,
|
||||
.desc {
|
||||
margin: 0;
|
||||
color: var(--app-sub);
|
||||
}
|
||||
|
||||
.tag {
|
||||
font-size: .875rem;
|
||||
}
|
||||
|
||||
.header {
|
||||
margin: 0;
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
.desc {
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.modes {
|
||||
gap: .75rem;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,23 +1,10 @@
|
||||
<template>
|
||||
<div class="connect-setting">
|
||||
<section class="card">
|
||||
<div class="head">
|
||||
<p class="tag">系统设置</p>
|
||||
<h2 class="header">配置入口</h2>
|
||||
<p class="desc">设置页只保留入口,具体配置在独立页面中维护。</p>
|
||||
</div>
|
||||
<div class="entries">
|
||||
<t-button block variant="outline" @click="openConnectSetting">
|
||||
连接配置
|
||||
</t-button>
|
||||
<t-button block variant="outline" @click="openDashboardSetting">
|
||||
仪表板
|
||||
</t-button>
|
||||
<t-button block variant="outline" @click="openThemeSetting">
|
||||
主题
|
||||
</t-button>
|
||||
</div>
|
||||
</section>
|
||||
<div class="settings-tab">
|
||||
<t-cell-group theme="card">
|
||||
<t-cell title="连接配置" arrow @click="router.push('/settings/connect')" />
|
||||
<t-cell title="仪表板" arrow @click="router.push('/settings/dashboard')" />
|
||||
<t-cell title="主题" arrow @click="router.push('/settings/theme')" />
|
||||
</t-cell-group>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -27,73 +14,10 @@ defineOptions({
|
||||
});
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
function openConnectSetting(): void {
|
||||
void router.push("/settings/connect");
|
||||
}
|
||||
|
||||
function openDashboardSetting(): void {
|
||||
void router.push("/settings/dashboard");
|
||||
}
|
||||
|
||||
function openThemeSetting(): void {
|
||||
void router.push("/settings/theme");
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.connect-setting {
|
||||
gap: 1rem;
|
||||
display: flex;
|
||||
padding: 1rem;
|
||||
flex-direction: column;
|
||||
|
||||
.card {
|
||||
gap: 1rem;
|
||||
display: flex;
|
||||
padding: 1rem;
|
||||
border-radius: 1rem;
|
||||
flex-direction: column;
|
||||
border: 1px solid var(--app-line);
|
||||
background: var(--app-card);
|
||||
box-shadow: 0 .35rem 1rem rgba(17, 32, 56, .05);
|
||||
}
|
||||
|
||||
.head {
|
||||
gap: .5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.tag,
|
||||
.desc {
|
||||
margin: 0;
|
||||
color: var(--app-sub);
|
||||
}
|
||||
|
||||
.tag {
|
||||
font-size: .875rem;
|
||||
}
|
||||
|
||||
.header {
|
||||
margin: 0;
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
.desc {
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.entries {
|
||||
gap: .75rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
:global(.theme-dark) .connect-setting {
|
||||
.card {
|
||||
box-shadow: 0 .35rem 1rem rgba(0, 0, 0, .2);
|
||||
}
|
||||
.settings-tab {
|
||||
padding-top: calc(var(--app-nav-offset) + 1rem);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -156,7 +156,8 @@ const router = createRouter({
|
||||
navBarVisible: true,
|
||||
navBarCanBack: true,
|
||||
navBarTitle: "主题设置",
|
||||
tabBarVisible: false
|
||||
tabBarVisible: false,
|
||||
bodyBackground: "#F4F4F4"
|
||||
},
|
||||
component: ThemeSetting
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ const tabs: RouteRecordRaw[] = [
|
||||
tabBarVisible: true,
|
||||
tabBarRoot: true,
|
||||
tabBarPadding: true,
|
||||
bodyBackground: "#FFF"
|
||||
bodyBackground: "#F4F4F4"
|
||||
},
|
||||
component: SettingsTab
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user