Skip to content

Maintenance: Refactor Javascript - #2078

Merged
Jixabon merged 10 commits into
masterfrom
mtx/refactor-javascript
Apr 11, 2026
Merged

Maintenance: Refactor Javascript#2078
Jixabon merged 10 commits into
masterfrom
mtx/refactor-javascript

Conversation

@Jixabon

@Jixabon Jixabon commented Mar 22, 2026

Copy link
Copy Markdown
Contributor

This PR contains a pretty big overhaul/reorganization of the javascript code. It splits everything into modules, making it much easier to find and troubleshoot javascript ui and ajax handling code. Everything runs out of the new app.js file and is conditionally loaded based on the url pathname. This reduces the amount of code running per page load and reduces conflicts and errors failing to find elements that don't exist.

Note: There will be no conflicts due to completely new files. Thorough testing required. Also depending on time of merge and other PRs with JS changes they will need to be updated.

Comment thread app/js/ui/dhcp.js Fixed
Comment thread app/js/ui/dhcp.js Fixed
@billz

billz commented Mar 22, 2026

Copy link
Copy Markdown
Member

This is another long overdue maintenance / sanity update. Initial smoke test passes. Agreed this will require thorough testing.

I also think this is useful...

image

@billz

billz commented Apr 5, 2026

Copy link
Copy Markdown
Member

Some observations from testing:

  • Wireguard > Peer tab, Peer public key magic wand button (no action)
  • DHCP Server > Static Leases tab, "+" / add button (no action), delete button works
  • (Minor) Magic wand button on Wireguard > Peer tab has a mouseover effect, absent in Hotspot > Security and RestAPI > Settings tabs

The latter is unrelated to this PR; I'm sure it's been like this for awhile. Better to make them consistent while we're at it, however.

Apart from these small things, looks great!

@Jixabon

Jixabon commented Apr 10, 2026

Copy link
Copy Markdown
Contributor Author

@billz I've unfortunately not been able to replicate the WireGuard Keygen issue.

As for the button style discrepancies, I'll make note of it and include it in the next round of UI fixes.

@Jixabon
Jixabon merged commit 593d320 into master Apr 11, 2026
3 checks passed
@Jixabon
Jixabon deleted the mtx/refactor-javascript branch April 11, 2026 03:20
@Jixabon
Jixabon restored the mtx/refactor-javascript branch April 11, 2026 04:06
@billz
billz deleted the mtx/refactor-javascript branch July 6, 2026 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants