Merge pull request #267 from lumozx/master

fix: 多端数据同步下,列表适配暗黑模式
This commit is contained in:
木偶 2023-10-20 15:50:43 +08:00 committed by GitHub
commit 404cb4fcb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 69 additions and 6 deletions

View File

@ -15,6 +15,8 @@
--color-input-hover: #fff; --color-input-hover: #fff;
// 边框 // 边框
--color-border-light: #f0f0f0; --color-border-light: #f0f0f0;
// 输入框附带icon
--color-action-color: rgba(0, 0, 0, 0.25);;
} }
.dark { .dark {
@ -29,4 +31,6 @@
--color-input-hover: #444d; --color-input-hover: #444d;
// 边框 // 边框
--color-border-light: #444d; --color-border-light: #444d;
// 输入框附带icon
--color-action-color: #ffffff4d;
} }

View File

@ -103,7 +103,7 @@ const wrapperCol = { span: 14 };
color: var(--color-text-content); color: var(--color-text-content);
} }
:deep(.ant-input) { :deep(.ant-input) {
background: var(--color-input-hover); background: var(--color-input-hover) !important;
color: var(--color-text-content); color: var(--color-text-content);
} }
} }

View File

@ -6,7 +6,7 @@
<ExportOutlined /> <ExportOutlined />
</template> </template>
</a-button> </a-button>
<a-button @click="importData" danger size="small" style="margin-right: 10px;"> <a-button @click="importData" danger size="small" style="margin-right: 10px; background-color: var(--color-input-hover)">
导入数据 导入数据
<template #icon> <template #icon>
<ImportOutlined /> <ImportOutlined />
@ -33,15 +33,20 @@
<DatabaseOutlined style="font-size: 18px;"/> <DatabaseOutlined style="font-size: 18px;"/>
</a> </a>
</template> </template>
<a-list-item-meta :description="`${item.keys.length} 份文档`"> <a-list-item-meta>
<template #title> <template #title>
<div> <div style="color: var(--color-text-content)">
<span>{{ item.plugin?.pluginName }}</span> <span>{{ item.plugin?.pluginName }}</span>
</div> </div>
</template> </template>
<template #avatar> <template #avatar>
<a-avatar shape="square" :src="item.plugin?.logo"/> <a-avatar shape="square" :src="item.plugin?.logo"/>
</template> </template>
<template #description>
<div style="color: var(--color-text-desc)">
<span>{{ item.keys.length }} 份文档</span>
</div>
</template>
</a-list-item-meta> </a-list-item-meta>
</a-list-item> </a-list-item>
</template> </template>
@ -52,6 +57,7 @@
:closable="false" :closable="false"
:title="currentSelect.plugin.pluginName" :title="currentSelect.plugin.pluginName"
placement="right" placement="right"
class="exportDrawer"
> >
<p <p
class="key-item" class="key-item"
@ -64,7 +70,12 @@
</a-drawer> </a-drawer>
<a-modal <a-modal
centered centered
bodyStyle="max-height: 500px; overflow: auto" :bodyStyle="{
maxHeight: '500px',
overflow: 'auto',
backgroundColor: 'var(--color-body-bg)',
color: 'var(--color-text-primary)'
}"
:footer="null" :footer="null"
:closable="false" :closable="false"
v-model:visible="show" v-model:visible="show"
@ -75,6 +86,7 @@
v-model:visible="showSetting" v-model:visible="showSetting"
title="webdav 账户配置" title="webdav 账户配置"
:footer="null" :footer="null"
class="webdavModel"
> >
<a-alert v-if="formState.suport === 'jianguo'" style="margin-bottom: 20px;" type="info" show-icon> <a-alert v-if="formState.suport === 'jianguo'" style="margin-bottom: 20px;" type="info" show-icon>
<template #message> <template #message>
@ -255,7 +267,7 @@ const downloadPlugin = async (plugin) => {
.export-header { .export-header {
width: 100%; width: 100%;
height: 40px; height: 40px;
border-bottom: 1px solid #eee; border-bottom: 1px solid var(--color-border-light);
text-align: right; text-align: right;
} }
.key-item { .key-item {
@ -265,4 +277,44 @@ const downloadPlugin = async (plugin) => {
color: var(--ant-primary-color); color: var(--ant-primary-color);
} }
} }
.exportDrawer{
.ant-drawer-header{
background-color: var(--color-body-bg);
border-bottom: 1px solid var(--color-border-light);
.ant-drawer-title{
color: var(--color-text-primary);
}
}
.ant-drawer-body{
background-color: var(--color-body-bg);
color: var(--color-text-content)
}
}
.webdavModel{
.ant-modal-close-x{
color: var(--color-text-content);
}
.ant-modal-header{
background-color: var(--color-body-bg);
border-bottom: 1px solid var(--color-border-light);
.ant-modal-title{
color: var(--color-text-primary);
}
}
.ant-form-item-label>label {
color: var(--color-text-content);
}
.ant-modal-body {
background-color: var(--color-body-bg);
.ant-input,
.ant-input-password,
.ant-select-selector {
background: var(--color-input-hover) !important;
color: var(--color-text-content);
}
.ant-input-password-icon, .ant-select-arrow {
color: var(--color-action-color);
}
}
}
</style> </style>

View File

@ -512,6 +512,13 @@ const changeLanguage = (value) => {
background: var(--color-list-hover); background: var(--color-list-hover);
} }
} }
.ant-select-selector {
background: var(--color-input-hover) !important;
color: var(--color-text-content);
}
.ant-input-password-icon, .ant-select-arrow {
color: var(--color-action-color);
}
} }
} }
} }