From bf4949353d3666df7a5f908c6529869c67b8c0f3 Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 11 Apr 2021 20:43:35 +0200 Subject: [PATCH] support url-pwd on mounts page --- copyparty/httpcli.py | 9 +++++++-- copyparty/web/browser2.html | 4 ++-- copyparty/web/splash.html | 6 +++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 15335ff4..7a56b1df 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -1214,9 +1214,14 @@ class HttpCli(object): return True def tx_mounts(self): + suf = [ + "{}={}".format(k, v) if v else k for k, v in self.uparam.items() if k != "h" + ] + suf = "?" + "&".join(suf) if suf else "" + rvol = [x + "/" if x else x for x in self.rvol] wvol = [x + "/" if x else x for x in self.wvol] - html = self.j2("splash", this=self, rvol=rvol, wvol=wvol) + html = self.j2("splash", this=self, rvol=rvol, wvol=wvol, url_suf=suf) self.reply(html.encode("utf-8")) return True @@ -1356,7 +1361,7 @@ class HttpCli(object): if pwd: url_suf.append("pw=" + quotep(pwd)) - url_suf = ("?" + "&".join(url_suf)) if url_suf else "" + url_suf = ("?" + "&".join(url_suf)) if url_suf else "" dirs = [] files = [] diff --git a/copyparty/web/browser2.html b/copyparty/web/browser2.html index 33aa2949..8c49c7b9 100644 --- a/copyparty/web/browser2.html +++ b/copyparty/web/browser2.html @@ -10,7 +10,7 @@ {%- if srv_info %} -

{{ srv_info }}

+

{{ srv_info }}

{%- endif %} {%- if have_b_u %} @@ -49,7 +49,7 @@
{{ logues[1] }}

{%- endif %} -

control-panel

+

control-panel

diff --git a/copyparty/web/splash.html b/copyparty/web/splash.html index 235a7f10..cec763ce 100644 --- a/copyparty/web/splash.html +++ b/copyparty/web/splash.html @@ -16,20 +16,20 @@

you can browse these:

you can upload to:

login for more: