From 8a0197d68224e816b3e569c36ed3dfd931088386 Mon Sep 17 00:00:00 2001 From: shpuld Date: Sat, 18 Feb 2017 19:58:16 +0200 Subject: Fix follow/mute buttons from getting squished on mobile --- src/components/user_profile/user_profile.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue index 08221ac8..b0d6db85 100644 --- a/src/components/user_profile/user_profile.vue +++ b/src/components/user_profile/user_profile.vue @@ -16,6 +16,7 @@ .user-interactions { display: flex; flex-flow: row wrap; + justify-content: center; div { flex: 1; @@ -30,11 +31,11 @@ } .mute { - margin-right: 4em; + max-width: 200px; } .follow { - margin-left: 4em; + max-width: 200px; } button { -- cgit v1.2.3-70-g09d2 From 1ccc9dd629b2ecfe3883f337f39120da810813d0 Mon Sep 17 00:00:00 2001 From: hakui Date: Sat, 18 Feb 2017 12:51:47 -0600 Subject: wrap long urls while not breaking normal words. also practicing the new branch thing --- src/components/status/status.vue | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 85d78d2e..4d4f7046 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -107,6 +107,7 @@ a { display: inline-block; + word-wrap: break-word; } .status-content { -- cgit v1.2.3-70-g09d2 From 2aea6c4b09de8ee8f5c7d2f83c1873100ef75956 Mon Sep 17 00:00:00 2001 From: hakui Date: Sat, 18 Feb 2017 13:18:00 -0600 Subject: increased leading for expanded view's header --- src/App.scss | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/App.scss b/src/App.scss index 3547f258..34c7ee74 100644 --- a/src/App.scss +++ b/src/App.scss @@ -107,6 +107,7 @@ main-router { padding: 0.6em 0 0.5em; text-align: center; font-size: 1.3em; + line-height: 24px; } .panel-footer { -- cgit v1.2.3-70-g09d2 From 963a0035e5e3f35ee790aeb3db64cb8dd32a84a4 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Sat, 18 Feb 2017 20:42:00 +0100 Subject: Make page title dynamic, better notification handling. --- src/components/notifications/notifications.js | 26 ++++++++++++++++++++++++-- src/components/notifications/notifications.vue | 5 +++-- src/modules/config.js | 7 +++++-- src/modules/statuses.js | 7 ++++++- 4 files changed, 38 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js index 10f987a8..7dbbf588 100644 --- a/src/components/notifications/notifications.js +++ b/src/components/notifications/notifications.js @@ -1,4 +1,4 @@ -import { sortBy, take } from 'lodash' +import { sortBy, take, filter } from 'lodash' const Notifications = { data () { @@ -7,8 +7,30 @@ const Notifications = { } }, computed: { + notifications () { + return this.$store.state.statuses.notifications + }, + unseenNotifications () { + return filter(this.notifications, ({seen}) => !seen) + }, visibleNotifications () { - return take(sortBy(this.$store.state.statuses.notifications, ({action}) => -action.id), this.visibleNotificationCount) + // Don't know why, but sortBy([seen, -action.id]) doesn't work. + let sortedNotifications = sortBy(this.notifications, ({action}) => -action.id) + sortedNotifications = sortBy(sortedNotifications, 'seen') + return take(sortedNotifications, this.visibleNotificationCount) + }, + unseenCount () { + return this.unseenNotifications.length + } + }, + watch: { + unseenCount (count) { + this.$store.dispatch('setPageTitle', `(${count})`) + } + }, + methods: { + markAsSeen () { + this.$store.commit('markNotificationsAsSeen', this.visibleNotifications) } } } diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue index 0846c27b..785cc019 100644 --- a/src/components/notifications/notifications.vue +++ b/src/components/notifications/notifications.vue @@ -1,13 +1,14 @@