add setting to set boosts to be the same as default post visibility
This commit is contained in:
parent
b457c07156
commit
ae35c58425
7 changed files with 25 additions and 1 deletions
|
@ -25,7 +25,11 @@ const RetweetButton = {
|
||||||
},
|
},
|
||||||
doRetweet () {
|
doRetweet () {
|
||||||
if (!this.status.repeated) {
|
if (!this.status.repeated) {
|
||||||
|
if (this.$store.getters.mergedConfig.boostsFollowDefVis) {
|
||||||
|
this.$store.dispatch('retweet_dv', { id: this.status.id })
|
||||||
|
} else {
|
||||||
this.$store.dispatch('retweet', { id: this.status.id })
|
this.$store.dispatch('retweet', { id: this.status.id })
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$store.dispatch('unretweet', { id: this.status.id })
|
this.$store.dispatch('unretweet', { id: this.status.id })
|
||||||
}
|
}
|
||||||
|
|
|
@ -561,6 +561,11 @@
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<BooleanSetting path="boostsFollowDefVis">
|
||||||
|
{{ $t('settings.boosts_follow_def_vis') }}
|
||||||
|
</BooleanSetting>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<BooleanSetting path="sensitiveByDefault">
|
<BooleanSetting path="sensitiveByDefault">
|
||||||
{{ $t('settings.sensitive_by_default') }}
|
{{ $t('settings.sensitive_by_default') }}
|
||||||
|
|
|
@ -492,6 +492,7 @@
|
||||||
"block_import_error": "Error importing blocks",
|
"block_import_error": "Error importing blocks",
|
||||||
"blocks_imported": "Blocks imported! Processing them will take a while.",
|
"blocks_imported": "Blocks imported! Processing them will take a while.",
|
||||||
"blocks_tab": "Blocks",
|
"blocks_tab": "Blocks",
|
||||||
|
"boosts_follow_def_vis": "Make boosts follow default visibility",
|
||||||
"bot": "This is a bot account",
|
"bot": "This is a bot account",
|
||||||
"btnRadius": "Buttons",
|
"btnRadius": "Buttons",
|
||||||
"cBlue": "Blue (Reply, follow)",
|
"cBlue": "Blue (Reply, follow)",
|
||||||
|
|
|
@ -112,6 +112,7 @@ export const defaultState = {
|
||||||
soundOnNotif: false,
|
soundOnNotif: false,
|
||||||
soundOnNotifVolume: 0.2,
|
soundOnNotifVolume: 0.2,
|
||||||
soundOnNotifCustom: '',
|
soundOnNotifCustom: '',
|
||||||
|
boostsFollowDefVis: false,
|
||||||
renderMisskeyMarkdown: undefined,
|
renderMisskeyMarkdown: undefined,
|
||||||
renderMfmOnHover: undefined, // instance default
|
renderMfmOnHover: undefined, // instance default
|
||||||
conversationDisplay: undefined, // instance default
|
conversationDisplay: undefined, // instance default
|
||||||
|
|
|
@ -70,6 +70,7 @@ const defaultState = {
|
||||||
soundOnNotif: false,
|
soundOnNotif: false,
|
||||||
soundOnNotifVolume: 0.2,
|
soundOnNotifVolume: 0.2,
|
||||||
soundOnNotifCustom: '',
|
soundOnNotifCustom: '',
|
||||||
|
boostsFollowDefVis: false,
|
||||||
renderMisskeyMarkdown: true,
|
renderMisskeyMarkdown: true,
|
||||||
renderMfmOnHover: false,
|
renderMfmOnHover: false,
|
||||||
conversationDisplay: 'linear',
|
conversationDisplay: 'linear',
|
||||||
|
|
|
@ -669,6 +669,12 @@ const statuses = {
|
||||||
rootState.api.backendInteractor.retweet({ id: status.id })
|
rootState.api.backendInteractor.retweet({ id: status.id })
|
||||||
.then(status => commit('setRetweetedConfirm', { status: status.retweeted_status, user: rootState.users.currentUser }))
|
.then(status => commit('setRetweetedConfirm', { status: status.retweeted_status, user: rootState.users.currentUser }))
|
||||||
},
|
},
|
||||||
|
retweet_dv ({ rootState, commit }, status) {
|
||||||
|
// Optimistic retweeting... ????????
|
||||||
|
commit('setRetweeted', { status, value: true })
|
||||||
|
rootState.api.backendInteractor.retweet_dv({ id: status.id, visibility: rootState.users.currentUser.default_scope })
|
||||||
|
.then(status => commit('setRetweetedConfirm', { status: status.retweeted_status, user: rootState.users.currentUser }))
|
||||||
|
},
|
||||||
unretweet ({ rootState, commit }, status) {
|
unretweet ({ rootState, commit }, status) {
|
||||||
// Optimistic unretweeting...
|
// Optimistic unretweeting...
|
||||||
commit('setRetweeted', { status, value: false })
|
commit('setRetweeted', { status, value: false })
|
||||||
|
|
|
@ -844,6 +844,11 @@ const retweet = ({ id, credentials }) => {
|
||||||
.then((data) => parseStatus(data))
|
.then((data) => parseStatus(data))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const retweet_dv = ({ id, credentials, visibility }) => {
|
||||||
|
return promisedRequest({ url: MASTODON_RETWEET_URL(id), method: 'POST', credentials, payload: {"visibility": visibility} })
|
||||||
|
.then((data) => parseStatus(data))
|
||||||
|
}
|
||||||
|
|
||||||
const unretweet = ({ id, credentials }) => {
|
const unretweet = ({ id, credentials }) => {
|
||||||
return promisedRequest({ url: MASTODON_UNRETWEET_URL(id), method: 'POST', credentials })
|
return promisedRequest({ url: MASTODON_UNRETWEET_URL(id), method: 'POST', credentials })
|
||||||
.then((data) => parseStatus(data))
|
.then((data) => parseStatus(data))
|
||||||
|
@ -1785,6 +1790,7 @@ const apiService = {
|
||||||
favorite,
|
favorite,
|
||||||
unfavorite,
|
unfavorite,
|
||||||
retweet,
|
retweet,
|
||||||
|
retweet_dv,
|
||||||
unretweet,
|
unretweet,
|
||||||
bookmarkStatus,
|
bookmarkStatus,
|
||||||
unbookmarkStatus,
|
unbookmarkStatus,
|
||||||
|
|
Loading…
Add table
Reference in a new issue