feat(publish): add loading icon for sending

This commit is contained in:
三咲智子 Kevin Deng 2023-01-10 21:32:50 +08:00
parent 0ef99f2c8e
commit 81c8a74748
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
2 changed files with 4 additions and 2 deletions

View file

@ -260,16 +260,17 @@ defineExpose({
<CommonTooltip id="publish-tooltip" placement="top" :content="$t('tooltip.add_publishable_content')" :disabled="!isPublishDisabled">
<button
btn-solid rounded-3 text-sm w-full
btn-solid rounded-3 text-sm w-full flex="~ gap1" items-center
md:w-fit
class="publish-button"
:aria-disabled="isPublishDisabled"
aria-describedby="publish-tooltip"
@click="publish"
>
<div v-if="isSending" i-ri:loader-2-fill animate-spin />
<span v-if="draft.editingStatus">{{ $t('action.save_changes') }}</span>
<span v-else-if="draft.params.inReplyToId">{{ $t('action.reply') }}</span>
<span v-else>{{ $t('action.publish') }}</span>
<span v-else>{{ !isSending ? $t('action.publish') : $t('state.publishing') }}</span>
</button>
</CommonTooltip>
</div>

View file

@ -347,6 +347,7 @@
"edited": "(Edited)",
"editing": "Editing",
"loading": "Loading...",
"publishing": "Publishing",
"upload_failed": "Upload failed",
"uploading": "Uploading..."
},