summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/hydrilla/locales/en_US/LC_MESSAGES/messages.po282
-rw-r--r--src/hydrilla/proxy/state_impl/concrete_state.py2
-rw-r--r--src/hydrilla/proxy/web_ui/items.py15
-rw-r--r--src/hydrilla/proxy/web_ui/templates/base.html.jinja81
-rw-r--r--src/hydrilla/proxy/web_ui/templates/include/item_list_style.css.jinja2
-rw-r--r--src/hydrilla/proxy/web_ui/templates/index.html.jinja20
-rw-r--r--src/hydrilla/proxy/web_ui/templates/items/item_view.html.jinja20
-rw-r--r--src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja54
-rw-r--r--src/hydrilla/proxy/web_ui/templates/items/libraries.html.jinja4
-rw-r--r--src/hydrilla/proxy/web_ui/templates/items/library_view.html.jinja8
-rw-r--r--src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja6
-rw-r--r--src/hydrilla/proxy/web_ui/templates/items/load_from_disk.html.jinja39
-rw-r--r--src/hydrilla/proxy/web_ui/templates/items/package_view.html.jinja8
-rw-r--r--src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja156
-rw-r--r--src/hydrilla/proxy/web_ui/templates/items/packages.html.jinja4
-rw-r--r--src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja47
-rw-r--r--src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja18
-rw-r--r--src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja143
18 files changed, 546 insertions, 363 deletions
diff --git a/src/hydrilla/locales/en_US/LC_MESSAGES/messages.po b/src/hydrilla/locales/en_US/LC_MESSAGES/messages.po
index 23d1127..ff2299c 100644
--- a/src/hydrilla/locales/en_US/LC_MESSAGES/messages.po
+++ b/src/hydrilla/locales/en_US/LC_MESSAGES/messages.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: hydrilla 2.0\n"
"Report-Msgid-Bugs-To: koszko@koszko.org\n"
-"POT-Creation-Date: 2022-09-02 13:49+0200\n"
+"POT-Creation-Date: 2022-09-05 13:54+0200\n"
"PO-Revision-Date: 2022-02-12 00:00+0000\n"
"Last-Translator: Wojtek Kosior <koszko@koszko.org>\n"
"Language: en_US\n"
@@ -205,105 +205,119 @@ msgstr "Requested file could not be found."
msgid "api.resource_not_enabled_for_access"
msgstr "Requested resource is not enabled for access."
-#: src/hydrilla/proxy/state_impl/concrete_state.py:107
+#: src/hydrilla/proxy/state_impl/concrete_state.py:106
msgid "err.proxy.unknown_db_schema"
msgstr ""
"Haketilo's data files have been altered, possibly by a newer version of "
"Haketilo."
-#: src/hydrilla/proxy/state_impl/concrete_state.py:111
+#: src/hydrilla/proxy/state_impl/concrete_state.py:110
msgid "err.proxy.no_sqlite_foreign_keys"
msgstr ""
"This installation of Haketilo uses an SQLite version which does not "
"support foreign key constraints."
-#: src/hydrilla/proxy/web_ui/items.py:52
-msgid "err.proxy.uploaded_malcontent_invalid"
-msgstr "The uploaded archive does not contain valid Haketilo malcontent."
-
-#: src/hydrilla/proxy/web_ui/items.py:77
-msgid "err.proxy.uploaded_file_not_zip"
-msgstr "The uploaded file is not a valid ZIP file."
-
-#: src/hydrilla/proxy/web_ui/templates/base.html.jinja:44
+#: src/hydrilla/proxy/web_ui/templates/base.html.jinja:63
msgid "web_ui.base.title.haketilo_proxy"
msgstr "Haketilo"
-#: src/hydrilla/proxy/web_ui/templates/base.html.jinja:184
+#: src/hydrilla/proxy/web_ui/templates/base.html.jinja:228
msgid "web_ui.base.nav.home"
msgstr "Home"
-#: src/hydrilla/proxy/web_ui/templates/base.html.jinja:185
+#: src/hydrilla/proxy/web_ui/templates/base.html.jinja:229
msgid "web_ui.base.nav.packages"
msgstr "Packages"
-#: src/hydrilla/proxy/web_ui/templates/base.html.jinja:186
+#: src/hydrilla/proxy/web_ui/templates/base.html.jinja:230
msgid "web_ui.base.nav.libraries"
msgstr "Libraries"
-#: src/hydrilla/proxy/web_ui/templates/base.html.jinja:187
+#: src/hydrilla/proxy/web_ui/templates/base.html.jinja:231
msgid "web_ui.base.nav.repos"
msgstr "Repositories"
-#: src/hydrilla/proxy/web_ui/templates/base.html.jinja:188
+#: src/hydrilla/proxy/web_ui/templates/base.html.jinja:232
msgid "web_ui.base.nav.load"
msgstr "Import from file"
-#: src/hydrilla/proxy/web_ui/templates/index.html.jinja:22
+#: src/hydrilla/proxy/web_ui/templates/index.html.jinja:23
msgid "web_ui.home.title"
msgstr "Welcome"
-#: src/hydrilla/proxy/web_ui/templates/index.html.jinja:24
-msgid "web_ui.home.welcome_to_haketilo"
+#: src/hydrilla/proxy/web_ui/templates/index.html.jinja:27
+msgid "web_ui.home.heading.welcome_to_haketilo"
msgstr "Welcome to Haketilo!"
+#: src/hydrilla/proxy/web_ui/templates/index.html.jinja:31
+msgid "web_ui.home.this_is_haketilo_page"
+msgstr ""
+"This is a virtual site hosted locally by Haketilo. You can use it to "
+"configure Haketilo proxy."
+
+#: src/hydrilla/proxy/web_ui/templates/index.html.jinja:37
+msgid "web_ui.home.heading.about_haketilo"
+msgstr "About Haketilo"
+
+#: src/hydrilla/proxy/web_ui/templates/index.html.jinja:41
+msgid "web_ui.home.haketilo_is_blah_blah"
+msgstr ""
+"Haketilo is a tool that gives users more control over their web browsing."
+" It can block unwanted JavaScript software on web pages as well as add "
+"custom logic to them. Haketilo was orignally developed as a browser "
+"extension but has since been made into an HTTP proxy."
+
#: src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja:25
-#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:31
+#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:33
msgid "web_ui.err.file_installation_error"
msgstr "Failed to install needed items from repository."
-#: src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja:30
+#: src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja:29
msgid "web_ui.err.uninstall_disallowed"
msgstr "This item is required and cannot be uninstalled."
-#: src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja:35
-#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:36
+#: src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja:33
+#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:37
msgid "web_ui.err.repo_communication_error"
msgstr "Couldn't communicate with repository."
-#: src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja:63
+#: src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja:40
+msgid "web_ui.items.single_version.version_{}"
+msgstr "Version '{}'."
+
+#: src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja:71
msgid "web_ui.items.single_version.retry_install_button"
msgstr "Retry installation"
-#: src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja:67
+#: src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja:75
msgid "web_ui.items.single_version.leave_uninstalled_button"
msgstr "Leave uninstalled"
-#: src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja:71
+#: src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja:79
msgid "web_ui.items.single_version.install_button"
msgstr "Install"
-#: src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja:72
+#: src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja:80
msgid "web_ui.items.single_version.uninstall_button"
msgstr "Uninstall"
-#: src/hydrilla/proxy/web_ui/templates/items/libraries.html.jinja:22
+#: src/hydrilla/proxy/web_ui/templates/items/libraries.html.jinja:23
msgid "web_ui.libraries.title"
msgstr "Libraries"
-#: src/hydrilla/proxy/web_ui/templates/items/libraries.html.jinja:29
+#: src/hydrilla/proxy/web_ui/templates/items/libraries.html.jinja:39
msgid "web_ui.libraries.heading"
msgstr "Available libraries"
-#: src/hydrilla/proxy/web_ui/templates/items/library_view.html.jinja:22
+#: src/hydrilla/proxy/web_ui/templates/items/library_view.html.jinja:23
msgid "web_ui.items.single.library.title"
msgstr "Library view"
-#: src/hydrilla/proxy/web_ui/templates/items/library_view.html.jinja:25
+#: src/hydrilla/proxy/web_ui/templates/items/library_view.html.jinja:27
msgid "web_ui.items.single.library.heading.name_{}"
msgstr "Libraries named '{}'"
-#: src/hydrilla/proxy/web_ui/templates/items/library_view.html.jinja:35
+#: src/hydrilla/proxy/web_ui/templates/items/library_view.html.jinja:41
msgid "web_ui.items.single.library.version_list_heading"
msgstr "Available versions"
@@ -321,49 +335,61 @@ msgstr "Library '{}'"
#: src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja:42
msgid "web_ui.items.single_version.library.item_required"
-msgstr "This library is required by an enabled mapping. It cannot be uninstalled."
+msgstr ""
+"This library version is required by an enabled mapping. It cannot be "
+"uninstalled."
#: src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja:46
msgid "web_ui.items.single_version.library.item_auto_activated"
-msgstr "This library is used by a package which can be activated automatically."
+msgstr ""
+"This library version is used by a package which can be activated "
+"automatically."
#: src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja:50
msgid "web_ui.items.single_version.library.item_not_activated"
-msgstr "This library is not used by any active package."
+msgstr "This library version is not used by any active package."
#: src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja:54
msgid "web_ui.items.single_version.library.install_failed"
-msgstr "Couldn't install this library."
+msgstr "Couldn't install this library version."
#: src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja:58
msgid "web_ui.items.single_version.library.version_list_heading"
-msgstr "Other available versions of this library"
+msgstr "Other available versions of the library"
-#: src/hydrilla/proxy/web_ui/templates/items/load_from_disk.html.jinja:22
+#: src/hydrilla/proxy/web_ui/templates/items/load_from_disk.html.jinja:23
msgid "web_ui.load_from_disk.title"
msgstr "Import from file"
-#: src/hydrilla/proxy/web_ui/templates/items/load_from_disk.html.jinja:32
+#: src/hydrilla/proxy/web_ui/templates/items/load_from_disk.html.jinja:41
msgid "web_ui.load_from_disk.heading"
msgstr "Import items from a ZIP archive"
-#: src/hydrilla/proxy/web_ui/templates/items/load_from_disk.html.jinja:40
+#: src/hydrilla/proxy/web_ui/templates/items/load_from_disk.html.jinja:45
+msgid "web_ui.err.uploaded_file_not_zip"
+msgstr "The uploaded file is not a valid ZIP file."
+
+#: src/hydrilla/proxy/web_ui/templates/items/load_from_disk.html.jinja:49
+msgid "web_ui.err.invalid_uploaded_malcontent"
+msgstr "The uploaded archive does not contain valid Haketilo malcontent."
+
+#: src/hydrilla/proxy/web_ui/templates/items/load_from_disk.html.jinja:57
msgid "web_ui.load_from_disk.choose_zipfile_button"
msgstr "Select file"
-#: src/hydrilla/proxy/web_ui/templates/items/load_from_disk.html.jinja:45
+#: src/hydrilla/proxy/web_ui/templates/items/load_from_disk.html.jinja:64
msgid "web_ui.load_from_disk.install_button"
msgstr "Import"
-#: src/hydrilla/proxy/web_ui/templates/items/package_view.html.jinja:22
+#: src/hydrilla/proxy/web_ui/templates/items/package_view.html.jinja:23
msgid "web_ui.items.single.package.title"
msgstr "Package view"
-#: src/hydrilla/proxy/web_ui/templates/items/package_view.html.jinja:25
+#: src/hydrilla/proxy/web_ui/templates/items/package_view.html.jinja:27
msgid "web_ui.items.single.package.heading.name_{}"
msgstr "Packages named '{}'"
-#: src/hydrilla/proxy/web_ui/templates/items/package_view.html.jinja:35
+#: src/hydrilla/proxy/web_ui/templates/items/package_view.html.jinja:39
msgid "web_ui.items.single.package.version_list_heading"
msgstr "Available versions"
@@ -381,164 +407,176 @@ msgstr "Package '{}'"
#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:42
msgid "web_ui.items.single_version.package.item_required"
-msgstr "This package is required. It cannot be uninstalled."
+msgstr "This package version is required. It cannot be uninstalled."
#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:46
msgid "web_ui.items.single_version.package.item_auto_activated"
-msgstr "This package can be activated automatically."
+msgstr "This package version can be activated automatically."
#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:50
msgid "web_ui.items.single_version.package.item_not_activated"
-msgstr "This package is not active."
+msgstr "This package version is not active."
#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:54
msgid "web_ui.items.single_version.package.install_failed"
-msgstr "Couldn't install this package."
+msgstr "Couldn't install this package version."
#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:58
msgid "web_ui.items.single_version.package.version_list_heading"
-msgstr "Other available versions of this package"
+msgstr "Other available versions of the package"
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:74
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:72
msgid "web_ui.items.single_version.unenable_button"
msgstr "Forget"
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:75
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:73
msgid "web_ui.items.single_version.disable_button"
msgstr "Disable"
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:76
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:74
msgid "web_ui.items.single_version.enable_button"
msgstr "Enable"
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:80
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:79
msgid "web_ui.items.single_version.item_not_marked"
-msgstr "This package isn't enabled."
+msgstr "The package isn't enabled."
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:83
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:82
msgid "web_ui.items.single_version.item_disabled"
-msgstr "All versions of this package have been explicitly disabled by the user."
+msgstr "All versions of the package have been explicitly disabled by the user."
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:87
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:86
msgid "web_ui.items.single_version.item_enabled"
-msgstr "This package has been enabled by the user."
+msgstr "The package has been enabled by the user."
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:109
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:105
msgid "web_ui.items.single_version.unpin_button"
msgstr "Unpin"
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:113
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:110
msgid "web_ui.items.single_version.not_pinned"
-msgstr "This package is not pinned to any version."
+msgstr "The package is not pinned to any version."
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:118
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:115
msgid "web_ui.items.single_version.pinned_repo_local"
-msgstr "This package is pinned to only use locally installed versions."
+msgstr "The package is pinned to only use locally installed versions."
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:122
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:118
msgid "web_ui.items.single_version.pinned_repo_{}"
-msgstr "This package is pinned to only use versions from repository '{}'."
+msgstr "The package is pinned to only use versions from repository '{}'."
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:134
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:129
msgid "web_ui.items.single_version.pin_local_repo_button"
msgstr "Pin to local packages"
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:138
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:149
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:134
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:147
msgid "web_ui.items.single_version.pin_repo_button"
msgstr "Pin to repository"
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:145
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:141
msgid "web_ui.items.single_version.repin_repo_button"
msgstr "Pin to this repository"
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:154
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:164
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:155
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:166
msgid "web_ui.items.single_version.pin_ver_button"
msgstr "Pin to this version"
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:156
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:158
msgid "web_ui.items.single_version.pinned_ver"
-msgstr "This package is pinned to this version."
+msgstr "The package is pinned to this version."
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:159
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:161
msgid "web_ui.items.single_version.repin_ver_button"
msgstr "Pin to this version"
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:161
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:163
msgid "web_ui.items.single_version.pinned_other_ver"
-msgstr "This package is pinned to a different version."
+msgstr "The package is pinned to a different version."
+
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:171
+msgid "web_ui.items.single_version.active_ver_is_this_one"
+msgstr "This is the currently active version."
+
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:175
+msgid "web_ui.items.single_version.active_ver_is_{}"
+msgstr "Currently active version is '{}'."
-#: src/hydrilla/proxy/web_ui/templates/items/packages.html.jinja:22
+#: src/hydrilla/proxy/web_ui/templates/items/packages.html.jinja:23
msgid "web_ui.packages.title"
msgstr "Packages"
-#: src/hydrilla/proxy/web_ui/templates/items/packages.html.jinja:29
+#: src/hydrilla/proxy/web_ui/templates/items/packages.html.jinja:39
msgid "web_ui.packages.heading"
msgstr "Available packages"
-#: src/hydrilla/proxy/web_ui/templates/items/packages.html.jinja:53
+#: src/hydrilla/proxy/web_ui/templates/items/packages.html.jinja:73
msgid "web_ui.packages.enabled_version_{}"
msgstr "enabled version {}"
-#: src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja:22
+#: src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja:23
msgid "web_ui.repos.add.title"
msgstr "New repository"
-#: src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja:24
+#: src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja:26
msgid "web_ui.repos.add.heading"
msgstr "Configure a new repository"
-#: src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja:28
-msgid "web_ui.repos.add.name_field_label"
-msgstr "Name"
-
-#: src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja:33
-#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:68
+#: src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja:29
+#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:67
msgid "web_ui.err.repo_name_invalid"
msgstr "Chosen name is not valid."
-#: src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja:38
-#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:73
+#: src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja:33
+#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:71
msgid "web_ui.err.repo_name_taken"
msgstr "Chosen name is already in use."
-#: src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja:46
-msgid "web_ui.repos.add.url_field_label"
-msgstr "URL"
+#: src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja:37
+msgid "web_ui.repos.add.name_field_label"
+msgstr "Name"
-#: src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja:51
-#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:116
+#: src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja:47
+#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:121
msgid "web_ui.err.repo_url_invalid"
msgstr "Chosen URL is not vald."
-#: src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja:59
+#: src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja:51
+msgid "web_ui.repos.add.url_field_label"
+msgstr "URL"
+
+#: src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja:62
msgid "web_ui.repos.add.submit_button"
msgstr "Add repository"
-#: src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja:22
+#: src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja:23
msgid "web_ui.repos.title"
msgstr "Repositories"
-#: src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja:29
+#: src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja:32
msgid "web_ui.repos.heading"
-msgstr "Configured repositories"
+msgstr "Manage repositories"
-#: src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja:32
+#: src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja:36
msgid "web_ui.repos.add_repo_button"
msgstr "Configure new repository"
-#: src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja:52
-#: src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja:62
+#: src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja:41
+msgid "web_ui.repos.repo_list_heading"
+msgstr "Configured repositories"
+
+#: src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja:64
+#: src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja:79
msgid "web_ui.repos.package_count_{}"
msgstr "packages: {}"
-#: src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja:59
-#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:46
+#: src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja:76
+#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:45
msgid "web_ui.repos.local_packages_semirepo"
msgstr "Local items"
-#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:22
+#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:23
msgid "web_ui.repos.single.title"
msgstr "Repository view"
@@ -548,59 +586,63 @@ msgstr ""
"Repository uses an unsupported API version. You might need to update "
"Haketilo."
-#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:49
+#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:48
msgid "web_ui.repos.single.heading.name_{}"
-msgstr "Configured repositories"
+msgstr "Repository '{}'"
-#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:61
+#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:60
msgid "web_ui.repos.single.update_name_button"
msgstr "Change name"
-#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:81
+#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:80
msgid "web_ui.repos.single.commit_update_name_button"
msgstr "Set new name"
-#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:84
+#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:85
msgid "web_ui.repos.single.abort_update_name_button"
msgstr "Cancel"
-#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:92
+#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:96
msgid "web_ui.repos.single.repo_is_deleted"
msgstr ""
"This repository has been deleted but you're still holding packages that "
"came from it."
-#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:108
+#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:102
+msgid "web_ui.repos.single.url_is_{}"
+msgstr "Current URL is '{}'."
+
+#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:114
msgid "web_ui.repos.single.update_url_button"
msgstr "Change URL"
-#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:124
+#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:130
msgid "web_ui.repos.single.commit_update_url_button"
msgstr "Set new URL"
-#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:127
+#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:135
msgid "web_ui.repos.single.abort_update_url_button"
msgstr "Cancel"
-#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:133
+#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:145
msgid "web_ui.repos.single.repo_never_refreshed"
msgstr "This repository has not been refreshed yet"
-#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:136
+#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:148
msgid "web_ui.repos.single.last_refreshed_{}"
msgstr "Last refreshed on {}."
-#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:143
+#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:154
msgid "web_ui.repos.single.refresh_now_button"
msgstr "Refresh"
-#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:150
+#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:162
msgid "web_ui.repos.item_count_{mappings}_{resources}"
msgstr "packages: {mappings}; libraries: {resources}"
-#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:161
+#: src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja:173
msgid "web_ui.repos.single.remove_button"
-msgstr "Remove"
+msgstr "Remove repository"
#: src/hydrilla/server/malcontent.py:79
msgid "err.server.malcontent_path_not_dir_{}"
diff --git a/src/hydrilla/proxy/state_impl/concrete_state.py b/src/hydrilla/proxy/state_impl/concrete_state.py
index 6bc6404..4781baa 100644
--- a/src/hydrilla/proxy/state_impl/concrete_state.py
+++ b/src/hydrilla/proxy/state_impl/concrete_state.py
@@ -251,7 +251,7 @@ class ConcreteHaketiloState(base.HaketiloStateWithFields):
def get_settings(self) -> st.HaketiloGlobalSettings:
return st.HaketiloGlobalSettings(
mapping_use_mode = st.MappingUseMode.AUTO,
- default_allow_scripts = True,
+ default_allow_scripts = False,
repo_refresh_seconds = 0
)
diff --git a/src/hydrilla/proxy/web_ui/items.py b/src/hydrilla/proxy/web_ui/items.py
index a781856..1a56d7d 100644
--- a/src/hydrilla/proxy/web_ui/items.py
+++ b/src/hydrilla/proxy/web_ui/items.py
@@ -47,16 +47,11 @@ from .. import state as st
from . import _app
-class InvalidUploadedMalcontent(HaketiloException):
- def __init__(self):
- super().__init__(_('err.proxy.uploaded_malcontent_invalid'))
-
-
bp = flask.Blueprint('items', __package__)
@bp.route('/load_from_disk', methods=['GET'])
-def load_from_disk() -> werkzeug.Response:
- html = flask.render_template('items/load_from_disk.html.jinja')
+def load_from_disk(errors: t.Mapping[str, bool] = {}) -> werkzeug.Response:
+ html = flask.render_template('items/load_from_disk.html.jinja', **errors)
return flask.make_response(html, 200)
@bp.route('/load_from_disk', methods=['POST'])
@@ -74,11 +69,11 @@ def load_from_disk_post() -> werkzeug.Response:
with zipfile.ZipFile(zip_file_storage) as zip_file:
zip_file.extractall(tmpdir_child)
except:
- raise HaketiloException(_('err.proxy.uploaded_file_not_zip'))
+ return load_from_disk({'uploaded_file_not_zip': True})
extracted_top_level_files = tuple(tmpdir_child.iterdir())
if extracted_top_level_files == ():
- raise InvalidUploadedMalcontent()
+ return load_from_disk({'invalid_uploaded_malcontent': True})
if len(extracted_top_level_files) == 1 and \
extracted_top_level_files[0].is_dir():
@@ -89,7 +84,7 @@ def load_from_disk_post() -> werkzeug.Response:
try:
_app.get_haketilo_state().import_items(malcontent_dir_path)
except:
- raise InvalidUploadedMalcontent()
+ return load_from_disk({'invalid_uploaded_malcontent': True})
return flask.redirect(flask.url_for('.packages'))
diff --git a/src/hydrilla/proxy/web_ui/templates/base.html.jinja b/src/hydrilla/proxy/web_ui/templates/base.html.jinja
index 2febf2f..918fb28 100644
--- a/src/hydrilla/proxy/web_ui/templates/base.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/base.html.jinja
@@ -21,14 +21,24 @@ in a proprietary work, I am not going to enforce this in court.
<!DOCTYPE html>
{% macro button_row(buttons_data) %}
- <div class="button-row">
+ <div class="flex-row">
{% for classes, text, action in buttons_data %}
+ {% if not loop.first %}
+ <div class="button-row-separator"></div>
+ {% do classes.append('button-bordering-left') %}
+ {% endif %}
+
+ {% if not loop.last %}
+ {% do classes.append('button-bordering-right') %}
+ {% endif %}
+
{% if 'disabled-button' in classes %}
{% set disabled_attr = ' disabled=""' %}
{% else %}
{% set disabled_attr = '' %}
{% endif %}
- <form method="POST" class="inline-form">
+
+ <form method="POST" class="flex-row">
<input name="action" value="{{ action }}" type="hidden">
<button class="{{ classes|join(' ') }}"{{ disabled_attr }}>
{{ text }}
@@ -38,6 +48,12 @@ in a proprietary work, I am not going to enforce this in court.
</div>
{% endmacro %}
+{% macro error_note(note_text) %}
+ <aside class="error-note">
+ {{ note_text }}
+ </aside>
+{% endmacro %}
+
<html>
<head>
{% block head %}
@@ -56,6 +72,7 @@ in a proprietary work, I am not going to enforce this in court.
#main {
max-width: 750px;
margin: auto;
+ padding: 0 5px;
}
a {
@@ -63,16 +80,6 @@ in a proprietary work, I am not going to enforce this in court.
color: inherit;
}
- .inline-form {
- display: inline-flex;
- padding: 0;
- margin: 0;
- }
-
- .inline-form > * {
- flex: 1 1 0;
- }
-
.small-print {
font-size: 80%;
color: #555;
@@ -81,22 +88,52 @@ in a proprietary work, I am not going to enforce this in court.
.error-note {
display: block;
border-left: 5px solid #a33;
+ padding: 10px;
background-color: #fcc;
}
+ .block-with-bottom-margin, .flex-row, aside, p {
+ display: block;
+ margin: 0 0 10px 0;
+ }
+
+ .flex-row {
+ display: flex;
+ padding: 0;
+ }
+
+ .flex-row > * {
+ flex: 1 1 0;
+ }
+
+ .flex-row > .flex-row {
+ margin: 0;
+ }
+
+ .button-row-separator {
+ background-color: #65A065;
+ flex: 0 0 2px;
+ }
+
+ div.horizontal-separator {
+ display: block;
+ background-color: #e3e3e3;
+ height: 1px;
+ margin: 0 0 10px 0;
+ }
+
.green-button, .red-button, .blue-button {
border: none;
border-radius: 2px;
color: white;
text-align: center;
text-decoration: none;
- display: inline-block;
+ display: block;
padding: 5px 10px;
-moz-user-select: none;
user-select: none;
cursor: pointer;
font: 400 0.9em sans-serif;
- margin: 2px;
}
.green-button {
@@ -112,34 +149,22 @@ in a proprietary work, I am not going to enforce this in court.
}
.disabled-button {
- background-color: #aaa;
- cursor: default;
+ background-color: #aaa;
+ cursor: default;
}
.button-bordering-right {
- margin-right: 0;
border-radius: 2px 0 0 2px;
- border-right: 1px solid #65A065;
}
.button-bordering-left {
- margin-left: 0;
border-radius: 0 2px 2px 0;
- border-left: 1px solid #65A065;
}
.button-bordering-left.button-bordering-right {
border-radius: 0;
}
- .button-row {
- display: flex;
- }
-
- .button-row > * {
- flex: 1 1 0;
- }
-
.hide {
display: none !important;
}
diff --git a/src/hydrilla/proxy/web_ui/templates/include/item_list_style.css.jinja b/src/hydrilla/proxy/web_ui/templates/include/item_list_style.css.jinja
index 86ac1b5..d834862 100644
--- a/src/hydrilla/proxy/web_ui/templates/include/item_list_style.css.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/include/item_list_style.css.jinja
@@ -26,7 +26,7 @@ ul#item_list > li {
list-style-type: none;
max-width: 100%;
white-space: nowrap;
- margin: 0 5px 0 5px;
+ margin: 0;
}
ul#item_list > li > :only-child {
diff --git a/src/hydrilla/proxy/web_ui/templates/index.html.jinja b/src/hydrilla/proxy/web_ui/templates/index.html.jinja
index 8fd2ead..725e30e 100644
--- a/src/hydrilla/proxy/web_ui/templates/index.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/index.html.jinja
@@ -19,7 +19,25 @@ file's licenses. Although I request that you do not make use this code
in a proprietary work, I am not going to enforce this in court.
#}
{% extends "base.html.jinja" %}
+
{% block title %} {{ _('web_ui.home.title') }} {% endblock %}
+
{% block main %}
- {{ _('web_ui.home.welcome_to_haketilo') }}
+ <h3>
+ {{ _('web_ui.home.heading.welcome_to_haketilo') }}
+ </h3>
+
+ <p>
+ {{ _('web_ui.home.this_is_haketilo_page') }}
+ </p>
+
+ <div class="horizontal-separator"></div>
+
+ <h4>
+ {{ _('web_ui.home.heading.about_haketilo') }}
+ </h4>
+
+ <p>
+ {{ _('web_ui.home.haketilo_is_blah_blah') }}
+ </p>
{% endblock %}
diff --git a/src/hydrilla/proxy/web_ui/templates/items/item_view.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/item_view.html.jinja
index 07212ff..d4910ab 100644
--- a/src/hydrilla/proxy/web_ui/templates/items/item_view.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/items/item_view.html.jinja
@@ -20,13 +20,13 @@ in a proprietary work, I am not going to enforce this in court.
#}
{% extends "base.html.jinja" %}
-{% macro versioned_identifier_with_repo(info) %}
+{% macro versioned_identifier_with_repo(info) -%}
{{ info.info.version_string }}
- {% if not info.is_local %}
+ {%- if not info.is_local %}
@
{{ info.info.repo }}
- {% endif %}
-{% endmacro %}
+ {%- endif %}
+{%- endmacro %}
{% block style %}
{{ super() }}
@@ -37,15 +37,25 @@ in a proprietary work, I am not going to enforce this in court.
color: #777;
}
{% endblock %}
+
{% block main %}
{% block main_info %}
<h3>{% block heading required %}{% endblock %}</h3>
{% endblock %}
- {% if display_info.all_versions|length > 0 %}
+
+ {%
+ if display_info.all_versions|length > 1 or
+ (display_info.all_versions|length == 1 and
+ (version_display_info is not defined or
+ version_display_info.ref != display_info.all_versions[0].ref))
+ %}
+ <div class="horizontal-separator"></div>
+
<h4>
{% block version_list_heading required %}
{% endblock %}
</h4>
+
<ul id="item_list">
{% for info in display_info.all_versions %}
{%
diff --git a/src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja
index de62330..f1d34cc 100644
--- a/src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja
@@ -19,44 +19,52 @@ file's licenses. Although I request that you do not make use this code
in a proprietary work, I am not going to enforce this in court.
#}
{% extends "items/item_view.html.jinja" %}
+
{% block main_info %}
{% if file_installation_error is defined %}
- <aside class="error-note">
- {{ _('web_ui.err.file_installation_error') }}
- </aside>
+ {{ error_note(_('web_ui.err.file_installation_error')) }}
{% endif %}
+
{% if uninstall_disallowed is defined %}
- <aside class="error-note">
- {{ _('web_ui.err.uninstall_disallowed') }}
- </aside>
+ {{ error_note(_('web_ui.err.uninstall_disallowed')) }}
{% endif %}
+
{% if repo_communication_error is defined %}
- <aside class="error-note">
- {{ _('web_ui.err.repo_communication_error') }}
- </aside>
+ {{ error_note(_('web_ui.err.repo_communication_error')) }}
{% endif %}
{{ super() }}
- <div class="item-identifier">
- {{ versioned_identifier_with_repo(version_display_info) }}
- </div>
+ <p>
+ {{
+ _('web_ui.items.single_version.version_{}')
+ .format(versioned_identifier_with_repo(version_display_info))
+ }}
+ </p>
+
+ <div class="horizontal-separator"></div>
{% block main_info_bulk %}
- TODO: add more info...
+ <p>
+ TODO: add more info...
+ </p>
+
+ <div class="horizontal-separator"></div>
{% endblock %}
- {% if version_display_info.active == ActiveStatus.REQUIRED %}
- <div>{% block item_required_msg required %}{% endblock %}</div>
- {% elif version_display_info.active == ActiveStatus.AUTO %}
- <div>{% block item_auto_activated_msg required %}{% endblock %}</div>
- {% else %}
- {# version_display_info.active == ActiveStatus.NOT_ACTIVE #}
- <div>{% block item_not_activated_msg required %}{% endblock %}</div>
- {% endif %}
+ <p>
+ {% if version_display_info.active == ActiveStatus.REQUIRED %}
+ {% block item_required_msg required %}{% endblock %}
+ {% elif version_display_info.active == ActiveStatus.AUTO %}
+ {% block item_auto_activated_msg required %}{% endblock %}
+ {% else %}
+ {# version_display_info.active == ActiveStatus.NOT_ACTIVE #}
+ {% block item_not_activated_msg required %}{% endblock %}
+ {% endif %}
+ </p>
- {% set install_but_classes = ['green-button', 'button-bordering-left'] %}
- {% set uninstall_but_classes = ['green-button', 'button-bordering-right'] %}
+ {% set install_but_classes = ['green-button'] %}
+ {% set uninstall_but_classes = ['green-button'] %}
{% if version_display_info.installed == InstalledStatus.FAILED_TO_INSTALL %}
{%
set install_text =
diff --git a/src/hydrilla/proxy/web_ui/templates/items/libraries.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/libraries.html.jinja
index 77874cb..aa12246 100644
--- a/src/hydrilla/proxy/web_ui/templates/items/libraries.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/items/libraries.html.jinja
@@ -19,7 +19,9 @@ file's licenses. Although I request that you do not make use this code
in a proprietary work, I am not going to enforce this in court.
#}
{% extends "base.html.jinja" %}
+
{% block title %} {{ _('web_ui.libraries.title') }} {% endblock %}
+
{% block style %}
{{ super() }}
@@ -32,8 +34,10 @@ in a proprietary work, I am not going to enforce this in court.
min-height: 2.2em;
}
{% endblock %}
+
{% block main %}
<h3>{{ _('web_ui.libraries.heading') }}</h3>
+
<ul id="item_list">
{% for info in display_infos %}
<li>
diff --git a/src/hydrilla/proxy/web_ui/templates/items/library_view.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/library_view.html.jinja
index b7d0d60..76736bc 100644
--- a/src/hydrilla/proxy/web_ui/templates/items/library_view.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/items/library_view.html.jinja
@@ -19,18 +19,24 @@ file's licenses. Although I request that you do not make use this code
in a proprietary work, I am not going to enforce this in court.
#}
{% extends "items/item_view.html.jinja" %}
+
{% block title %} {{ _('web_ui.items.single.library.title') }} {% endblock %}
+
{% block heading %}
{{
_('web_ui.items.single.library.heading.name_{}')
.format(display_info.identifier)
}}
{% endblock %}
+
{% block main_info %}
{{ super() }}
- TODO: add more info...
+ <p>
+ TODO: add more info...
+ </p>
{% endblock %}
+
{% block version_list_heading %}
{{ _('web_ui.items.single.library.version_list_heading') }}
{% endblock %}
diff --git a/src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja
index 9e0a32e..7e045ad 100644
--- a/src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja
@@ -57,3 +57,9 @@ in a proprietary work, I am not going to enforce this in court.
{% block version_list_heading %}
{{ _('web_ui.items.single_version.library.version_list_heading') }}
{% endblock %}
+
+{% block main_info_bulk %}
+ <p>
+ TODO: add more info...
+ </p>
+{% endblock %}
diff --git a/src/hydrilla/proxy/web_ui/templates/items/load_from_disk.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/load_from_disk.html.jinja
index 84ade45..30179dd 100644
--- a/src/hydrilla/proxy/web_ui/templates/items/load_from_disk.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/items/load_from_disk.html.jinja
@@ -19,7 +19,9 @@ file's licenses. Although I request that you do not make use this code
in a proprietary work, I am not going to enforce this in court.
#}
{% extends "base.html.jinja" %}
+
{% block title %} {{ _('web_ui.load_from_disk.title') }} {% endblock %}
+
{% block style %}
{{ super() }}
@@ -27,20 +29,37 @@ in a proprietary work, I am not going to enforce this in court.
input[type="file"]::file-selector-button {
display: none;
}
+
+ input[type="file"] {
+ display: block;
+ font-size: inherit;
+ font-style: inherit;
+ }
{% endblock %}
+
{% block main %}
<h3>{{ _('web_ui.load_from_disk.heading') }}</h3>
+
<form method="POST" enctype="multipart/form-data">
- <div>
- <input id="items_zipfile" name="items_zipfile" type="file"
- accept=".zip,application/zip" required="">
- </div>
- <div>
- <label class="green-button" for="items_zipfile">
- {{ _('web_ui.load_from_disk.choose_zipfile_button') }}
- </label>
- </div>
- <div>
+ {% if uploaded_file_not_zip is defined %}
+ {{ error_note(_('web_ui.err.uploaded_file_not_zip')) }}
+ {% endif %}
+
+ {% if invalid_uploaded_malcontent is defined %}
+ {{ error_note(_('web_ui.err.invalid_uploaded_malcontent')) }}
+ {% endif %}
+
+ <input id="items_zipfile" name="items_zipfile" type="file"
+ accept=".zip,application/zip" required=""
+ class="block-with-bottom-margin">
+
+ <label class="green-button block-with-bottom-margin" for="items_zipfile">
+ {{ _('web_ui.load_from_disk.choose_zipfile_button') }}
+ </label>
+
+ <div class="horizontal-separator"></div>
+
+ <div class="flex-row">
<button class="green-button">
{{ _('web_ui.load_from_disk.install_button') }}
</button>
diff --git a/src/hydrilla/proxy/web_ui/templates/items/package_view.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/package_view.html.jinja
index 8df2d4d..ef04eb1 100644
--- a/src/hydrilla/proxy/web_ui/templates/items/package_view.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/items/package_view.html.jinja
@@ -19,18 +19,24 @@ file's licenses. Although I request that you do not make use this code
in a proprietary work, I am not going to enforce this in court.
#}
{% extends "items/item_view.html.jinja" %}
+
{% block title %} {{ _('web_ui.items.single.package.title') }} {% endblock %}
+
{% block heading %}
{{
_('web_ui.items.single.package.heading.name_{}')
.format(display_info.identifier)
}}
{% endblock %}
+
{% block main_info %}
{{ super() }}
- TODO: add more info...
+ <p>
+ TODO: add more info...
+ </p>
{% endblock %}
+
{% block version_list_heading %}
{{ _('web_ui.items.single.package.version_list_heading') }}
{% endblock %}
diff --git a/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja
index ea8b7d3..1eb9878 100644
--- a/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja
@@ -59,33 +59,33 @@ in a proprietary work, I am not going to enforce this in court.
{% endblock %}
{% block main_info_bulk %}
- TODO: add more info...
-
- {% set enable_but_classes = ['blue-button', 'button-bordering-left'] %}
- {%
- set unenable_but_classes = [
- 'green-button',
- 'button-bordering-right',
- 'button-bordering-left'
- ]
- %}
- {% set disable_but_classes = ['red-button', 'button-bordering-right'] %}
+ <p>
+ TODO: add more info...
+ </p>
+
+ <div class="horizontal-separator"></div>
+
+ {% set enable_but_classes = ['blue-button'] %}
+ {% set unenable_but_classes = ['green-button'] %}
+ {% set disable_but_classes = ['red-button'] %}
{% set unenable_text = _('web_ui.items.single_version.unenable_button') %}
{% set disable_text = _('web_ui.items.single_version.disable_button') %}
{% set enable_text = _('web_ui.items.single_version.enable_button') %}
- {% if display_info.enabled == EnabledStatus.NO_MARK %}
- {% do unenable_but_classes.append('disabled-button') %}
- <div> {{ _('web_ui.items.single_version.item_not_marked') }} </div>
- {% elif display_info.enabled == EnabledStatus.DISABLED %}
- {% do disable_but_classes.append('disabled-button') %}
- <div> {{ _('web_ui.items.single_version.item_disabled') }} </div>
- {% else %}
- {# display_info.enabled == EnabledStatus.ENABLED #}
- {% do enable_but_classes.append('disabled-button') %}
- <div> {{ _('web_ui.items.single_version.item_enabled') }} </div>
- {% endif %}
+ <p>
+ {% if display_info.enabled == EnabledStatus.NO_MARK %}
+ {% do unenable_but_classes.append('disabled-button') %}
+ {{ _('web_ui.items.single_version.item_not_marked') }}
+ {% elif display_info.enabled == EnabledStatus.DISABLED %}
+ {% do disable_but_classes.append('disabled-button') %}
+ {{ _('web_ui.items.single_version.item_disabled') }}
+ {% else %}
+ {# display_info.enabled == EnabledStatus.ENABLED #}
+ {% do enable_but_classes.append('disabled-button') %}
+ {{ _('web_ui.items.single_version.item_enabled') }}
+ {% endif %}
+ </p>
{{
button_row([
@@ -95,74 +95,90 @@ in a proprietary work, I am not going to enforce this in court.
])
}}
+ <div class="horizontal-separator"></div>
+
{% if display_info.enabled == EnabledStatus.ENABLED %}
- {% set unpin_but_classes = ['green-button', 'button-bordering-right'] %}
- {%
- set pin_repo_but_classes = [
- 'green-button',
- 'button-bordering-right',
- 'button-bordering-left'
- ]
- %}
- {% set pin_ver_but_classes = ['green-button', 'button-bordering-left'] %}
+ {% set unpin_but_classes = ['green-button'] %}
+ {% set pin_repo_but_classes = ['green-button'] %}
+ {% set pin_ver_but_classes = ['green-button'] %}
{% set unpin_text = _('web_ui.items.single_version.unpin_button') %}
- {% if display_info.frozen == FrozenStatus.NOT_FROZEN %}
- {% do unpin_but_classes.append('disabled-button') %}
- <div> {{ _('web_ui.items.single_version.not_pinned') }} </div>
- {% endif %}
+ <p>
+ {% if display_info.frozen == FrozenStatus.NOT_FROZEN %}
+ {% do unpin_but_classes.append('disabled-button') %}
+ {{ _('web_ui.items.single_version.not_pinned') }}
+ {% endif %}
- {% if display_info.frozen == FrozenStatus.REPOSITORY %}
- {% if display_info.active_version.is_local %}
- <div> {{ _('web_ui.items.single_version.pinned_repo_local') }} </div>
- {% else %}
- <div>
+ {% if display_info.frozen == FrozenStatus.REPOSITORY %}
+ {% if display_info.active_version.is_local %}
+ {{ _('web_ui.items.single_version.pinned_repo_local') }}
+ {% else %}
{{
_('web_ui.items.single_version.pinned_repo_{}')
.format(display_info.active_version.info.repo)
}}
- </div>
- {% endif %}
- {%
- if display_info.active_version.info.repo ==
- version_display_info.info.repo
- %}
- {% if version_display_info.is_local %}
+ {% endif %}
+ {%
+ if display_info.active_version.info.repo ==
+ version_display_info.info.repo
+ %}
+ {% if version_display_info.is_local %}
+ {%
+ set pin_repo_text =
+ _('web_ui.items.single_version.pin_local_repo_button')
+ %}
+ {% else %}
+ {%
+ set pin_repo_text =
+ _('web_ui.items.single_version.pin_repo_button')
+ %}
+ {% endif %}
+ {% do pin_repo_but_classes.append('disabled-button') %}
+ {% else %}
{%
set pin_repo_text =
- _('web_ui.items.single_version.pin_local_repo_button')
+ _('web_ui.items.single_version.repin_repo_button')
+ %}
+ {% endif %}
+ {% else %}{# display_info.frozen == FrozenStatus.REPOSITORY #}
+ {%
+ set pin_repo_text =
+ _('web_ui.items.single_version.pin_repo_button')
+ %}
+ {% endif %}{# else/ display_info.frozen == FrozenStatus.REPOSITORY #}
+
+ {% if display_info.frozen == FrozenStatus.EXACT_VERSION %}
+ {% if display_info.active_version.ref == version_display_info.ref %}
+ {%
+ set pin_ver_text =
+ _('web_ui.items.single_version.pin_ver_button')
%}
+ {% do pin_ver_but_classes.append('disabled-button') %}
+ {{ _('web_ui.items.single_version.pinned_ver') }}
{% else %}
{%
- set pin_repo_text = _('web_ui.items.single_version.pin_repo_button')
+ set pin_ver_text = _('web_ui.items.single_version.repin_ver_button')
%}
+ {{ _('web_ui.items.single_version.pinned_other_ver') }}
{% endif %}
- {% do pin_repo_but_classes.append('disabled-button') %}
{% else %}
- {%
- set pin_repo_text =
- _('web_ui.items.single_version.repin_repo_button')
- %}
- {% endif %}
- {% else %}{# display_info.frozen == FrozenStatus.REPOSITORY #}
- {% set pin_repo_text = _('web_ui.items.single_version.pin_repo_button') %}
- {% endif %}{# else/ display_info.frozen == FrozenStatus.REPOSITORY #}
+ {% set pin_ver_text = _('web_ui.items.single_version.pin_ver_button') %}
+ {% endif %}{# else/ display_info.frozen == FrozenStatus.EXACT_VERSION #}
- {% if display_info.frozen == FrozenStatus.EXACT_VERSION %}
{% if display_info.active_version.ref == version_display_info.ref %}
- {% set pin_ver_text = _('web_ui.items.single_version.pin_ver_button') %}
- {% do pin_ver_but_classes.append('disabled-button') %}
- <div> {{ _('web_ui.items.single_version.pinned_ver') }} </div>
+ {% if display_info.frozen != FrozenStatus.EXACT_VERSION %}
+ {{ _('web_ui.items.single_version.active_ver_is_this_one') }}
+ {% endif %}
{% else %}
- {%
- set pin_ver_text = _('web_ui.items.single_version.repin_ver_button')
- %}
- <div> {{ _('web_ui.items.single_version.pinned_other_ver') }} </div>
+ {{
+ _('web_ui.items.single_version.active_ver_is_{}')
+ .format(
+ versioned_identifier_with_repo(display_info.active_version)
+ )
+ }}
{% endif %}
- {% else %}
- {% set pin_ver_text = _('web_ui.items.single_version.pin_ver_button') %}
- {% endif %}{# else/ display_info.frozen == FrozenStatus.EXACT_VERSION #}
+ </p>
{{
button_row([
@@ -171,5 +187,7 @@ in a proprietary work, I am not going to enforce this in court.
(pin_ver_but_classes, pin_ver_text, 'freeze_to_version')
])
}}
+
+ <div class="horizontal-separator"></div>
{% endif %}{# display_info.enabled == EnabledStatus.ENABLED #}
{% endblock main_info_bulk %}
diff --git a/src/hydrilla/proxy/web_ui/templates/items/packages.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/packages.html.jinja
index 093570d..3c2b241 100644
--- a/src/hydrilla/proxy/web_ui/templates/items/packages.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/items/packages.html.jinja
@@ -19,7 +19,9 @@ file's licenses. Although I request that you do not make use this code
in a proprietary work, I am not going to enforce this in court.
#}
{% extends "base.html.jinja" %}
+
{% block title %} {{ _('web_ui.packages.title') }} {% endblock %}
+
{% block style %}
{{ super() }}
@@ -32,8 +34,10 @@ in a proprietary work, I am not going to enforce this in court.
min-height: 2.2em;
}
{% endblock %}
+
{% block main %}
<h3>{{ _('web_ui.packages.heading') }}</h3>
+
<ul id="item_list">
{% for info in display_infos %}
{% set entry_classes = [] %}
diff --git a/src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja b/src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja
index 398ac9a..8542d89 100644
--- a/src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/repos/add.html.jinja
@@ -19,42 +19,45 @@ file's licenses. Although I request that you do not make use this code
in a proprietary work, I am not going to enforce this in court.
#}
{% extends "base.html.jinja" %}
+
{% block title %} {{ _('web_ui.repos.add.title') }} {% endblock %}
+
{% block main %}
<h3>{{ _('web_ui.repos.add.heading') }}</h3>
<form method="POST">
- <div>
- <label for="name_field">
- {{ _('web_ui.repos.add.name_field_label') }}
- </label>
- </div>
{% if repo_name_invalid is defined %}
- <aside class="error-note">
- {{ _('web_ui.err.repo_name_invalid') }}
- </aside>
+ {{ error_note(_('web_ui.err.repo_name_invalid')) }}
{% endif %}
+
{% if repo_name_taken is defined %}
- <aside class="error-note">
- {{ _('web_ui.err.repo_name_taken') }}
- </aside>
+ {{ error_note(_('web_ui.err.repo_name_taken')) }}
{% endif %}
- <div>
+
+ <label for="name_field" class="block-with-bottom-margin">
+ {{ _('web_ui.repos.add.name_field_label') }}
+ </label>
+
+ <div class="flex-row">
<input id="name_field" name="name" required="">
</div>
- <div>
- <label for="url_field">
- {{ _('web_ui.repos.add.url_field_label') }}
- </label>
- </div>
+
+ <div class="horizontal-separator"></div>
+
{% if repo_url_invalid is defined %}
- <aside class="error-note">
- {{ _('web_ui.err.repo_url_invalid') }}
- </aside>
+ {{ error_note(_('web_ui.err.repo_url_invalid')) }}
{% endif %}
- <div>
+
+ <label for="url_field" class="block-with-bottom-margin">
+ {{ _('web_ui.repos.add.url_field_label') }}
+ </label>
+
+ <div class="flex-row">
<input id="url_field" name="url" required="">
</div>
- <div>
+
+ <div class="horizontal-separator"></div>
+
+ <div class="flex-row block-with-bottom-margin">
<button class="green-button">
{{ _('web_ui.repos.add.submit_button') }}
</button>
diff --git a/src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja b/src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja
index 07506e8..e6e9036 100644
--- a/src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/repos/index.html.jinja
@@ -19,19 +19,27 @@ file's licenses. Although I request that you do not make use this code
in a proprietary work, I am not going to enforce this in court.
#}
{% extends "base.html.jinja" %}
+
{% block title %}{{ _('web_ui.repos.title') }}{% endblock %}
+
{% block style %}
{{ super() }}
{% include 'include/item_list_style.css.jinja' %}
{% endblock %}
+
{% block main %}
<h3>{{ _('web_ui.repos.heading') }}</h3>
- <div>
- <a href="{{ url_for('.add_repo') }}" class="green-button">
- {{ _('web_ui.repos.add_repo_button') }}
- </a>
- </div>
+
+ <a href="{{ url_for('.add_repo') }}"
+ class="green-button block-with-bottom-margin">
+ {{ _('web_ui.repos.add_repo_button') }}
+ </a>
+
+ <div class="horizontal-separator"></div>
+
+ <h4>{{ _('web_ui.repos.repo_list_heading') }}</h4>
+
<ul id="item_list">
{% for info in display_infos %}
{% set entry_classes = [] %}
diff --git a/src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja b/src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja
index 604b38c..448c451 100644
--- a/src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/repos/show_single.html.jinja
@@ -19,29 +19,28 @@ file's licenses. Although I request that you do not make use this code
in a proprietary work, I am not going to enforce this in court.
#}
{% extends "base.html.jinja" %}
+
{% block title %} {{ _('web_ui.repos.single.title') }} {% endblock %}
+
{% block style %}
{{ super() }}
{% include 'include/checkbox_tricks_style.css.jinja' %}
{% endblock %}
+
{% block main %}
{% if file_installation_error is defined %}
- <aside class="error-note">
- {{ _('web_ui.err.file_installation_error') }}
- </aside>
+ {{ error_note(_('web_ui.err.file_installation_error')) }}
{% endif %}
+
{% if repo_communication_error is defined %}
- <aside class="error-note">
- {{ _('web_ui.err.repo_communication_error') }}
- </aside>
+ {{ error_note(_('web_ui.err.repo_communication_error')) }}
{% endif %}
+
{% if repo_api_version_unsupported is defined %}
- <aside class="error-note">
- {{ _('web_ui.err.repo_api_version_unsupported') }}
- </aside>
+ {{ error_note(_('web_ui.err.repo_api_version_unsupported')) }}
{% endif %}
- {% set repo_id = display_info.ref.id %}
+
{% if display_info.is_local_semirepo %}
<h3>{{ _('web_ui.repos.local_packages_semirepo') }}</h3>
{% else %}
@@ -56,42 +55,53 @@ in a proprietary work, I am not going to enforce this in court.
{% if not display_info.deleted %}
<input id="hide_name_edit_form" type="checkbox"
class="chbx-tricks-show-hide" {{ checked_attr }}>
- <div>
- <label for="hide_name_edit_form" class="green-button">
- {{ _('web_ui.repos.single.update_name_button') }}
- </label>
- </div>
+ <label for="hide_name_edit_form"
+ class="green-button block-with-bottom-margin">
+ {{ _('web_ui.repos.single.update_name_button') }}
+ </label>
+
<form method="POST">
<input type="hidden" name="action" value="update_repo_data">
+
{% if repo_name_invalid is defined %}
- <aside class="error-note">
- {{ _('web_ui.err.repo_name_invalid') }}
- </aside>
+ {{ error_note(_('web_ui.err.repo_name_invalid')) }}
{% endif %}
+
{% if repo_name_taken is defined %}
- <aside class="error-note">
- {{ _('web_ui.err.repo_name_taken') }}
- </aside>
+ {{ error_note(_('web_ui.err.repo_name_taken')) }}
{% endif %}
- <div>
+
+ <div class="flex-row">
<input name="name" value="{{ display_info.name }}" required="">
</div>
- <div>
- <button class="green-button">
+
+ <div class="flex-row">
+ <button class="green-button button-bordering-right">
{{ _('web_ui.repos.single.commit_update_name_button') }}
</button>
- <label for="hide_name_edit_form" class="green-button">
+ <div class="button-row-separator"></div>
+ <label for="hide_name_edit_form"
+ class="green-button button-bordering-left">
{{ _('web_ui.repos.single.abort_update_name_button') }}
</label>
</div>
</form>
+
+ <div class="horizontal-separator"></div>
{% endif %}{# not display_info.deleted #}
{% endif %}{# else/ display_info.is_local_semirepo #}
+
{% if display_info.deleted and not display_info.is_local_semirepo %}
- <div>
+ <p>
{{ _('web_ui.repos.single.repo_is_deleted') }}
- </div>
+ </p>
+
+ <div class="horizontal-separator"></div>
{% elif not display_info.deleted %}
+ <p>
+ {{ _('web_ui.repos.single.url_is_{}').format(display_info.url) }}
+ </p>
+
{% if repo_url_invalid is defined %}
{% set checked_attr = '' %}
{% else %}
@@ -99,53 +109,55 @@ in a proprietary work, I am not going to enforce this in court.
{% endif %}
<input id="hide_url_edit_form" type="checkbox" class="chbx-tricks-show-hide"
{{ checked_attr }}>
- <div>
- <div>
- {{ display_info.url }}
- </div>
- <div>
- <label for="hide_url_edit_form" class="green-button">
- {{ _('web_ui.repos.single.update_url_button') }}
- </label>
- </div>
- </div>
+ <label for="hide_url_edit_form"
+ class="green-button block-with-bottom-margin">
+ {{ _('web_ui.repos.single.update_url_button') }}
+ </label>
+
<form method="POST">
<input type="hidden" name="action" value="update_repo_data">
+
{% if repo_url_invalid is defined %}
- <aside class="error-note">
- {{ _('web_ui.err.repo_url_invalid') }}
- </aside>
+ {{ error_note(_('web_ui.err.repo_url_invalid')) }}
{% endif %}
- <div>
+
+ <div class="flex-row">
<input name="url" value="{{ display_info.url }}" required="">
</div>
- <div>
- <button class="green-button">
+
+ <div class="flex-row">
+ <button class="green-button button-bordering-right">
{{ _('web_ui.repos.single.commit_update_url_button') }}
</button>
- <label for="hide_url_edit_form" class="green-button">
+ <div class="button-row-separator"></div>
+ <label for="hide_url_edit_form"
+ class="green-button button-bordering-left">
{{ _('web_ui.repos.single.abort_update_url_button') }}
</label>
</div>
</form>
+
+ <div class="horizontal-separator"></div>
+
<div>
- {% if display_info.last_refreshed is none %}
- {{ _('web_ui.repos.single.repo_never_refreshed') }}
- {% else %}
- {{
- _('web_ui.repos.single.last_refreshed_{}')
- .format(display_info.last_refreshed.strftime('%F %H:%M'))
- }}
- {% endif %}
- <form method="POST">
- <input type="hidden" name="action" value="refresh_repo">
- <button class="green-button">
- {{ _('web_ui.repos.single.refresh_now_button') }}
- </button>
- </form>
+ <p>
+ {% if display_info.last_refreshed is none %}
+ {{ _('web_ui.repos.single.repo_never_refreshed') }}
+ {% else %}
+ {{
+ _('web_ui.repos.single.last_refreshed_{}')
+ .format(display_info.last_refreshed.strftime('%F %H:%M'))
+ }}
+ {% endif %}
+ </p>
+
+ {% set button_text = _('web_ui.repos.single.refresh_now_button') %}
+ {{ button_row([[['green-button'], button_text, 'refresh_repo']]) }}
</div>
+
+ <div class="horizontal-separator"></div>
{% endif %}{# not display_info.deleted (elif) #}
- <div>
+ <p>
{{
_('web_ui.repos.item_count_{mappings}_{resources}')
.format(
@@ -153,13 +165,12 @@ in a proprietary work, I am not going to enforce this in court.
resources = display_info.resource_count
)
}}
- </div>
+ </p>
+
{% if not display_info.is_local_semirepo and not display_info.deleted %}
- <form method="POST">
- <input type="hidden" name="action" value="remove_repo">
- <button class="green-button">
- {{ _('web_ui.repos.single.remove_button') }}
- </button>
- </form>
+ <div class="horizontal-separator"></div>
+
+ {% set button_text = _('web_ui.repos.single.remove_button') %}
+ {{ button_row([[['green-button'], button_text, 'remove_repo']]) }}
{% endif %}
{% endblock %}