Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F140791
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/components/status_action_buttons/action_button.js b/src/components/status_action_buttons/action_button.js
index 193a96ee..4dc5f1bb 100644
--- a/src/components/status_action_buttons/action_button.js
+++ b/src/components/status_action_buttons/action_button.js
@@ -62,7 +62,6 @@ export default {
'extra',
'status',
'funcArg',
- 'animationState',
'getClass',
'getComponent',
'doAction',
@@ -73,6 +72,9 @@ export default {
EmojiPicker,
Popover
},
+ data: () => ({
+ animationState: false
+ }),
computed: {
buttonClass () {
return [
@@ -116,7 +118,11 @@ export default {
if (button.name === 'emoji') {
this.$refs.picker.showPicker()
} else {
+ this.animationState = true
this.getComponent(button) === 'button' && this.doAction(button)
+ setTimeout(() => {
+ this.animationState = false
+ }, 500)
close()
}
}
diff --git a/src/components/status_action_buttons/action_button.vue b/src/components/status_action_buttons/action_button.vue
index b9dca881..0e409afb 100644
--- a/src/components/status_action_buttons/action_button.vue
+++ b/src/components/status_action_buttons/action_button.vue
@@ -19,7 +19,8 @@
<FAIcon
class="fa-scale-110"
:icon="button.icon(funcArg)"
- :spin="!extra && button.animated?.() && animationState[button.name]"
+ :spin="!extra && button.animated?.() && animationState"
+ style="--fa-animation-duration: 750ms;"
fixed-width
/>
<template v-if="!buttonClass.disabled && button.toggleable?.(funcArg) && button.active">
diff --git a/src/components/status_action_buttons/status_action_buttons.js b/src/components/status_action_buttons/status_action_buttons.js
index a86c6044..8ad0a3fe 100644
--- a/src/components/status_action_buttons/status_action_buttons.js
+++ b/src/components/status_action_buttons/status_action_buttons.js
@@ -21,11 +21,6 @@ const StatusActionButtons = {
emits: ['toggleReplying'],
data () {
return {
- Popover,
- animationState: {
- retweet: false,
- favorite: false
- },
showPin: false,
showingConfirmDialog: false,
currentConfirmTitle: '',
@@ -99,11 +94,9 @@ const StatusActionButtons = {
}
},
doActionReal (button) {
- this.animationState[button.name] = true
button.action(this.funcArg)
.then(() => this.$emit('onSuccess'))
.catch(err => this.$emit('onError', err.error.error))
- .finally(() => setTimeout(() => { this.animationState[button.name] = false }))
},
onExtraClose () {
this.showPin = false
diff --git a/src/components/status_action_buttons/status_action_buttons.vue b/src/components/status_action_buttons/status_action_buttons.vue
index 81e000e7..8e6780ec 100644
--- a/src/components/status_action_buttons/status_action_buttons.vue
+++ b/src/components/status_action_buttons/status_action_buttons.vue
@@ -15,7 +15,6 @@
:funcArg="funcArg"
:get-class="getClass"
:get-component="getComponent"
- :animation-state="animationState"
:close="() => {}"
:do-action="doAction"
/>
@@ -84,7 +83,6 @@
:funcArg="funcArg"
:get-class="getClass"
:get-component="getComponent"
- :animation-state="animationState"
:close="close"
:do-action="doAction"
/>
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Jan 21, 3:58 PM (1 d, 5 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
55733
Default Alt Text
(3 KB)
Attached To
Mode
rPUFE pleroma-fe-upstream
Attached
Detach File
Event Timeline
Log In to Comment