From 74e5443f21d3c5131dc02db8c89d3ec11ef43b33 Mon Sep 17 00:00:00 2001 From: Giovane Cardoso Date: Sat, 21 May 2022 02:54:01 -0300 Subject: [PATCH] fix(router): dynamic auth redirect --- .../src/components/page/landing/AuthMain.vue | 7 ++++++- .../better-write-app/src/components/utils/Logo.vue | 2 +- packages/better-write-app/src/pages/Landing.vue | 11 ++++------- packages/better-write-app/src/use/editor.ts | 8 +++++--- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/packages/better-write-app/src/components/page/landing/AuthMain.vue b/packages/better-write-app/src/components/page/landing/AuthMain.vue index db6d5322d..ba1b5cd93 100644 --- a/packages/better-write-app/src/components/page/landing/AuthMain.vue +++ b/packages/better-write-app/src/components/page/landing/AuthMain.vue @@ -3,8 +3,12 @@ v-motion :initial="{ opacity: 0, y: 50 }" :enter="{ opacity: 1, y: 0, transition: { delay: 0 } }" - class="flex items-center flex-col w-full md:w-1/3 bg-black-opacity shadow-lg p-5" + class="flex items-center flex-col w-full md:w-3/5 xl:w-1/3 bg-black-opacity shadow-lg p-5" > + (false) const user = reactive({ diff --git a/packages/better-write-app/src/components/utils/Logo.vue b/packages/better-write-app/src/components/utils/Logo.vue index ec8a23480..6879b73df 100644 --- a/packages/better-write-app/src/components/utils/Logo.vue +++ b/packages/better-write-app/src/components/utils/Logo.vue @@ -59,7 +59,7 @@ const onClick = () => { if (props.hidden) return - local.onSaveProject().then(() => { + local.onSaveProject(false).then(() => { props.back ? router.back() : router.push('/landing') }) } diff --git a/packages/better-write-app/src/pages/Landing.vue b/packages/better-write-app/src/pages/Landing.vue index a18e83f38..5e0f8793a 100644 --- a/packages/better-write-app/src/pages/Landing.vue +++ b/packages/better-write-app/src/pages/Landing.vue @@ -57,7 +57,9 @@ class="flex text-gray-200 items-center text-lg rounded-full gap-2 transition-colors bg-gradient-to-br from-gray-300 to-gray-400 hover:from-gray-400 hover:to-gray-300 text-black px-7 py-3.5 md:(px-8 py-4) shadow-xl transition-colors font-bold" @click.prevent.stop="router.push('/about')" > - {{ t('landing.first.editor.about') }} +