diff --git a/app/assets/router/routes.ts b/app/assets/router/routes.ts new file mode 100644 index 0000000..68e1ab8 --- /dev/null +++ b/app/assets/router/routes.ts @@ -0,0 +1,44 @@ +const routes = [ + { + path: '/account/sign-in', + name: 'account.login', + meta: { + guest: { + redirect: { name: 'home' } + } + }, + component: () => import('../views/LoginView.vue') + }, + { + path: '/account/register', + name: 'account.register', + meta: { + guest: { + redirect: { name: 'home' } + } + }, + component: () => import('../views/RegisterView.vue') + }, + { + path: '/account/forgot-password', + name: 'account.forgot-password', + meta: { + guest: { + redirect: { name: 'home' } + } + }, + component: () => import('../views/ForgotPasswordView.vue') + }, + { + path: '/account/resend-verification', + name: 'account.resend-verification', + meta: { + guest: { + redirect: { name: 'home' } + } + }, + component: () => import('../views/ResendVerificationView.vue') + } +] + +export default routes diff --git a/app/assets/views/ForgotPasswordView.vue b/app/assets/views/ForgotPasswordView.vue new file mode 100644 index 0000000..04e9197 --- /dev/null +++ b/app/assets/views/ForgotPasswordView.vue @@ -0,0 +1,3 @@ + diff --git a/app/assets/views/LoginView.vue b/app/assets/views/LoginView.vue new file mode 100644 index 0000000..1344c72 --- /dev/null +++ b/app/assets/views/LoginView.vue @@ -0,0 +1,11 @@ + + + diff --git a/app/assets/views/RegisterView.vue b/app/assets/views/RegisterView.vue new file mode 100644 index 0000000..629542f --- /dev/null +++ b/app/assets/views/RegisterView.vue @@ -0,0 +1,8 @@ + + + diff --git a/app/assets/views/ResendVerificationView.vue b/app/assets/views/ResendVerificationView.vue new file mode 100644 index 0000000..53706a0 --- /dev/null +++ b/app/assets/views/ResendVerificationView.vue @@ -0,0 +1,3 @@ + diff --git a/dist/ForgotPasswordView-Ct0WfO54.js b/dist/ForgotPasswordView-Ct0WfO54.js new file mode 100644 index 0000000..a2765ba --- /dev/null +++ b/dist/ForgotPasswordView-Ct0WfO54.js @@ -0,0 +1,11 @@ +import { resolveComponent as r, openBlock as e, createBlock as t } from "vue"; +import { _ as s } from "./_plugin-vue_export-helper-CHgC5LLL.js"; +const c = {}; +function n(a, _) { + const o = r("UFPageForgotPassword"); + return e(), t(o); +} +const p = /* @__PURE__ */ s(c, [["render", n]]); +export { + p as default +}; diff --git a/dist/ForgotPasswordView-Do1jt-vY.cjs b/dist/ForgotPasswordView-Do1jt-vY.cjs new file mode 100644 index 0000000..b4df55a --- /dev/null +++ b/dist/ForgotPasswordView-Do1jt-vY.cjs @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),t={};function n(s,_){const o=e.resolveComponent("UFPageForgotPassword");return e.openBlock(),e.createBlock(o)}const c=r._export_sfc(t,[["render",n]]);exports.default=c; diff --git a/dist/LoginView-DgGcaGh5.js b/dist/LoginView-DgGcaGh5.js new file mode 100644 index 0000000..d1c525a --- /dev/null +++ b/dist/LoginView-DgGcaGh5.js @@ -0,0 +1,19 @@ +import { defineComponent as s, resolveComponent as i, openBlock as p, createBlock as u, unref as n } from "vue"; +import { useRouter as a } from "vue-router"; +const d = /* @__PURE__ */ s({ + __name: "LoginView", + setup(m) { + const e = a(); + return (f, o) => { + const r = i("UFPageLogin"); + return p(), u(r, { + onGotoRegistration: o[0] || (o[0] = (t) => n(e).push({ name: "account.register" })), + onGotoForgotPassword: o[1] || (o[1] = (t) => n(e).push({ name: "account.forgot-password" })), + onGotoResendVerification: o[2] || (o[2] = (t) => n(e).push({ name: "account.resend-verification" })) + }); + }; + } +}); +export { + d as default +}; diff --git a/dist/LoginView-DwEVPIza.cjs b/dist/LoginView-DwEVPIza.cjs new file mode 100644 index 0000000..dc9f733 --- /dev/null +++ b/dist/LoginView-DwEVPIza.cjs @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("vue-router"),s=e.defineComponent({__name:"LoginView",setup(i){const n=u.useRouter();return(a,o)=>{const r=e.resolveComponent("UFPageLogin");return e.openBlock(),e.createBlock(r,{onGotoRegistration:o[0]||(o[0]=t=>e.unref(n).push({name:"account.register"})),onGotoForgotPassword:o[1]||(o[1]=t=>e.unref(n).push({name:"account.forgot-password"})),onGotoResendVerification:o[2]||(o[2]=t=>e.unref(n).push({name:"account.resend-verification"}))})}}});exports.default=s; diff --git a/dist/RegisterView-BX7SoD5B.cjs b/dist/RegisterView-BX7SoD5B.cjs new file mode 100644 index 0000000..1260b28 --- /dev/null +++ b/dist/RegisterView-BX7SoD5B.cjs @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("vue-router"),u=e.defineComponent({__name:"RegisterView",setup(s){const t=r.useRouter();return(c,o)=>{const n=e.resolveComponent("UFPageRegister");return e.openBlock(),e.createBlock(n,{onGotoLogin:o[0]||(o[0]=i=>e.unref(t).push({name:"account.login"}))})}}});exports.default=u; diff --git a/dist/RegisterView-D9MTwaNP.js b/dist/RegisterView-D9MTwaNP.js new file mode 100644 index 0000000..ba611ab --- /dev/null +++ b/dist/RegisterView-D9MTwaNP.js @@ -0,0 +1,17 @@ +import { defineComponent as n, resolveComponent as r, openBlock as s, createBlock as p, unref as i } from "vue"; +import { useRouter as m } from "vue-router"; +const f = /* @__PURE__ */ n({ + __name: "RegisterView", + setup(u) { + const o = m(); + return (c, e) => { + const t = r("UFPageRegister"); + return s(), p(t, { + onGotoLogin: e[0] || (e[0] = (a) => i(o).push({ name: "account.login" })) + }); + }; + } +}); +export { + f as default +}; diff --git a/dist/ResendVerificationView-BBUXSJO0.js b/dist/ResendVerificationView-BBUXSJO0.js new file mode 100644 index 0000000..ab4a85f --- /dev/null +++ b/dist/ResendVerificationView-BBUXSJO0.js @@ -0,0 +1,11 @@ +import { resolveComponent as o, openBlock as n, createBlock as c } from "vue"; +import { _ as r } from "./_plugin-vue_export-helper-CHgC5LLL.js"; +const t = {}; +function i(s, a) { + const e = o("UFPageResendVerification"); + return n(), c(e); +} +const m = /* @__PURE__ */ r(t, [["render", i]]); +export { + m as default +}; diff --git a/dist/ResendVerificationView-D4anMPwm.cjs b/dist/ResendVerificationView-D4anMPwm.cjs new file mode 100644 index 0000000..ad510ff --- /dev/null +++ b/dist/ResendVerificationView-D4anMPwm.cjs @@ -0,0 +1 @@ +"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),t={};function r(i,s){const n=e.resolveComponent("UFPageResendVerification");return e.openBlock(),e.createBlock(n)}const c=o._export_sfc(t,[["render",r]]);exports.default=c; diff --git a/dist/_plugin-vue_export-helper-BHFhmbuH.cjs b/dist/_plugin-vue_export-helper-BHFhmbuH.cjs new file mode 100644 index 0000000..dc82924 --- /dev/null +++ b/dist/_plugin-vue_export-helper-BHFhmbuH.cjs @@ -0,0 +1 @@ +"use strict";const e=(t,o)=>{const c=t.__vccOpts||t;for(const[r,s]of o)c[r]=s;return c};exports._export_sfc=e; diff --git a/dist/_plugin-vue_export-helper-CHgC5LLL.js b/dist/_plugin-vue_export-helper-CHgC5LLL.js new file mode 100644 index 0000000..a902fb0 --- /dev/null +++ b/dist/_plugin-vue_export-helper-CHgC5LLL.js @@ -0,0 +1,9 @@ +const s = (t, r) => { + const o = t.__vccOpts || t; + for (const [c, e] of r) + o[c] = e; + return o; +}; +export { + s as _ +}; diff --git a/dist/router/routes.d.ts b/dist/router/routes.d.ts new file mode 100644 index 0000000..33aaaf8 --- /dev/null +++ b/dist/router/routes.d.ts @@ -0,0 +1,13 @@ +declare const routes: { + path: string; + name: string; + meta: { + guest: { + redirect: { + name: string; + }; + }; + }; + component: () => Promise; +}[]; +export default routes; diff --git a/dist/routes.cjs b/dist/routes.cjs new file mode 100644 index 0000000..9161cdc --- /dev/null +++ b/dist/routes.cjs @@ -0,0 +1 @@ +"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=[{path:"/account/sign-in",name:"account.login",meta:{guest:{redirect:{name:"home"}}},component:()=>Promise.resolve().then(()=>require("./LoginView-DwEVPIza.cjs"))},{path:"/account/register",name:"account.register",meta:{guest:{redirect:{name:"home"}}},component:()=>Promise.resolve().then(()=>require("./RegisterView-BX7SoD5B.cjs"))},{path:"/account/forgot-password",name:"account.forgot-password",meta:{guest:{redirect:{name:"home"}}},component:()=>Promise.resolve().then(()=>require("./ForgotPasswordView-Do1jt-vY.cjs"))},{path:"/account/resend-verification",name:"account.resend-verification",meta:{guest:{redirect:{name:"home"}}},component:()=>Promise.resolve().then(()=>require("./ResendVerificationView-D4anMPwm.cjs"))}];exports.default=e; diff --git a/dist/routes.js b/dist/routes.js new file mode 100644 index 0000000..d6bb601 --- /dev/null +++ b/dist/routes.js @@ -0,0 +1,45 @@ +const e = [ + { + path: "/account/sign-in", + name: "account.login", + meta: { + guest: { + redirect: { name: "home" } + } + }, + component: () => import("./LoginView-DgGcaGh5.js") + }, + { + path: "/account/register", + name: "account.register", + meta: { + guest: { + redirect: { name: "home" } + } + }, + component: () => import("./RegisterView-D9MTwaNP.js") + }, + { + path: "/account/forgot-password", + name: "account.forgot-password", + meta: { + guest: { + redirect: { name: "home" } + } + }, + component: () => import("./ForgotPasswordView-Ct0WfO54.js") + }, + { + path: "/account/resend-verification", + name: "account.resend-verification", + meta: { + guest: { + redirect: { name: "home" } + } + }, + component: () => import("./ResendVerificationView-BBUXSJO0.js") + } +]; +export { + e as default +}; diff --git a/dist/views/ForgotPasswordView.vue.d.ts b/dist/views/ForgotPasswordView.vue.d.ts new file mode 100644 index 0000000..2a9e71a --- /dev/null +++ b/dist/views/ForgotPasswordView.vue.d.ts @@ -0,0 +1,2 @@ +declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>; +export default _default; diff --git a/dist/views/LoginView.vue.d.ts b/dist/views/LoginView.vue.d.ts new file mode 100644 index 0000000..2a9e71a --- /dev/null +++ b/dist/views/LoginView.vue.d.ts @@ -0,0 +1,2 @@ +declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>; +export default _default; diff --git a/dist/views/RegisterView.vue.d.ts b/dist/views/RegisterView.vue.d.ts new file mode 100644 index 0000000..2a9e71a --- /dev/null +++ b/dist/views/RegisterView.vue.d.ts @@ -0,0 +1,2 @@ +declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>; +export default _default; diff --git a/dist/views/ResendVerificationView.vue.d.ts b/dist/views/ResendVerificationView.vue.d.ts new file mode 100644 index 0000000..2a9e71a --- /dev/null +++ b/dist/views/ResendVerificationView.vue.d.ts @@ -0,0 +1,2 @@ +declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>; +export default _default; diff --git a/package.json b/package.json index a39df08..9d7328d 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,11 @@ "require": "./dist/guards.cjs", "types": "./dist/guards/authGuard.d.ts" }, + "./routes": { + "import": "./dist/routes.js", + "require": "./dist/routes.cjs", + "types": "./dist/router/routes.d.ts" + }, "./*": "./app/assets/*" }, "files": [ diff --git a/vite.config.ts b/vite.config.ts index 4adc5bd..04f5d26 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -16,7 +16,8 @@ export default defineConfig({ composables: 'app/assets/composables/index.ts', types: 'app/assets/interfaces/index.ts', guards: 'app/assets/guards/authGuard.ts', - stores: 'app/assets/stores/auth.ts' + stores: 'app/assets/stores/auth.ts', + routes: 'app/assets/router/routes.ts' } }, rollupOptions: {