Skip to content

Commit

Permalink
feat(intelligence-next): changes router home to intelligence-next
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiantela committed May 29, 2024
1 parent 78c14e5 commit 9a25afe
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 45 deletions.
4 changes: 1 addition & 3 deletions src/components/TutorialModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,7 @@ export default {
if (target === 'home' || target === 'new') {
if (target === 'home') return;
this.setTutorialActive(name);
this.$router.push({
name: 'home',
});
this.$router.push('/home');
this.closeTutorialMenu();
} else if (
Object.keys(this.finished).includes(previous) ||
Expand Down
4 changes: 1 addition & 3 deletions src/components/payment/PaymentOptions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ export default {
},
methods: {
goToHome() {
this.$router.push({
name: 'home',
});
this.$router.push('/home');
},
goToPayment() {
this.$router.push({
Expand Down
12 changes: 8 additions & 4 deletions src/components/repository/sidebar/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -599,10 +599,14 @@ export default {
path !== this.$router.currentRoute.name ||
path === 'repository-settings'
) {
this.$router.push({
name: `${path}`,
...opts,
});
if (path === 'home') {
this.$router.push('/home');
} else {
this.$router.push({
name: `${path}`,
...opts,
});
}
}
},
setInitialSelectedMenu() {
Expand Down
5 changes: 0 additions & 5 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,6 @@ const router = new Router({
}
},
},
{
path: '/home',
name: 'home',
component: Home,
},
{
path: '/new/',
name: 'new',
Expand Down
15 changes: 5 additions & 10 deletions src/views/CreateRepository.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="create-repository">
<create-repository-form/>
<CreateRepositoryForm />
</div>
</template>

Expand All @@ -14,22 +14,18 @@ export default {
CreateRepositoryForm,
},
computed: {
...mapGetters([
'authenticated',
]),
...mapGetters(['authenticated']),
},
mounted() {
this.checkIsAuthenticated();
},
methods: {
checkIsAuthenticated() {
if (!this.authenticated) {
this.$router.push({
name: 'home'
});
this.$router.push('/home');
}
}
}
},
},
};
</script>

Expand All @@ -38,5 +34,4 @@ export default {
height: 100vh;
width: 100%;
}
</style>
8 changes: 2 additions & 6 deletions src/views/LandingPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@ export default {
},
watch: {
authenticated() {
this.$router.push({
name: 'home',
});
this.$router.push('/home');
},
},
mounted() {
Expand All @@ -141,9 +139,7 @@ export default {
},
methods: {
showAllBots() {
this.$router.push({
name: 'home',
});
this.$router.push('/home');
},
signIn() {
this.$router.push({
Expand Down
4 changes: 1 addition & 3 deletions src/views/auth/RecoverPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ export default {
},
methods: {
onAuthenticated() {
this.$router.push({
name: 'home',
});
this.$router.push('/home');
},
},
};
Expand Down
4 changes: 1 addition & 3 deletions src/views/auth/SignIn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ export default {
},
methods: {
onAuthenticated() {
this.$router.push({
name: 'home',
});
this.$router.push('/home');
},
goToCreate() {
this.$router.push({
Expand Down
17 changes: 10 additions & 7 deletions src/views/auth/SignUp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,16 @@ export default {
},
watch: {
authenticated() {
this.$router.push({
name:
this.authenticated &&
runtimeVariables.get('VUE_APP_BOTHUB_WEBAPP_PAYMENT_ENABLED')
? 'payment-options'
: 'home',
});
if (
this.authenticated &&
runtimeVariables.get('VUE_APP_BOTHUB_WEBAPP_PAYMENT_ENABLED')
) {
this.$router.push({
name: 'payment-options',
});
} else {
this.$router.push('/home');
}
},
},
mounted() {
Expand Down
2 changes: 1 addition & 1 deletion src/views/repository/content/Bases.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
type="tertiary"
iconCenter="arrow_left_alt"
scheme="neutral-dark"
@click="$router.push({ name: 'home' })"
@click="$router.push('/home')"
/>

<UnnnicSkeletonLoading
Expand Down

0 comments on commit 9a25afe

Please sign in to comment.