Skip to content

Commit 21d14b9

Browse files
feat(web): dropdown and attachment card changes
1 parent 65f8f09 commit 21d14b9

6 files changed

+29
-30
lines changed

web/components/attachment_card.templ

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ templ AttachmentCard(props AttachmentCardProps) {
1818
}
1919
<div class="flex-1 p-2 flex flex-col justify-end gap-2">
2020
<p class="break-all font-bold">{ props.Attachment.Name }</p>
21-
<div class="join flex justify-end">
22-
<a class="join-item btn tooltip flex items-center" data-tip="Envelope" href={ routes.Envelope(props.Attachment.MessageID).URLQuery("tab=" + routes.EnvelopeTabAttachments.String()) }>
21+
<div class="join flex">
22+
<a class="join-item btn tooltip flex-1 flex items-center" data-tip="Envelope" href={ routes.Envelope(props.Attachment.MessageID).URLQuery("tab=" + routes.EnvelopeTabAttachments.String()) }>
2323
@icons.Mail("h-5 w-5")
2424
</a>
25-
<a class="join-item btn tooltip flex items-center" data-tip="View" hx-boost="false" href={ routes.AttachmentFile(props.Attachment.FileName()).URL() }>
25+
<a class="join-item btn tooltip flex-1 flex items-center" data-tip="View" hx-boost="false" href={ routes.AttachmentFile(props.Attachment.FileName()).URL() }>
2626
@icons.Eye("h-5 w-5")
2727
</a>
28-
<a class="join-item btn tooltip flex items-center" data-tip="Download" hx-boost="false" href={ routes.AttachmentFile(props.Attachment.FileName()).URLQuery("download=1") }>
28+
<a class="join-item btn tooltip flex-1 flex items-center" data-tip="Download" hx-boost="false" href={ routes.AttachmentFile(props.Attachment.FileName()).URLQuery("download=1") }>
2929
@icons.Download("h-5 w-5")
3030
</a>
3131
</div>

web/components/attachment_card_templ.go

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/components/header.templ

+4-5
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ templ Header(m meta.Meta) {
1818
</div>
1919
if !m.Anonymous {
2020
<div class="flex-none">
21-
<details class="dropdown dropdown-end">
22-
<summary class="btn btn-square btn-ghost">
21+
<div class="dropdown dropdown-end">
22+
<label tabindex="0" class="btn btn-square btn-ghost">
2323
@icons.More("h-5 w-5")
24-
</summary>
24+
</label>
2525
<ul class="menu dropdown-content bg-base-100 rounded-box z-50 w-52 p-2 shadow-lg">
2626
<li>
2727
<a href="#" hx-delete={ routes.Logout().URLString() }>
@@ -30,9 +30,8 @@ templ Header(m meta.Meta) {
3030
</a>
3131
</li>
3232
</ul>
33-
</details>
33+
</div>
3434
</div>
3535
}
3636
</div>
3737
}
38-

web/components/header_templ.go

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/components/paginate_header.templ

+12-12
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ type PaginateHeaderProps struct {
1919
templ PaginateHeader(props PaginateHeaderProps) {
2020
<div class="flex flex-col items-center justify-between gap-4 sm:flex-row">
2121
<div class="mr-auto flex flex-row items-center gap-2">
22-
<details class="dropdown">
23-
<summary class="btn btn-sm btn-outline">
22+
<div class="dropdown">
23+
<label tabindex="0" class="btn btn-sm btn-outline">
2424
{ strconv.Itoa(props.PageResult.PerPage) }
25-
</summary>
26-
<ul class="menu dropdown-content bg-base-100 rounded-box z-50 w-52 p-2 shadow-lg">
27-
for _, option := range limits {
28-
<li>
29-
<a href={ props.Route.URLQuery(helpers.Query(props.Query, "perPage", option)) }>
30-
{ strconv.Itoa(option) }
31-
</a>
32-
</li>
33-
}
25+
</label>
26+
<ul tabindex="0" class="menu dropdown-content bg-base-100 rounded-box z-50 w-52 p-2 shadow-lg">
27+
for _, option := range limits {
28+
<li>
29+
<a href={ props.Route.URLQuery(helpers.Query(props.Query, "perPage", option)) }>
30+
{ strconv.Itoa(option) }
31+
</a>
32+
</li>
33+
}
3434
</ul>
35-
</details>
35+
</div>
3636
if props.Ascending {
3737
<a class="btn btn-sm btn-outline" href={ props.Route.URLQuery(helpers.Query(props.Query, "ascending", "")) }>
3838
ASC

web/components/paginate_header_templ.go

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)