mirror of
https://git.pleroma.social/sjw/pleroma-fe.git
synced 2024-12-23 01:46:39 +01:00
Display loading and error indicator for conversation page
This commit is contained in:
parent
39269c4829
commit
b173741f87
1
changelog.d/status-loading-indicator.add
Normal file
1
changelog.d/status-loading-indicator.add
Normal file
@ -0,0 +1 @@
|
|||||||
|
Display loading and error indicator for conversation page
|
@ -56,7 +56,8 @@ const conversation = {
|
|||||||
expanded: false,
|
expanded: false,
|
||||||
threadDisplayStatusObject: {}, // id => 'showing' | 'hidden'
|
threadDisplayStatusObject: {}, // id => 'showing' | 'hidden'
|
||||||
statusContentPropertiesObject: {},
|
statusContentPropertiesObject: {},
|
||||||
inlineDivePosition: null
|
inlineDivePosition: null,
|
||||||
|
loadStatusError: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: [
|
props: [
|
||||||
@ -392,11 +393,15 @@ const conversation = {
|
|||||||
this.setHighlight(this.originalStatusId)
|
this.setHighlight(this.originalStatusId)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
this.loadStatusError = null
|
||||||
this.$store.state.api.backendInteractor.fetchStatus({ id: this.statusId })
|
this.$store.state.api.backendInteractor.fetchStatus({ id: this.statusId })
|
||||||
.then((status) => {
|
.then((status) => {
|
||||||
this.$store.dispatch('addNewStatuses', { statuses: [status] })
|
this.$store.dispatch('addNewStatuses', { statuses: [status] })
|
||||||
this.fetchConversation()
|
this.fetchConversation()
|
||||||
})
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
this.loadStatusError = error
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getReplies (id) {
|
getReplies (id) {
|
||||||
|
@ -29,6 +29,23 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
v-if="isPage && !status"
|
||||||
|
class="conversation-body"
|
||||||
|
:class="{ 'panel-body': isExpanded }"
|
||||||
|
>
|
||||||
|
<p v-if="!loadStatusError">
|
||||||
|
<FAIcon
|
||||||
|
spin
|
||||||
|
icon="circle-notch"
|
||||||
|
/>
|
||||||
|
{{ $t('status.loading') }}
|
||||||
|
</p>
|
||||||
|
<p v-else>
|
||||||
|
{{ $t('status.load_error', { error: loadStatusError }) }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-else
|
||||||
class="conversation-body"
|
class="conversation-body"
|
||||||
:class="{ 'panel-body': isExpanded }"
|
:class="{ 'panel-body': isExpanded }"
|
||||||
>
|
>
|
||||||
|
@ -1110,7 +1110,9 @@
|
|||||||
"hide_quote": "Hide the quoted status",
|
"hide_quote": "Hide the quoted status",
|
||||||
"display_quote": "Display the quoted status",
|
"display_quote": "Display the quoted status",
|
||||||
"invisible_quote": "Quoted status unavailable: {link}",
|
"invisible_quote": "Quoted status unavailable: {link}",
|
||||||
"more_actions": "More actions on this status"
|
"more_actions": "More actions on this status",
|
||||||
|
"loading": "Loading...",
|
||||||
|
"load_error": "Unable to load status: {error}"
|
||||||
},
|
},
|
||||||
"user_card": {
|
"user_card": {
|
||||||
"approve": "Approve",
|
"approve": "Approve",
|
||||||
|
Loading…
Reference in New Issue
Block a user