From 3c3f2c654ea9e6083ec855b5c795a303b3711f3c Mon Sep 17 00:00:00 2001 From: taehoon Date: Sun, 10 Nov 2019 14:42:01 -0500 Subject: add hideISP to defaultState of config module --- src/modules/config.js | 1 + 1 file changed, 1 insertion(+) (limited to 'src/modules/config.js') diff --git a/src/modules/config.js b/src/modules/config.js index 78314118..d4819ee8 100644 --- a/src/modules/config.js +++ b/src/modules/config.js @@ -5,6 +5,7 @@ const browserLocale = (window.navigator.language || 'en').split('-')[0] export const defaultState = { colors: {}, + hideISP: false, // bad name: actually hides posts of muted USERS hideMutedPosts: undefined, // instance default collapseMessageWithSubject: undefined, // instance default -- cgit v1.2.3-70-g09d2 From 897131572f62c36277e06e464f328f37cf6acad2 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 14 Nov 2019 00:47:20 +0200 Subject: Made it optional --- src/components/settings/settings.vue | 11 ++++++++++ src/components/status/status.js | 40 ++++++++++++++++++++---------------- src/components/status/status.vue | 5 +++-- src/i18n/en.json | 2 ++ src/modules/config.js | 1 + src/modules/instance.js | 1 + 6 files changed, 40 insertions(+), 20 deletions(-) (limited to 'src/modules/config.js') diff --git a/src/components/settings/settings.vue b/src/components/settings/settings.vue index a83489d2..c4021137 100644 --- a/src/components/settings/settings.vue +++ b/src/components/settings/settings.vue @@ -270,6 +270,17 @@ + +
+

{{ $t('settings.fun') }}

+
    +
  • + + {{ $t('settings.greentext') }} {{ $t('settings.instance_default', { value: greentextLocalizedValue }) }} + +
  • +
+
diff --git a/src/components/status/status.js b/src/components/status/status.js index 416aa36a..dd0ce3ab 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -259,26 +259,30 @@ const Status = { postBodyHtml () { const html = this.status.statusnet_html - try { - if (html.includes('>')) { - // This checks if post has '>' at the beginning, excluding mentions so that @mention >impying works - return processHtml(html, (string) => { - if (string.includes('>') && - string - .replace(/<[^>]+?>/gi, '') // remove all tags - .replace(/@\w+/gi, '') // remove mentions (even failed ones) - .trim() - .startsWith('>')) { - return `${string}` - } else { - return string - } - }) - } else { + if (this.mergedConfig.greentext) { + try { + if (html.includes('>')) { + // This checks if post has '>' at the beginning, excluding mentions so that @mention >impying works + return processHtml(html, (string) => { + if (string.includes('>') && + string + .replace(/<[^>]+?>/gi, '') // remove all tags + .replace(/@\w+/gi, '') // remove mentions (even failed ones) + .trim() + .startsWith('>')) { + return `${string}` + } else { + return string + } + }) + } else { + return html + } + } catch (e) { + console.err('Failed to process status html', e) return html } - } catch (e) { - console.err('Failed to process status html', e) + } else { return html } }, diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 65778b2e..d291e762 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -606,7 +606,7 @@ $status-margin: 0.75em; height: 100%; mask: linear-gradient(to top, white, transparent) bottom/100% 70px no-repeat, linear-gradient(to top, white, white); - // Autoprefixed seem to ignore this one, and also syntax is different + /* Autoprefixed seem to ignore this one, and also syntax is different */ -webkit-mask-composite: xor; mask-composite: exclude; } @@ -752,7 +752,8 @@ $status-margin: 0.75em; } .greentext { - color: green; + color: $fallback--cGreen; + color: var(--cGreen, $fallback--cGreen); } .status-conversation { diff --git a/src/i18n/en.json b/src/i18n/en.json index ead333c1..7b0b3b94 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -370,6 +370,8 @@ "false": "no", "true": "yes" }, + "fun": "Fun", + "greentext": "Meme arrows", "notifications": "Notifications", "notification_setting": "Receive notifications from:", "notification_setting_follows": "Users you follow", diff --git a/src/modules/config.js b/src/modules/config.js index d4819ee8..329b4091 100644 --- a/src/modules/config.js +++ b/src/modules/config.js @@ -45,6 +45,7 @@ export const defaultState = { playVideosInModal: false, useOneClickNsfw: false, useContainFit: false, + greentext: undefined, // instance default hidePostStats: undefined, // instance default hideUserStats: undefined // instance default } diff --git a/src/modules/instance.js b/src/modules/instance.js index 7b0e0da4..96f14ed5 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -32,6 +32,7 @@ const defaultState = { noAttachmentLinks: false, showFeaturesPanel: true, minimalScopesMode: false, + greentext: false, // Nasty stuff pleromaBackend: true, -- cgit v1.2.3-70-g09d2 From 6af870cd9069a8fc45b7684d264656dad0cf4a70 Mon Sep 17 00:00:00 2001 From: kPherox Date: Wed, 11 Dec 2019 00:00:10 +0900 Subject: Add view for moves notifications --- src/components/notification/notification.vue | 14 +++++++++++++- src/components/notifications/notifications.scss | 7 ++++++- src/components/settings/settings.vue | 5 +++++ src/i18n/en.json | 1 + src/modules/config.js | 3 ++- src/modules/statuses.js | 3 ++- src/services/notification_utils/notification_utils.js | 3 ++- src/services/push/push.js | 3 ++- static/fontello.json | 6 ++++++ 9 files changed, 39 insertions(+), 6 deletions(-) (limited to 'src/modules/config.js') diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue index 1f192c77..cf4d8072 100644 --- a/src/components/notification/notification.vue +++ b/src/components/notification/notification.vue @@ -74,9 +74,13 @@ {{ $t('notifications.followed_you') }} + + + {{ $t('notifications.moved_to') }} +
@@ -115,6 +119,14 @@ @{{ notification.from_profile.screen_name }}
+
+ + @{{ notification.target.screen_name }} + +