mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: logs page whitespace
fix url of upload breadcrumbs
This commit is contained in:
@@ -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>
|
||||
|
||||
12
src/views/admin/partials/breadcrumbs.tpl
Normal file
12
src/views/admin/partials/breadcrumbs.tpl
Normal file
@@ -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 }}}
|
||||
Reference in New Issue
Block a user