Skip to content

Commit

Permalink
feat: rename /home to /index and purge site
Browse files Browse the repository at this point in the history
  • Loading branch information
1Mateus committed Dec 22, 2023
1 parent e5b4b61 commit 54ce0fb
Show file tree
Hide file tree
Showing 17 changed files with 47 additions and 117 deletions.
2 changes: 1 addition & 1 deletion front/components/Auth/steps/Recovery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const splited = computed(() => {
const recovery = async () => {
await wallet.connect(data.phrase)
router.push((route.query as any).next || '/home')
router.push((route.query as any).next || '/')
}
const toPaste = async () => {
Expand Down
2 changes: 1 addition & 1 deletion front/components/Auth/steps/Verify.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const create = async () => {
await wallet.connect(props.mnemonic)
router.push((route.query as any).next || '/home')
router.push((route.query as any).next || '/')
}
const isDisabled = computed(() => {
Expand Down
2 changes: 1 addition & 1 deletion front/components/Faucet/steps/Nft.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const pay = async () => {
await provider.value.sendNFTFaucetTransaciton(id, manifest)
isLoading.value = true
router.push('/home')
router.push('/')
} catch (e) {
console.warn(e)
} finally {
Expand Down
2 changes: 1 addition & 1 deletion front/components/Faucet/steps/Token.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const pay = async () => {
await provider.value.sendTokenFaucetTransaction(data.token)
isLoading.value = true
router.push('/home')
router.push('/')
} catch (e) {
console.warn(e)
} finally {
Expand Down
2 changes: 1 addition & 1 deletion front/components/Invoice/NFT/steps/Success.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class="
</div>

<UIButtonInline
@click.prevent="router.push('/home')"
@click.prevent="router.push('/')"
label="Create or go to your Opact Wallet"
/>
</UICardBody>
Expand Down
2 changes: 1 addition & 1 deletion front/components/Invoice/Token/steps/Success.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const router = useRouter()
</div>

<UIButtonInline
@click.prevent="router.push('/home')"
@click.prevent="router.push('/')"
label="Create or go to your Opact Wallet"
/>
</UICardBody>
Expand Down
2 changes: 1 addition & 1 deletion front/components/layout/GenericTopbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ withDefaults(

<UIButtonIcon
icon="chevronLeft"
@click.prevent="router.push('/home')"
@click.prevent="router.push('/')"
class="absolute left-0 top-1/2 -translate-y-1/2"
/>

Expand Down
2 changes: 1 addition & 1 deletion front/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const router = useRouter()
lg:flex
"
>
<button @click.prevent="router.push('/home')">
<button @click.prevent="router.push('/')">
<Icon
name="logo"
class="text-white w-[163px] h-[32px]"
Expand Down
4 changes: 2 additions & 2 deletions front/middleware/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default defineNuxtRouteMiddleware((to) => {
appConfig.public.nftDisabled
) {
return router.push({
path: '/home'
path: '/'
})
}

Expand All @@ -21,7 +21,7 @@ export default defineNuxtRouteMiddleware((to) => {
appConfig.public.faucetDisabled
) {
return router.push({
path: '/home'
path: '/'
})
}

Expand Down
2 changes: 1 addition & 1 deletion front/middleware/guest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineNuxtRouteMiddleware(() => {
(wallet.cache && wallet.cache.phrase)
) {
return router.push({
path: '/home'
path: '/'
})
}
})
5 changes: 1 addition & 4 deletions front/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,8 @@ export default defineNuxtConfig({
}
},
routeRules: {
'/': { prerender: true },
'/wallet': { prerender: true },
'/tickets': { prerender: true },
'/auth': { prerender: false },
'/home': { prerender: false },
'/': { prerender: false },
'/faucet': { prerender: false },
'/history': { prerender: false },
'/invoice': { prerender: false },
Expand Down
48 changes: 0 additions & 48 deletions front/pages/home.vue

This file was deleted.

41 changes: 33 additions & 8 deletions front/pages/index.vue
Original file line number Diff line number Diff line change
@@ -1,23 +1,48 @@
<script setup lang="ts">
definePageMeta({
layout: 'site'
layout: 'app',
middleware: 'auth'
})
useHead({
title: 'Opact'
title: 'Home'
})
</script>

<template>
<div>
<PagesHomeHero />
<LayoutMobileTopbar />

<PagesHomeTickets />
<div
class="
lg:w-full
h-full
pt-6
lg:pt-0
lg:gap-6
lg:grid
lg:grid-cols-[minmax(auto,_698px)_400px]
lg:grid-rows-[141px_1fr]
lg:justify-center
"
>
<HomeWidgetTokens />

<PagesHomeWalletOpact />
<HomeWidgetActions />

<PagesHomeZK />

<!-- <PagesHomeContact /> -->
<HomeWidgetHistory />
</div>
</div>
</template>

<style>
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.2s ease;
}
.fade-enter-from,
.fade-leave-to {
opacity: 0;
}
</style>
23 changes: 0 additions & 23 deletions front/pages/tickets.vue

This file was deleted.

21 changes: 0 additions & 21 deletions front/pages/wallet.vue

This file was deleted.

2 changes: 1 addition & 1 deletion front/stores/receive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ export const useReceiveStore = defineStore({

app.initApp(wallet)

router.push('/home')
router.push('/')

this.reset()
}
Expand Down
2 changes: 1 addition & 1 deletion front/stores/send.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ export const useSendStore = defineStore({

app.initApp(wallet)

router.push('/home')
router.push('/')
}
}
})

0 comments on commit 54ce0fb

Please sign in to comment.