From fed3772dfd88667ed91a86f51f90d4dd1413c676 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Tue, 4 Oct 2022 12:00:36 +0200 Subject: Add loading on like request --- pages/models/_id/index.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'pages') diff --git a/pages/models/_id/index.vue b/pages/models/_id/index.vue index abc9a34..a353170 100644 --- a/pages/models/_id/index.vue +++ b/pages/models/_id/index.vue @@ -87,9 +87,15 @@ .mb-5.text-right button.inline-flex.leading-6.justify-center.rounded-md.border.border-transparent.bg-white.py-2.px-4.mr-2.text-sm.font-medium.text-black.shadow-sm( - class="hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-300 focus:ring-offset-2" + class="hover:bg-gray-500 focus:outline-none focus:ring-2 focus:ring-gray-700 focus:ring-offset-2" @click="toggleLike" + :disabled="isLoading" + :readonly="isLoading" ) + + + + svg(v-if="!likedByUser()" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 mr-1") svg(v-else xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-6 h-6 mr-1") -- cgit v1.2.3-18-g5258