style: 优化部分样式

This commit is contained in:
2024-06-11 23:44:33 +08:00
parent e6c7278637
commit 58609cb0e2
8 changed files with 47 additions and 55 deletions

View File

@@ -311,10 +311,10 @@ export interface SecurityConfig {
PASSWORD_ERROR_LOCK_MINUTES: OptionResp PASSWORD_ERROR_LOCK_MINUTES: OptionResp
PASSWORD_EXPIRATION_DAYS: OptionResp PASSWORD_EXPIRATION_DAYS: OptionResp
PASSWORD_EXPIRATION_WARNING_DAYS: OptionResp PASSWORD_EXPIRATION_WARNING_DAYS: OptionResp
PASSWORD_REUSE_POLICY: OptionResp PASSWORD_REPETITION_TIMES: OptionResp
PASSWORD_MIN_LENGTH: OptionResp PASSWORD_MIN_LENGTH: OptionResp
PASSWORD_ALLOW_CONTAIN_USERNAME: OptionResp PASSWORD_ALLOW_CONTAIN_USERNAME: OptionResp
PASSWORD_CONTAIN_SPECIAL_CHARACTERS: OptionResp PASSWORD_REQUIRE_SYMBOLS: OptionResp
} }
/** 绑定三方账号信息 */ /** 绑定三方账号信息 */

View File

@@ -16,7 +16,7 @@ const appStore = useAppStore()
font-size: 13px; font-size: 13px;
color: var(--color-text-3); color: var(--color-text-3);
background-color: var(--color-bg-1); background-color: var(--color-bg-1);
border-top: 1px dashed var(--color-neutral-3); border-top: 1px solid var(--color-neutral-3);
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
justify-content: center; justify-content: center;

View File

@@ -8,6 +8,6 @@
"menuCollapse": true, "menuCollapse": true,
"menuAccordion": true, "menuAccordion": true,
"menuDark": false, "menuDark": false,
"copyrightDisplay": false, "copyrightDisplay": true,
"layout": "left" "layout": "left"
} }

View File

