refactor: refactor AuthLayout to configure the login page more freely (#4294)

This commit is contained in:
Vben
2024-08-31 21:38:24 +08:00
committed by GitHub
parent a7d322019e
commit 8404c12129
31 changed files with 314 additions and 115 deletions

View File

@@ -28,7 +28,7 @@
/* 主题颜色 */
--primary: 231 98% 65%;
--primary: 212 100% 45%;
--primary-foreground: 0 0% 98%;
/* Used for destructive actions such as <Button variant="destructive"> */
@@ -78,6 +78,7 @@
/* 遮罩颜色 */
--overlay: 0 0% 0% / 45%;
--overlay-light: 0 0% 95% / 45%;
/* 基本文字大小 */
--font-size-base: 16px;

View File

@@ -87,7 +87,7 @@ const defaultPreferences: Preferences = {
theme: {
builtinType: 'default',
colorDestructive: 'hsl(348 100% 61%)',
colorPrimary: 'hsl(231 98% 65%)',
colorPrimary: 'hsl(212 100% 45%)',
colorSuccess: 'hsl(144 57% 58%)',
colorWarning: 'hsl(42 84% 61%)',
mode: 'dark',

View File

@@ -9,7 +9,7 @@ interface BuiltinThemePreset {
const BUILT_IN_THEME_PRESETS: BuiltinThemePreset[] = [
{
color: 'hsl(231 98% 65%)',
color: 'hsl(212 100% 45%)',
type: 'default',
},
{
@@ -25,7 +25,7 @@ const BUILT_IN_THEME_PRESETS: BuiltinThemePreset[] = [
type: 'yellow',
},
{
color: 'hsl(212 100% 45%)',
color: 'hsl(231 98% 65%)',
type: 'sky-blue',
},
{

View File

@@ -159,7 +159,7 @@ function pointerDownOutside(e: Event) {
)
"
:show-close="closable"
close-class="top-4"
close-class="top-3"
@escape-key-down="escapeKeyDown"
@interact-outside="interactOutside"
@pointer-down-outside="pointerDownOutside"
@@ -219,7 +219,7 @@ function pointerDownOutside(e: Event) {
<VbenIconButton
v-if="fullscreenButton"
class="hover:bg-accent hover:text-accent-foreground text-foreground/80 flex-center absolute right-10 top-4 hidden size-6 rounded-full px-1 text-lg opacity-70 transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none sm:block"
class="hover:bg-accent hover:text-accent-foreground text-foreground/80 flex-center absolute right-10 top-3 hidden size-6 rounded-full px-1 text-lg opacity-70 transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none sm:block"
@click="handleFullscreen"
>
<Shrink v-if="fullscreen" class="size-3.5" />

View File

@@ -25,7 +25,7 @@ const show = ref(false);
</script>
<template>
<form class="relative">
<div class="relative">
<VbenInput
v-model="modelValue"
v-bind="{ ...forward, ...$attrs }"
@@ -48,5 +48,5 @@ const show = ref(false);
<Eye v-if="show" class="size-4" />
<EyeOff v-else class="size-4" />
</div>
</form>
</div>
</template>

View File

@@ -69,7 +69,7 @@ function onTransitionEnd() {
<div
:class="
cn(
'bg-overlay z-100 pointer-events-none absolute left-0 top-0 flex size-full flex-col items-center justify-center transition-all duration-500',
'z-100 pointer-events-none absolute left-0 top-0 flex size-full flex-col items-center justify-center bg-[hsl(var(--overlay-light))] transition-all duration-500',
{
'invisible opacity-0': !showSpinner,
},

View File

@@ -63,7 +63,7 @@ function onTransitionEnd() {
<div
:class="
cn(
'flex-center bg-overlay z-100 absolute left-0 top-0 size-full backdrop-blur-sm transition-all duration-500',
'flex-center z-100 absolute left-0 top-0 size-full bg-[hsl(var(--overlay-light))] backdrop-blur-sm transition-all duration-500',
{
'invisible opacity-0': !showSpinner,
},