From 96d6bcf26eed3ab111202fb8ef7b76cca8475650 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 17 Feb 2023 22:49:03 +0000 Subject: [PATCH] if non-TLS, show warning in the login form --- copyparty/httpcli.py | 1 + copyparty/web/splash.css | 19 ++++++++++++++----- copyparty/web/splash.html | 7 +++++-- copyparty/web/splash.js | 3 ++- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 825bd514..784359ca 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -2877,6 +2877,7 @@ class HttpCli(object): url_suf=suf, k304=self.k304(), ver=S_VERSION if self.args.ver else "", + ahttps="" if self.is_https else "https://" + self.host + self.req, ) self.reply(html.encode("utf-8")) return True diff --git a/copyparty/web/splash.css b/copyparty/web/splash.css index 2a8e67e6..c6b8b5b7 100644 --- a/copyparty/web/splash.css +++ b/copyparty/web/splash.css @@ -36,6 +36,11 @@ a { td a { margin: 0; } +#w { + color: #fff; + background: #940; + border-color: #b70; +} .af, .logout { float: right; @@ -175,15 +180,19 @@ html.z a.g { border-color: #af4; box-shadow: 0 .3em 1em #7d0; } -html.z input { - color: #fff; - background: #626; - border: 1px solid #c2c; - border-width: 1px 0 0 0; +input { + color: #a50; + background: #fff; + border: 1px solid #a50; border-radius: .5em; padding: .5em .7em; margin: 0 .5em 0 0; } +html.z input { + color: #fff; + background: #626; + border-color: #c2c; +} html.z .num { border-color: #777; } diff --git a/copyparty/web/splash.html b/copyparty/web/splash.html index f5711d0f..8810852e 100644 --- a/copyparty/web/splash.html +++ b/copyparty/web/splash.html @@ -89,13 +89,16 @@

login for more:

- + π {%- if not this.args.nb %} diff --git a/copyparty/web/splash.js b/copyparty/web/splash.js index a35bee09..55143084 100644 --- a/copyparty/web/splash.js +++ b/copyparty/web/splash.js @@ -25,7 +25,8 @@ var Ls = { "t1": "handling", "u2": "tid siden noen sist skrev til serveren$N( opplastning / navneendring / ... )$N$N17d = 17 dager$N1h23 = 1 time 23 minutter$N4m56 = 4 minuter 56 sekunder", "v1": "koble til", - "v2": "bruk denne serveren som en lokal harddisk$N$NADVARSEL: kommer til å vise passordet ditt!" + "v2": "bruk denne serveren som en lokal harddisk$N$NADVARSEL: kommer til å vise passordet ditt!", + "w1": "bytt til https", }, "eng": { "d2": "shows the state of all active threads",