Skip to content

Web UI: Noscript fallback messages; relocate js into templates#1097

Merged
rdmark merged 1 commit intodevelopfrom
rdmark-js-rearrangement
Feb 15, 2023
Merged

Web UI: Noscript fallback messages; relocate js into templates#1097
rdmark merged 1 commit intodevelopfrom
rdmark-js-rearrangement

Conversation

@rdmark
Copy link
Copy Markdown
Member

@rdmark rdmark commented Feb 14, 2023

  • Flesh out and style the noscript messages. Hide the link to the upload page when scripts are disabled.
  • Move embedded scripts to the specific template where they're used, to save vintage browsers the effort (and avoid unhelpful errors)

<label for="piscsi_config">{{ _("PiSCSI Config") }}</label>
</form>

<script type="application/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.9.3/min/dropzone.min.js"></script>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we would benefit from using a protocol-relative URL here, e.g. //cdnjs.cloudflare.com/ajax/libs/dropzone/5.9.3/min/dropzone.min.js, which would be requested via HTTP when accessing the web UI via HTTP. I'm not quite sure what the intersection is between the browser supporting Dropzone and not supporting modern TLS.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea to keep in mind in other scenarios. In this case, I'd say that it is very unlikely that a user agent not capable of https would be able to handle this modern and fairly complex js library.

@rdmark rdmark merged commit cfc3390 into develop Feb 15, 2023
@rdmark rdmark deleted the rdmark-js-rearrangement branch February 15, 2023 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants