Skip to content

Commit

Permalink
fix(mobile): settings swiper flow (#3715)
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmcg authored and JustZacca committed Jun 22, 2022
1 parent 0e47133 commit 22d5f98
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
7 changes: 1 addition & 6 deletions components/interactables/AsideMenu/AsideMenu.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<div class="aside-menu hidden-scroll" v-scroll-lock="true">
<menu-icon
size="1.5x"
v-if="toggleable"
v-on:click="toggle"
class="menu-toggle"
/>
<InteractablesClose v-if="$device.isMobile" :action="closeModal" />
<aside class="menu">
<div v-for="group in menuContent">
<p class="menu-label">{{ group.title }}</p>
Expand Down
2 changes: 1 addition & 1 deletion components/interactables/AsideMenu/AsideMenu.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
margin-bottom: @normal-spacing;
}

.menu-toggle {
.close-button {
position: absolute;
right: 2rem;
top: 2.4rem;
Expand Down
19 changes: 15 additions & 4 deletions components/interactables/AsideMenu/AsideMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ export default Vue.extend({
type: String,
default: '',
},
/**
* Should we include the aside menu toggle icon
*/
toggleable: Boolean,
/**
* Callable method or function emitted when the menu is toggled
*/
Expand Down Expand Up @@ -51,6 +47,21 @@ export default Vue.extend({
default: () => () => {},
},
},
mounted() {
if (this.$device.isMobile) {
this.$store.commit('ui/setSettingsRoute', '')
}
},
methods: {
/**
* @method closeModal DocsTODO
* @description
* @example
*/
closeModal() {
this.$store.commit('ui/toggleSettings', { show: false })
},
},
})
</script>

Expand Down
2 changes: 0 additions & 2 deletions components/views/settings/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<InteractablesAsideMenu
:menu-content="sidebarLayout"
:title="title"
:toggleable="toggleable"
:toggle="toggle"
:active="ui.settingsRoute"
custom
Expand All @@ -17,7 +16,6 @@ import { SettingsRoutes } from '~/store/ui/types'
export default Vue.extend({
props: {
toggleable: Boolean,
toggle: {
type: Function,
default: () => {},
Expand Down
1 change: 0 additions & 1 deletion components/views/settings/modal/Modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<UiSimpleScroll scrollMode="vertical" scrollShow="scroll">
<SettingsSidebar
:title="$t('pages.settings.settings')"
:toggleable="$device.isMobile"
:toggle="toggleSidebar"
:handleRouteChange="changeRoute"
/>
Expand Down
3 changes: 0 additions & 3 deletions components/views/settings/modal/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ export default Vue.extend({
})
},
},
mounted() {
this.showSidebar(this.$device.isMobile)
},
methods: {
/**
* Opens and closes the left hand sidebar
Expand Down

0 comments on commit 22d5f98

Please sign in to comment.