1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-21 13:59:36 +02:00

Enhance unlinked state logic for checklists and notes; update button layout in modals

This commit is contained in:
Sean Morley 2024-12-26 22:09:17 -05:00
parent df2ce01910
commit 8f7551f4be
6 changed files with 7 additions and 9 deletions

View file

@ -30,7 +30,7 @@
collection.start_date > checklist.date && collection.start_date > checklist.date &&
collection.end_date > checklist.date; collection.end_date > checklist.date;
unlinked = !!(startOutsideRange || endOutsideRange); unlinked = !!(startOutsideRange || endOutsideRange || !checklist.date);
} }
} }

View file

@ -293,10 +293,9 @@
{/if} {/if}
<div class="mt-4"> <div class="mt-4">
<button class="btn btn-neutral" on:click={close}>{$t('about.close')}</button>
<button class="btn btn-primary mr-1" disabled={isReadOnly} on:click={save} <button class="btn btn-primary mr-1" disabled={isReadOnly} on:click={save}
>{$t('notes.save')}</button >{$t('notes.save')}</button
> ><button class="btn btn-neutral" on:click={close}>{$t('about.close')}</button>
</div> </div>
</form> </form>
</div> </div>

View file

@ -25,7 +25,7 @@
const endOutsideRange = const endOutsideRange =
note.date && collection.start_date > note.date && collection.end_date > note.date; note.date && collection.start_date > note.date && collection.end_date > note.date;
unlinked = !!(startOutsideRange || endOutsideRange); unlinked = !!(startOutsideRange || endOutsideRange || !note.date);
} }
} }

View file

@ -288,11 +288,10 @@
<!-- Action Buttons --> <!-- Action Buttons -->
<div class="mt-4"> <div class="mt-4">
<button class="btn btn-neutral" on:click={close}>
{$t('about.close')}
</button>
<button class="btn btn-primary mr-1" disabled={isReadOnly} on:click={save}> <button class="btn btn-primary mr-1" disabled={isReadOnly} on:click={save}>
{$t('notes.save')} {$t('notes.save')}
</button><button class="btn btn-neutral" on:click={close}>
{$t('about.close')}
</button> </button>
</div> </div>
</form> </form>

View file

@ -589,7 +589,7 @@ it would also work to just use on:click on the MapLibre component itself. -->
<!-- Form Actions --> <!-- Form Actions -->
<div class="mt-4"> <div class="mt-4">
<button type="submit" class="btn btn-primary"> <button type="submit" class="btn btn-primary">
{$t('adventures.save_next')} {$t('notes.save')}
</button> </button>
<button type="button" class="btn" on:click={close}> <button type="button" class="btn" on:click={close}>
{$t('about.close')} {$t('about.close')}

View file

@ -426,7 +426,7 @@
{/if} {/if}
{#if collection.description} {#if collection.description}
<div class="flex justify-center mt-4"> <div class="flex justify-center mt-4 max-w-screen-lg mx-auto">
<article <article
class="prose overflow-auto max-h-96 max-w-full p-4 border border-base-300 rounded-lg bg-base-300 mb-4" class="prose overflow-auto max-h-96 max-w-full p-4 border border-base-300 rounded-lg bg-base-300 mb-4"
style="overflow-y: auto;" style="overflow-y: auto;"