Skip to content

Commit b347a77

Browse files
committed
feat: initial account implementation
1 parent 3b4b788 commit b347a77

File tree

5 files changed

+92
-7
lines changed

5 files changed

+92
-7
lines changed

packages/app/src/pages/Account.vue

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<template>
2+
<main class="wb-screen w-full flex flex-row justify-center flex-wrap gap-20 items-center bg-theme-background-2">
3+
<section class="flex text-white justify-around items-center flex-col gap-5 w-80 h-140 rounded-xl bg-theme-background-4">
4+
<h2 class="font-bold text-3xl">{{ t('account.common.title') }}</h2>
5+
<h3 class="font-bold text-3xl">{{ t('account.common.price') }}</h3>
6+
<p class="font-raleway text-lg text-center">{{ t('account.common.description') }}</p>
7+
<Button @click="onCreateAccount('common')">{{ t('account.common.enter') }}</Button>
8+
</section>
9+
<section class="flex text-white justify-around items-center flex-col gap-5 w-80 h-140 rounded-xl bg-theme-background-3">
10+
<h2 class="font-bold text-3xl">{{ t('account.adventure.title') }}</h2>
11+
<h3 class="font-bold text-3xl">{{ t('account.adventure.price') }}</h3>
12+
<p class="font-raleway text-lg text-center">{{ t('account.adventure.description') }}</p>
13+
<Button @click="onCreateAccount('adventure')">{{ t('account.adventure.enter') }}</Button>
14+
</section>
15+
<section class="flex text-white justify-around items-center flex-col gap-5 w-80 h-140 rounded-xl bg-theme-background-1">
16+
<h2 class="font-bold text-3xl">{{ t('account.force.title') }}</h2>
17+
<h3 class="font-bold text-3xl">{{ t('account.force.price') }}</h3>
18+
<p class="font-raleway text-lg text-center">{{ t('account.force.description') }}</p>
19+
<Button @click="onCreateAccount('force')">{{ t('account.force.enter') }}</Button>
20+
</section>
21+
</main>
22+
</template>
23+
24+
<script setup lang="ts">
25+
import { tryOnMounted } from '@vueuse/core'
26+
import { usePlugin } from 'better-write-plugin-core'
27+
import { useI18n } from 'vue-i18n'
28+
29+
const plugin = usePlugin()
30+
const { t } = useI18n()
31+
32+
// TODO: images in background
33+
tryOnMounted(async () => {
34+
plugin.emit('plugin-theme-set', 'BetterWrite - Dark')
35+
})
36+
37+
const onCreateAccount = (type: 'common' | 'adventure' | 'force') => {
38+
plugin.emit('plugin-backend-register-user', type)
39+
}
40+
</script>

packages/app/src/routes.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ export const routes = [
99
path: '/landing',
1010
component: () => import('@/pages/Landing.vue'),
1111
},
12+
{
13+
name: 'Account',
14+
path: '/account',
15+
component: () => import('@/pages/Account.vue'),
16+
},
1217
{
1318
name: 'About',
1419
path: '/about',

packages/app/src/use/landing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const useLanding = () => {
3939

4040
localStorage.setItem('visited', 'visited')
4141

42-
router.push('/').finally(() => {
42+
router.push('/account').finally(() => {
4343
// for common reactivity in other routes
4444
document.body.style.overflowX = 'auto'
4545

packages/languages/src/en-US.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,26 @@ export default {
55
password: 'Password...',
66
start: 'Log in'
77
},
8+
account: {
9+
common: {
10+
title: 'Common',
11+
price: 'Free',
12+
description: 'Use the default application.',
13+
enter: 'Enter',
14+
},
15+
adventure: {
16+
title: 'Adventure',
17+
price: '5 / Mes',
18+
description: 'Venturing into a larger storage capacity.',
19+
enter: 'Enter',
20+
},
21+
force: {
22+
title: 'Force',
23+
price: '20/Mes',
24+
description: 'Extensive cloud saving capabilities and direct support!',
25+
enter: 'Enter',
26+
},
27+
},
828
editor: {
929
new: {
1030
title: 'New Project',

packages/languages/src/pt-BR.ts

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,31 @@
11
export default {
2-
editor: {
3-
backend: {
4-
title: 'Entre ou crie sua conta!',
5-
email: 'Email...',
6-
password: 'Senha...',
7-
start: 'Entrar'
2+
account: {
3+
common: {
4+
title: 'Simples',
5+
price: 'Gratuito',
6+
description: 'Use a aplicação padrão.',
7+
enter: 'Escolher',
8+
},
9+
adventure: {
10+
title: 'Aventureiro',
11+
price: '5 / Mes',
12+
description: 'Se aventure em uma capacidade maior de armazenamento.',
13+
enter: 'Escolher',
14+
},
15+
force: {
16+
title: 'Força Maior',
17+
price: '20/Mes',
18+
description: 'Uma vasta capacidade de salvamento na nuvem e suporte direto!',
19+
enter: 'Escolher',
820
},
21+
},
22+
backend: {
23+
title: 'Entre ou crie sua conta!',
24+
email: 'Email...',
25+
password: 'Senha...',
26+
start: 'Entrar'
27+
},
28+
editor: {
929
new: {
1030
title: 'Novo Projeto',
1131
description1: 'O ',

0 commit comments

Comments
 (0)