From bd2ed617a740ef3b37dedf3bed608e433dc0ec09 Mon Sep 17 00:00:00 2001 From: shpuld Date: Sat, 15 Dec 2018 19:13:01 +0200 Subject: Remove panel switcher, add rudimentary drawer --- src/App.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/App.js') diff --git a/src/App.js b/src/App.js index 4f3fd798..e4ffb85a 100644 --- a/src/App.js +++ b/src/App.js @@ -6,6 +6,7 @@ import InstanceSpecificPanel from './components/instance_specific_panel/instance import FeaturesPanel from './components/features_panel/features_panel.vue' import WhoToFollowPanel from './components/who_to_follow_panel/who_to_follow_panel.vue' import ChatPanel from './components/chat_panel/chat_panel.vue' +import SideDrawer from './components/side_drawer/side_drawer.vue' export default { name: 'app', @@ -17,7 +18,8 @@ export default { InstanceSpecificPanel, FeaturesPanel, WhoToFollowPanel, - ChatPanel + ChatPanel, + SideDrawer }, data: () => ({ mobileActivePanel: 'timeline', @@ -28,7 +30,13 @@ export default { window.CSS.supports('-moz-mask-size', 'contain') || window.CSS.supports('-ms-mask-size', 'contain') || window.CSS.supports('-o-mask-size', 'contain') - ) + ), + mobileViews: { + postStatus: 'poststatus', + notifications: 'notifications', + timeline: 'timeline' + }, + showMobileSidebar: false }), created () { // Load the locale from the storage @@ -67,6 +75,9 @@ export default { 'background-image': `url(${this.background})` } }, + mobileShowOnlyIn () { + return view => ({ 'mobile-hidden': this.mobileActivePanel !== view }) + }, sitename () { return this.$store.state.instance.name }, chat () { return this.$store.state.chat.channel.state === 'joined' }, suggestionsEnabled () { return this.$store.state.instance.suggestionsEnabled }, @@ -85,6 +96,9 @@ export default { }, onFinderToggled (hidden) { this.finderHidden = hidden + }, + toggleMobileSidebar () { + this.showMobileSidebar = !this.showMobileSidebar } } } -- cgit v1.2.3-70-g09d2 From e46b560ead02ab5d9df8edbb997c56b835aa21d4 Mon Sep 17 00:00:00 2001 From: shpuld Date: Sun, 23 Dec 2018 19:50:19 +0200 Subject: move closing logic to drawer, add swipe to close --- src/App.js | 5 +-- src/App.vue | 14 ++----- src/components/side_drawer/side_drawer.js | 32 ++++++++++---- src/components/side_drawer/side_drawer.vue | 67 ++++++++++++++++-------------- src/components/user_finder/user_finder.vue | 22 +++++----- 5 files changed, 78 insertions(+), 62 deletions(-) (limited to 'src/App.js') diff --git a/src/App.js b/src/App.js index 728c8e54..68fae50e 100644 --- a/src/App.js +++ b/src/App.js @@ -30,8 +30,7 @@ export default { window.CSS.supports('-moz-mask-size', 'contain') || window.CSS.supports('-ms-mask-size', 'contain') || window.CSS.supports('-o-mask-size', 'contain') - ), - showMobileSidebar: false + ) }), created () { // Load the locale from the storage @@ -93,7 +92,7 @@ export default { this.finderHidden = hidden }, toggleMobileSidebar () { - this.showMobileSidebar = !this.showMobileSidebar + this.$refs.sideDrawer.toggleDrawer() } } } diff --git a/src/App.vue b/src/App.vue index 55cac52c..59398a34 100644 --- a/src/App.vue +++ b/src/App.vue @@ -14,9 +14,9 @@
- - - + + +
@@ -25,17 +25,11 @@
-