From e7cd922d8bd41ea0c3568183b36e1b6a90fcc789 Mon Sep 17 00:00:00 2001
From: ed
Date: Sun, 15 May 2022 13:20:52 +0200
Subject: [PATCH] translate splashpage and search too
---
copyparty/httpcli.py | 6 +-
copyparty/web/browser.js | 93 +++++++++++++++-----
copyparty/web/md.html | 6 +-
copyparty/web/mde.html | 2 +-
copyparty/web/msg.html | 70 +++++++--------
copyparty/web/splash.css | 14 +--
copyparty/web/splash.html | 173 ++++++++++++++++++--------------------
copyparty/web/splash.js | 43 ++++++++++
scripts/make-sfx.sh | 12 +--
scripts/sfx.ls | 1 +
10 files changed, 256 insertions(+), 164 deletions(-)
create mode 100644 copyparty/web/splash.js
diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py
index 1292f6ec..0c4d37de 100644
--- a/copyparty/httpcli.py
+++ b/copyparty/httpcli.py
@@ -1829,12 +1829,12 @@ class HttpCli(object):
def tx_404(self, is_403=False):
rc = 404
if self.args.vague_403:
- m = '404 not found ┐( ´ -`)┌
or maybe you don\'t have access -- try logging in or go home
' + m = 'or maybe you don\'t have access -- try logging in or go home
' elif is_403: - m = 'you\'ll have to log in or go home
' + m = 'you\'ll have to log in or go home
' rc = 403 else: - m = '{{ p }}
- {%- endif %} +{{ pre }}- {%- endif %} + {%- if h1 %} +
{{ p }}
+ {%- endif %} - {%- if redir %} - - {%- endif %} + {%- if pre %} +{{ pre }}+ {%- endif %} + + {%- if html %} + {{ html }} + {%- endif %} + + {%- if click %} + + {%- endif %} +
howdy stranger (you're not logged in)
- {%- else %} - logout -welcome back, {{ this.uname }}
- {%- endif %} + {%- if this.uname == '*' %} +howdy stranger (you're not logged in)
+ {%- else %} + logout +welcome back, {{ this.uname }}
+ {%- endif %} - {%- if msg %} -
-
|
-
|
+
|
+
|
enabling this will disconnect your client on every HTTP 304, which can prevent some buggy browsers/proxies from getting stuck (suddenly not being able to load pages), but it will also make things slower in general
enabling this will disconnect your client on every HTTP 304, which can prevent some buggy browsers/proxies from getting stuck (suddenly not being able to load pages), but it will also make things slower in general