Open home widget create forms in popup modals
Deploy with Docker Compose / deploy (push) Successful in 23s
Weekly Maintenance / maintenance (push) Successful in 1m19s

The Places tab already popped its create form up over the page; every other
/stp widget swapped its contents for the form instead, which meant losing
sight of the list you were adding to and a cramped form inside a grid cell.

Extract the Places modal into a shared components/util/Modal.vue (teleported
backdrop, click-outside and Escape to close) and use it for the Feed, Bookmarks,
Favorites, Consumption and Rowing create forms as well. Widget headers keep
their normal titles now that each form carries its own heading in the modal.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KcFtkisHcKJuTZAnv3fVzA
This commit is contained in:
2026-09-12 18:50:17 +01:00
co-authored by Claude Opus 5
parent 894c158afd
commit fe6fc02b6b
9 changed files with 106 additions and 73 deletions
+9 -8
View File
@@ -1,6 +1,7 @@
<script setup>
import { computed, ref, defineAsyncComponent } from "vue";
import LinkTable from "@/components/util/LinkTable.vue";
import Modal from "@/components/util/Modal.vue";
import Header from "@/components/text/Header.vue";
import CreateToggle from "@/components/input/CreateToggle.vue";
import { useHomeDataStore } from "@/stores/homeData";
@@ -26,16 +27,10 @@ const groupedBookmarks = computed(() => {
<template>
<div class="bookmarks-wrapper">
<Header class="text-left">
{{ showCreate ? "Create Bookmark" : "Bookmarks" }}
Bookmarks
<template #action><CreateToggle v-model="showCreate" /></template>
</Header>
<CreateBookmark
v-if="showCreate"
class="flex-1 min-h-0 p-1"
@done="showCreate = false"
@cancel="showCreate = false"
/>
<div v-if="!showCreate" class="bookmarks-scroll">
<div class="bookmarks-scroll">
<LinkTable
v-for="group in groupedBookmarks"
:key="group[0]"
@@ -43,6 +38,12 @@ const groupedBookmarks = computed(() => {
:items="group[1]"
/>
</div>
<Modal v-model="showCreate">
<CreateBookmark
@done="showCreate = false"
@cancel="showCreate = false"
/>
</Modal>
</div>
</template>