reorganized account page component templates
This commit is contained in:
+2
-1
@@ -144,5 +144,6 @@
|
||||
</h4>
|
||||
</summary>
|
||||
|
||||
{{ component ( printf "/accounts/%d/shops/link-sections/%s/links/%s" $acctID $platform $platform ) }}
|
||||
{{/* TODO: how to remove the platform from the path twice? */}}
|
||||
{{ component ( printf "/accounts/%d/platforms/%s/link-sections/links/%s" $acctID $platform $platform ) }}
|
||||
</details>
|
||||
+1
-2
@@ -5,8 +5,7 @@
|
||||
<h3>Etsy User: {{ $etsyUser.UserID }}; Shop ID: {{ $etsyUser.ShopID }}</h3>
|
||||
{{- else }}
|
||||
<h3 class="m-[0.5em] px-[2em] italic">
|
||||
{{/* TODO: create this link dynamically, not EVERYTIME THE PAGE IS LOADED */}}
|
||||
<a href="{{ printf "/webhooks/etsy/%d/new-account-link" $acctID.AccountID }}">
|
||||
<a href="{{ printf "/api/webhooks/etsy/%d/new-account-link" $acctID.AccountID }}" hx-boost="false">
|
||||
Link Your Store!
|
||||
</a>
|
||||
</h3>
|
||||
+2
-2
@@ -18,7 +18,7 @@
|
||||
hx-drag-action={{printf "/api/accounts/%d/platforms/%s/order-index" $acctID $platformSegment}}
|
||||
|
||||
hx-trigger={{printf "sse:accounts_%d_platforms_%s_order-index" $acctID $platformSegment }}
|
||||
hx-get={{printf "/ui/accounts/%d/shops/list-items/%s" $acctID $platformSegment}}
|
||||
hx-get={{printf "/ui/accounts/%d/platforms/%s/list-item" $acctID $platformSegment}}
|
||||
|
||||
draggable="true"
|
||||
data-order-index={{$orderIndex}}
|
||||
@@ -98,7 +98,7 @@
|
||||
class="p-[1em] text-center"
|
||||
>
|
||||
{{- $pathSegment := lowerSnakeCase (printf "%s" $platform) }}
|
||||
{{- component (printf "/accounts/%d/shops/link-sections/%s" $acctID $pathSegment) }}
|
||||
{{- component (printf "/accounts/%d/platforms/%s/link-sections" $acctID $pathSegment) }}
|
||||
</div>
|
||||
</details>
|
||||
</li>
|
||||
@@ -167,7 +167,7 @@
|
||||
|
||||
<ul class="list-none" hx-swap="morph">
|
||||
{{- range $i, $platform := .Accounts.GetOrderOfPlatformsOnAccountPage $acctID }}
|
||||
{{ component (printf "/accounts/%d/shops/list-items/%s" $acctID $platform) "OrderIndex" $i }}
|
||||
{{ component (printf "/accounts/%d/platforms/%s/list-item" $acctID $platform) "OrderIndex" $i }}
|
||||
{{- end }}
|
||||
</ul>
|
||||
</details>
|
||||
|
||||
Reference in New Issue
Block a user