Skip to content

Commit

Permalink
update(SettingsModal): updated settings modal's appearances and toggl…
Browse files Browse the repository at this point in the history
…e,swipe actions in mobile (#134)

* feat(ProfilePageRedux): added new profile mockup

* feat(ButtonGroup): moved marketplace's buttongroup to components and updated it

* updated(search & chatbar): disabled calendar's month picker and enabled deletion of command

* updated(ProfilePageRedux): added extra spacing styles and updated badge data

* update(ProfilePageRedux): changed style name

* feat(UserSearch&AddFriends): added user search component and friends functions

* updated(ButtonGroup): reflected initial active status

* feat(Audio Constraints): added function to change audio constraints

* updated(SettingsModal): updated mobile appearance and actions

Co-authored-by: Matt Wisniewski <retropronghorn@gmail.com>
  • Loading branch information
nickjjang and Matt Wisniewski committed Sep 11, 2021
1 parent 8fd06be commit f4feab7
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 59 deletions.
2 changes: 1 addition & 1 deletion components/tailored/settings/modal/Modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div id="settings"
:class="`with-sidebar ${sidebar ? 'is-open' : 'is-collapsed'}`"
>
<div class="sidebar is-secondary-background">
<div class="sidebar is-secondary-background" v-touch:swipe.left="collapseSidebar" v-touch:swipe.right="showSidebar">
<UiScroll verticalScroll>
<TailoredSettingsSidebar
:title="$t('global.settings')"
Expand Down
62 changes: 7 additions & 55 deletions components/tailored/settings/modal/Modal.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#app-wrap {
#app.mobile-app {
height: calc(100vh - @mobile-nav-size);
Expand Down Expand Up @@ -32,14 +31,15 @@ p {
.with-sidebar {
display: flex;
flex-wrap: wrap;
flex-direction: row;
height: 100vh;
overflow: hidden;
}

.sidebar {
flex-basis: 18rem;
flex-grow: 1;
height: 100vh;
height: 100%;
transition: @transition-all;
position: relative;

Expand All @@ -60,7 +60,7 @@ p {
white-space: pre-line;
flex-basis: 0;
flex-grow: 999;
height: 100vh;
height: 100%;
font-size: @text-size;
transition: @transition-all;
.title, .subtitle {
Expand Down Expand Up @@ -97,38 +97,11 @@ p {
}
}

@media only screen and (max-width: 768px) {
@mobile-sidebar-width: 100vw;
.sidebar {
flex-basis: @mobile-sidebar-width;
}
.not-sidebar {
padding: 1rem 0;
width: 100vw;
overflow-x: hidden;
transform: translateX(calc(@mobile-sidebar-width + 3rem));
}
.is-collapsed {
.sidebar {
transform: translateX(calc(-@mobile-sidebar-width + 3rem));

.menu {
pointer-events: none;
}
}
.not-sidebar {
transform: translateX(0);
margin-left: calc(-@mobile-sidebar-width + 3rem);
}
}
}

#app-wrap {
#settings {
height: 80vh;
width: 80vw;
display: flex;
flex-direction: column;
overflow: hidden;
border-radius: @corner-rounding;

Expand Down Expand Up @@ -209,31 +182,10 @@ p {
filter: @primary-text-glow;
}
}
}
}

@media only screen and (max-width: 768px) {
@mobile-sidebar-width: 100vw;
.sidebar {
flex-basis: @mobile-sidebar-width;
}
.not-sidebar {
padding: 1rem 0;
width: 100vw;
overflow-x: hidden;
transform: translateX(calc(@mobile-sidebar-width + 3rem));
}
.is-collapsed {
.sidebar {
transform: translateX(calc(-@mobile-sidebar-width + 3rem));

.menu {
pointer-events: none;
}
}
.not-sidebar {
transform: translateX(0);
margin-left: calc(-@mobile-sidebar-width + 3rem);

@media only screen and (max-width: 768px) {
width: 100%;
height: 100%;
}
}
}
Expand Down
9 changes: 9 additions & 0 deletions components/tailored/settings/modal/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,17 @@ export default Vue.extend({
toggleSidebar() {
this.$data.sidebar = !this.$data.sidebar
},
showSidebar() {
this.$data.sidebar = true
},
collapseSidebar() {
this.$data.sidebar = false
},
changeRoute(route: string) {
this.$data.page = route
if (this.$device.isMobile) {
this.collapseSidebar()
}
},
closeModal() {
this.$store.commit('toggleSettings', false)
Expand Down
1 change: 0 additions & 1 deletion components/ui/AsideMenu/AsideMenu.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
position: relative;
-webkit-user-drag: none;
user-select: none;
height: calc(100vh - @mobile-nav-size);

.menu-list {
margin-bottom: @normal-spacing;
Expand Down
2 changes: 1 addition & 1 deletion mock/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
export const profileBadges = [
{
type: ProfileBadgeType.Type1,
badge: { color: 'red', icon: ['fas', 'id-badge'] },
badge: { color: 'red', icon: ['far', 'id-badge'] },
},
{
type: ProfileBadgeType.Type2,
Expand Down
6 changes: 6 additions & 0 deletions plugins/thirdparty/fontawesome.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import {
faHeart as faHeartFull,
faShoppingBag as faShoppingBagFull,
faShoppingCart,
faRibbon,
faCertificate,
faOtter,
} from '@fortawesome/free-solid-svg-icons'

import * as fal from '@fortawesome/pro-light-svg-icons'
Expand Down Expand Up @@ -174,6 +177,9 @@ library.add(faCrown)
library.add(faEllipsisH)
library.add(faInfoCircle)
library.add(faIdBadge)
library.add(faRibbon)
library.add(faCertificate)
library.add(faOtter)
library.add(faClock)

Vue.component('FontAwesomeIcon', FontAwesomeIcon)
2 changes: 1 addition & 1 deletion store/accounts/state.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AccountsState, RegistrationStatus } from './types'

const InitalAccountsState = (): AccountsState => ({
locked: true,
locked: false,
error: '',
pinHash: '',
active: '',
Expand Down

0 comments on commit f4feab7

Please sign in to comment.