change title of the page

This commit is contained in:
2018-07-02 14:41:49 +03:00
parent c8041cd0bf
commit 913de10f8c
8 changed files with 12 additions and 18 deletions

View File

@@ -111,5 +111,8 @@ Operation is one of download, direct_download, zip_download, or upload
- @app.route('/script/direct/<name>/<token>', methods=['GET']) - @app.route('/script/direct/<name>/<token>', methods=['GET'])
Get a bash script that downloads all the files in a share using direct filename tokens. Get a bash script that downloads all the files in a share using direct filename tokens.
- @app.route('/script/upload_split/<name>/<token>', methods=['GET']) - @app.route('/script/upload_split/<name>/<token>', methods=['GET'])
Get a bash script that uploads multiple files and folders. The script splits files Get a python script that uploads multiple files and folders. The script splits files
to smaller chunks, to prevent timeouts. Folders are uploaded as .tar to smaller chunks, to prevent timeouts. Folders are uploaded as .tar
- @app.route('/script/client/<name>/<token>', methods=['GET'])
Get a python script that is a console client for downloading and
uploading files.

View File

@@ -228,14 +228,6 @@ def upload_url():
@app.route('/send/<name>', methods=['GET'])
def send(name):
(ok,share) = get_share(name)
if not ok:
return share
return render_template('send.html',name=name)
@app.route('/file/list/<name>/<token>', methods=['GET']) @app.route('/file/list/<name>/<token>', methods=['GET'])
def file_list(name, token): def file_list(name, token):
(ok,share) = get_share(name, token = token) (ok,share) = get_share(name, token = token)

View File

@@ -146,3 +146,7 @@ function UploadURL() {
} }
} }
function changeTitle(newTitle) {
document.title = "Flees - " + newTitle;
}

View File

@@ -9,4 +9,5 @@
</form> </form>
</div> </div>
</div> </div>
<script type="text/javascript">changeTitle("{{ name | safe }}");</script>
{% endblock %} {% endblock %}

View File

@@ -30,4 +30,5 @@
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
<script type="text/javascript">changeTitle("{{ g.site_name | safe }}");</script>
{% endblock %} {% endblock %}

View File

@@ -94,4 +94,5 @@
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>
<script type="text/javascript">changeTitle("{{ name | safe }}");</script>
{% endblock %} {% endblock %}

View File

@@ -4,4 +4,5 @@
<p>You logged out from share <a href="{{ url_for('list_view',name=name) }}">{{ name|safe }}</a></p> <p>You logged out from share <a href="{{ url_for('list_view',name=name) }}">{{ name|safe }}</a></p>
<p>Continue to <a href="{{ url_for('index') }}">index</a></p> <p>Continue to <a href="{{ url_for('index') }}">index</a></p>
</div> </div>
<script type="text/javascript">changeTitle("{{ name | safe }}");</script>
{% endblock %} {% endblock %}

View File

@@ -1,9 +0,0 @@
{% extends "layout.html" %}
{% block body %}
upload to {{ name|safe }}
<form action={{ url_for('upload') }} method=post enctype=multipart/form-data>
<input type=hidden name=name value="{{ name|safe }}" />
<p><input type=file name=file onchange="function() { document.getElementById('upload_button').disabled = false; }">
<input id="upload_button" type=submit value=Upload disabled>
</form>
{% endblock %}