move shops to new page; live vs mock navbar

This commit is contained in:
2026-02-06 16:37:55 -07:00
parent 548f72d9a4
commit e3b2dd3377
11 changed files with 265 additions and 345 deletions
@@ -47,128 +47,3 @@
</div>
</h2>
</section>
<section
id="shops-section"
class="
m-[1rem]
pb-[1rem]
border-b-[2px]
border-sidebar-border
"
>
<details class="flex flex-col items-stretch" open>
<summary class="list-none cursor-pointer self-center">
{{-
component "tutorial-tooltip"
"AnchorTag" "h2"
"AnchorID" "shops-button"
"AnchorClickedEventName" "anchorClicked"
"AnchorContent" "Shops"
"AnchorClass" "bg-card my-[0.5em] px-[2em] py-[0.5em] rounded-lg"
"PopoverID" "shops-popover"
"PopoverContentIDPrefix" "shops-popover-content"
"PopoverContents" (
newHTMLSlice
"Click <span class=\"font-bold italic\">Shops</span> to display all shops and platforms available"
"Click <span class=\"font-bold italic\">Shops</span> to hide them again"
"There you go!"
)
}}
<!--h2
class="bg-card my-[0.5em] px-[2em] py-[0.5em] rounded-lg"
style="anchor-name: --shops-button;"
_="
on click
set popover to the #shops-popover
send shopsButtonClicked to #shops-popover
"
>
Shops
</h2-->
<!--div
popover="manual"
id="shops-popover"
class="
border-[1px] border-sidebar-border rounded-lg
bg-card
p-[1em]
animate-pulse
max-w-[80vw]
mt-[1.5em]
open:grid
cursor-default
"
style="
position: fixed;
position-anchor: --shops-button;
position-area: bottom;
grid-template-columns: 1fr max-content;
grid-template-rows: max-content;
gap: 1em;
box-shadow: 2px 2px 2px 1px rgb(0 0 0 / 20%);
transition-behavior: allow-discrete;
"
_="
init
call me.showPopover()
set :shopButtonClicks to 0
on click
event.preventDefault()
on shopsButtonClicked
set :shopButtonClicks to :shopButtonClicks + 1
if :shopButtonClicks is 1 then
hide #shop-popover-msg-1
show #shop-popover-msg-2
else if :shopButtonClicks is 2 then
hide #shop-popover-msg-2
show #shop-popover-msg-3
else if :shopButtonClicks is 3 then
call me.hidePopover()
end
"
>
<span id="shop-popover-msg-1" style="grid-column: 1;">
Click <span class="font-bold italic">Shops</span> to display all shops and platforms available
</span>
<span id="shop-popover-msg-2" style="grid-column: 1; display: none;">
Click <span class="font-bold italic">Shops</span> to hide them again
</span>
<span id="shop-popover-msg-3" style="grid-column: 1; display: none;">
There you go!
</span>
<button
class="cursor-pointer"
style="
grid-column: 2;
font-size: 2em;
line-height: 0.5em;
"
_="
on click
set parent to the closest #shops-popover
call parent.hidePopover()
"
>
&#x00d7;
</button>
</div-->
</summary>
<ul class="list-none" hx-swap="morph">
{{- range $i, $platform := .Accounts.GetOrderOfPlatformsOnAccountPage $acctID }}
{{ component (printf "/accounts/%d/platforms/%s/list-item" $acctID $platform) "OrderIndex" $i }}
{{- end }}
</ul>
</details>
</section>
@@ -0,0 +1,25 @@
{{- .Auth.ByMatchingAccountID 2 }}
{{- $acctID := .Identity.Account.AccountID }}
{{- $stores := .Accounts.GetShops $acctID -}}
{{- define "title" }} Inventory++ {{ end }}
<h1 class="text-center mb-[0.5em]">Inventory</h1>
<h2 class="text-center mb-[0.5em]">Synced Listings</h2>
<section class="w-full flex flex-col items-center">
<h3 class="mb-[1.25rem]">
Create a Sync Group
</h3>
{{/*
{{ component (printf "accounts/%d/inventory/sync-groups/draft/table" $acctID) }}
<div>
{{ component (printf "accounts/%d/inventory/sync-groups/draft/table/add-listing-button" $acctID) }}
{{ component (printf "accounts/%d/inventory/sync-groups/draft/table/save-sync-group-button" $acctID) }}
</div>
*/}}
</section>
@@ -0,0 +1,22 @@
{{- .Auth.ByMatchingAccountID 2 }}
{{- define "title" }} Inventory++ Shops {{ end }}
{{- $acctID := .Identity.Account.AccountID }}
<section
id="shops-section"
class="
m-[1rem]
pb-[1rem]
"
>
<ul class="list-none" hx-swap="morph">
{{- range $i, $platform := .Accounts.GetOrderOfPlatformsOnAccountPage $acctID }}
{{ component (printf "/accounts/%d/platforms/%s/shops/list-item" $acctID $platform)
"OrderIndex" $i
}}
{{- end }}
</ul>
</section>
@@ -0,0 +1,23 @@
{{- .Auth.ByMatchingAccountID 2 }}
{{- define "title" }} Inventory++ Mock Shops {{ end }}
{{- $acctID := .Identity.Account.AccountID }}
<section
id="mock-shops-section"
class="
m-[1rem]
pb-[1rem]
"
>
<ul class="list-none" hx-swap="morph">
{{- range $i, $platform := .Accounts.GetOrderOfPlatformsOnAccountPage $acctID }}
{{ component (printf "/accounts/%d/platforms/%s/shops/list-item" $acctID $platform)
"OrderIndex" $i
"Mock" true
}}
{{- end }}
</ul>
</section>