forked from AkkomaGang/akkoma-fe
New option: Require confirmation for boosts
This commit is contained in:
parent
5abce529ca
commit
e69dddee69
5 changed files with 29 additions and 3 deletions
|
@ -12,10 +12,24 @@ const RetweetButton = {
|
|||
},
|
||||
methods: {
|
||||
retweet () {
|
||||
if (!this.status.repeated) {
|
||||
this.$store.dispatch('retweet', { id: this.status.id })
|
||||
if (this.mergedConfig.confirmRetweets) {
|
||||
if (!this.status.repeated) {
|
||||
const confirmed = window.confirm(this.$t('status.retweet_confirm'))
|
||||
if (confirmed) {
|
||||
this.$store.dispatch('retweet', { id: this.status.id })
|
||||
}
|
||||
} else {
|
||||
const confirmed = window.confirm(this.$t('status.unretweet_confirm'))
|
||||
if (confirmed) {
|
||||
this.$store.dispatch('unretweet', { id: this.status.id })
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$store.dispatch('unretweet', { id: this.status.id })
|
||||
if (!this.status.repeated) {
|
||||
this.$store.dispatch('retweet', { id: this.status.id })
|
||||
} else {
|
||||
this.$store.dispatch('unretweet', { id: this.status.id })
|
||||
}
|
||||
}
|
||||
this.animated = true
|
||||
setTimeout(() => {
|
||||
|
|
|
@ -164,6 +164,13 @@
|
|||
{{ $t('settings.autohide_floating_post_button') }}
|
||||
</BooleanSetting>
|
||||
</li>
|
||||
<li>
|
||||
<BooleanSetting
|
||||
path="confirmRetweets"
|
||||
>
|
||||
{{ $t('settings.confirm_retweets') }}
|
||||
</BooleanSetting>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
|
|
|
@ -518,6 +518,7 @@
|
|||
"reply_visibility_following_short": "Show replies to my follows",
|
||||
"reply_visibility_self_short": "Show replies to self only",
|
||||
"autohide_floating_post_button": "Automatically hide New Post button (mobile)",
|
||||
"confirm_retweets": "Require confirmation for boosts/unboosts",
|
||||
"saving_err": "Error saving settings",
|
||||
"saving_ok": "Settings saved",
|
||||
"search_user_to_block": "Search whom you want to block",
|
||||
|
@ -804,6 +805,8 @@
|
|||
"bookmark": "Bookmark",
|
||||
"unbookmark": "Unbookmark",
|
||||
"delete_confirm": "Do you really want to delete this status?",
|
||||
"retweet_confirm": "Boost this status?",
|
||||
"unretweet_confirm": "Undo boost?",
|
||||
"reply_to": "Reply to",
|
||||
"mentions": "Mentions",
|
||||
"replies_list": "Replies:",
|
||||
|
|
|
@ -42,6 +42,7 @@ export const defaultState = {
|
|||
hideSiteName: undefined, // instance default
|
||||
hideAttachments: false,
|
||||
hideAttachmentsInConv: false,
|
||||
confirmRetweets: undefined, // instance default
|
||||
maxThumbnails: 16,
|
||||
hideNsfw: true,
|
||||
preloadImage: true,
|
||||
|
|
|
@ -38,6 +38,7 @@ const defaultState = {
|
|||
hideSiteName: false,
|
||||
hideUserStats: false,
|
||||
muteBotStatuses: false,
|
||||
confirmRetweets: false,
|
||||
loginMethod: 'password',
|
||||
logo: '/static/logo.svg',
|
||||
logoMargin: '.2em',
|
||||
|
|
Loading…
Reference in a new issue