From 1543bb38d236248f0e3676dbe57dde7256621bee Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Mon, 12 Apr 2021 18:15:51 -0400 Subject: Show the custom title in all modes --- .../resources/templates/listing.html | 6 +- .../resources/templates/receive.html | 87 +++++++++++----------- cli/onionshare_cli/resources/templates/send.html | 17 +++-- .../resources/templates/thankyou.html | 6 +- cli/onionshare_cli/web/receive_mode.py | 6 +- cli/onionshare_cli/web/share_mode.py | 1 + cli/onionshare_cli/web/website_mode.py | 1 + 7 files changed, 67 insertions(+), 57 deletions(-) (limited to 'cli') diff --git a/cli/onionshare_cli/resources/templates/listing.html b/cli/onionshare_cli/resources/templates/listing.html index 8458bb87..8e0dedf7 100644 --- a/cli/onionshare_cli/resources/templates/listing.html +++ b/cli/onionshare_cli/resources/templates/listing.html @@ -2,7 +2,7 @@ - OnionShare + {% if title %}{{ title }}{% else %}OnionShare{% endif %} @@ -14,7 +14,7 @@
-

OnionShare

+

{% if title %}{{ title }}{% else %}OnionShare{% endif %}

@@ -57,4 +57,4 @@ - + \ No newline at end of file diff --git a/cli/onionshare_cli/resources/templates/receive.html b/cli/onionshare_cli/resources/templates/receive.html index 20f4bb7e..08b9623c 100644 --- a/cli/onionshare_cli/resources/templates/receive.html +++ b/cli/onionshare_cli/resources/templates/receive.html @@ -1,46 +1,49 @@ - - OnionShare - - - - - - - -
- -

OnionShare

-
- -
-

- -

Send Files

-

Select the files you want to send, then click "Send Files"...

- -
- -
-
    - {% with messages = get_flashed_messages(with_categories=true) %} - {% if messages %} - {% for category, message in messages %} -
  • {{ message }}
  • - {% endfor %} - {% endif %} - {% endwith %} -
-
- -
-

-

-
+ + {% if title %}{{ title }}{% else %}OnionShare Dropbox{% endif %} + + + + + + + + +
+ +

{% if title %}{{ title }}{% else %}OnionShare Dropbox{% endif %}

+
+ +
+

+ +

Send Files

+

Select the files you want to send, then click "Send Files"...

+ +
+ +
+
    + {% with messages = get_flashed_messages(with_categories=true) %} + {% if messages %} + {% for category, message in messages %} +
  • {{ message }}
  • + {% endfor %} + {% endif %} + {% endwith %} +
- - - - + +
+

+

+
+ +
+ + + + + \ No newline at end of file diff --git a/cli/onionshare_cli/resources/templates/send.html b/cli/onionshare_cli/resources/templates/send.html index dd30bfdd..bd9bd631 100644 --- a/cli/onionshare_cli/resources/templates/send.html +++ b/cli/onionshare_cli/resources/templates/send.html @@ -2,9 +2,9 @@ - OnionShare + {% if title %}{{ title }}{% else %}OnionShare{% endif %} - + @@ -16,7 +16,7 @@
-

OnionShare

+

{% if title %}{{ title }}{% else %}OnionShare{% endif %}

Total size: {{ filesize_human }} {% if is_zipped %} (compressed){% endif %}
@@ -25,10 +25,11 @@
{% if breadcrumbs %} - - {% endif %} + + {% endif %}
@@ -66,4 +67,4 @@ - + \ No newline at end of file diff --git a/cli/onionshare_cli/resources/templates/thankyou.html b/cli/onionshare_cli/resources/templates/thankyou.html index aa0bc553..8e92386d 100644 --- a/cli/onionshare_cli/resources/templates/thankyou.html +++ b/cli/onionshare_cli/resources/templates/thankyou.html @@ -4,7 +4,7 @@ OnionShare is closed - + @@ -12,7 +12,7 @@
-

OnionShare

+

{% if title %}{{ title }}{% else %}OnionShare{% endif %}

@@ -24,4 +24,4 @@
- + \ No newline at end of file diff --git a/cli/onionshare_cli/web/receive_mode.py b/cli/onionshare_cli/web/receive_mode.py index 46f471a8..21e83f58 100644 --- a/cli/onionshare_cli/web/receive_mode.py +++ b/cli/onionshare_cli/web/receive_mode.py @@ -64,7 +64,9 @@ class ReceiveModeWeb: self.web.add_request(self.web.REQUEST_LOAD, request.path) r = make_response( render_template( - "receive.html", static_url_path=self.web.static_url_path + "receive.html", + static_url_path=self.web.static_url_path, + title=self.web.settings.get("general", "title"), ) ) return self.web.add_security_headers(r) @@ -168,6 +170,7 @@ class ReceiveModeWeb: "new_body": render_template( "thankyou.html", static_url_path=self.web.static_url_path, + title=self.web.settings.get("general", "title"), ) } ) @@ -176,6 +179,7 @@ class ReceiveModeWeb: r = make_response( render_template("thankyou.html"), static_url_path=self.web.static_url_path, + title=self.web.settings.get("general", "title"), ) return self.web.add_security_headers(r) diff --git a/cli/onionshare_cli/web/share_mode.py b/cli/onionshare_cli/web/share_mode.py index 72ba8c64..87ec5185 100644 --- a/cli/onionshare_cli/web/share_mode.py +++ b/cli/onionshare_cli/web/share_mode.py @@ -230,6 +230,7 @@ class ShareModeWeb(SendBaseModeWeb): is_zipped=self.is_zipped, static_url_path=self.web.static_url_path, download_individual_files=self.download_individual_files, + title=self.web.settings.get("general", "title"), ) ) diff --git a/cli/onionshare_cli/web/website_mode.py b/cli/onionshare_cli/web/website_mode.py index 5718c9a9..6badd399 100644 --- a/cli/onionshare_cli/web/website_mode.py +++ b/cli/onionshare_cli/web/website_mode.py @@ -60,6 +60,7 @@ class WebsiteModeWeb(SendBaseModeWeb): breadcrumbs=breadcrumbs, breadcrumbs_leaf=breadcrumbs_leaf, static_url_path=self.web.static_url_path, + title=self.web.settings.get("general", "title"), ) ) -- cgit v1.2.3-54-g00ecf