feat: add login page
This commit is contained in:
parent
e76205c0d0
commit
2d6b06c27a
|
@ -1,5 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="error-page">
|
<div class="error-page" :class="{ 'dark-mode': isDarkMode }">
|
||||||
|
<!-- macOS Style Background -->
|
||||||
|
<div class="background-image">
|
||||||
|
<div class="blur-overlay"></div>
|
||||||
|
<div class="gradient-overlay"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Glass Layer -->
|
||||||
|
<div class="glass-layer"></div>
|
||||||
|
|
||||||
<!-- Windows-style Error Window -->
|
<!-- Windows-style Error Window -->
|
||||||
<div class="error-window">
|
<div class="error-window">
|
||||||
<!-- Title Bar -->
|
<!-- Title Bar -->
|
||||||
|
@ -30,68 +39,76 @@
|
||||||
<p class="error-description">{{ $t('error.serverErrorDescription') }}</p>
|
<p class="error-description">{{ $t('error.serverErrorDescription') }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Action Buttons -->
|
<!-- Action Button -->
|
||||||
<div class="error-actions">
|
<div class="error-actions">
|
||||||
<button class="action-btn primary" @click="goHome">
|
<button class="action-btn primary" @click="goHome">
|
||||||
<span class="btn-icon">🏠</span>
|
<span class="btn-icon">🏠</span>
|
||||||
{{ $t('error.goHome') }}
|
{{ $t('error.goHome') }}
|
||||||
</button>
|
</button>
|
||||||
<button class="action-btn secondary" @click="refreshPage">
|
|
||||||
<span class="btn-icon">🔄</span>
|
|
||||||
{{ $t('error.refresh') }}
|
|
||||||
</button>
|
|
||||||
<button class="action-btn secondary" @click="reportError">
|
|
||||||
<span class="btn-icon">📧</span>
|
|
||||||
{{ $t('error.report') }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Technical Details (Collapsible) -->
|
|
||||||
<div class="technical-details">
|
|
||||||
<button class="details-toggle" @click="toggleDetails">
|
|
||||||
<span class="toggle-icon" :class="{ 'rotated': showDetails }">▼</span>
|
|
||||||
{{ $t('error.technicalDetails') }}
|
|
||||||
</button>
|
|
||||||
<div v-if="showDetails" class="details-content">
|
|
||||||
<div class="details-item">
|
|
||||||
<strong>{{ $t('error.errorCode') }}:</strong> 500 - Internal Server Error
|
|
||||||
</div>
|
|
||||||
<div class="details-item">
|
|
||||||
<strong>{{ $t('error.timestamp') }}:</strong> {{ currentTime }}
|
|
||||||
</div>
|
|
||||||
<div class="details-item">
|
|
||||||
<strong>{{ $t('error.requestId') }}:</strong> {{ requestId }}
|
|
||||||
</div>
|
|
||||||
<div class="details-item">
|
|
||||||
<strong>{{ $t('error.userAgent') }}:</strong> {{ userAgent }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Background Pattern -->
|
<!-- Status Bar -->
|
||||||
<div class="error-background">
|
<div class="status-bar">
|
||||||
<div class="pattern-grid"></div>
|
<div class="status-left">
|
||||||
|
<!-- Empty for now -->
|
||||||
|
</div>
|
||||||
|
<div class="status-center">
|
||||||
|
<!-- Empty for now -->
|
||||||
|
</div>
|
||||||
|
<div class="status-right">
|
||||||
|
<!-- Language Toggle -->
|
||||||
|
<div class="language-switcher-wrapper" ref="languageSwitcherWrapper">
|
||||||
|
<button @click="toggleLanguageMenu" class="language-switcher">
|
||||||
|
{{ currentLanguageDisplay }}
|
||||||
|
</button>
|
||||||
|
<div v-if="isLanguageMenuOpen" class="language-menu">
|
||||||
|
<ul>
|
||||||
|
<li v-for="lang in availableLanguages" :key="lang.key" @click="selectLanguage(lang.key as 'en' | 'zh')">
|
||||||
|
<span class="checkmark" :style="{ visibility: locale === lang.key ? 'visible' : 'hidden' }">✓</span>
|
||||||
|
<span>{{ lang.label }}</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, onMounted } from 'vue';
|
import { ref, computed, onMounted, onUnmounted, watch } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useSettingsStore } from '../../stores/settings';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t } = useI18n();
|
const { t, locale, setLocale } = useI18n();
|
||||||
|
const settingsStore = useSettingsStore();
|
||||||
|
|
||||||
// Reactive state
|
// Reactive state
|
||||||
const showDetails = ref(false);
|
|
||||||
const currentTime = ref('');
|
const currentTime = ref('');
|
||||||
const requestId = ref('');
|
const requestId = ref('');
|
||||||
const userAgent = ref('');
|
const userAgent = ref('');
|
||||||
|
|
||||||
|
// --- Language Switcher Logic ---
|
||||||
|
const isLanguageMenuOpen = ref(false);
|
||||||
|
const languageSwitcherWrapper = ref<HTMLElement | null>(null);
|
||||||
|
const availableLanguages = computed(() => [
|
||||||
|
{ key: 'en', label: 'English', display: 'EN' },
|
||||||
|
{ key: 'zh', label: '繁體中文', display: '注' },
|
||||||
|
]);
|
||||||
|
|
||||||
|
const currentLanguageDisplay = computed(() => {
|
||||||
|
const current = availableLanguages.value.find(lang => lang.key === locale.value);
|
||||||
|
return current?.display || '注';
|
||||||
|
});
|
||||||
|
|
||||||
|
// Theme state from settings store
|
||||||
|
const isDarkMode = computed(() => settingsStore.theme === 'dark');
|
||||||
|
|
||||||
// Computed properties
|
// Computed properties
|
||||||
const goHome = () => {
|
const goHome = () => {
|
||||||
router.push('/');
|
router.push('/');
|
||||||
|
@ -107,8 +124,20 @@ const reportError = () => {
|
||||||
alert(t('error.reportSent'));
|
alert(t('error.reportSent'));
|
||||||
};
|
};
|
||||||
|
|
||||||
const toggleDetails = () => {
|
// Language switcher functions
|
||||||
showDetails.value = !showDetails.value;
|
function toggleLanguageMenu() {
|
||||||
|
isLanguageMenuOpen.value = !isLanguageMenuOpen.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectLanguage(lang: 'en' | 'zh') {
|
||||||
|
setLocale(lang);
|
||||||
|
isLanguageMenuOpen.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleClickOutside = (event: MouseEvent) => {
|
||||||
|
if (languageSwitcherWrapper.value && !languageSwitcherWrapper.value.contains(event.target as Node)) {
|
||||||
|
isLanguageMenuOpen.value = false;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Initialize data
|
// Initialize data
|
||||||
|
@ -118,6 +147,19 @@ onMounted(() => {
|
||||||
userAgent.value = navigator.userAgent.substring(0, 50) + '...';
|
userAgent.value = navigator.userAgent.substring(0, 50) + '...';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
document.removeEventListener('click', handleClickOutside);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Watch for language menu state
|
||||||
|
watch(isLanguageMenuOpen, (isOpen) => {
|
||||||
|
if (isOpen) {
|
||||||
|
document.addEventListener('click', handleClickOutside);
|
||||||
|
} else {
|
||||||
|
document.removeEventListener('click', handleClickOutside);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Set page title
|
// Set page title
|
||||||
useHead({
|
useHead({
|
||||||
title: t('error.title')
|
title: t('error.title')
|
||||||
|
@ -131,7 +173,6 @@ useHead({
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background: var(--background-desktop);
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
@ -139,34 +180,68 @@ useHead({
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.error-background {
|
.background-image {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
opacity: 0.1;
|
background: linear-gradient(135deg,
|
||||||
|
#f8fafc 0%,
|
||||||
|
#e2e8f0 25%,
|
||||||
|
#cbd5e1 50%,
|
||||||
|
#94a3b8 75%,
|
||||||
|
#64748b 100%);
|
||||||
|
background-size: 400% 400%;
|
||||||
|
animation: gradient-shift 15s ease infinite;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pattern-grid {
|
.glass-layer {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-image:
|
background: rgba(255, 255, 255, 0.1);
|
||||||
linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
|
backdrop-filter: blur(20px);
|
||||||
linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
|
-webkit-backdrop-filter: blur(20px);
|
||||||
background-size: 20px 20px;
|
z-index: 1;
|
||||||
animation: grid-move 20s linear infinite;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes grid-move {
|
@keyframes gradient-shift {
|
||||||
0% { transform: translate(0, 0); }
|
0% { background-position: 0% 50%; }
|
||||||
100% { transform: translate(20px, 20px); }
|
50% { background-position: 100% 50%; }
|
||||||
|
100% { background-position: 0% 50%; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.blur-overlay {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
backdrop-filter: blur(20px);
|
||||||
|
-webkit-backdrop-filter: blur(20px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.gradient-overlay {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: linear-gradient(
|
||||||
|
180deg,
|
||||||
|
rgba(0, 0, 0, 0.1) 0%,
|
||||||
|
rgba(0, 0, 0, 0.3) 50%,
|
||||||
|
rgba(0, 0, 0, 0.6) 100%
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
.error-window {
|
.error-window {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 2;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
max-width: 600px;
|
max-width: 600px;
|
||||||
background: var(--window-background);
|
background: var(--window-background);
|
||||||
|
@ -304,10 +379,8 @@ useHead({
|
||||||
|
|
||||||
.error-actions {
|
.error-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 12px;
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.action-btn {
|
.action-btn {
|
||||||
|
@ -352,56 +425,92 @@ useHead({
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.technical-details {
|
|
||||||
border-top: 1px solid var(--window-border-color);
|
.status-bar {
|
||||||
padding-top: 20px;
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 22px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 20px;
|
||||||
|
background: var(--taskbar-background);
|
||||||
|
backdrop-filter: blur(20px);
|
||||||
|
-webkit-backdrop-filter: blur(20px);
|
||||||
|
color: var(--taskbar-item-text-color);
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 500;
|
||||||
|
z-index: 2;
|
||||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.details-toggle {
|
.status-left,
|
||||||
background: none;
|
.status-center,
|
||||||
border: none;
|
.status-right {
|
||||||
color: var(--content-text-color);
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 14px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
margin: 0 auto;
|
|
||||||
padding: 8px;
|
|
||||||
border-radius: var(--rounded-button);
|
|
||||||
transition: background-color 0.2s ease;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.details-toggle:hover {
|
.language-switcher-wrapper {
|
||||||
background: var(--taskbar-item-background);
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toggle-icon {
|
.language-switcher {
|
||||||
transition: transform 0.3s ease;
|
background: none;
|
||||||
|
border: none;
|
||||||
|
color: var(--taskbar-item-text-color);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
font-weight: 500;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 0 4px;
|
||||||
|
width: 24px;
|
||||||
|
height: 22px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 22px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toggle-icon.rotated {
|
.language-menu {
|
||||||
transform: rotate(180deg);
|
position: absolute;
|
||||||
|
top: calc(100% + 4px);
|
||||||
|
right: 0;
|
||||||
|
width: 160px;
|
||||||
|
background-color: var(--start-menu-background);
|
||||||
|
border: 1px solid var(--start-menu-border-color);
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
||||||
|
padding: 4px;
|
||||||
|
z-index: 10001;
|
||||||
}
|
}
|
||||||
|
|
||||||
.details-content {
|
.language-menu ul {
|
||||||
margin-top: 16px;
|
list-style: none;
|
||||||
padding: 16px;
|
padding: 0;
|
||||||
background: var(--taskbar-item-background);
|
margin: 0;
|
||||||
border-radius: var(--rounded-button);
|
|
||||||
text-align: left;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 1.5;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.details-item {
|
.language-menu li {
|
||||||
margin-bottom: 8px;
|
display: flex;
|
||||||
word-break: break-all;
|
align-items: center;
|
||||||
|
padding: 4px 8px;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color 0.15s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.details-item:last-child {
|
.language-menu li:hover {
|
||||||
margin-bottom: 0;
|
background-color: var(--taskbar-item-background-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkmark {
|
||||||
|
width: 16px;
|
||||||
|
text-align: center;
|
||||||
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Responsive Design */
|
/* Responsive Design */
|
||||||
|
@ -423,27 +532,164 @@ useHead({
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.error-actions {
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.action-btn {
|
.action-btn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 200px;
|
max-width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.status-bar {
|
||||||
|
padding: 8px 16px;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dark/Light theme transitions */
|
/* Light mode (default) */
|
||||||
.error-page {
|
.background-image {
|
||||||
transition: background-color 0.3s ease;
|
background: linear-gradient(135deg,
|
||||||
|
#f8fafc 0%,
|
||||||
|
#e2e8f0 25%,
|
||||||
|
#cbd5e1 50%,
|
||||||
|
#94a3b8 75%,
|
||||||
|
#64748b 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.glass-layer {
|
||||||
|
background: rgba(255, 255, 255, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.error-window {
|
.error-window {
|
||||||
transition: background-color 0.3s ease, border-color 0.3s ease;
|
background: rgba(255, 255, 255, 0.95);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||||
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-bar {
|
||||||
|
background: rgba(255, 255, 255, 0.9);
|
||||||
|
color: #1f2937;
|
||||||
|
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.window-content {
|
.window-content {
|
||||||
transition: color 0.3s ease;
|
color: #1f2937;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-title {
|
||||||
|
color: #1f2937;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-description {
|
||||||
|
color: #4b5563;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-btn.primary {
|
||||||
|
background: #10b981;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-btn.primary:hover {
|
||||||
|
background: #059669;
|
||||||
|
box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-btn.secondary {
|
||||||
|
background: rgba(0, 0, 0, 0.05);
|
||||||
|
color: #374151;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-btn.secondary:hover {
|
||||||
|
background: rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.details-toggle {
|
||||||
|
color: #374151;
|
||||||
|
}
|
||||||
|
|
||||||
|
.details-toggle:hover {
|
||||||
|
background: rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.details-content {
|
||||||
|
background: rgba(0, 0, 0, 0.05);
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.details-item {
|
||||||
|
color: #4b5563;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Dark mode adjustments */
|
||||||
|
.dark-mode .background-image {
|
||||||
|
background: linear-gradient(135deg,
|
||||||
|
#0f172a 0%,
|
||||||
|
#1e293b 25%,
|
||||||
|
#334155 50%,
|
||||||
|
#475569 75%,
|
||||||
|
#64748b 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark-mode .glass-layer {
|
||||||
|
background: rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark-mode .error-window {
|
||||||
|
background: rgba(15, 23, 42, 0.95);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark-mode .title-bar {
|
||||||
|
background: rgba(15, 23, 42, 0.9);
|
||||||
|
color: #f1f5f9;
|
||||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark-mode .window-content {
|
||||||
|
color: #f1f5f9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark-mode .error-title {
|
||||||
|
color: #f1f5f9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark-mode .error-description {
|
||||||
|
color: #cbd5e1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark-mode .action-btn.primary {
|
||||||
|
background: #10b981;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark-mode .action-btn.primary:hover {
|
||||||
|
background: #059669;
|
||||||
|
box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark-mode .action-btn.secondary {
|
||||||
|
background: rgba(255, 255, 255, 0.1);
|
||||||
|
color: #e2e8f0;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark-mode .action-btn.secondary:hover {
|
||||||
|
background: rgba(255, 255, 255, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark-mode .details-toggle {
|
||||||
|
color: #e2e8f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark-mode .details-toggle:hover {
|
||||||
|
background: rgba(255, 255, 255, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark-mode .details-content {
|
||||||
|
background: rgba(255, 255, 255, 0.1);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark-mode .details-item {
|
||||||
|
color: #cbd5e1;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,96 +1,79 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="auth-page">
|
<div class="setup-screen">
|
||||||
<!-- Windows-style Auth Window -->
|
<!-- macOS Style Background -->
|
||||||
<div class="auth-window">
|
<div class="background-image">
|
||||||
<!-- Title Bar -->
|
<div class="blur-overlay"></div>
|
||||||
<div class="title-bar">
|
<div class="gradient-overlay"></div>
|
||||||
<div class="title-bar-content">
|
|
||||||
<div class="title-bar-icon">📝</div>
|
|
||||||
<div class="title-bar-text">{{ $t('auth.register.title') }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="title-bar-controls">
|
|
||||||
<button class="control-btn close-btn" @click="goHome">
|
|
||||||
<span class="control-btn-icon">×</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Window Content -->
|
<!-- Glass Layer -->
|
||||||
<div class="window-content">
|
<div class="glass-layer"></div>
|
||||||
<div class="auth-content">
|
|
||||||
<!-- Header -->
|
<!-- Setup Content -->
|
||||||
<div class="auth-header">
|
<div class="setup-content">
|
||||||
<h1 class="auth-title">{{ $t('auth.register.title') }}</h1>
|
<!-- Setup Header -->
|
||||||
<p class="auth-subtitle">{{ $t('auth.register.subtitle') }}</p>
|
<div class="setup-header">
|
||||||
|
<div class="setup-icon">👤</div>
|
||||||
|
<h1 class="setup-title">{{ $t('auth.register.title') }}</h1>
|
||||||
|
<p class="setup-subtitle">{{ $t('auth.register.subtitle') }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Form -->
|
<!-- Setup Form -->
|
||||||
<form @submit.prevent="handleRegister" class="auth-form">
|
<div class="setup-form">
|
||||||
|
<form @submit.prevent="handleRegister" class="form">
|
||||||
<!-- Full Name Field -->
|
<!-- Full Name Field -->
|
||||||
<div class="form-group">
|
<div class="form-field">
|
||||||
<label for="fullName" class="form-label">{{ $t('auth.register.fullName') }}</label>
|
|
||||||
<input
|
<input
|
||||||
id="fullName"
|
|
||||||
v-model="form.fullName"
|
v-model="form.fullName"
|
||||||
type="text"
|
type="text"
|
||||||
:placeholder="$t('auth.register.fullNamePlaceholder')"
|
:placeholder="$t('auth.register.fullNamePlaceholder')"
|
||||||
class="form-input"
|
class="setup-input"
|
||||||
:class="{ 'error': errors.fullName }"
|
:class="{ 'error': errors.fullName }"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<span v-if="errors.fullName" class="error-message">{{ errors.fullName }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Email Field -->
|
<!-- Email Field -->
|
||||||
<div class="form-group">
|
<div class="form-field">
|
||||||
<label for="email" class="form-label">{{ $t('auth.register.email') }}</label>
|
|
||||||
<input
|
<input
|
||||||
id="email"
|
|
||||||
v-model="form.email"
|
v-model="form.email"
|
||||||
type="email"
|
type="email"
|
||||||
:placeholder="$t('auth.register.emailPlaceholder')"
|
:placeholder="$t('auth.register.emailPlaceholder')"
|
||||||
class="form-input"
|
class="setup-input"
|
||||||
:class="{ 'error': errors.email }"
|
:class="{ 'error': errors.email }"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<span v-if="errors.email" class="error-message">{{ errors.email }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Password Field -->
|
<!-- Password Field -->
|
||||||
<div class="form-group">
|
<div class="form-field">
|
||||||
<label for="password" class="form-label">{{ $t('auth.register.password') }}</label>
|
|
||||||
<input
|
<input
|
||||||
id="password"
|
|
||||||
v-model="form.password"
|
v-model="form.password"
|
||||||
type="password"
|
type="password"
|
||||||
:placeholder="$t('auth.register.passwordPlaceholder')"
|
:placeholder="$t('auth.register.passwordPlaceholder')"
|
||||||
class="form-input"
|
class="setup-input"
|
||||||
:class="{ 'error': errors.password }"
|
:class="{ 'error': errors.password }"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<span v-if="errors.password" class="error-message">{{ errors.password }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Confirm Password Field -->
|
<!-- Confirm Password Field -->
|
||||||
<div class="form-group">
|
<div class="form-field">
|
||||||
<label for="confirmPassword" class="form-label">{{ $t('auth.register.confirmPassword') }}</label>
|
|
||||||
<input
|
<input
|
||||||
id="confirmPassword"
|
|
||||||
v-model="form.confirmPassword"
|
v-model="form.confirmPassword"
|
||||||
type="password"
|
type="password"
|
||||||
:placeholder="$t('auth.register.confirmPasswordPlaceholder')"
|
:placeholder="$t('auth.register.confirmPasswordPlaceholder')"
|
||||||
class="form-input"
|
class="setup-input"
|
||||||
:class="{ 'error': errors.confirmPassword }"
|
:class="{ 'error': errors.confirmPassword }"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<span v-if="errors.confirmPassword" class="error-message">{{ errors.confirmPassword }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Terms and Conditions -->
|
<!-- Terms and Conditions -->
|
||||||
<div class="form-group">
|
<div class="terms-section">
|
||||||
<label class="checkbox-label">
|
<label class="terms-label">
|
||||||
<input v-model="form.agreeTerms" type="checkbox" class="checkbox-input" required />
|
<input v-model="form.agreeTerms" type="checkbox" class="terms-checkbox" required />
|
||||||
<span class="checkbox-text">
|
<span class="terms-text">
|
||||||
{{ $t('auth.register.agreeTerms') }}
|
{{ $t('auth.register.agreeTerms') }}
|
||||||
<button type="button" class="terms-link" @click="showTerms">
|
<button type="button" class="terms-link" @click="showTerms">
|
||||||
{{ $t('auth.register.termsAndConditions') }}
|
{{ $t('auth.register.termsAndConditions') }}
|
||||||
|
@ -99,40 +82,68 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Unified Error Messages -->
|
||||||
|
<div class="error-messages">
|
||||||
|
<div v-if="errors.fullName" class="error-message">{{ errors.fullName }}</div>
|
||||||
|
<div v-if="errors.email" class="error-message">{{ errors.email }}</div>
|
||||||
|
<div v-if="errors.password" class="error-message">{{ errors.password }}</div>
|
||||||
|
<div v-if="errors.confirmPassword" class="error-message">{{ errors.confirmPassword }}</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Submit Button -->
|
<!-- Submit Button -->
|
||||||
<button type="submit" class="auth-button" :disabled="isLoading">
|
<button type="submit" class="setup-button" :disabled="isLoading">
|
||||||
<span v-if="isLoading" class="loading-spinner"></span>
|
<span v-if="isLoading" class="loading-spinner"></span>
|
||||||
{{ isLoading ? $t('auth.common.loading') : $t('auth.register.registerButton') }}
|
{{ isLoading ? $t('auth.common.loading') : $t('auth.register.registerButton') }}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<!-- Sign In Link -->
|
<!-- Sign In Link -->
|
||||||
<div class="auth-footer">
|
<div class="setup-footer">
|
||||||
<p class="auth-footer-text">
|
<p class="footer-text">
|
||||||
{{ $t('auth.register.hasAccount') }}
|
{{ $t('auth.register.hasAccount') }}
|
||||||
<button class="auth-link" @click="goToLogin">
|
<button class="footer-link" @click="goToLogin">
|
||||||
{{ $t('auth.register.signIn') }}
|
{{ $t('auth.register.signIn') }}
|
||||||
</button>
|
</button>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Background Pattern -->
|
<!-- Status Bar -->
|
||||||
<div class="auth-background">
|
<div class="status-bar">
|
||||||
<div class="pattern-grid"></div>
|
<div class="status-left">
|
||||||
|
<!-- Empty for now -->
|
||||||
|
</div>
|
||||||
|
<div class="status-center">
|
||||||
|
<!-- Empty for now -->
|
||||||
|
</div>
|
||||||
|
<div class="status-right">
|
||||||
|
<!-- Language Toggle -->
|
||||||
|
<div class="language-switcher-wrapper" ref="languageSwitcherWrapper">
|
||||||
|
<button @click="toggleLanguageMenu" class="language-switcher">
|
||||||
|
{{ currentLanguageDisplay }}
|
||||||
|
</button>
|
||||||
|
<div v-if="isLanguageMenuOpen" class="language-menu">
|
||||||
|
<ul>
|
||||||
|
<li v-for="lang in availableLanguages" :key="lang.key" @click="selectLanguage(lang.key as 'en' | 'zh')">
|
||||||
|
<span class="checkmark" :style="{ visibility: locale === lang.key ? 'visible' : 'hidden' }">✓</span>
|
||||||
|
<span>{{ lang.label }}</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive } from 'vue';
|
import { ref, reactive, computed, onMounted, onUnmounted, watch } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t } = useI18n();
|
const { t, locale, setLocale } = useI18n();
|
||||||
|
|
||||||
// Form data
|
// Form data
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
|
@ -154,6 +165,19 @@ const errors = reactive({
|
||||||
// Loading state
|
// Loading state
|
||||||
const isLoading = ref(false);
|
const isLoading = ref(false);
|
||||||
|
|
||||||
|
// --- Language Switcher Logic ---
|
||||||
|
const isLanguageMenuOpen = ref(false);
|
||||||
|
const languageSwitcherWrapper = ref<HTMLElement | null>(null);
|
||||||
|
const availableLanguages = computed(() => [
|
||||||
|
{ key: 'en', label: 'English', display: 'EN' },
|
||||||
|
{ key: 'zh', label: '繁體中文', display: '注' },
|
||||||
|
]);
|
||||||
|
|
||||||
|
const currentLanguageDisplay = computed(() => {
|
||||||
|
const current = availableLanguages.value.find(lang => lang.key === locale.value);
|
||||||
|
return current?.display || '注';
|
||||||
|
});
|
||||||
|
|
||||||
// Validation functions
|
// Validation functions
|
||||||
const validateEmail = (email: string) => {
|
const validateEmail = (email: string) => {
|
||||||
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
||||||
|
@ -233,204 +257,243 @@ const goToLogin = () => {
|
||||||
const goHome = () => {
|
const goHome = () => {
|
||||||
router.push('/');
|
router.push('/');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Language switcher functions
|
||||||
|
function toggleLanguageMenu() {
|
||||||
|
isLanguageMenuOpen.value = !isLanguageMenuOpen.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectLanguage(lang: 'en' | 'zh') {
|
||||||
|
setLocale(lang);
|
||||||
|
isLanguageMenuOpen.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleClickOutside = (event: MouseEvent) => {
|
||||||
|
if (languageSwitcherWrapper.value && !languageSwitcherWrapper.value.contains(event.target as Node)) {
|
||||||
|
isLanguageMenuOpen.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Lifecycle
|
||||||
|
onMounted(() => {
|
||||||
|
// Add any initialization logic here
|
||||||
|
});
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
document.removeEventListener('click', handleClickOutside);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Watch for language menu state
|
||||||
|
watch(isLanguageMenuOpen, (isOpen) => {
|
||||||
|
if (isOpen) {
|
||||||
|
document.addEventListener('click', handleClickOutside);
|
||||||
|
} else {
|
||||||
|
document.removeEventListener('click', handleClickOutside);
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.auth-page {
|
.setup-screen {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background: var(--background-desktop);
|
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.auth-background {
|
.background-image {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
opacity: 0.1;
|
background: linear-gradient(135deg,
|
||||||
|
#f8fafc 0%,
|
||||||
|
#e2e8f0 25%,
|
||||||
|
#cbd5e1 50%,
|
||||||
|
#94a3b8 75%,
|
||||||
|
#64748b 100%);
|
||||||
|
background-size: 400% 400%;
|
||||||
|
animation: gradient-shift 15s ease infinite;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pattern-grid {
|
.glass-layer {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-image:
|
background: rgba(255, 255, 255, 0.1);
|
||||||
linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
|
backdrop-filter: blur(20px);
|
||||||
linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
|
-webkit-backdrop-filter: blur(20px);
|
||||||
background-size: 20px 20px;
|
|
||||||
animation: grid-move 20s linear infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes grid-move {
|
|
||||||
0% { transform: translate(0, 0); }
|
|
||||||
100% { transform: translate(20px, 20px); }
|
|
||||||
}
|
|
||||||
|
|
||||||
.auth-window {
|
|
||||||
position: relative;
|
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
width: 90%;
|
|
||||||
max-width: 400px;
|
|
||||||
background: var(--window-background);
|
|
||||||
border: 1px solid var(--window-border-color);
|
|
||||||
border-radius: var(--rounded-window);
|
|
||||||
box-shadow: var(--shadow-window);
|
|
||||||
overflow: hidden;
|
|
||||||
animation: window-appear 0.5s ease-out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes window-appear {
|
@keyframes gradient-shift {
|
||||||
from {
|
0% { background-position: 0% 50%; }
|
||||||
opacity: 0;
|
50% { background-position: 100% 50%; }
|
||||||
transform: scale(0.9) translateY(20px);
|
100% { background-position: 0% 50%; }
|
||||||
}
|
|
||||||
to {
|
|
||||||
opacity: 1;
|
|
||||||
transform: scale(1) translateY(0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.title-bar {
|
.blur-overlay {
|
||||||
display: flex;
|
position: absolute;
|
||||||
align-items: center;
|
top: 0;
|
||||||
justify-content: space-between;
|
left: 0;
|
||||||
background: var(--title-bar-background);
|
|
||||||
color: var(--title-bar-text-color);
|
|
||||||
padding: 8px 12px;
|
|
||||||
border-bottom: 1px solid var(--window-border-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.title-bar-content {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title-bar-icon {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title-bar-text {
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title-bar-controls {
|
|
||||||
display: flex;
|
|
||||||
gap: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.control-btn {
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
border: none;
|
|
||||||
border-radius: var(--rounded-control-btn);
|
|
||||||
background: var(--control-btn-close-bg);
|
|
||||||
color: white;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: all 0.2s ease;
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.control-btn:hover {
|
|
||||||
transform: scale(1.1);
|
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.window-content {
|
|
||||||
padding: 32px;
|
|
||||||
color: var(--content-text-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.auth-content {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.auth-header {
|
|
||||||
margin-bottom: 32px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.auth-title {
|
|
||||||
font-size: 28px;
|
|
||||||
font-weight: 700;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
color: var(--content-text-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.auth-subtitle {
|
|
||||||
font-size: 16px;
|
|
||||||
color: var(--content-text-color);
|
|
||||||
opacity: 0.7;
|
|
||||||
}
|
|
||||||
|
|
||||||
.auth-form {
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-group {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-label {
|
|
||||||
display: block;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 600;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
color: var(--content-text-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-input {
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 12px 16px;
|
height: 100%;
|
||||||
border: 1px solid var(--window-border-color);
|
backdrop-filter: blur(20px);
|
||||||
border-radius: var(--rounded-button);
|
-webkit-backdrop-filter: blur(20px);
|
||||||
background: var(--taskbar-item-background);
|
}
|
||||||
color: var(--content-text-color);
|
|
||||||
font-size: 14px;
|
.gradient-overlay {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: linear-gradient(
|
||||||
|
180deg,
|
||||||
|
rgba(0, 0, 0, 0.1) 0%,
|
||||||
|
rgba(0, 0, 0, 0.3) 50%,
|
||||||
|
rgba(0, 0, 0, 0.6) 100%
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
.setup-content {
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
padding: 60px 40px 40px;
|
||||||
|
color: white;
|
||||||
|
min-height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.setup-header {
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 40px;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.setup-icon {
|
||||||
|
font-size: 4rem;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
|
||||||
|
}
|
||||||
|
|
||||||
|
.setup-title {
|
||||||
|
font-size: 2.5rem;
|
||||||
|
font-weight: 300;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.setup-subtitle {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
font-weight: 300;
|
||||||
|
opacity: 0.9;
|
||||||
|
text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.setup-form {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 20px;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 400px;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 16px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-field {
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.setup-input {
|
||||||
|
width: 100%;
|
||||||
|
height: 50px;
|
||||||
|
padding: 14px 24px;
|
||||||
|
background: rgba(255, 255, 255, 0.15);
|
||||||
|
backdrop-filter: blur(20px);
|
||||||
|
border: 2px solid rgba(255, 255, 255, 0.3);
|
||||||
|
border-radius: 50px;
|
||||||
|
color: white;
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 300;
|
||||||
|
text-align: center;
|
||||||
|
outline: none;
|
||||||
|
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-input:focus {
|
.setup-input::placeholder {
|
||||||
|
color: rgba(255, 255, 255, 0.7);
|
||||||
|
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.setup-input:focus {
|
||||||
|
background: rgba(255, 255, 255, 0.2);
|
||||||
|
border-color: rgba(255, 255, 255, 0.5);
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--control-btn-maximize-bg);
|
|
||||||
box-shadow: 0 0 0 2px rgba(76, 209, 55, 0.2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-input.error {
|
.setup-input.error {
|
||||||
border-color: var(--control-btn-close-bg);
|
border-color: #ff6b6b;
|
||||||
|
background: rgba(255, 107, 107, 0.2);
|
||||||
|
animation: shake 0.5s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.error-message {
|
@keyframes shake {
|
||||||
display: block;
|
0%, 100% { transform: translateX(0); }
|
||||||
font-size: 12px;
|
25% { transform: translateX(-10px); }
|
||||||
color: var(--control-btn-close-bg);
|
75% { transform: translateX(10px); }
|
||||||
margin-top: 4px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkbox-label {
|
.terms-section {
|
||||||
|
width: 100%;
|
||||||
|
margin: 8px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.terms-label {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 14px;
|
font-size: 0.9rem;
|
||||||
color: var(--content-text-color);
|
color: rgba(255, 255, 255, 0.8);
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
|
text-align: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkbox-input {
|
.terms-checkbox {
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
width: 16px;
|
width: 16px;
|
||||||
|
@ -438,58 +501,83 @@ const goHome = () => {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.checkbox-text {
|
.terms-text {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.terms-link {
|
.terms-link {
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
color: var(--control-btn-maximize-bg);
|
color: rgba(255, 255, 255, 0.9);
|
||||||
font-size: 14px;
|
font-size: 0.9rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.terms-link:hover {
|
.terms-link:hover {
|
||||||
opacity: 0.8;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.auth-button {
|
.error-messages {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
margin-top: 12px;
|
||||||
|
min-height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-message {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
color: #ff6b6b;
|
||||||
|
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
|
||||||
|
text-align: center;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.setup-button {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 14px;
|
height: 50px;
|
||||||
background: var(--control-btn-maximize-bg);
|
padding: 14px 24px;
|
||||||
|
background: rgba(255, 255, 255, 0.2);
|
||||||
|
backdrop-filter: blur(20px);
|
||||||
|
border: 2px solid rgba(255, 255, 255, 0.3);
|
||||||
|
border-radius: 50px;
|
||||||
color: white;
|
color: white;
|
||||||
border: none;
|
font-size: 1rem;
|
||||||
border-radius: var(--rounded-button);
|
font-weight: 500;
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 600;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
outline: none;
|
||||||
|
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.auth-button:hover:not(:disabled) {
|
.setup-button:hover:not(:disabled) {
|
||||||
|
background: rgba(255, 255, 255, 0.3);
|
||||||
|
border-color: rgba(255, 255, 255, 0.5);
|
||||||
transform: translateY(-2px);
|
transform: translateY(-2px);
|
||||||
box-shadow: 0 6px 20px rgba(76, 209, 55, 0.4);
|
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.auth-button:disabled {
|
.setup-button:disabled {
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
|
transform: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-spinner {
|
.loading-spinner {
|
||||||
width: 16px;
|
width: 20px;
|
||||||
height: 16px;
|
height: 20px;
|
||||||
border: 2px solid transparent;
|
border: 2px solid transparent;
|
||||||
border-top: 2px solid white;
|
border-top: 2px solid currentColor;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
animation: spin 1s linear infinite;
|
animation: spin 1s linear infinite;
|
||||||
}
|
}
|
||||||
|
@ -499,57 +587,203 @@ const goHome = () => {
|
||||||
100% { transform: rotate(360deg); }
|
100% { transform: rotate(360deg); }
|
||||||
}
|
}
|
||||||
|
|
||||||
.auth-footer {
|
.setup-footer {
|
||||||
margin-top: 24px;
|
margin-top: 24px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.auth-footer-text {
|
.footer-text {
|
||||||
font-size: 14px;
|
font-size: 0.9rem;
|
||||||
color: var(--content-text-color);
|
color: rgba(255, 255, 255, 0.8);
|
||||||
opacity: 0.7;
|
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
.auth-link {
|
.footer-link {
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
color: var(--control-btn-maximize-bg);
|
color: rgba(255, 255, 255, 0.9);
|
||||||
font-size: 14px;
|
font-size: 0.9rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.auth-link:hover {
|
.footer-link:hover {
|
||||||
opacity: 0.8;
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-bar {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 22px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 20px;
|
||||||
|
background: var(--taskbar-background);
|
||||||
|
backdrop-filter: blur(20px);
|
||||||
|
-webkit-backdrop-filter: blur(20px);
|
||||||
|
color: var(--taskbar-item-text-color);
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 500;
|
||||||
|
z-index: 2;
|
||||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-left,
|
||||||
|
.status-center,
|
||||||
|
.status-right {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.language-switcher-wrapper {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.language-switcher {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
color: var(--taskbar-item-text-color);
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 500;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 0 4px;
|
||||||
|
width: 24px;
|
||||||
|
height: 22px;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 22px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.language-menu {
|
||||||
|
position: absolute;
|
||||||
|
top: calc(100% + 4px);
|
||||||
|
right: 0;
|
||||||
|
width: 160px;
|
||||||
|
background-color: var(--start-menu-background);
|
||||||
|
border: 1px solid var(--start-menu-border-color);
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
||||||
|
padding: 4px;
|
||||||
|
z-index: 10001;
|
||||||
|
}
|
||||||
|
|
||||||
|
.language-menu ul {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.language-menu li {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 4px 8px;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color 0.15s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.language-menu li:hover {
|
||||||
|
background-color: var(--taskbar-item-background-hover);
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkmark {
|
||||||
|
width: 16px;
|
||||||
|
text-align: center;
|
||||||
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Responsive Design */
|
/* Responsive Design */
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.auth-window {
|
.setup-content {
|
||||||
width: 95%;
|
padding: 60px 20px 20px;
|
||||||
margin: 20px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.window-content {
|
.setup-title {
|
||||||
padding: 24px;
|
font-size: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.auth-title {
|
.setup-subtitle {
|
||||||
font-size: 24px;
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.setup-icon {
|
||||||
|
font-size: 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.setup-input {
|
||||||
|
height: 44px;
|
||||||
|
padding: 12px 20px;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.setup-button {
|
||||||
|
height: 44px;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-bar {
|
||||||
|
padding: 8px 16px;
|
||||||
|
font-size: 0.8rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dark/Light theme transitions */
|
@media (max-width: 480px) {
|
||||||
.auth-page {
|
.setup-content {
|
||||||
transition: background-color 0.3s ease;
|
padding: 40px 16px 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.auth-window {
|
.setup-title {
|
||||||
transition: background-color 0.3s ease, border-color 0.3s ease;
|
font-size: 1.8rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.window-content {
|
.setup-subtitle {
|
||||||
transition: color 0.3s ease;
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.setup-icon {
|
||||||
|
font-size: 2.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.setup-input {
|
||||||
|
height: 40px;
|
||||||
|
padding: 10px 16px;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.setup-button {
|
||||||
|
height: 40px;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.terms-label {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer-text {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Dark mode adjustments */
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
.background-image {
|
||||||
|
background: linear-gradient(135deg,
|
||||||
|
#1e293b 0%,
|
||||||
|
#334155 25%,
|
||||||
|
#475569 50%,
|
||||||
|
#64748b 75%,
|
||||||
|
#94a3b8 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.glass-layer {
|
||||||
|
background: rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue