diff options
| author | Henry Jameson <me@hjkos.com> | 2019-03-25 21:12:15 +0200 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2019-03-25 21:12:15 +0200 |
| commit | 0ffd43954eb36d61feab7a0a8fb91f86a6857f75 (patch) | |
| tree | 3f0b597e37613eda5d0840bc7f6e1d33b84cead4 /src/components/settings/settings.js | |
| parent | 4a5aef8883d3e92a58e272857cdfb303da61feb2 (diff) | |
| parent | 854d0e80512d2da80cd5153144698a5148da4aa6 (diff) | |
Merge remote-tracking branch 'upstream/develop' into mastoapi/actions
* upstream/develop: (87 commits)
review
Update attachment normalizer
Add fallback for attachments uploaded via the other platforms
Get correct mimetype through entity_normalizer
Set default parameter
Switch to mastoapi for posting status and uploading media
Revert changes
prevent text pasting if image is pasted
remove border radius of suggested emojis
#450 - dispatch login after saved state is loaded
#448 - fix timeline fetch error when status text is null
#451 - add class to username span
No need to fetch mutes on load anymore 🙌
switch to mastoapi
switch to mastoapi
masto api sends muted property now
No need to fetch user data using old api anymore 🎉
Switch to mastoapi
reactivity fixes
less hackery, more direct usage of mastoapi
...
Diffstat (limited to 'src/components/settings/settings.js')
| -rw-r--r-- | src/components/settings/settings.js | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/components/settings/settings.js b/src/components/settings/settings.js index 979457a5..1d5f75ed 100644 --- a/src/components/settings/settings.js +++ b/src/components/settings/settings.js @@ -1,8 +1,13 @@ /* eslint-env browser */ +import { filter, trim } from 'lodash' + import TabSwitcher from '../tab_switcher/tab_switcher.js' import StyleSwitcher from '../style_switcher/style_switcher.vue' import InterfaceLanguageSwitcher from '../interface_language_switcher/interface_language_switcher.vue' -import { filter, trim } from 'lodash' +import { extractCommit } from '../../services/version/version.service' + +const pleromaFeCommitUrl = 'https://git.pleroma.social/pleroma/pleroma-fe/commit/' +const pleromaBeCommitUrl = 'https://git.pleroma.social/pleroma/pleroma/commit/' const settings = { data () { @@ -42,6 +47,11 @@ const settings = { pauseOnUnfocusedLocal: user.pauseOnUnfocused, hoverPreviewLocal: user.hoverPreview, + hideMutedPostsLocal: typeof user.hideMutedPosts === 'undefined' + ? instance.hideMutedPosts + : user.hideMutedPosts, + hideMutedPostsDefault: this.$t('settings.values.' + instance.hideMutedPosts), + collapseMessageWithSubjectLocal: typeof user.collapseMessageWithSubject === 'undefined' ? instance.collapseMessageWithSubject : user.collapseMessageWithSubject, @@ -78,7 +88,10 @@ const settings = { // Future spec, still not supported in Nightly 63 as of 08/2018 Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'audioTracks'), playVideosInModal: user.playVideosInModal, - useContainFit: user.useContainFit + useContainFit: user.useContainFit, + + backendVersion: instance.backendVersion, + frontendVersion: instance.frontendVersion } }, components: { @@ -96,7 +109,13 @@ const settings = { postFormats () { return this.$store.state.instance.postFormats || [] }, - instanceSpecificPanelPresent () { return this.$store.state.instance.showInstanceSpecificPanel } + instanceSpecificPanelPresent () { return this.$store.state.instance.showInstanceSpecificPanel }, + frontendVersionLink () { + return pleromaFeCommitUrl + this.frontendVersion + }, + backendVersionLink () { + return pleromaBeCommitUrl + extractCommit(this.backendVersion) + } }, watch: { hideAttachmentsLocal (value) { @@ -163,6 +182,9 @@ const settings = { value = filter(value.split('\n'), (word) => trim(word).length > 0) this.$store.dispatch('setOption', { name: 'muteWords', value }) }, + hideMutedPostsLocal (value) { + this.$store.dispatch('setOption', { name: 'hideMutedPosts', value }) + }, collapseMessageWithSubjectLocal (value) { this.$store.dispatch('setOption', { name: 'collapseMessageWithSubject', value }) }, |
