Make it a little faster, queue is in sqlite now, fix db bug and more
This commit is contained in:
@@ -21,34 +21,48 @@ func Components.Shell(title, html, page, $mypage)
|
||||
text="Home",
|
||||
icon="home",
|
||||
href=index,
|
||||
classStr=""
|
||||
classStr="",
|
||||
badge = ""
|
||||
},
|
||||
{
|
||||
text="Queue",
|
||||
icon="downloading",
|
||||
href=(/"queue").MakeRelative(mypage).ToString(),,
|
||||
classStr="",
|
||||
badge=<b hx-trigger="every 1000ms" hx-target="this" hx-push-url="false" hx-indicator="none" hx-get="./queue-size" hx-swap="outerHTML">
|
||||
?
|
||||
</b>
|
||||
},
|
||||
{
|
||||
text = "Downloads",
|
||||
icon = "download",
|
||||
href=(/"downloads").MakeRelative(mypage).ToString(),
|
||||
classStr=""
|
||||
classStr="",
|
||||
badge=""
|
||||
},
|
||||
{
|
||||
text = "Plugins",
|
||||
icon = "extension",
|
||||
href= (/"plugins").MakeRelative(mypage).ToString(),
|
||||
classStr=""
|
||||
classStr="",
|
||||
badge=""
|
||||
},
|
||||
{
|
||||
text = "Settings",
|
||||
icon = "settings",
|
||||
href= (/"settings").MakeRelative(mypage).ToString(),
|
||||
classStr=""
|
||||
classStr="",
|
||||
badge=""
|
||||
},
|
||||
{
|
||||
text = "Api",
|
||||
icon = "api",
|
||||
href = (/"api").MakeRelative(mypage).ToString(),
|
||||
classStr=""
|
||||
classStr="",
|
||||
badge=""
|
||||
}
|
||||
];
|
||||
pages[page].classStr = "active";
|
||||
pages[page].classStr = " primary-container";
|
||||
return <!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
@@ -65,8 +79,43 @@ func Components.Shell(title, html, page, $mypage)
|
||||
<script type="module" src={(/"beer.min.js").MakeRelative(mypage).ToString()} defer></script>
|
||||
</head>
|
||||
<body hx-indicator="#loading-indicator">
|
||||
|
||||
<nav class="bottom">
|
||||
<dialog class="left" id="leftpane">
|
||||
<header>
|
||||
<nav>
|
||||
<img class="circle large" src="/tytd-128.png">
|
||||
<h6 class="max">TYTD2025</h6>
|
||||
<button hx-on:click="ui('#leftpane')" class="transparent circle large">
|
||||
<i>close</i>
|
||||
</button>
|
||||
</nav>
|
||||
</header>
|
||||
<div class="space"></div>
|
||||
<ul class="list">
|
||||
<each(var page : pages)>
|
||||
|
||||
<li class={$"wave round{page.classStr}"} hx-target="body" hx-push-url="true" hx-get={page.href}>
|
||||
<i>{page.icon}</i>
|
||||
<span class="max">{page.text}</span>
|
||||
<raw(page.badge)>
|
||||
|
||||
</li>
|
||||
|
||||
|
||||
</each>
|
||||
|
||||
|
||||
</ul>
|
||||
</dialog>
|
||||
<header class="fixed primary-container">
|
||||
<nav>
|
||||
<button hx-on:click="ui('#leftpane')" class="circle transparent">
|
||||
<i>menu</i>
|
||||
</button>
|
||||
<h6 class="max">TYTD2025</h6>
|
||||
|
||||
</nav>
|
||||
</header>
|
||||
/*<nav class="bottom">
|
||||
<each(var page : pages)>
|
||||
<a hx-get={page.href} hx-target="body" hx-push-url="true" class={page.classStr}>
|
||||
<i>{page.icon}</i>
|
||||
@@ -81,7 +130,7 @@ func Components.Shell(title, html, page, $mypage)
|
||||
|
||||
</a>
|
||||
</each>
|
||||
</nav>
|
||||
</nav>*/
|
||||
|
||||
<main class="responsive">
|
||||
<raw(html)>
|
||||
|
||||
Reference in New Issue
Block a user