Add browse files link to sidebar

This commit is contained in:
Tamas Kocsis 2020-09-21 18:26:44 +02:00
parent 19bc0358b5
commit 52ed8c18ca
2 changed files with 7 additions and 3 deletions

View File

@ -169,12 +169,15 @@ class UiWebsocketPlugin(object):
"""))
def sidebarRenderFileStats(self, body, site):
site_address = site.content_manager.contents.get("content.json", {}).get("domain", site.address)
body.append(_("""
<li>
<label>
{_[Files]}
<small class="label-right"><a href='#Site+directory' id='link-directory' class='link-right'>{_[Open site directory]}</a>
<a href='/ZeroNet-Internal/Zip?address={site.address}' id='link-zip' class='link-right' download='site.zip'>{_[Save as .zip]}</a></small>
<a href='/list/{site_address}' class='link-right link-outline'>{_[Browse files]}</a>
<small class="label-right">
<a href='/ZeroNet-Internal/Zip?address={site.address}' id='link-zip' class='link-right' download='site.zip'>{_[Save as .zip]}</a>
</small>
</label>
<ul class='graph graph-stacked'>
"""))

View File

@ -16,9 +16,10 @@
.sidebar .link-right { color: white; text-decoration: none; border-bottom: 1px solid #666; text-transform: uppercase; }
.sidebar .link-right:hover { border-color: #CCC; }
.sidebar .link-right:active { background-color: #444 }
.sidebar .link-outline { outline: 1px solid #eee6; padding: 2px 13px; border-bottom: none; font-size: 80%; }
/* SIDEBAR */
.sidebar-container { width: 100%; height: 100%; overflow: hidden; position: fixed; z-index: 2; }
.sidebar-container { width: 100%; height: 100%; overflow: hidden; position: fixed; top: 0px; z-index: 2;}
.sidebar { background-color: #212121; position: fixed; backface-visibility: hidden; right: -1200px; height: 100%; width: 1200px; } /*box-shadow: inset 0px 0px 10px #000*/
.sidebar .content { margin: 30px; font-family: "Segoe UI Light", "Segoe UI", "Helvetica Neue"; color: white; width: 375px; height: 300px; font-weight: 200; transition: all 1s; opacity: 0 }
.sidebar-container.loaded .content { opacity: 1; transform: none }