Skip to content

Commit

Permalink
refactor(utils): screen loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Novout committed Apr 25, 2023
1 parent 5562bf0 commit b8d665e
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
20 changes: 20 additions & 0 deletions packages/app/src/components/utils/LoadingScreen.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<template>
<div
class="flex justify-center items-center h-screen w-full z-umax"
:style="{ backgroundColor: '#1e293b' }"
>
<img
class="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 shadow-lg rounded-xs w-32 md:w-60 opacity-30"
alt="Better Write Logo"
src="/logo_default.svg"
/>
<p class="md:text-2xl text-lg font-raleway animate-pulse absolute top-1/5 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-full text-center">{{ t('landing.loading') }}</p>
<Spinner :width="100" :height="100" />
</div>
</template>

<script setup lang="ts">
import { useI18n } from "vue-i18n";
const { t } = useI18n()
</script>
13 changes: 1 addition & 12 deletions packages/app/src/pages/Landing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,7 @@
</div>
<AuthMain v-else @close="isNecessaryLogin = false" />
</div>
<div
v-else
class="flex justify-center items-center h-screen w-full z-umax"
:style="{ backgroundColor: '#1e293b' }"
>
<img
class="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 shadow-lg rounded-xs w-32 md:w-60 opacity-30"
alt="Better Write Logo"
src="/logo_default.svg"
/>
<Spinner :width="100" :height="100" />
</div>
<LoadingScreen v-else />
</section>
</main>
</template>
Expand Down
1 change: 1 addition & 0 deletions packages/languages/src/en-US/landing.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export default {
loading: 'It may take a few seconds...',
auth: {
email: 'Enter a valid email!',
emailPlaceholder: 'Email...',
Expand Down
1 change: 1 addition & 0 deletions packages/languages/src/pt-BR/landing.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export default {
loading: 'Pode demorar alguns segundos...',
auth: {
email: 'Insira um email válido!',
emailPlaceholder: 'Email...',
Expand Down

0 comments on commit b8d665e

Please sign in to comment.