Merge remote-tracking branch 'origin/develop' into sss-objects
This commit is contained in:
commit
76616461e9
130 changed files with 1129 additions and 1205 deletions
|
|
@ -124,6 +124,7 @@ export default {
|
|||
}
|
||||
},
|
||||
doActionWrap (button, close = () => {}) {
|
||||
if (this.button.interactive ? !this.button.interactive(this.funcArg) : false) return
|
||||
this.$emit('interacted')
|
||||
if (button.name === 'emoji') {
|
||||
this.$refs.picker.showPicker()
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
:title="$t(button.label(funcArg))"
|
||||
target="_blank"
|
||||
:tabindex="0"
|
||||
:disabled="buttonClass.disabled"
|
||||
:disabled="button.interactive ? !button.interactive(funcArg) : false"
|
||||
:href="getComponent(button) == 'a' ? button.link?.(funcArg) || remoteInteractionLink : undefined"
|
||||
@click="doActionWrap(button, outerClose)"
|
||||
>
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
:style="{ '--fa-animation-duration': '750ms' }"
|
||||
fixed-width
|
||||
/>
|
||||
<template v-if="!buttonClass.disabled && button.toggleable?.(funcArg) && button.active">
|
||||
<template v-if="!buttonClass.disabled && (!button.interactive || button?.interactive(funcArg)) && button.toggleable?.(funcArg) && button.active">
|
||||
<FAIcon
|
||||
v-if="button.active(funcArg)"
|
||||
class="active-marker"
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ export const BUTTONS = [{
|
|||
label: ({ status }) => status.repeated
|
||||
? 'tool_tip.unrepeat'
|
||||
: 'tool_tip.repeat',
|
||||
icon ({ status }) {
|
||||
if (PRIVATE_SCOPES.has(status.visibility)) {
|
||||
icon ({ status, currentUser }) {
|
||||
if (currentUser.id !== status.user.id && PRIVATE_SCOPES.has(status.visibility)) {
|
||||
return 'lock'
|
||||
}
|
||||
return 'retweet'
|
||||
|
|
@ -40,7 +40,7 @@ export const BUTTONS = [{
|
|||
active: ({ status }) => status.repeated,
|
||||
counter: ({ status }) => status.repeat_num,
|
||||
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,
|
||||
confirm: ({ status, getters }) => !status.repeated && getters.mergedConfig.modalOnRepeat,
|
||||
confirmStrings: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue