From 929d4d75b4a9a20bbf7835a7f7d8df96e70d4ffc Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Mon, 2 Jan 2017 22:30:11 +0100 Subject: [PATCH 01/72] 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 02/72] 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 03/72] 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 39a6867557e1af5dfa4047dc3e19f80069b744a4 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Thu, 30 Mar 2017 15:11:32 +0300 Subject: [PATCH 04/72] Make muted notifications take much less space (handy for bot spam). --- src/components/status/status.vue | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 62a55505..993ce796 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -162,8 +162,11 @@ border-left: 4px rgba(255, 48, 16, 0.65); border-left-style: inherit; } - .muted button { - margin-left: auto; + .muted { + padding: 0.1em 0.7em 0.1em 0.8em; + button { + margin-left: auto; + } } a.unmute { From 05dfd9657138f9cff555a65e76c67ecac0864af0 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Sun, 9 Apr 2017 14:28:21 +0300 Subject: [PATCH 05/72] Revert nsfw image sizing, give attachments max-height to reduce scrolling --- src/components/attachment/attachment.js | 2 +- src/components/attachment/attachment.vue | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js index 7715add5..ccf26b79 100644 --- a/src/components/attachment/attachment.js +++ b/src/components/attachment/attachment.js @@ -26,7 +26,7 @@ const Attachment = { autoHeight () { if (this.type === 'image' && this.nsfw) { return { - 'min-height': '311px' + 'min-height': '109px' } } } diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index 6af23391..e2fc65ba 100644 --- a/src/components/attachment/attachment.vue +++ b/src/components/attachment/attachment.vue @@ -116,8 +116,10 @@ border-style: solid; border-width: 1px; border-radius: 5px; + object-fit: contain; width: 100%; - height: 100%; /* If this isn't here, chrome will stretch the images */ + //height: 100%; /* If this isn't here, chrome will stretch the images */ + max-height: 500px; } } } From f3ca011fbedb2ce6271bcc887d290828ccd1d284 Mon Sep 17 00:00:00 2001 From: lambadalambda Date: Sun, 9 Apr 2017 08:26:30 -0400 Subject: [PATCH 06/72] Add chrome picture stretching fix back in. --- src/components/attachment/attachment.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index e2fc65ba..1ba1c02a 100644 --- a/src/components/attachment/attachment.vue +++ b/src/components/attachment/attachment.vue @@ -118,7 +118,7 @@ border-radius: 5px; object-fit: contain; width: 100%; - //height: 100%; /* If this isn't here, chrome will stretch the images */ + height: 100%; /* If this isn't here, chrome will stretch the images */ max-height: 500px; } } From a53555254a711654399836e0f5f052d629bf4380 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Sun, 9 Apr 2017 15:53:23 +0200 Subject: [PATCH 07/72] Add word-based muting to settings / statuses. --- src/components/settings/settings.js | 6 +++++- src/components/settings/settings.vue | 11 ++++++++++- src/components/status/status.js | 14 +++++++++++++- src/components/status/status.vue | 7 ++++++- src/main.js | 1 + src/modules/config.js | 3 ++- 6 files changed, 37 insertions(+), 5 deletions(-) diff --git a/src/components/settings/settings.js b/src/components/settings/settings.js index 3d373283..7aa4bbc4 100644 --- a/src/components/settings/settings.js +++ b/src/components/settings/settings.js @@ -5,7 +5,8 @@ const settings = { return { hideAttachmentsLocal: this.$store.state.config.hideAttachments, hideAttachmentsInConvLocal: this.$store.state.config.hideAttachmentsInConv, - hideNsfwLocal: this.$store.state.config.hideNsfw + hideNsfwLocal: this.$store.state.config.hideNsfw, + muteWordsString: this.$store.state.config.muteWords.join('\n') } }, components: { @@ -20,6 +21,9 @@ const settings = { }, hideNsfwLocal (value) { this.$store.dispatch('setOption', { name: 'hideNsfw', value }) + }, + muteWordsString (value) { + this.$store.dispatch('setOption', { name: 'muteWords', value: value.split('\n') }) } } } diff --git a/src/components/settings/settings.vue b/src/components/settings/settings.vue index 478d761a..33d46e7e 100644 --- a/src/components/settings/settings.vue +++ b/src/components/settings/settings.vue @@ -8,6 +8,11 @@

Theme

+
+

Filtering

+

All notices containing these words will be muted, one per line

+ +

Attachments

    @@ -32,9 +37,13 @@ - diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 4dfc0a02..1c5e281e 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -17,6 +17,7 @@ const FRIENDS_URL = '/api/statuses/friends.json' const FOLLOWING_URL = '/api/friendships/create.json' const UNFOLLOWING_URL = '/api/friendships/destroy.json' const QVITTER_USER_PREF_URL = '/api/qvitter/set_profile_pref.json' +const EXTERNAL_PROFILE_URL = '/api/externalprofile/show.json' // const USER_URL = '/api/users/show.json' const oldfetch = window.fetch @@ -35,6 +36,13 @@ const authHeaders = (user) => { } } +const externalProfile = (profileUrl) => { + let url = `${EXTERNAL_PROFILE_URL}?profileurl=${profileUrl}` + return fetch(url, { + method: 'GET' + }).then((data) => data.json()) +} + const followUser = ({id, credentials}) => { let url = `${FOLLOWING_URL}?user_id=${id}` return fetch(url, { @@ -198,7 +206,8 @@ const apiService = { uploadMedia, fetchAllFollowing, setUserMute, - fetchMutes + fetchMutes, + externalProfile } export default apiService diff --git a/src/services/backend_interactor_service/backend_interactor_service.js b/src/services/backend_interactor_service/backend_interactor_service.js index bc68d02c..74248bc0 100644 --- a/src/services/backend_interactor_service/backend_interactor_service.js +++ b/src/services/backend_interactor_service/backend_interactor_service.js @@ -36,6 +36,8 @@ const backendInteractorService = (credentials) => { const fetchMutes = () => apiService.fetchMutes({credentials}) + const externalProfile = (profileUrl) => apiService.externalProfile(profileUrl) + const backendInteractorServiceInstance = { fetchStatus, fetchConversation, @@ -46,7 +48,8 @@ const backendInteractorService = (credentials) => { verifyCredentials: apiService.verifyCredentials, startFetching, setUserMute, - fetchMutes + fetchMutes, + externalProfile } return backendInteractorServiceInstance From d389d3a7633f88933586b9660b4ad3510b7f98ee Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Mon, 22 May 2017 13:50:10 +0200 Subject: [PATCH 34/72] Copy cool retweet look. --- src/components/status/status.vue | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/components/status/status.vue b/src/components/status/status.vue index db33a200..8886b551 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -19,7 +19,8 @@
    @@ -147,7 +148,23 @@ } .status .avatar { - width: 48px; + width: 48px; + height: 48px; + + &.retweeted { + width: 40px; + height: 40px; + margin-right: 8px; + margin-bottom: 8px; + } + } + + .status img.avatar-retweeter { + width: 24px; + height: 24px; + position: absolute; + margin-left: 24px; + margin-top: 24px; } .status.compact .avatar { From e621be1428f844a39fdb0bf44ff6d0f2af7ff253 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Tue, 30 May 2017 00:24:08 +0300 Subject: [PATCH 35/72] 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 36/72] 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 @@