@@ -48,7 +48,7 @@ const getMessageData = async () => {
// 打开消息中心 // 打开消息中心
const open = () => { const open = () => {
window.open('/#/setting/message') window.open('/setting/message')
} }
// 全部已读 // 全部已读

View File

@@ -99,8 +99,7 @@ const initWebSocket = (token: string) => {
} }
socket.onmessage = (event) => { socket.onmessage = (event) => {
const data = JSON.parse(event.data) unreadMessageCount.value = Number.parseInt(event.data)
unreadMessageCount.value = Number.parseInt(data?.content)
} }
socket.onerror = () => { socket.onerror = () => {

View File

@@ -5,6 +5,7 @@
</template> </template>
<a-row :gutter="8"> <a-row :gutter="8">
<a-carousel <a-carousel
v-if="imageList.length"
indicator-type="slider" indicator-type="slider"
show-arrow="always" show-arrow="always"
auto-play auto-play
@@ -16,6 +17,7 @@
</a> </a>
</a-carousel-item> </a-carousel-item>
</a-carousel> </a-carousel>
<a-empty v-else />
</a-row> </a-row>
</a-card> </a-card>
</template> </template>
@@ -28,10 +30,5 @@ interface ImageType {
} }
const imageList: ImageType[] = [ const imageList: ImageType[] = [
{
src: `https://continew.top/img/sponsor/ad/roovps.jpg?${new Date().getTime()}`,
title: 'ROOVPS',
link: 'https://roovps.com/cart'
}
] ]
</script> </script>

View File

@@ -1,6 +1,32 @@
<template> <template>
<a-form ref="formRef" :model="form" :rules="rules" size="large" layout="vertical" :disabled="!isUpdate" class="form"> <a-form ref="formRef" :model="form" :rules="rules" size="large" layout="vertical" :disabled="!isUpdate" class="form">
<a-list class="list-layout" :bordered="false" :loading="loading"> <a-list class="list-layout" :bordered="false" :loading="loading">
<a-form-item class="image-item" field="SITE_LOGO" hide-label>
{{ siteConfig.SITE_LOGO.name }}
<template #extra>
{{ siteConfig.SITE_LOGO.description }}
<br />
<a-upload :file-list="logoFile ? [logoFile] : []" accept="image/*" :show-file-list="false"
:custom-request="handleUploadLogo" @change="handleChangeLogo">
<template #upload-button>
<div :class="`arco-upload-list-item${logoFile && logoFile.status === 'error' ? ' arco-upload-list-item-error' : ''
}`">
<div v-if="logoFile && logoFile.url" class="arco-upload-list-picture custom-upload-avatar logo">
<img :src="logoFile.url" alt="Logo" />
<div v-if="isUpdate" class="arco-upload-list-picture-mask logo">
<IconEdit />
</div>
</div>
<div v-else class="arco-upload-picture-card logo">
<div class="arco-upload-picture-card-text">
<icon-upload />
</div>
</div>
</div>
</template>
</a-upload>
</template>
</a-form-item>
<a-form-item class="image-item" field="SITE_FAVICON" hide-label> <a-form-item class="image-item" field="SITE_FAVICON" hide-label>
{{ siteConfig.SITE_FAVICON.name }} {{ siteConfig.SITE_FAVICON.name }}
<template #extra> <template #extra>
@@ -28,32 +54,6 @@
</a-upload> </a-upload>
</template> </template>
</a-form-item> </a-form-item>
<a-form-item class="image-item" field="SITE_LOGO" hide-label>
{{ siteConfig.SITE_LOGO.name }}
<template #extra>
{{ siteConfig.SITE_LOGO.description }}
<br />
<a-upload :file-list="logoFile ? [logoFile] : []" accept="image/*" :show-file-list="false"
:custom-request="handleUploadLogo" @change="handleChangeLogo">
<template #upload-button>
<div :class="`arco-upload-list-item${logoFile && logoFile.status === 'error' ? ' arco-upload-list-item-error' : ''
}`">
<div v-if="logoFile && logoFile.url" class="arco-upload-list-picture custom-upload-avatar logo">
<img :src="logoFile.url" alt="Logo" />
<div v-if="isUpdate" class="arco-upload-list-picture-mask logo">
<IconEdit />
</div>
</div>
<div v-else class="arco-upload-picture-card logo">
<div class="arco-upload-picture-card-text">
<icon-upload />
</div>
</div>
</div>
</template>
</a-upload>
</template>
</a-form-item>
<a-form-item class="input-item" field="SITE_TITLE" :label="siteConfig.SITE_TITLE.name"> <a-form-item class="input-item" field="SITE_TITLE" :label="siteConfig.SITE_TITLE.name">
<a-input v-model.trim="form.SITE_TITLE" placeholder="请输入网站标题" :max-length="18" /> <a-input v-model.trim="form.SITE_TITLE" placeholder="请输入网站标题" :max-length="18" />
</a-form-item> </a-form-item>
@@ -275,10 +275,6 @@ onMounted(() => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.form {
// margin: 20px 0 0 20px;
}
.logo { .logo {
width: 50px; width: 50px;
height: 50px; height: 50px;

View File

@@ -32,9 +32,9 @@
<template #append></template> <template #append></template>
</a-input-number> </a-input-number>
</a-form-item> </a-form-item>
<a-form-item field="PASSWORD_REUSE_POLICY" :label="securityConfig.PASSWORD_REUSE_POLICY.name" <a-form-item field="PASSWORD_REPETITION_TIMES" :label="securityConfig.PASSWORD_REPETITION_TIMES.name"
:help="securityConfig.PASSWORD_REUSE_POLICY.description" hide-asterisk> :help="securityConfig.PASSWORD_REPETITION_TIMES.description" hide-asterisk>
<a-input-number v-model="form.PASSWORD_REUSE_POLICY" class="input-width" :precision="0" :min="3" :max="32"> <a-input-number v-model="form.PASSWORD_REPETITION_TIMES" class="input-width" :precision="0" :min="3" :max="32">
<template #append></template> <template #append></template>
</a-input-number> </a-input-number>
</a-form-item> </a-form-item>
@@ -49,9 +49,9 @@
<template #unchecked></template> <template #unchecked></template>
</a-switch> </a-switch>
</a-form-item> </a-form-item>
<a-form-item field="PASSWORD_CONTAIN_SPECIAL_CHARACTERS" <a-form-item field="PASSWORD_REQUIRE_SYMBOLS"
:label="securityConfig.PASSWORD_CONTAIN_SPECIAL_CHARACTERS.name"> :label="securityConfig.PASSWORD_REQUIRE_SYMBOLS.name">
<a-switch v-model="form.PASSWORD_CONTAIN_SPECIAL_CHARACTERS" type="round" :checked-value="1" <a-switch v-model="form.PASSWORD_REQUIRE_SYMBOLS" type="round" :checked-value="1"
:unchecked-value="0"> :unchecked-value="0">
<template #checked></template> <template #checked></template>
<template #unchecked></template> <template #unchecked></template>
@@ -95,10 +95,10 @@ const { form } = useForm({
PASSWORD_ERROR_LOCK_MINUTES: 0, PASSWORD_ERROR_LOCK_MINUTES: 0,
PASSWORD_EXPIRATION_DAYS: 0, PASSWORD_EXPIRATION_DAYS: 0,
PASSWORD_EXPIRATION_WARNING_DAYS: 0, PASSWORD_EXPIRATION_WARNING_DAYS: 0,
PASSWORD_REUSE_POLICY: 0, PASSWORD_REPETITION_TIMES: 0,
PASSWORD_MIN_LENGTH: 0, PASSWORD_MIN_LENGTH: 0,
PASSWORD_ALLOW_CONTAIN_USERNAME: 0, PASSWORD_ALLOW_CONTAIN_USERNAME: 0,
PASSWORD_CONTAIN_SPECIAL_CHARACTERS: 0 PASSWORD_REQUIRE_SYMBOLS: 0
}) })
const rules: FormInstance['rules'] = { const rules: FormInstance['rules'] = {
PASSWORD_ERROR_LOCK_COUNT: [{ required: true, message: '请输入值' }], PASSWORD_ERROR_LOCK_COUNT: [{ required: true, message: '请输入值' }],
@@ -116,7 +116,7 @@ const rules: FormInstance['rules'] = {
} }
} }
], ],
PASSWORD_REUSE_POLICY: [{ required: true, message: '请输入值' }], PASSWORD_REPETITION_TIMES: [{ required: true, message: '请输入值' }],
PASSWORD_MIN_LENGTH: [{ required: true, message: '请输入值' }] PASSWORD_MIN_LENGTH: [{ required: true, message: '请输入值' }]
} }
@@ -125,10 +125,10 @@ const securityConfig = ref<SecurityConfig>({
PASSWORD_ERROR_LOCK_MINUTES: {}, PASSWORD_ERROR_LOCK_MINUTES: {},
PASSWORD_EXPIRATION_DAYS: {}, PASSWORD_EXPIRATION_DAYS: {},
PASSWORD_EXPIRATION_WARNING_DAYS: {}, PASSWORD_EXPIRATION_WARNING_DAYS: {},
PASSWORD_REUSE_POLICY: {}, PASSWORD_REPETITION_TIMES: {},
PASSWORD_MIN_LENGTH: {}, PASSWORD_MIN_LENGTH: {},
PASSWORD_ALLOW_CONTAIN_USERNAME: {}, PASSWORD_ALLOW_CONTAIN_USERNAME: {},
PASSWORD_CONTAIN_SPECIAL_CHARACTERS: {} PASSWORD_REQUIRE_SYMBOLS: {}
}) })
// 重置 // 重置
const reset = () => { const reset = () => {
@@ -137,10 +137,10 @@ const reset = () => {
form.PASSWORD_ERROR_LOCK_MINUTES = securityConfig.value.PASSWORD_ERROR_LOCK_MINUTES.value || 0 form.PASSWORD_ERROR_LOCK_MINUTES = securityConfig.value.PASSWORD_ERROR_LOCK_MINUTES.value || 0
form.PASSWORD_EXPIRATION_DAYS = securityConfig.value.PASSWORD_EXPIRATION_DAYS.value || 0 form.PASSWORD_EXPIRATION_DAYS = securityConfig.value.PASSWORD_EXPIRATION_DAYS.value || 0
form.PASSWORD_EXPIRATION_WARNING_DAYS = securityConfig.value.PASSWORD_EXPIRATION_WARNING_DAYS.value || 0 form.PASSWORD_EXPIRATION_WARNING_DAYS = securityConfig.value.PASSWORD_EXPIRATION_WARNING_DAYS.value || 0
form.PASSWORD_REUSE_POLICY = securityConfig.value.PASSWORD_REUSE_POLICY.value || 0 form.PASSWORD_REPETITION_TIMES = securityConfig.value.PASSWORD_REPETITION_TIMES.value || 0
form.PASSWORD_MIN_LENGTH = securityConfig.value.PASSWORD_MIN_LENGTH.value || 0 form.PASSWORD_MIN_LENGTH = securityConfig.value.PASSWORD_MIN_LENGTH.value || 0
form.PASSWORD_ALLOW_CONTAIN_USERNAME = securityConfig.value.PASSWORD_ALLOW_CONTAIN_USERNAME.value || 0 form.PASSWORD_ALLOW_CONTAIN_USERNAME = securityConfig.value.PASSWORD_ALLOW_CONTAIN_USERNAME.value || 0
form.PASSWORD_CONTAIN_SPECIAL_CHARACTERS = securityConfig.value.PASSWORD_CONTAIN_SPECIAL_CHARACTERS.value || 0 form.PASSWORD_REQUIRE_SYMBOLS = securityConfig.value.PASSWORD_REQUIRE_SYMBOLS.value || 0
} }
const isUpdate = ref(false) const isUpdate = ref(false)