From 41ddc5fc3325c66e98cc2f2c38e6514b3f2e4ddd Mon Sep 17 00:00:00 2001 From: Daniel Markstedt Date: Sat, 27 Aug 2022 18:38:23 -0700 Subject: [PATCH] Allow custom drive sizes in bespoke UI; other sundry improvements (#813) * Allow custom drive image sizes in the bespoke UI. Addresses Issue#748 * Clarify what the Pi repo mirror setup is good for. * Use the number input type for rudimentary input validation. * Append byte unit. * More granular input validation using html5 attributes. Max allowed input is 256GiB in bytes. * Correct use of html5 number input elements. --- python/web/README.md | 4 +++- python/web/src/templates/drives.html | 4 ++-- python/web/src/templates/index.html | 12 ++++++------ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/python/web/README.md b/python/web/README.md index cb610eaa..6487bf9c 100644 --- a/python/web/README.md +++ b/python/web/README.md @@ -21,7 +21,9 @@ You may edit the files under `mock/bin` to simulate Linux command responses. TODO: rascsi-web uses protobuf commands to send and receive data from rascsi. A separate mocking solution will be needed for this interface. -## Pushing to the Pi via git +## (Optional) Pushing to the Pi via git + +This is a setup for pushing code changes from your local development environment to the Raspberry Pi without a roundtrip to the remote GitHub repository. Setup a bare repo on the rascsi ``` diff --git a/python/web/src/templates/drives.html b/python/web/src/templates/drives.html index accaee99..0d007ce4 100644 --- a/python/web/src/templates/drives.html +++ b/python/web/src/templates/drives.html @@ -34,7 +34,7 @@ - + {{ _("Size:") }} {{ _("B") }} .{{ hd.file_type }} @@ -124,7 +124,7 @@ - + {{ _("Size:") }} {{ _("B") }} .{{ rm.file_type }} diff --git a/python/web/src/templates/index.html b/python/web/src/templates/index.html index fb984d71..e2d86f57 100644 --- a/python/web/src/templates/index.html +++ b/python/web/src/templates/index.html @@ -258,7 +258,7 @@ {% endfor %} - + {% if file["detected_type"] != "UNDEFINED" %} {{ file['detected_type_name'] }} @@ -337,7 +337,7 @@ {% for key, value in device_types[type]["params"].items() %} {% if value.isnumeric() %} - + {% elif key == "interface" %} - + @@ -416,7 +416,7 @@ gb: "{{ _("GB") }}", mb: "{{ _("MB") }}", kb: "{{ _("KB") }}", - b: "{{ _("b") }}" + b: "{{ _("B") }}" } } @@ -572,7 +572,7 @@ - + @@ -607,7 +607,7 @@
- +