Merge: 사이드바 순서 변경 + 기본 진입 일정으로
This commit is contained in:
@@ -210,7 +210,7 @@ export class AuthController {
|
||||
): Promise<void> {
|
||||
// 소셜 로그인은 별도 체크박스가 없어 로그인 유지(영속)로 처리
|
||||
await this.loginWith(res, req.user as PublicUser, true);
|
||||
res.redirect(`${this.webUrl()}/projects`);
|
||||
res.redirect(`${this.webUrl()}/schedule`);
|
||||
}
|
||||
|
||||
// ── 카카오 OAuth ──
|
||||
@@ -232,7 +232,7 @@ export class AuthController {
|
||||
): Promise<void> {
|
||||
// 소셜 로그인은 별도 체크박스가 없어 로그인 유지(영속)로 처리
|
||||
await this.loginWith(res, req.user as PublicUser, true);
|
||||
res.redirect(`${this.webUrl()}/projects`);
|
||||
res.redirect(`${this.webUrl()}/schedule`);
|
||||
}
|
||||
|
||||
@Post('logout')
|
||||
|
||||
@@ -105,6 +105,31 @@ async function onLogout() {
|
||||
</RouterLink>
|
||||
|
||||
<nav class="sidenav">
|
||||
<RouterLink
|
||||
to="/schedule"
|
||||
class="nav-item"
|
||||
title="일정"
|
||||
:class="{ active: activeNav === 'schedule' }"
|
||||
>
|
||||
<svg
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<rect
|
||||
x="3"
|
||||
y="4"
|
||||
width="18"
|
||||
height="18"
|
||||
rx="2"
|
||||
/>
|
||||
<path d="M16 2v4M8 2v4M3 10h18" />
|
||||
</svg>
|
||||
<span>일정</span>
|
||||
</RouterLink>
|
||||
<RouterLink
|
||||
to="/tasks"
|
||||
class="nav-item"
|
||||
@@ -176,31 +201,6 @@ async function onLogout() {
|
||||
</svg>
|
||||
<span>프로젝트</span>
|
||||
</RouterLink>
|
||||
<RouterLink
|
||||
to="/schedule"
|
||||
class="nav-item"
|
||||
title="일정"
|
||||
:class="{ active: activeNav === 'schedule' }"
|
||||
>
|
||||
<svg
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<rect
|
||||
x="3"
|
||||
y="4"
|
||||
width="18"
|
||||
height="18"
|
||||
rx="2"
|
||||
/>
|
||||
<path d="M16 2v4M8 2v4M3 10h18" />
|
||||
</svg>
|
||||
<span>일정</span>
|
||||
</RouterLink>
|
||||
</nav>
|
||||
|
||||
<!-- 하단: 접기 토글 + 사용자 프로필 + 메뉴(위로 펼침) -->
|
||||
|
||||
@@ -46,7 +46,7 @@ async function onLogin() {
|
||||
},
|
||||
{ silent: true },
|
||||
)
|
||||
await router.push('/projects')
|
||||
await router.push('/schedule')
|
||||
} catch (err) {
|
||||
const res = (
|
||||
err as { response?: { status?: number; data?: { error?: { message?: string } } } }
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useAuthStore } from '@/stores/auth.store'
|
||||
const routes: RouteRecordRaw[] = [
|
||||
{
|
||||
path: '/',
|
||||
redirect: '/projects',
|
||||
redirect: '/schedule',
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
@@ -134,13 +134,13 @@ router.beforeEach(async (to) => {
|
||||
return { name: 'login' }
|
||||
}
|
||||
|
||||
// 이미 로그인 상태에서 로그인/회원가입 진입 → 프로젝트 목록으로
|
||||
// 이미 로그인 상태에서 로그인/회원가입 진입 → 기본 화면(일정)으로
|
||||
if (
|
||||
!to.meta.requiresAuth &&
|
||||
authStore.isLoggedIn &&
|
||||
(to.name === 'login' || to.name === 'signup')
|
||||
) {
|
||||
return { path: '/projects' }
|
||||
return { path: '/schedule' }
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user