fix: Various bug fixes and improvements

This commit is contained in:
kwicxy
2025-05-29 16:41:03 +08:00
parent b884fe0e86
commit 5e9c2a669b
8 changed files with 61 additions and 40 deletions
@@ -44,7 +44,7 @@ onMounted(() => {
</v-card>
</div>
<div v-else class="login-page-container-dark">
<div class="login-background"></div>
<div class="login-background-dark"></div>
<v-card
variant="outlined"
class="login-card"
@@ -97,6 +97,17 @@ onMounted(() => {
animation: rotate 60s linear infinite;
}
.login-background-dark {
position: absolute;
width: 200%;
height: 200%;
top: -50%;
left: -50%;
background-color: var(--v-theme-surface);
z-index: 0;
animation: rotate 60s linear infinite;
}
@keyframes rotate {
0% {
transform: rotate(0deg);
@@ -109,10 +120,11 @@ onMounted(() => {
.login-card {
max-width: 520px;
width: 90%;
color: var(--v-theme-primaryText) !important;
border-radius: 12px !important;
border-color: var(--v-theme-border) !important;
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07) !important;
background-color: var(--v-theme-background) !important;
background-color: var(--v-theme-surface) !important;
transform: translateY(20px);
opacity: 0;
transition: all 0.5s ease;
@@ -1,8 +1,9 @@
<script setup lang="ts">
import { ref } from 'vue';
import {ref, useCssModule} from 'vue';
import { useAuthStore } from '@/stores/auth';
import { Form } from 'vee-validate';
import md5 from 'js-md5';
import {useCustomizerStore} from "@/stores/customizer";
const valid = ref(false);
const show1 = ref(false);
@@ -42,8 +43,8 @@ async function validate(values: any, { setErrors }: any) {
required
density="comfortable"
hide-details="auto"
variant="outlined"
color="primary"
variant="outlined"
:style="{color: useCustomizerStore().uiTheme === 'PurpleTheme' ? '#000000dd' : '#ffffff'}"
prepend-inner-icon="mdi-account"
:disabled="loading"
></v-text-field>
@@ -54,7 +55,7 @@ async function validate(values: any, { setErrors }: any) {
required
density="comfortable"
variant="outlined"
color="primary"
:style="{color: useCustomizerStore().uiTheme === 'PurpleTheme' ? '#000000dd' : '#ffffff'}"
hide-details="auto"
:append-icon="show1 ? 'mdi-eye' : 'mdi-eye-off'"
:type="show1 ? 'text' : 'password'"
@@ -64,9 +65,9 @@ async function validate(values: any, { setErrors }: any) {
:disabled="loading"
></v-text-field>
<div class="mt-1 mb-5 hint-text">
<v-label :style="{color: useCustomizerStore().uiTheme === 'PurpleTheme' ? '#000000aa' : '#ffffffcc'}" class="mt-1 mb-5">
<small>默认用户名和密码为 astrbot</small>
</div>
</v-label>
<v-btn
color="secondary"