diff options
Diffstat (limited to 'web')
| -rw-r--r-- | web/templates/index.html | 15 | ||||
| -rw-r--r-- | web/templates/partials/shopping-mode-items.html | 3 | ||||
| -rw-r--r-- | web/templates/partials/shopping-tab.html | 4 |
3 files changed, 12 insertions, 10 deletions
diff --git a/web/templates/index.html b/web/templates/index.html index b11b557..f58c5e1 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -189,14 +189,14 @@ <form hx-post="/unified-add" hx-swap="none" hx-on::after-request="if(event.detail.successful) { this.reset(); closeActionModal(); htmx.trigger(document.body, 'refresh-tasks'); }"> - <input type="hidden" name="source" value="trello"> + <input type="hidden" name="source" value="shopping"> <input type="text" name="title" placeholder="Item name..." class="w-full bg-input border border-white/20 rounded-lg px-3 py-2 text-sm text-white placeholder-white/50 mb-3" required> - <select name="list_id" - id="shopping-list-select" + <select name="store" + id="shopping-store-select" class="w-full bg-input border border-white/20 rounded-lg px-3 py-2 text-sm text-white mb-3" required> <option value="">Loading stores...</option> @@ -244,9 +244,12 @@ } } function loadShoppingLists() { - var select = document.getElementById('shopping-list-select'); + // Stores, not Trello lists: the Shopping board is no longer a + // shopping source, so an item added to a Trello list would not + // have shown up in the list at all. + var select = document.getElementById('shopping-store-select'); if (select.options.length <= 1) { - fetch('/partials/shopping-lists') + fetch('/partials/shopping-stores') .then(function(r) { return r.text(); }) .then(function(html) { select.innerHTML = html; @@ -254,7 +257,7 @@ select.selectedIndex = 0; } }) - .catch(function(e) { console.error('Failed to load shopping lists:', e); }); + .catch(function(e) { console.error('Failed to load shopping stores:', e); }); } } // Keyboard shortcut: Ctrl+K or Cmd+K diff --git a/web/templates/partials/shopping-mode-items.html b/web/templates/partials/shopping-mode-items.html index 5dad772..c49b164 100644 --- a/web/templates/partials/shopping-mode-items.html +++ b/web/templates/partials/shopping-mode-items.html @@ -19,8 +19,7 @@ <!-- Source badge --> <span class="text-xs px-2 py-0.5 rounded flex-shrink-0 - {{if eq .Source "trello"}}bg-blue-900/50 text-blue-300 - {{else if eq .Source "user"}}bg-purple-900/50 text-purple-300 + {{if eq .Source "user"}}bg-purple-900/50 text-purple-300 {{else}}bg-green-900/50 text-green-300{{end}}"> {{.Source}} </span> diff --git a/web/templates/partials/shopping-tab.html b/web/templates/partials/shopping-tab.html index e68876f..9d49122 100644 --- a/web/templates/partials/shopping-tab.html +++ b/web/templates/partials/shopping-tab.html @@ -117,7 +117,7 @@ <li class="flex items-center gap-3 p-3 bg-card bg-card-hover transition-colors rounded-lg border border-white/5"> <span class="flex-1 text-white">{{.Name}}</span> {{if .Quantity}}<span class="text-white/50 text-sm">{{.Quantity}}</span>{{end}} - <span class="text-xs px-2 py-0.5 rounded {{if eq .Source "trello"}}bg-blue-900/50 text-blue-300{{else if eq .Source "user"}}bg-purple-900/50 text-purple-300{{else}}bg-green-900/50 text-green-300{{end}}"> + <span class="text-xs px-2 py-0.5 rounded {{if eq .Source "user"}}bg-purple-900/50 text-purple-300{{else}}bg-green-900/50 text-green-300{{end}}"> {{.Source}} </span> </li> @@ -161,7 +161,7 @@ <span class="text-xs px-2 py-0.5 rounded bg-white/10 text-white/50"> {{.Store}} </span> - <span class="text-xs px-2 py-0.5 rounded {{if eq .Source "trello"}}bg-blue-900/50 text-blue-300{{else if eq .Source "user"}}bg-purple-900/50 text-purple-300{{else}}bg-green-900/50 text-green-300{{end}}"> + <span class="text-xs px-2 py-0.5 rounded {{if eq .Source "user"}}bg-purple-900/50 text-purple-300{{else}}bg-green-900/50 text-green-300{{end}}"> {{.Source}} </span> </li> |
