From 36dbbb07bedd3ef619a0d36ee806d73bae81998e Mon Sep 17 00:00:00 2001 From: banahaker Date: Wed, 8 Mar 2023 20:38:47 +0800 Subject: [PATCH 1/2] feat: auth page structure --- .../Home/LoginPage.vue} | 0 .../Home/SignUpPage.vue} | 0 src/{views => pages}/PageHome.vue | 0 src/{views => pages}/PageOAuth.vue | 0 src/{views => pages}/PageOverview.vue | 0 src/{views => pages}/PageVerifyEmail.vue | 0 src/{views => pages}/RouterView.vue | 0 src/router/index.ts | 18 +++++++++--------- 8 files changed, 9 insertions(+), 9 deletions(-) rename src/{components/Auth/BlockLoginPage.vue => pages/Home/LoginPage.vue} (100%) rename src/{components/Auth/BlockSignUpPage.vue => pages/Home/SignUpPage.vue} (100%) rename src/{views => pages}/PageHome.vue (100%) rename src/{views => pages}/PageOAuth.vue (100%) rename src/{views => pages}/PageOverview.vue (100%) rename src/{views => pages}/PageVerifyEmail.vue (100%) rename src/{views => pages}/RouterView.vue (100%) diff --git a/src/components/Auth/BlockLoginPage.vue b/src/pages/Home/LoginPage.vue similarity index 100% rename from src/components/Auth/BlockLoginPage.vue rename to src/pages/Home/LoginPage.vue diff --git a/src/components/Auth/BlockSignUpPage.vue b/src/pages/Home/SignUpPage.vue similarity index 100% rename from src/components/Auth/BlockSignUpPage.vue rename to src/pages/Home/SignUpPage.vue diff --git a/src/views/PageHome.vue b/src/pages/PageHome.vue similarity index 100% rename from src/views/PageHome.vue rename to src/pages/PageHome.vue diff --git a/src/views/PageOAuth.vue b/src/pages/PageOAuth.vue similarity index 100% rename from src/views/PageOAuth.vue rename to src/pages/PageOAuth.vue diff --git a/src/views/PageOverview.vue b/src/pages/PageOverview.vue similarity index 100% rename from src/views/PageOverview.vue rename to src/pages/PageOverview.vue diff --git a/src/views/PageVerifyEmail.vue b/src/pages/PageVerifyEmail.vue similarity index 100% rename from src/views/PageVerifyEmail.vue rename to src/pages/PageVerifyEmail.vue diff --git a/src/views/RouterView.vue b/src/pages/RouterView.vue similarity index 100% rename from src/views/RouterView.vue rename to src/pages/RouterView.vue diff --git a/src/router/index.ts b/src/router/index.ts index 792307e3..a7fd52fc 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -9,51 +9,51 @@ const routes: RouteRecordRaw[] = [ { path: '/', name: 'Home', - component: () => import('@/views/PageHome.vue'), + component: () => import('@/pages/PageHome.vue'), }, { path: '/overview', name: 'Overview', - component: () => import('@/views/PageOverview.vue'), + component: () => import('@/pages/PageOverview.vue'), }, { path: '/account', name: 'Account', - component: () => import('@/views/RouterView.vue'), + component: () => import('@/pages/RouterView.vue'), children: [ { path: 'login', name: 'Login', - component: () => import('@/components/Auth/BlockLoginPage.vue'), + component: () => import('@/pages/Home/LoginPage.vue'), }, { path: 'signup', name: 'SignUp', - component: () => import('@/components/Auth/BlockSignUpPage.vue'), + component: () => import('@/pages/Home/SignUpPage.vue'), }, ], }, { path: '/oauth', name: 'OAuth', - component: () => import('@/views/RouterView.vue'), + component: () => import('@/pages/RouterView.vue'), children: [ { path: 'google', name: 'Google OAuth', - component: () => import('@/views/PageOAuth.vue'), + component: () => import('@/pages/PageOAuth.vue'), }, { path: 'facebook', name: 'Facebook OAuth', - component: () => import('@/views/PageOAuth.vue'), + component: () => import('@/pages/PageOAuth.vue'), }, ], }, { path: '/verify-email', name: 'Verify Email', - component: () => import('@/views/PageVerifyEmail.vue'), + component: () => import('@/pages/PageVerifyEmail.vue'), }, ]; From c7042df08b19c842e13d9a0ee42dc7ddd5b265de Mon Sep 17 00:00:00 2001 From: SIongSng Date: Wed, 22 Mar 2023 23:01:37 +0800 Subject: [PATCH 2/2] refactor: move files to `Account` directory --- src/pages/{Home => Account}/LoginPage.vue | 0 src/pages/{Home => Account}/SignUpPage.vue | 0 src/router/index.ts | 4 ++-- 3 files changed, 2 insertions(+), 2 deletions(-) rename src/pages/{Home => Account}/LoginPage.vue (100%) rename src/pages/{Home => Account}/SignUpPage.vue (100%) diff --git a/src/pages/Home/LoginPage.vue b/src/pages/Account/LoginPage.vue similarity index 100% rename from src/pages/Home/LoginPage.vue rename to src/pages/Account/LoginPage.vue diff --git a/src/pages/Home/SignUpPage.vue b/src/pages/Account/SignUpPage.vue similarity index 100% rename from src/pages/Home/SignUpPage.vue rename to src/pages/Account/SignUpPage.vue diff --git a/src/router/index.ts b/src/router/index.ts index a7fd52fc..17d0576d 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -24,12 +24,12 @@ const routes: RouteRecordRaw[] = [ { path: 'login', name: 'Login', - component: () => import('@/pages/Home/LoginPage.vue'), + component: () => import('@/pages/Account/LoginPage.vue'), }, { path: 'signup', name: 'SignUp', - component: () => import('@/pages/Home/SignUpPage.vue'), + component: () => import('@/pages/Account/SignUpPage.vue'), }, ], },