aboutsummaryrefslogtreecommitdiff
path: root/src/App.js
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2018-12-31 17:35:31 +0000
committerShpuld Shpludson <shp@cock.li>2018-12-31 17:35:31 +0000
commit76cfb15b3c76531b7c3da0261720d13004c8cfdd (patch)
tree12d63c530bc9080c8d7449a5f393d0549355b288 /src/App.js
parent7aa42c01eb5f05c2e3ed71fc52be6a30e45802bf (diff)
parentace042015e77e507d6323c493596943dd8c657bb (diff)
Merge branch 'feature/replace-panel-switcher' into 'develop'
Mobile side drawer See merge request pleroma/pleroma-fe!443
Diffstat (limited to 'src/App.js')
-rw-r--r--src/App.js19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/App.js b/src/App.js
index 4f3fd798..85df9416 100644
--- a/src/App.js
+++ b/src/App.js
@@ -6,6 +6,8 @@ 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'
+import { unseenNotificationsFromStore } from './services/notification_utils/notification_utils'
export default {
name: 'app',
@@ -17,7 +19,8 @@ export default {
InstanceSpecificPanel,
FeaturesPanel,
WhoToFollowPanel,
- ChatPanel
+ ChatPanel,
+ SideDrawer
},
data: () => ({
mobileActivePanel: 'timeline',
@@ -70,12 +73,15 @@ export default {
sitename () { return this.$store.state.instance.name },
chat () { return this.$store.state.chat.channel.state === 'joined' },
suggestionsEnabled () { return this.$store.state.instance.suggestionsEnabled },
- showInstanceSpecificPanel () { return this.$store.state.instance.showInstanceSpecificPanel }
+ showInstanceSpecificPanel () { return this.$store.state.instance.showInstanceSpecificPanel },
+ unseenNotifications () {
+ return unseenNotificationsFromStore(this.$store)
+ },
+ unseenNotificationsCount () {
+ return this.unseenNotifications.length
+ }
},
methods: {
- activatePanel (panelName) {
- this.mobileActivePanel = panelName
- },
scrollToTop () {
window.scrollTo(0, 0)
},
@@ -85,6 +91,9 @@ export default {
},
onFinderToggled (hidden) {
this.finderHidden = hidden
+ },
+ toggleMobileSidebar () {
+ this.$refs.sideDrawer.toggleDrawer()
}
}
}