Skip to content

Commit

Permalink
Overview: Truncate alternative addresses to collapse
Browse files Browse the repository at this point in the history
  • Loading branch information
cal0pteryx committed Aug 3, 2024
1 parent ee94ecb commit fce242d
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions themes/xmpp-providers/layouts/shortcodes/provider-table.html
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,23 @@
</td>
<td>
{{ if .alternativeJids }}
{{ range .alternativeJids }}
<span class="badge text-bg-secondary opacity-75">{{ . }}</span>
{{ if gt (len .alternativeJids) 1 }}
<div class="d-flex align-items-center">
<button class="btn btn-sm py-0 ps-0" type="button" data-bs-toggle="collapse" data-bs-target="#{{ .jid }}-alternative-addresses-collapse" aria-expanded="false" aria-controls="{{ .jid }}-alternative-addresses-collapse">
Show All ({{ len .alternativeJids }})
</button>
<div>
<div class="collapse collapse-horizontal" id="{{ .jid }}-alternative-addresses-collapse">
{{ range .alternativeJids }}
<span class="badge text-bg-secondary opacity-75">{{ . }}</span>
{{ end }}
</div>
</div>
</div>
{{ else }}
{{ range .alternativeJids }}
<span class="badge text-bg-secondary opacity-75">{{ . }}</span>
{{ end }}
{{ end }}
{{ else }}
-
Expand Down

0 comments on commit fce242d

Please sign in to comment.