allow repeats of own private-ish statuses
This commit is contained in:
parent
cc8480e8ea
commit
24427de6e7
1 changed files with 3 additions and 3 deletions
|
|
@ -30,8 +30,8 @@ export const BUTTONS = [{
|
||||||
label: ({ status }) => status.repeated
|
label: ({ status }) => status.repeated
|
||||||
? 'tool_tip.unrepeat'
|
? 'tool_tip.unrepeat'
|
||||||
: 'tool_tip.repeat',
|
: 'tool_tip.repeat',
|
||||||
icon ({ status }) {
|
icon ({ status, currentUser }) {
|
||||||
if (PRIVATE_SCOPES.has(status.visibility)) {
|
if (currentUser.id !== status.user.id && PRIVATE_SCOPES.has(status.visibility)) {
|
||||||
return 'lock'
|
return 'lock'
|
||||||
}
|
}
|
||||||
return 'retweet'
|
return 'retweet'
|
||||||
|
|
@ -40,7 +40,7 @@ export const BUTTONS = [{
|
||||||
active: ({ status }) => status.repeated,
|
active: ({ status }) => status.repeated,
|
||||||
counter: ({ status }) => status.repeat_num,
|
counter: ({ status }) => status.repeat_num,
|
||||||
anonLink: true,
|
anonLink: true,
|
||||||
interactive: ({ status, loggedIn }) => loggedIn && !PRIVATE_SCOPES.has(status.visibility),
|
interactive: ({ status, currentUser }) => !!currentUser && (currentUser.id === status.user.id || !PRIVATE_SCOPES.has(status.visibility)),
|
||||||
toggleable: true,
|
toggleable: true,
|
||||||
confirm: ({ status, getters }) => !status.repeated && getters.mergedConfig.modalOnRepeat,
|
confirm: ({ status, getters }) => !status.repeated && getters.mergedConfig.modalOnRepeat,
|
||||||
confirmStrings: {
|
confirmStrings: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue