Some styling for menus

This commit is contained in:
ville rantanen
2018-06-29 10:10:33 +03:00
parent 84b28ac748
commit d074932259
4 changed files with 43 additions and 14 deletions

View File

@@ -14,7 +14,7 @@ from utils.utils import *
from utils.crypt import *
__FLEES_VERSION__ = "20180416.0"
__FLEES_VERSION__ = "20180629.0"
app = Flask(__name__)
app.config.from_object(__name__)
# Read config from json !

View File

@@ -114,12 +114,37 @@ tr:nth-child(odd) {
cursor: pointer;
}
#list_info_toggle {
#list_info_toggle_container {
margin-top: 24px;
cursor: pointer;
position: relative;
text-align: right;
text-decoration: underline;
}
#list_info_toggle {
cursor: pointer;
text-decoration: underline;
padding-right: 1.25em;
position: relative;
}
#list_info_toggle:after {
content: "";
position: absolute;
right: 0;
top: 0.21em;
bottom: 0.21em;
width: 1em;
background: linear-gradient(
to bottom,
transparent, transparent 5%,
#148F77 5%, #148F77 25%,
transparent 25%, transparent 40%,
#148F77 40%, #148F77 60%,
transparent 60%, transparent 75%,
#148F77 75%, #148F77 95%,
transparent 95%, transparent 100%
);
}
#list_info {
display: none;
}

View File

@@ -18,13 +18,14 @@
<input type=submit value=Upload disabled>
</div>
{% endif %}
<div id=list_info_toggle onclick="infoToggle()">Share tools</div>
<div id=list_info_toggle_container><span id=list_info_toggle onclick="infoToggle()">Share tools</span></div>
<div id=list_info>
<div id=list_url_upload>
<form id="url_upload_form" action={{ url_for('upload_url') }} method=post>
<input id="list_upload_name" type=hidden name=name value="{{ name|safe }}" />
<input type=hidden name=from_gui value="true" />
<input id="list_url_upload_text" type=text name=url
title="Upload using an URL"
value="https://..." onclick="clear_text(this.id,'https://...')"><br>
</form>
<input id="list_url_upload_button" type=submit value="Upload URL" onclick="UploadURL()">
@@ -33,24 +34,27 @@
<ul>
{% if public %}
<li>is <a href="{{ url_for('index') }}" title="Share is publicly visible in the index">public</a>
<li><span title="Share is publicly visible in the index">Public</span>
{% else %}
<li>is <a href="{{ url_for('index') }}" title="Share not listed in the index unless you have logged in">unlisted</a>
<li><span title="Share not listed in the index unless you have logged in">Unlisted</span>
{% endif %}
{% if expire %}
<li><span title="All share operations disabled after the date">expires {{ expire }}</span>
<li><span title="All share operations disabled after the date">Expires {{ expire }}</span>
{% else %}
<li>never expires
<li>Never expires
{% endif %}
{% if upload %}
{% if overwrite %}
<li><span title="Uploaded files with existing names are overwritten">uploads overwrite</span>
<li><span title="Uploaded files with existing names are overwritten">Uploads overwrite</span>
{% else %}
<li><span title="Uploaded files with existing names are versioned">uploads versioned</span>
<li><span title="Uploaded files with existing names are versioned">Uploads versioned</span>
{% endif %}
{% else %}
<li><span title="Uploads not enabled for this sahre">No uploading</span>
{% endif %}
<li><a href="{{ url_for('download_zip',name=name) }}" title="Download all the files as one ZIP file. Total size of files must be less than {{ g.max_zip_size }} Mb">Download as zip</a>
<li><span id=list_script_toggle onclick="scriptToggle()">Command line info</span>
<li><span id=list_script_toggle onclick="scriptToggle()" title="Show command line usage information">Command line info</span>
<li><a href="{{ url_for('index') }}">Return to index</a>
<li><a href="{{ url_for('logout',name=name) }}">Logout</a>
</div>
</div>

View File

@@ -82,13 +82,13 @@ def get_script_url(public_url, share, end_point, token = "[TOKEN]"):
)
if end_point in ( "download", "direct"):
cmd = 'curl -s %s | bash /dev/stdin [-f]'%( url, )
doc = 'Download all files in the share.'
doc = 'Download all files in the share. -f to force overwrite existing files.'
if end_point == "client":
cmd = 'python <( curl -s %s )'%( url, )
doc = 'Console client to download and upload files.'
if end_point == "upload_split":
cmd = 'curl -s %s | python - [-s split_size_in_Mb] file_to_upload.ext [second.file.ext]'%( url, )
doc = 'Upload files to the share.'
doc = 'Upload files to the share. -s to set splitting size.'
return {'cmd': cmd, 'doc': doc}