Skip to content

Commit

Permalink
fix(mobile): bottom nav bar state (#3662)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonwoodland committed Jun 16, 2022
1 parent ffa4a71 commit 60fabb3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions components/views/navigation/mobile/nav/Nav.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<div id="mobile-nav">
<div>
<home-icon size="1x" v-on:click="navigateToHome" />
<home-icon size="1x" @click="navigateToHome" />
</div>
<div
:class="`${$route.path.includes('/files') ? 'active' : ''}`"
data-cy="mobile-nav-files"
>
<folder-icon size="1x" v-on:click="() => $router.push('/files/browse')" />
<folder-icon size="1x" @click="navigateToFiles" />
</div>
<div data-cy="mobile-nav-marketplace">
<shopping-bag-icon size="1x" @click="toggleModal" />
</div>
<div :class="`${$route.path.includes('/friends') ? 'active' : ''}`">
<users-icon size="1x" v-on:click="navigateToFriend" />
<users-icon size="1x" @click="navigateToFriend" />
</div>
<div
:class="`${$route.path.includes('/settings') ? 'active' : ''}`"
data-cy="mobile-nav-settings"
>
<div v-on:click="$store.commit('ui/toggleSettings', { show: true })">
<div @click="$store.commit('ui/toggleSettings', { show: true })">
<UiUserState
:user="{address: accounts.active, state: accounts.details.state}"
:src="src"
Expand Down
6 changes: 4 additions & 2 deletions components/views/navigation/mobile/nav/Nav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ export default Vue.extend({
* @description Navigate to chat "/chat/direct" without specific user
*/
navigateToHome() {
this.$store.commit('ui/showSidebar', true)
this.$store.commit('ui/setSwiperSlideIndex', 0)
this.$store.commit('ui/setSwiperSlideIndex', 1)
this.$router.push('/chat/direct')
},
/**
Expand All @@ -54,6 +53,9 @@ export default Vue.extend({
this.$store.commit('ui/showSidebar', false)
this.$router.push('/friends/list')
},
navigateToFiles() {
this.$router.push('/files/browse')
},
},
})
</script>
Expand Down

0 comments on commit 60fabb3

Please sign in to comment.