From b3e122d31f95c5a130ce7c41970984502798903c Mon Sep 17 00:00:00 2001 From: Vivian Lim Date: Wed, 27 Jun 2018 23:55:29 -0700 Subject: Carry forward content warnings in replies --- src/components/post_status_form/post_status_form.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/components/post_status_form') diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 4f4c6aca..4f6cee9c 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -24,7 +24,8 @@ const PostStatusForm = { 'replyTo', 'repliedUser', 'attentions', - 'messageScope' + 'messageScope', + 'parentSpoilerText' ], components: { MediaUpload @@ -50,7 +51,8 @@ const PostStatusForm = { newStatus: { status: statusText, files: [], - visibility: this.messageScope || 'public' + visibility: this.messageScope || 'public', + spoilerText: this.parentSpoilerText || null }, caret: 0 } -- cgit v1.2.3-70-g09d2 From 17f6eb18e73a46c0268d9c7bc46f755ac5da1b6f Mon Sep 17 00:00:00 2001 From: lambda Date: Thu, 12 Jul 2018 07:20:39 +0000 Subject: Revert "Merge branch 'cw-clickthrough' into 'develop'" This reverts merge request !291 --- .../post_status_form/post_status_form.js | 6 ++-- src/components/status/status.js | 9 +----- src/components/status/status.vue | 36 ++-------------------- src/main.js | 4 +-- static/config.json | 3 +- 5 files changed, 8 insertions(+), 50 deletions(-) (limited to 'src/components/post_status_form') diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 4f6cee9c..4f4c6aca 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -24,8 +24,7 @@ const PostStatusForm = { 'replyTo', 'repliedUser', 'attentions', - 'messageScope', - 'parentSpoilerText' + 'messageScope' ], components: { MediaUpload @@ -51,8 +50,7 @@ const PostStatusForm = { newStatus: { status: statusText, files: [], - visibility: this.messageScope || 'public', - spoilerText: this.parentSpoilerText || null + visibility: this.messageScope || 'public' }, caret: 0 } diff --git a/src/components/status/status.js b/src/components/status/status.js index 40786d94..87ef90d8 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -28,8 +28,7 @@ const Status = { userExpanded: false, preview: null, showPreview: false, - showingTall: false, - showingContentWarningContent: false + showingTall: false }), computed: { muteWords () { @@ -93,9 +92,6 @@ const Status = { return 'small' } return 'normal' - }, - clickThroughContentWarningsEnabled () { - return this.$store.state.config.clickThroughContentWarningsEnabled } }, components: { @@ -149,9 +145,6 @@ const Status = { toggleShowTall () { this.showingTall = !this.showingTall }, - toggleContentWarningContent () { - this.showingContentWarningContent = !this.showingContentWarningContent - }, replyEnter (id, event) { this.showPreview = true const targetId = Number(id) diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 2e33999a..f88c810d 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -73,22 +73,11 @@
Show more -
-
- - - - - -
-
-
Click to view this post. (has attachments)
-
-
+
Show less
-
+
@@ -107,13 +96,7 @@
- +
@@ -505,17 +488,4 @@ a.unmute { } } -.hiddenContent { - margin: 8px; - padding: 32px; - background: var(--lightBg, $fallback--lightBg); - border-radius: var(--panelRadius, $fallback--panelRadius); -} -.status-el_focused * .hiddenContent { - background: var(--bg, $fallback--bg); -} -.contentWarnedContent { - margin: 8px; -} - diff --git a/src/main.js b/src/main.js index 01ee7f75..bacd7f6d 100644 --- a/src/main.js +++ b/src/main.js @@ -89,7 +89,7 @@ window.fetch('/api/statusnet/config.json') window.fetch('/static/config.json') .then((res) => res.json()) .then((data) => { - const {theme, background, logo, showWhoToFollowPanel, whoToFollowProvider, whoToFollowLink, showInstanceSpecificPanel, scopeOptionsEnabled, clickThroughContentWarningsEnabled} = data + const {theme, background, logo, showWhoToFollowPanel, whoToFollowProvider, whoToFollowLink, showInstanceSpecificPanel, scopeOptionsEnabled} = data store.dispatch('setOption', { name: 'theme', value: theme }) store.dispatch('setOption', { name: 'background', value: background }) store.dispatch('setOption', { name: 'logo', value: logo }) @@ -98,8 +98,6 @@ window.fetch('/static/config.json') store.dispatch('setOption', { name: 'whoToFollowLink', value: whoToFollowLink }) store.dispatch('setOption', { name: 'showInstanceSpecificPanel', value: showInstanceSpecificPanel }) store.dispatch('setOption', { name: 'scopeOptionsEnabled', value: scopeOptionsEnabled }) - store.dispatch('setOption', { name: 'clickThroughContentWarningsEnabled', value: clickThroughContentWarningsEnabled }) - if (data['chatDisabled']) { store.dispatch('disableChat') } diff --git a/static/config.json b/static/config.json index 4fdddf29..4dacfebe 100644 --- a/static/config.json +++ b/static/config.json @@ -11,6 +11,5 @@ "whoToFollowLink": "https://vinayaka.distsn.org/?{{host}}+{{user}}", "whoToFollowLinkDummy2": "https://followlink.osa-p.net/recommend.html", "showInstanceSpecificPanel": false, - "scopeOptionsEnabled": true, - "clickThroughContentWarningsEnabled": true + "scopeOptionsEnabled": false } -- cgit v1.2.3-70-g09d2 From fd484a1a628c29bcd0bed6b68488ee28b5497fd0 Mon Sep 17 00:00:00 2001 From: Toromino Date: Sun, 5 Aug 2018 19:17:11 +0000 Subject: Textarea is now focused when replying --- src/components/post_status_form/post_status_form.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/components/post_status_form') diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 4f4c6aca..b1a1acb7 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -31,6 +31,10 @@ const PostStatusForm = { }, mounted () { this.resize(this.$refs.textarea) + + if (this.replyTo) { + this.$refs.textarea.focus() + } }, data () { const preset = this.$route.query.message -- cgit v1.2.3-70-g09d2 From 88a81406e3feaa4241a7f76278b2c4b126e2496b Mon Sep 17 00:00:00 2001 From: Toromino Date: Sun, 5 Aug 2018 19:41:34 +0000 Subject: Remove trailing whitespace --- src/components/post_status_form/post_status_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/components/post_status_form') diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index b1a1acb7..dcb2c6e3 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -31,7 +31,7 @@ const PostStatusForm = { }, mounted () { this.resize(this.$refs.textarea) - + if (this.replyTo) { this.$refs.textarea.focus() } -- cgit v1.2.3-70-g09d2 From 976444064f19fbfc1a4085b421196f36d690d820 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 6 Aug 2018 09:45:22 +0300 Subject: Fixes broken custom emoji in autocomplete when proxying to remote BE --- src/components/post_status_form/post_status_form.js | 2 +- src/main.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/components/post_status_form') diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 4f4c6aca..aa9cd160 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -91,7 +91,7 @@ const PostStatusForm = { screen_name: `:${shortcode}:`, name: '', utf: utf || '', - img: image_url, + img: utf ? '' : this.$store.state.config.server + image_url, highlighted: index === this.highlighted })) } else { diff --git a/src/main.js b/src/main.js index bacd7f6d..fa955063 100644 --- a/src/main.js +++ b/src/main.js @@ -79,11 +79,12 @@ const i18n = new VueI18n({ window.fetch('/api/statusnet/config.json') .then((res) => res.json()) .then((data) => { - const {name, closed: registrationClosed, textlimit} = data.site + const {name, closed: registrationClosed, textlimit, server} = data.site store.dispatch('setOption', { name: 'name', value: name }) store.dispatch('setOption', { name: 'registrationOpen', value: (registrationClosed === '0') }) store.dispatch('setOption', { name: 'textlimit', value: parseInt(textlimit) }) + store.dispatch('setOption', { name: 'server', value: server }) }) window.fetch('/static/config.json') -- cgit v1.2.3-70-g09d2 From d5efa10946239dc1c9e0aa646dc1238a2737c456 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 6 Aug 2018 09:52:07 +0300 Subject: hopefully, fix linter --- src/components/post_status_form/post_status_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/components/post_status_form') diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index aa9cd160..34c02325 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -87,10 +87,10 @@ const PostStatusForm = { return false } return map(take(matchedEmoji, 5), ({shortcode, image_url, utf}, index) => ({ - // eslint-disable-next-line camelcase screen_name: `:${shortcode}:`, name: '', utf: utf || '', + // eslint-disable-next-line camelcase img: utf ? '' : this.$store.state.config.server + image_url, highlighted: index === this.highlighted })) -- cgit v1.2.3-70-g09d2