Skip to content

Commit 2fafae8

Browse files
committed
Updated bootstrap icons, replaced bi-share with svg to fix #274
1 parent b761ee7 commit 2fafae8

File tree

6 files changed

+18
-8
lines changed

6 files changed

+18
-8
lines changed

internal/webserver/web/static/assets/dist/icons/bootstrap-icons.min.css

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.
Binary file not shown.

internal/webserver/web/static/js/admin_ui_upload.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,10 @@ function createButtonGroup(item) {
790790
btnShare.className = "btn btn-outline-light btn-sm";
791791
btnShare.title = "Share";
792792
btnShare.onclick = () => shareUrl(item.Id);
793-
btnShare.innerHTML = `<i class="bi bi-share"></i>`;
793+
// For some reason bi-share does not always show up, using the svg fixes it
794+
btnShare.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi" viewBox="0 0 16 16">
795+
<path d="M13.5 1a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3M11 2.5a2.5 2.5 0 1 1 .603 1.628l-6.718 3.12a2.5 2.5 0 0 1 0 1.504l6.718 3.12a2.5 2.5 0 1 1-.488.876l-6.718-3.12a2.5 2.5 0 1 1 0-3.256l6.718-3.12A2.5 2.5 0 0 1 11 2.5m-8.5 4a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3m11 5.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3"/>
796+
</svg>`;
794797
group1.appendChild(btnShare);
795798

796799

internal/webserver/web/static/js/min/admin.min.15.js

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/webserver/web/templates/html_admin.tmpl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,13 +242,18 @@
242242

243243
{{ define "admin_button_share" }}
244244
<button type="button" class="btn btn-outline-light btn-sm" title="Share" onclick="shareUrl('{{ .CurrentFile.Id }}',
245-
'{{ .CurrentFile.UrlDownload }}')"><i class="bi bi-share"></i></button>
245+
'{{ .CurrentFile.UrlDownload }}')">
246+
<!-- For some reason bi-share does not always show up, using the svg fixes it -->
247+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi" viewBox="0 0 16 16">
248+
<path d="M13.5 1a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3M11 2.5a2.5 2.5 0 1 1 .603 1.628l-6.718 3.12a2.5 2.5 0 0 1 0 1.504l6.718 3.12a2.5 2.5 0 1 1-.488.876l-6.718-3.12a2.5 2.5 0 1 1 0-3.256l6.718-3.12A2.5 2.5 0 0 1 11 2.5m-8.5 4a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3m11 5.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3"/>
249+
</svg>
250+
</button>
246251
<button type="button" class="btn btn-outline-light btn-sm dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
247252
</button>
248253
<ul class="dropdown-menu dropdown-menu-end" data-bs-theme="dark" >
249-
<li style="cursor: pointer;"><a class="dropdown-item" id="qrcode-{{ .CurrentFile.Id }}" title="Open QR Code" class="btn btn-outline-light btn-sm" onclick="showQrCode('{{ .CurrentFile.UrlDownload }}');"><i class="bi bi-qr-code"></i> QR Code</a></li>
254+
<li style="cursor: pointer;"><a class="dropdown-item" id="qrcode-{{ .CurrentFile.Id }}" title="Open QR Code" onclick="showQrCode('{{ .CurrentFile.UrlDownload }}');"><i class="bi bi-qr-code"></i> QR Code</a></li>
250255
<li style="cursor: pointer;"><a class="dropdown-item" id="email-{{ .CurrentFile.Id }}" href="mailto:?body={{ .CurrentFile.UrlDownload | urlquery}}"
251-
target="_blank" title="Share via email" class="btn btn-outline-light btn-sm"><i class="bi bi-envelope"></i> Email</a></li>
256+
target="_blank" title="Share via email"><i class="bi bi-envelope"></i> Email</a></li>
252257
</ul>
253258
{{ end }}
254259

0 commit comments

Comments
 (0)