From 4f01125bcc39105c589bc0f9c3d3b0b20729e80c Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sat, 16 Jul 2022 17:10:05 +1000 Subject: [PATCH] improved login page to be responsive, also made pretty fname remove paths now we have only 1 imp/sto/bin path -- reduces fname size which is a small help to BUG-96 --- BUGs | 8 ++++++-- TODO | 5 ++++- files.py | 6 +++++- templates/login.html | 2 +- templates/viewer.html | 5 ++++- 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/BUGs b/BUGs index e16ab86..b4b66ec 100644 --- a/BUGs +++ b/BUGs @@ -1,2 +1,6 @@ -### Next: 96 -BUG-94: video player no longer works on any platform/browser - just 'spins' then nothing, URL seems right, I can play the video after I download the file direct, so the file is ok too. Used to work -- maybe using Ubuntu 22.04??? (or other newer pieces - feels wrong though, this feels client side somehow - did I bork the html somehow - check git' +### Next: 97 +BUG-94: video player cannot handle non mp4 formats... do I care? (could just offer a download link and hope the client deals with it) +--> OR? https://jsmpeg.com/ +--> OR? convert all videos to mp4/webm + +BUG-96: if image is really skinny, the viewer is left-justified, should at least be centered? diff --git a/TODO b/TODO index a671672..69112cb 100644 --- a/TODO +++ b/TODO @@ -10,6 +10,8 @@ all NMO's need to handle delete data and rebuild / allow recreation of content form FS (not just test, it causes a bug now / db constraint violation) --> need to test the 'override' when we re-ai-match (AFTER re-build from FS) + * should I change the rotation code to use that jpeg util to reduce/remove compression loss? + * run_ai_on throws log line, for matching even if there are no faces, would be less noisy to not do that (or should say no faces?) * should allow context menu from View thumbs (particularly useful on search) to show other files around this one by date (maybe that folder or something?) @@ -42,7 +44,8 @@ * on a phone, the files.html page header is a mess "Oldest.." line is too large to fit on 1 line (make it a hamburger?) - searched for text overlaps buttons above and below - < 10 files > is subsequently not centered - - the fodler/bin icons might be best below search then? (and on same line as XS/S, etc.) + - the folder/bin icons might be best below search then? (and on same line as XS/S, etc.) + * on phone login page, job* pages, etc. are all squished * when search, have a way to hide deleted files -> not sure where to put this on GUI, its so busy... diff --git a/files.py b/files.py index 3c26b0c..52c3057 100644 --- a/files.py +++ b/files.py @@ -755,7 +755,11 @@ def view(id): return redirect("/") else: NMO_data = FaceOverrideType.query.all() - return render_template("viewer.html", current=int(id), eids=eids, objs=objs, OPT=OPT, NMO_data=NMO_data ) + setting = Settings.query.first() + imp_path = setting.import_path + st_path = setting.storage_path + bin_path = setting.recycle_bin_path + return render_template("viewer.html", current=int(id), eids=eids, objs=objs, OPT=OPT, NMO_data=NMO_data, imp_path=imp_path, st_path=st_path, bin_path=bin_path ) ################################################################################## # /view/id -> grabs data from DB and views it (POST -> set state, redirect to GET) diff --git a/templates/login.html b/templates/login.html index 9f7eaa7..775969f 100644 --- a/templates/login.html +++ b/templates/login.html @@ -44,7 +44,7 @@ {% endif %} -
+

{#  Photo Assistant Login

#}  Photo Assistant Login diff --git a/templates/viewer.html b/templates/viewer.html index ef37f09..fb4f76d 100644 --- a/templates/viewer.html +++ b/templates/viewer.html @@ -30,6 +30,9 @@ var offset={{OPT.offset}} var first_eid={{OPT.first_eid}} var last_eid={{OPT.last_eid}} + var imp_path="static/Import/{{imp_path}}" + var st_path="static/Storage/{{st_path}}" + var bin_path="static/Bin/{{bin_path}}" {% for id in objs %} e=new Object() @@ -84,7 +87,7 @@ if( fname.indexOf( "static/Import" ) == 0 ) { s+='' - tmp_path=fname.replace("static/Import","" ) + tmp_path=fname.replace(imp_path,"" ) } if( fname.indexOf( "static/Storage" ) == 0 ) {