From 929d4d75b4a9a20bbf7835a7f7d8df96e70d4ffc Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Mon, 2 Jan 2017 22:30:11 +0100 Subject: [PATCH 1/7] Use hash routing. --- src/main.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main.js b/src/main.js index 048706d5..c673dbe5 100644 --- a/src/main.js +++ b/src/main.js @@ -43,7 +43,6 @@ const routes = [ ] const router = new VueRouter({ - mode: 'history', routes, scrollBehavior: (to, from, savedPosition) => { return savedPosition || { x: 0, y: 0 } From 1a5ec7484e82ea74c6f795208247d0bcef3f8715 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Fri, 20 Jan 2017 23:39:38 +0100 Subject: [PATCH 2/7] Fix style setting in Chrome. --- src/services/style_setter/style_setter.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/services/style_setter/style_setter.js b/src/services/style_setter/style_setter.js index b8c978b4..79b68b38 100644 --- a/src/services/style_setter/style_setter.js +++ b/src/services/style_setter/style_setter.js @@ -22,6 +22,7 @@ const setStyle = (href) => { const setDynamic = () => { const baseEl = document.createElement('div') + body.appendChild(baseEl) baseEl.setAttribute('class', 'base05') const base05Color = window.getComputedStyle(baseEl).getPropertyValue('color') baseEl.setAttribute('class', 'base08') @@ -29,6 +30,7 @@ const setStyle = (href) => { const styleEl = document.createElement('style') head.appendChild(styleEl) const styleSheet = styleEl.sheet + body.removeChild(baseEl) styleSheet.insertRule(`a { color: ${base08Color}`, 'index-max') styleSheet.insertRule(`body { color: ${base05Color}`, 'index-max') From 51473f04842af5f135a248b09b55b3f9a381bc97 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Fri, 20 Jan 2017 23:58:58 +0100 Subject: [PATCH 3/7] Fix file uploads in Chrome. --- .../status_poster/status_poster.service.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/services/status_poster/status_poster.service.js b/src/services/status_poster/status_poster.service.js index 850993f7..bc1fd37d 100644 --- a/src/services/status_poster/status_poster.service.js +++ b/src/services/status_poster/status_poster.service.js @@ -20,12 +20,23 @@ const uploadMedia = ({ store, formData }) => { const credentials = store.state.users.currentUser.credentials return apiService.uploadMedia({ credentials, formData }).then((xml) => { - return { + // Firefox and Chrome treat method differently... + let link = xml.getElementsByTagName('link') + + if (link.length === 0) { + link = xml.getElementsByTagName('atom:link') + } + + link = link[0] + + const mediaData = { id: xml.getElementsByTagName('media_id')[0].textContent, url: xml.getElementsByTagName('media_url')[0].textContent, - image: xml.getElementsByTagName('atom:link')[0].getAttribute('href'), - mimetype: xml.getElementsByTagName('atom:link')[0].getAttribute('type') + image: link.getAttribute('href'), + mimetype: link.getAttribute('type') } + + return mediaData }) } From 32d1d2178a82fef48de2b8eebe911313c68c19a3 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Mon, 24 Apr 2017 20:34:06 +0200 Subject: [PATCH 4/7] Make linter happy. --- src/components/post_status_form/post_status_form.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index cba080ea..5dd14df5 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -2,7 +2,7 @@ import statusPoster from '../../services/status_poster/status_poster.service.js' import MediaUpload from '../media_upload/media_upload.vue' import fileTypeService from '../../services/file_type/file_type.service.js' -import { merge, reject, map, uniqBy } from 'lodash' +import { reject, map, uniqBy } from 'lodash' const buildMentionsString = ({user, attentions}, currentUser) => { let allAttentions = [...attentions] @@ -19,7 +19,6 @@ const buildMentionsString = ({user, attentions}, currentUser) => { return mentions.join(' ') + ' ' } - const PostStatusForm = { props: [ 'replyTo', From e621be1428f844a39fdb0bf44ff6d0f2af7ff253 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Tue, 30 May 2017 00:24:08 +0300 Subject: [PATCH 5/7] Cut notification header length from 3 lines to 1. --- .../notifications/notifications.scss | 4 ++++ .../notifications/notifications.vue | 23 ++++++++++++++----- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/components/notifications/notifications.scss b/src/components/notifications/notifications.scss index c7c650a9..5619c2d8 100644 --- a/src/components/notifications/notifications.scss +++ b/src/components/notifications/notifications.scss @@ -54,10 +54,14 @@ } h1 { + word-break: break-all; margin: 0 0 0.3em; padding: 0; font-size: 1em; line-height:20px; + small { + font-weight: lighter; + } } padding: 0.3em 0.8em 0.5em; diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue index a326e9cd..9d9028ad 100644 --- a/src/components/notifications/notifications.vue +++ b/src/components/notifications/notifications.vue @@ -12,17 +12,28 @@
-
-

{{ notification.action.user.name }}
favorited your status

-

{{ notification.status.text }}

+

+ {{ notification.action.user.name }} + + +

+

{{ notification.status.text }}

-

{{ notification.action.user.name }}
repeated your status

-

{{ notification.status.text }}

+

+ {{ notification.action.user.name }} + + +

+

{{ notification.status.text }}

-

{{ notification.action.user.name }}
mentioned you

+

+ {{ notification.action.user.name }} + + +

{{ notification.status.text }}

From 5ad4d043e7514a26a395cf72215a74362c4ca2e0 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Wed, 31 May 2017 11:47:18 +0300 Subject: [PATCH 6/7] Enable reply/rt/fav for mention notifications by using a barebones status in place of plain notification content. --- src/components/notifications/notifications.js | 5 +++++ .../notifications/notifications.scss | 4 ++-- .../notifications/notifications.vue | 20 +++++++++---------- src/components/status/status.js | 3 ++- src/components/status/status.vue | 17 +++++++++++++++- 5 files changed, 35 insertions(+), 14 deletions(-) diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js index c8d5e212..c0c86c68 100644 --- a/src/components/notifications/notifications.js +++ b/src/components/notifications/notifications.js @@ -1,3 +1,5 @@ +import Status from '../status/status.vue' + import { sortBy, take, filter } from 'lodash' const Notifications = { @@ -23,6 +25,9 @@ const Notifications = { return this.unseenNotifications.length } }, + components: { + Status + }, watch: { unseenCount (count) { if (count > 0) { diff --git a/src/components/notifications/notifications.scss b/src/components/notifications/notifications.scss index 5619c2d8..f02ced8d 100644 --- a/src/components/notifications/notifications.scss +++ b/src/components/notifications/notifications.scss @@ -45,11 +45,11 @@ word-wrap: break-word; line-height:18px; - .icon-retweet { + .icon-retweet.lit { color: $green; } - .icon-reply { + .icon-reply.lit { color: $blue; } diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue index 9d9028ad..256d6f7a 100644 --- a/src/components/notifications/notifications.vue +++ b/src/components/notifications/notifications.vue @@ -11,30 +11,30 @@ -
+

{{ notification.action.user.name }}

-

{{ notification.status.text }}

+

{{ notification.action.user.name }} - +

-

{{ notification.status.text }}

+
-

- {{ notification.action.user.name }} - - -

-

{{ notification.status.text }}

+

+ {{ notification.action.user.name }} + + +

+
diff --git a/src/components/status/status.js b/src/components/status/status.js index 5e7bde53..183838a8 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -12,7 +12,8 @@ const Status = { 'expandable', 'inConversation', 'focused', - 'highlight' + 'highlight', + 'compact' ], data: () => ({ replying: false, diff --git a/src/components/status/status.vue b/src/components/status/status.vue index db33a200..e06fc29a 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -1,5 +1,20 @@