aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshpuld <shp@cock.li>2019-03-14 20:40:56 +0200
committershpuld <shp@cock.li>2019-03-14 20:40:56 +0200
commit0a86d39ba9cf48fc0b4fb6d91b0d5eff404b2a66 (patch)
treeab1c22d44b7c62bdedbd59d61b7daef4f6cfe8ba
parentf19284357e94968cdc9d4034c5e33ef9d6f6d9d7 (diff)
remove notifications from sidebar, make notifications appear on login only
-rw-r--r--src/components/mobile_nav/mobile_nav.js3
-rw-r--r--src/components/mobile_nav/mobile_nav.vue6
-rw-r--r--src/components/side_drawer/side_drawer.vue5
3 files changed, 6 insertions, 8 deletions
diff --git a/src/components/mobile_nav/mobile_nav.js b/src/components/mobile_nav/mobile_nav.js
index 88fab656..fd373ac1 100644
--- a/src/components/mobile_nav/mobile_nav.js
+++ b/src/components/mobile_nav/mobile_nav.js
@@ -13,6 +13,9 @@ const MobileNav = {
notificationsOpen: false
}),
computed: {
+ currentUser () {
+ return this.$store.state.users.currentUser
+ },
unseenNotifications () {
return unseenNotificationsFromStore(this.$store)
},
diff --git a/src/components/mobile_nav/mobile_nav.vue b/src/components/mobile_nav/mobile_nav.vue
index af2d6d5a..cb1aaa46 100644
--- a/src/components/mobile_nav/mobile_nav.vue
+++ b/src/components/mobile_nav/mobile_nav.vue
@@ -8,18 +8,18 @@
<router-link class="site-name" :to="{ name: 'root' }" active-class="home">{{sitename}}</router-link>
</div>
<div class='item right'>
- <a href="#" class="menu-button" @click.stop.prevent="toggleMobileNotifications()">
+ <a v-if="currentUser" href="#" class="menu-button" @click.stop.prevent="toggleMobileNotifications()">
<i class="button-icon icon-bell-alt"></i>
<div class="alert-dot" v-if="unseenNotificationsCount"></div>
</a>
</div>
<div class="mobile-notifications-header">
- <span>Notifications</span>
+ <span>{{$t('notifications.notifications')}}</span>
<i class="icon-cancel" @click.stop.prevent="toggleMobileNotifications()"/>
</div>
</div>
<SideDrawer ref="sideDrawer" :logout="logout"/>
- <div class="mobile-notifications" :class="{ 'closed': !notificationsOpen }">
+ <div v-if="currentUser" class="mobile-notifications" :class="{ 'closed': !notificationsOpen }">
<Notifications ref="notifications" noHeading="true"/>
</div>
<MobilePostStatusModal />
diff --git a/src/components/side_drawer/side_drawer.vue b/src/components/side_drawer/side_drawer.vue
index 95ee21b4..27db12d7 100644
--- a/src/components/side_drawer/side_drawer.vue
+++ b/src/components/side_drawer/side_drawer.vue
@@ -21,11 +21,6 @@
</router-link>
</li>
<li v-if="currentUser" @click="toggleDrawer">
- <router-link :to="{ name: 'notifications', params: { username: currentUser.screen_name } }">
- {{ $t("notifications.notifications") }} {{ unseenNotificationsCount > 0 ? `(${unseenNotificationsCount})` : '' }}
- </router-link>
- </li>
- <li v-if="currentUser" @click="toggleDrawer">
<router-link :to="{ name: 'dms', params: { username: currentUser.screen_name } }">
{{ $t("nav.dms") }}
</router-link>