From 6622875703c864caa5742947883b13dca490450f Mon Sep 17 00:00:00 2001 From: itdominator <1itdominator@gmail.com> Date: Sat, 13 Nov 2021 13:41:05 -0600 Subject: [PATCH] Updated ui and scripts --- src/dropper/config.py | 3 +- src/dropper/static/js/post-ajax.js | 2 +- src/dropper/templates/index.html | 140 +++++++++++++---------------- 3 files changed, 67 insertions(+), 78 deletions(-) diff --git a/src/dropper/config.py b/src/dropper/config.py index 70544a0..4b48dc7 100644 --- a/src/dropper/config.py +++ b/src/dropper/config.py @@ -18,7 +18,8 @@ class Config(object): DEBUG = False TESTING = False THREADED = True - SECRET_KEY = secrets.token_hex(32) + SECRET_KEY = "2A#GQafbREoblgMSQYomZSxbaPE6dt#" + # SECRET_KEY = secrets.token_hex(32) HOME_PTH = os.path.expanduser("~") ROOT_FILE_PTH = os.path.dirname(os.path.realpath(__file__)) diff --git a/src/dropper/static/js/post-ajax.js b/src/dropper/static/js/post-ajax.js index 02adf1f..2be20c7 100644 --- a/src/dropper/static/js/post-ajax.js +++ b/src/dropper/static/js/post-ajax.js @@ -26,7 +26,7 @@ const postAjaxController = (data, action, hash, fname) => { if (action === "delete") { query = '[fileHash="' + hash + '"]'; elm = document.querySelector(query); - while ( !elm.className.includes("row r") ) { + while ( !elm.className.includes("list-group-item") ) { elm = elm.parentElement; } elm.parentElement.removeChild(elm); diff --git a/src/dropper/templates/index.html b/src/dropper/templates/index.html index abc9357..2d010f9 100644 --- a/src/dropper/templates/index.html +++ b/src/dropper/templates/index.html @@ -2,116 +2,105 @@ {% block content %}
- -
-{{note["string"]}}{% endif %} - {% elif note["string"].strip() %} -
{{note["string"]}}- {% endif %} -
{{file[0]}}
{% if file[0].lower().endswith( (".png", ".jpg", ".jpeg") ) %} - - + + {% elif file[0].lower().endswith( (".mp4", ".webm") ) %} {% else %} - {{file[0]}} + {{file[0]}} {% endif %} -