Some styling for menus
This commit is contained in:
@@ -14,7 +14,7 @@ from utils.utils import *
|
|||||||
from utils.crypt import *
|
from utils.crypt import *
|
||||||
|
|
||||||
|
|
||||||
__FLEES_VERSION__ = "20180416.0"
|
__FLEES_VERSION__ = "20180629.0"
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.config.from_object(__name__)
|
app.config.from_object(__name__)
|
||||||
# Read config from json !
|
# Read config from json !
|
||||||
|
|||||||
@@ -114,12 +114,37 @@ tr:nth-child(odd) {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
#list_info_toggle {
|
#list_info_toggle_container {
|
||||||
margin-top: 24px;
|
margin-top: 24px;
|
||||||
cursor: pointer;
|
position: relative;
|
||||||
text-align: right;
|
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 {
|
#list_info {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,13 +18,14 @@
|
|||||||
<input type=submit value=Upload disabled>
|
<input type=submit value=Upload disabled>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% 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_info>
|
||||||
<div id=list_url_upload>
|
<div id=list_url_upload>
|
||||||
<form id="url_upload_form" action={{ url_for('upload_url') }} method=post>
|
<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 id="list_upload_name" type=hidden name=name value="{{ name|safe }}" />
|
||||||
<input type=hidden name=from_gui value="true" />
|
<input type=hidden name=from_gui value="true" />
|
||||||
<input id="list_url_upload_text" type=text name=url
|
<input id="list_url_upload_text" type=text name=url
|
||||||
|
title="Upload using an URL"
|
||||||
value="https://..." onclick="clear_text(this.id,'https://...')"><br>
|
value="https://..." onclick="clear_text(this.id,'https://...')"><br>
|
||||||
</form>
|
</form>
|
||||||
<input id="list_url_upload_button" type=submit value="Upload URL" onclick="UploadURL()">
|
<input id="list_url_upload_button" type=submit value="Upload URL" onclick="UploadURL()">
|
||||||
@@ -33,24 +34,27 @@
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{% if public %}
|
{% 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 %}
|
{% 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 %}
|
{% endif %}
|
||||||
{% if expire %}
|
{% 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 %}
|
{% else %}
|
||||||
<li>never expires
|
<li>Never expires
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if upload %}
|
{% if upload %}
|
||||||
{% if overwrite %}
|
{% 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 %}
|
{% 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 %}
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<li><span title="Uploads not enabled for this sahre">No uploading</span>
|
||||||
{% endif %}
|
{% 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><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>
|
<li><a href="{{ url_for('logout',name=name) }}">Logout</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -82,13 +82,13 @@ def get_script_url(public_url, share, end_point, token = "[TOKEN]"):
|
|||||||
)
|
)
|
||||||
if end_point in ( "download", "direct"):
|
if end_point in ( "download", "direct"):
|
||||||
cmd = 'curl -s %s | bash /dev/stdin [-f]'%( url, )
|
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":
|
if end_point == "client":
|
||||||
cmd = 'python <( curl -s %s )'%( url, )
|
cmd = 'python <( curl -s %s )'%( url, )
|
||||||
doc = 'Console client to download and upload files.'
|
doc = 'Console client to download and upload files.'
|
||||||
if end_point == "upload_split":
|
if end_point == "upload_split":
|
||||||
cmd = 'curl -s %s | python - [-s split_size_in_Mb] file_to_upload.ext [second.file.ext]'%( url, )
|
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}
|
return {'cmd': cmd, 'doc': doc}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user