From 0839c69b7357b15d810e209da818736ba8099ad2 Mon Sep 17 00:00:00 2001
From: idk <hankhill19580@gmail.com>
Date: Wed, 15 Sep 2021 15:02:54 -0400
Subject: [PATCH] add a page for the NSIS JPackage+Profile+I2P installer

---
 i2p2www/downloads.py                 |  9 ++++++++
 i2p2www/pages/downloads/firefox.html | 31 +++++++++++++++++-----------
 i2p2www/urls.py                      |  1 +
 3 files changed, 29 insertions(+), 12 deletions(-)

diff --git a/i2p2www/downloads.py b/i2p2www/downloads.py
index 5d46df930..1996657f3 100644
--- a/i2p2www/downloads.py
+++ b/i2p2www/downloads.py
@@ -89,6 +89,15 @@ def downloads_debian():
 def downloads_windows():
     return render_template('downloads/windows.html')
 
+# AIO-Windows-specific page
+def downloads_nsis():
+    # TODO: read mirror list or list of available files
+    if request.headers.get('X-I2P-Desthash') and not request.headers.get('X-Forwarded-Server'):
+        def_mirror = DEFAULT_I2P_MIRROR
+    else:
+        def_mirror = DEFAULT_MIRROR
+    return render_template('downloads/nsis.html', def_mirror=def_mirror)
+
 # Docker-specific page
 def downloads_docker():
     return render_template('downloads/docker.html')
diff --git a/i2p2www/pages/downloads/firefox.html b/i2p2www/pages/downloads/firefox.html
index e6cdef8f7..c471fce54 100644
--- a/i2p2www/pages/downloads/firefox.html
+++ b/i2p2www/pages/downloads/firefox.html
@@ -3,7 +3,17 @@
 {% block title %}Firefox Profile{% endblock %}
 {% block content %}
 
-<h1>{{ _('I2P Firefox Browser Profile') }}</h1>
+<h1>{{ _('I2P Easy Install Bundle(Beta)') }}</h1>
+<p>{% trans -%}
+The I2P Firefox Browser Profile has been expanded into the new I2P Easy Install
+Bundle, which is in Beta. If you already have an I2P Router installed, it is
+still safe to use this installer to configure your I2P Browser. If you do not
+have an I2P router installed, then you do not need to install I2P. This package
+will install I2P at the same time it installs the browser profile. This page
+has been kept to document the motivations and design of the included Firefox
+profile.
+{%- endtrans %}</p>
+<h2>{{ _('I2P Firefox Browser Profile') }}</h2>
 <p>{% trans -%}
 Now that you have joined the I2P network, you will want to see I2P Sites and and 
 other content that is hosted on the network. The Firefox browser profile is 
@@ -21,12 +31,9 @@ some browser features, this also reduces the attack surface available to outside
 This keeps you safer while browsing the Invisible Web.
 {%- endtrans %}</p>
 <h2>{{ _('How do I use it?') }}</h2>
-<p>{% trans guideurl=get_url('downloads_windows'), postfilename=pver('I2P-Profile-Installer-%s.exe') -%}
-First, download and install <a href="{{ guideurl }}">I2P for Windows</a>. Then,
-download the Firefox browser profile using the green button just below, and run
-the <code>{{ postfilename }}</code> by double-clicking it. Finally, start Firefox
-with the preconfigured Firefox profile using the shortcut on the desktop or in
-the start menu.
+<p>{% trans firefox="https://www.mozilla.org/", postfilename=pver('I2P-Profile-Installer-%s.exe') -%}
+First, download and install <a href="{{ firefox }}">Firefox</a>, then,
+just download and install <a href="{{ postfilename }}">this installer</a>.
 {%- endtrans %}</p>
 
 {%- set name     = 'Windows' -%}
@@ -84,11 +91,11 @@ option when filing the issue.
 <h2>{{ _('How is it different from Tor Browser?') }}</h2>
 <p>{% trans -%}
 This is not a fork of Firefox. Instead, it is a browser profile with pre-configured
-settings. That means that it requires Firefox(Or Tor Browser) to be installed
-before you can use it. This is for security reasons, it is important that you are
-able to recieve reliable updates from a trustworthy vendor. As much as we would
-like to, we can't maintain a whole Firefox fork and provide timely updates for
-it right now.
+settings, combined with an I2P router and some launcher scripts. That means that
+it requires Firefox(Or Tor Browser) to be installed before you can use it. This
+is for security reasons, it is important that you are able to recieve reliable
+updates from a trustworthy vendor. As much as we would like to, we can't 
+maintain a whole Firefox fork and provide timely updates for it right now.
 {%- endtrans %}</p>
 <p>{% trans -%}
 I2P routers are designed to have long uptimes, and so unlike Tor Browser, the
diff --git a/i2p2www/urls.py b/i2p2www/urls.py
index 37fbc46bb..208ced096 100644
--- a/i2p2www/urls.py
+++ b/i2p2www/urls.py
@@ -92,6 +92,7 @@ url('/<lang:lang>/download', 'downloads.downloads_list')
 url('/<lang:lang>/download/debian', 'downloads.downloads_debian')
 url('/<lang:lang>/download/docker', 'downloads.downloads_docker')
 url('/<lang:lang>/download/windows', 'downloads.downloads_windows')
+url('/<lang:lang>/download/nsis', 'downloads.downloads_nsis')
 url('/<lang:lang>/download/firefox', 'downloads.downloads_firefox')
 url('/<lang:lang>/download/config', 'downloads.downloads_config')
 url('/<lang:lang>/download/lab', 'downloads.downloads_lab')
-- 
GitLab