fix: logs page whitespace

fix url of upload breadcrumbs
isekai-main
Barış Soner Uşaklı 2 years ago
parent 05c9cca7c4
commit 2a3d6d5cfb

@ -68,14 +68,17 @@ function buildBreadcrumbs(currentFolder) {
const crumbs = [];
const parts = currentFolder.replace(nconf.get('upload_path'), '').split(path.sep);
let currentPath = '';
parts.forEach((part) => {
parts.forEach((part, i) => {
const dir = path.join(currentPath, part);
crumbs.push({
const crumb = {
text: part || 'Uploads',
url: part ?
};
if (i < parts.length - 1) {
crumb.url = part ?
(`${nconf.get('relative_path')}/admin/manage/uploads?dir=${dir}`) :
`${nconf.get('relative_path')}/admin/manage/uploads`,
});
`${nconf.get('relative_path')}/admin/manage/uploads`;
}
crumbs.push(crumb);
currentPath = dir;
});

@ -15,7 +15,7 @@
<div class="card">
<div class="card-body">
<pre style="height: 600px;">{data}</pre>
<pre style="height: 600px; white-space: break-spaces;">{data}</pre>
</div>
</div>
</div>

@ -0,0 +1,12 @@
{{{ if breadcrumbs.length }}}
<ol class="breadcrumb mb-0" itemscope="itemscope" itemprop="breadcrumb" itemtype="http://schema.org/BreadcrumbList">
{{{ each breadcrumbs }}}
<li{{{ if @last }}} component="breadcrumb/current"{{{ end }}} itemscope="itemscope" itemprop="itemListElement" itemtype="http://schema.org/ListItem" class="breadcrumb-item {{{ if @last }}}active{{{ end }}}">
<meta itemprop="position" content="{@index}" />
{{{ if ./url }}}<a href="{./url}" itemprop="item">{{{ end }}}
<span class="fw-semibold" itemprop="name">{./text}</span>
{{{ if ./url }}}</a>{{{ end }}}
</li>
{{{ end }}}
</ol>
{{{ end }}}
Loading…
Cancel
Save