로그인 화면

This commit is contained in:
jieun committed 2026-11-18 16:53:07 +09:00
1 parent 6adcb5b43d
commit f551671394
13 files changed
+152 -30

No files matched your search

+71
View File
@@ -0,0 +1,71 @@
<template>
<main class="login-page">
<svg class="login-network" viewBox="0 0 1600 1000" preserveAspectRatio="xMidYMid slice" aria-hidden="true" focusable="false">
<g fill="none" stroke="#46637e" stroke-width="1">
<path d="M0 110L220 40 350 220 100 370 0 110M220 40L570 0 350 220 540 390 100 370 0 620M0 620L100 370 310 610 80 830 0 620M80 830L310 610 430 890 180 1000M310 610L540 390 430 890 700 1000M350 220L780 100 540 390M780 100L1030 0 1150 260 1380 80 1600 190M1150 260L1370 440 1600 190M1380 80L1600 0M1370 440L1600 570 1460 760 1220 640 1370 440M1460 760L1600 1000 1250 950 1220 640 990 850 1250 950M1220 640L1010 440 1150 260M990 850L700 1000M1460 760L1600 570"/>
</g>
<g fill="#28425c"><path d="M0 110L220 40 350 220Z"/><path d="M100 370L310 610 0 620Z"/><path d="M310 610L430 890 80 830Z"/><path d="M1150 260L1380 80 1600 190Z"/><path d="M1370 440L1600 570 1460 760Z"/><path d="M1220 640L1250 950 990 850Z"/></g>
<g fill="#6c98b8"><circle cx="350" cy="220" r="3"/><circle cx="100" cy="370" r="3"/><circle cx="310" cy="610" r="3"/><circle cx="430" cy="890" r="3"/><circle cx="1150" cy="260" r="3"/><circle cx="1370" cy="440" r="3"/><circle cx="1460" cy="760" r="3"/><circle cx="1250" cy="950" r="3"/></g>
</svg>
<section class="login-shell" aria-labelledby="login-title">
<header class="login-brand">
<img class="login-logo" src="/img/metaqlab-logo.png" alt="메타큐랩"/>
<h1>공유 PM 통합 관제 플랫폼</h1>
</header>
<div class="login-form-panel">
<h2 id="login-title">관리자 로그인</h2>
<form @submit.prevent="submit">
<label class="login-field" for="login-id">아이디
<input id="login-id" ref="username" v-model="username" name="username" type="text" autocomplete="username" autocapitalize="none" :spellcheck="false" placeholder="아이디 입력" required :aria-invalid="Boolean(error)" :aria-describedby="error ? 'login-error' : undefined" @input="error=''"/>
</label>
<label class="login-field" for="login-password">비밀번호
<input id="login-password" v-model="password" name="password" type="password" autocomplete="current-password" placeholder="비밀번호 입력" required :aria-invalid="Boolean(error)" :aria-describedby="error ? 'login-error' : undefined" @input="error=''"/>
</label>
<p v-if="error" id="login-error" class="login-error" role="alert">{{ error }}</p>
<button class="login-submit" type="submit" :disabled="submitting">{{ submitting ? '로그인 중…' : '로그인' }}</button>
</form>
</div>
</section>
</main>
</template>
<script>
import { signIn, safeDestination } from '@/auth';
export default {
data: () => ({ username:'', password:'', error:'', submitting:false }),
mounted() { this.$refs.username.focus(); },
methods: {
async submit() {
if(this.submitting)return;
this.error=''; this.submitting=true;
try {
if(!signIn(this.username,this.password)) { this.error='아이디 또는 비밀번호를 확인해주세요.'; return; }
this.password='';
await this.$router.replace(safeDestination(this.$route.query.redirect));
} catch (_) { this.error='로그인 정보를 저장할 수 없습니다. 브라우저 저장소 설정을 확인해주세요.'; }
finally { this.submitting=false; }
}
}
};
</script>
<style>
.login-page{position:relative;isolation:isolate;max-width:none;width:100%;min-height:100vh;min-height:100dvh;margin:0;padding:48px 24px;display:flex;align-items:center;justify-content:center;background:#101d2e;color:#e8eff7;overflow:hidden}
.login-network{position:absolute;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none;opacity:.24}
.login-shell{width:100%;max-width:510px;background:#192737;border:1px solid #36485b;border-radius:4px;box-shadow:none}
.login-brand{text-align:center;padding:38px 32px 24px}
.login-logo{display:block;width:260px;max-width:85%;height:auto;margin:0 auto 23px;filter:brightness(0) invert(1);opacity:.94}
.login-brand h1{font-size:24px;font-weight:650;line-height:1.5;letter-spacing:-.9px;color:#edf3fa;margin:0;word-break:keep-all}
.login-form-panel{padding:26px 44px 42px}
.login-form-panel h2{font-size:20px;line-height:1.5;font-weight:600;letter-spacing:-.5px;text-align:center;margin:0 0 26px;color:#dce8f4}
.login-field{display:block;margin:0 0 23px;font-size:17px;font-weight:500;line-height:1.6;color:#c8d7e7}
.login-field input{display:block;width:100%;height:58px;margin-top:10px;padding:14px 17px;background:#101c2b;border:1px solid #4a5d73;border-radius:3px;color:#f1f6fc;font-size:18px;line-height:1.5;box-shadow:none;transition:border-color .15s ease}
.login-field input::placeholder{font-size:16px;color:#92a6bb;opacity:1}
.login-field input:focus{outline:2px solid #6bbac5;outline-offset:2px;border-color:#6bbac5}
.login-field input[aria-invalid=true]{border-color:#e0a090}
.login-submit{display:block;width:100%;height:58px;margin-top:31px;border:1px solid #4b78bd;border-radius:3px;background:#305e9f;color:#fff;font-size:19px;font-weight:650;letter-spacing:.3px;cursor:pointer;box-shadow:none;transition:background .15s ease}
.login-submit:hover{background:#396eb7}.login-submit:focus-visible{outline:2px solid #99bff2;outline-offset:4px}.login-submit:disabled{cursor:wait;opacity:.65}
.login-error{margin:0;color:#f0b4a4;font-size:15px;line-height:1.7;word-break:keep-all}
@media(max-width:560px){.login-page{padding:28px 18px}.login-brand{padding:30px 18px 21px}.login-logo{width:230px;margin-bottom:22px}.login-brand h1{font-size:20px;letter-spacing:-.6px}.login-form-panel{padding:24px 26px 34px}.login-form-panel h2{font-size:18px;margin-bottom:24px}.login-field{font-size:16px}.login-field input{font-size:17px;height:56px}.login-submit{height:56px;font-size:18px}}
@media(max-width:360px){.login-page{padding:20px 12px}.login-form-panel{padding:24px 20px 30px}.login-brand h1{font-size:19px}.login-logo{width:210px}}
@media(prefers-reduced-motion:reduce){.login-field input,.login-submit{transition:none}}
</style>