Improve disk UI and build performance
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{{define "layout"}}<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@@ -12,7 +12,7 @@
|
||||
<h1>🎵 Jukebox Maker</h1>
|
||||
<nav class="header-nav">
|
||||
<a href="/" class="header-action {{if eq .Page "dashboard"}}active{{end}}">Dashboard</a>
|
||||
<a href="/settings" class="header-action {{if eq .Page "settings"}}active{{end}}">Настройки</a>
|
||||
<a href="/settings" class="header-action {{if eq .Page "settings"}}active{{end}}">Settings</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
{{template "content" .}}
|
||||
</main>
|
||||
|
||||
<footer class="page-footer">
|
||||
<span>Version {{.Version}}</span>
|
||||
</footer>
|
||||
|
||||
<div class="toast-container" id="toastContainer"></div>
|
||||
|
||||
<script>
|
||||
@@ -33,10 +37,10 @@ function toast(msg, type) {
|
||||
}
|
||||
function fmtBytes(b) {
|
||||
if (!b) return '—';
|
||||
if (b >= 1e12) return (b/1e12).toFixed(1) + ' ТБ';
|
||||
if (b >= 1e9) return (b/1e9).toFixed(1) + ' ГБ';
|
||||
if (b >= 1e6) return (b/1e6).toFixed(1) + ' МБ';
|
||||
return (b/1e3).toFixed(0) + ' КБ';
|
||||
if (b >= 1e12) return (b/1e12).toFixed(1) + ' TB';
|
||||
if (b >= 1e9) return (b/1e9).toFixed(1) + ' GB';
|
||||
if (b >= 1e6) return (b/1e6).toFixed(1) + ' MB';
|
||||
return (b/1e3).toFixed(0) + ' KB';
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user