diff --git a/src/App.js b/src/App.js index 83a61d39..200254f3 100644 --- a/src/App.js +++ b/src/App.js @@ -81,7 +81,8 @@ export default { }, unseenNotificationsCount () { return this.unseenNotifications.length - } + }, + showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel } }, methods: { scrollToTop () { diff --git a/src/App.scss b/src/App.scss index d3721b32..1eaed6ea 100644 --- a/src/App.scss +++ b/src/App.scss @@ -719,3 +719,17 @@ nav { margin-right: 0.8em; } } + +.login-hint { + text-align: center; + + @media all and (min-width: 801px) { + display: none; + } + + a { + display: inline-block; + padding: 1em 0px; + width: 100%; + } +} diff --git a/src/App.vue b/src/App.vue index 833608ea..7541928f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -29,7 +29,7 @@ - + @@ -37,6 +37,11 @@
+
+ + {{ $t("login.hint") }} + +
diff --git a/src/boot/after_store.js b/src/boot/after_store.js index 5693dcc6..fa44dace 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -59,6 +59,7 @@ const afterStoreSetup = ({ store, i18n }) => { copyInstanceOption('background') copyInstanceOption('hidePostStats') copyInstanceOption('hideUserStats') + copyInstanceOption('hideFilteredStatuses') copyInstanceOption('logo') store.dispatch('setInstanceOption', { @@ -84,8 +85,10 @@ const afterStoreSetup = ({ store, i18n }) => { copyInstanceOption('loginMethod') copyInstanceOption('scopeCopy') copyInstanceOption('subjectLineBehavior') + copyInstanceOption('postContentType') copyInstanceOption('alwaysShowSubjectInput') copyInstanceOption('noAttachmentLinks') + copyInstanceOption('showFeaturesPanel') if ((config.chatDisabled)) { store.dispatch('disableChat') diff --git a/src/components/about/about.js b/src/components/about/about.js index b4433b4e..ae1cb182 100644 --- a/src/components/about/about.js +++ b/src/components/about/about.js @@ -7,6 +7,9 @@ const About = { InstanceSpecificPanel, FeaturesPanel, TermsOfServicePanel + }, + computed: { + showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel } } } diff --git a/src/components/about/about.vue b/src/components/about/about.vue index bf87e0b8..13dec87c 100644 --- a/src/components/about/about.vue +++ b/src/components/about/about.vue @@ -1,7 +1,7 @@ diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 5e8c2252..ab379c23 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -65,7 +65,6 @@ const PostStatusForm = { newStatus: { spoilerText: this.subject || '', status: statusText, - contentType: 'text/plain', nsfw: false, files: [], visibility: scope @@ -167,6 +166,11 @@ const PostStatusForm = { }, formattingOptionsEnabled () { return this.$store.state.instance.formattingOptionsEnabled + }, + defaultPostContentType () { + return typeof this.$store.state.config.postContentType === 'undefined' + ? this.$store.state.instance.postContentType + : this.$store.state.config.postContentType } }, methods: { diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index e09ad37f..6ed5d92e 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -35,7 +35,7 @@
+
  • +
    + {{$t('settings.post_status_content_type')}} + +
    +
  • @@ -205,7 +227,6 @@ -
    {{$t('settings.replies_in_timeline')}} @@ -232,11 +253,18 @@
    -

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

    - +
    +

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

    + +
    +
    + + +
    - diff --git a/src/components/status/status.js b/src/components/status/status.js index a3b662b6..06e4fe93 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -11,7 +11,7 @@ import generateProfileLink from 'src/services/user_profile_link_generator/user_p import fileType from 'src/services/file_type/file_type.service' import { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js' import { mentionMatchesUrl, extractTagFromUrl } from 'src/services/matcher/matcher.service.js' -import { filter, find } from 'lodash' +import { filter, find, unescape } from 'lodash' const Status = { name: 'Status', @@ -110,6 +110,14 @@ const Status = { return hits }, muted () { return !this.unmuted && (this.status.user.muted || this.muteWordHits.length > 0) }, + hideFilteredStatuses () { + return typeof this.$store.state.config.hideFilteredStatuses === 'undefined' + ? this.$store.state.instance.hideFilteredStatuses + : this.$store.state.config.hideFilteredStatuses + }, + hideStatus () { + return (this.hideReply || this.deleted) || (this.muted && this.hideFilteredStatuses) + }, isFocused () { // retweet or root of an expanded conversation if (this.focused) { @@ -201,14 +209,15 @@ const Status = { }, replySubject () { if (!this.status.summary) return '' + const decodedSummary = unescape(this.status.summary) const behavior = typeof this.$store.state.config.subjectLineBehavior === 'undefined' ? this.$store.state.instance.subjectLineBehavior : this.$store.state.config.subjectLineBehavior - const startsWithRe = this.status.summary.match(/^re[: ]/i) + const startsWithRe = decodedSummary.match(/^re[: ]/i) if (behavior !== 'noop' && startsWithRe || behavior === 'masto') { - return this.status.summary + return decodedSummary } else if (behavior === 'email') { - return 're: '.concat(this.status.summary) + return 're: '.concat(decodedSummary) } else if (behavior === 'noop') { return '' } diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 779696ea..76daf73a 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -1,5 +1,5 @@