show sending state for send message button as finding path could take some time

This commit is contained in:
liamcottle 2024-07-12 20:54:07 +12:00
commit ed4ae36c44

View file

@ -757,7 +757,8 @@
<!-- send message -->
<button @click="sendMessage" :disabled="!canSendMessage" type="button" class="ml-auto my-auto inline-flex items-center gap-x-1 rounded-md px-2.5 py-1.5 text-sm font-semibold text-white shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2" :class="[ canSendMessage ? 'bg-blue-500 hover:bg-blue-400 focus-visible:outline-blue-500' : 'bg-gray-400 focus-visible:outline-gray-500 cursor-not-allowed']">
Send
<span v-if="isSendingMessage">Sending...</span>
<span v-else>Send</span>
</button>
</div>
@ -3096,6 +3097,11 @@
return false;
}
// can't send if already sending
if(this.isSendingMessage){
return false;
}
return true;
},