Skip to content

Commit 32372f6

Browse files
author
djinni-hppro
committed
save loading
1 parent 04721ac commit 32372f6

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/index.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090

9191
<!-- AppShellContent -->
9292
<main class="flex-1 py-1 md:py-4 w-full"
93-
:class="{ 'max-w-max mx-auto sm:px-6 lg:px-8': editingNoteId === null, 'overflow-y-hidden': settingsDialogIsOpen, 'overflow-y-auto': !settingsDialogIsOpen }"
93+
:class="{ 'cursor-wait': isManualSyncing, 'max-w-max mx-auto sm:px-6 lg:px-8': editingNoteId === null, 'overflow-y-hidden': settingsDialogIsOpen, 'overflow-y-auto': !settingsDialogIsOpen }"
9494
>
9595
<!-- Search Box & Add Note -->
9696
<template x-if="editingNoteId === null">
@@ -263,6 +263,7 @@ <h3 class="text-lg font-bold mb-4">Are you sure?</h3>
263263
<!-- Settings Dialog -->
264264
<div x-show="settingsDialogIsOpen"
265265
class="fixed inset-0 z-10 w-full h-full flex items-center justify-center overflow-x-hidden"
266+
:class="isSavingSettings ? 'cursor-wait' : 'cursor-pointer'"
266267
style="display: none;background-color: #0e0e0ee6;"
267268
>
268269
<div class="fixed inset-0 size-auto h-full md:h-auto max-h-full max-w-none md:m-10 p-6 rounded-lg overflow-x-hidden overflow-y-auto bg-white backdrop:bg-transparent"
@@ -461,15 +462,15 @@ <h3 class="text-lg font-bold">Settings <span class="text-sm pl-2 font-light text
461462
<div class="flex justify-end gap-2 mt-2">
462463
<button @click="openImport()" __disabled="!isSyncConfigured" class="cursor-pointer px-4 py-2 rounded-md border border-gray-300 text-gray-700 hover:bg-gray-50">Import</button>
463464
<button @click="handleExport()" __disabled="!isSyncConfigured" class="cursor-pointer px-4 py-2 rounded-md border border-gray-300 text-gray-700 hover:bg-gray-50">Export</button>
464-
<button @click="handleSync()" __disabled="isSyncButtonDisabled" class="cursor-pointer px-4 py-2 rounded-md bg-green-600 text-white hover:bg-green-700 flex items-center">
465+
<button @click="handleSync()" __disabled="isSyncButtonDisabled" class="cursor-pointer px-4 py-2 rounded-md bg-green-600 text-white hover:bg-green-700 flex items-center" :class="isManualSyncing ? 'cursor-wait' : 'cursor-pointer'">
465466
<svg x-show="isManualSyncing" class="animate-spin -ml-1 mr-3 h-5 w-5 text-gray-800" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
466467
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
467468
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
468469
</svg>
469470
<span>Sync</span>
470471
</button>
471-
<button @click="handleSave()" __disabled="!isSyncConfigured" class="cursor-pointer px-4 py-2 rounded-md bg-blue-600 text-white hover:bg-blue-700">
472-
<svg x-show="isManualSyncing" class="animate-spin -ml-1 mr-3 h-5 w-5 text-gray-800" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
472+
<button @click="handleSave()" class="cursor-pointer px-4 py-2 rounded-md bg-blue-600 text-white hover:bg-blue-700 flex items-center" :class="isSavingSettings ? 'cursor-wait' : 'cursor-pointer'">
473+
<svg x-show="isSavingSettings" class="animate-spin -ml-1 mr-3 h-5 w-5 text-gray-800" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
473474
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
474475
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
475476
</svg>
@@ -480,7 +481,7 @@ <h3 class="text-lg font-bold">Settings <span class="text-sm pl-2 font-light text
480481
</div>
481482

482483
<!-- Toasts Container -->
483-
<div class="fixed bottom-2 right-2 z-50 flex flex-col space-y-2">
484+
<div class="fixed top-2 left-2 z-50 flex flex-col space-y-2">
484485
<template x-for="toast in toasts" :key="toast.id">
485486
<div
486487
x-show="toast.show"

0 commit comments

Comments
 (0)