Commit Graph

37 Commits

Author SHA1 Message Date
RD WebDesign d449e01b13 Allow to add an optional port to the reverse server IP
and include validation functions

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2026-06-13 22:02:08 -03:00
RD WebDesign f2a23569c0 Fix loadingOverlayTimeoutCallback() to actually remove waitMe overlay
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2026-06-13 16:54:27 -03:00
RD WebDesign 5eef250a4d Use regex flag "u" to fix errors after merging development branch
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2026-05-19 17:57:07 -03:00
RD WebDesign 571768a83c Merge branch 'development' into new/simple-dhcp-static-leases2
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2026-05-19 17:44:36 -03:00
Austin Gilmour 1c621a53f8 fix: replace ES2024 regex v flag with u for WebKit compatibility (#3757)
WebKit-based browsers (Safari, DuckDuckGo on macOS) don't yet support
the ES2024 Unicode Sets `v` regex flag, causing a SyntaxError that
prevents all dashboard JavaScript from executing — stats show `---` and
charts spin indefinitely.

None of the affected patterns use v-exclusive features (set notation
`[A--B]`, `[A&&B]`), so downgrading to `u` is fully equivalent and
restores broad compatibility without any functional change.

Also updates xo.config.js to enforce `requireFlag: "u"` so the linter
stays consistent with the codebase.

Affected files (16 occurrences across 8 files):
- scripts/js/utils.js
- scripts/js/index.js
- scripts/js/footer.js
- scripts/js/groups-domains.js
- scripts/js/settings-teleporter.js
- scripts/js/gravity.js
- scripts/js/groups.js
- scripts/js/groups-clients.js
- scripts/js/groups-lists.js
- scripts/js/settings-dns-records.js
- scripts/js/network.js
- scripts/js/taillog.js

Signed-off-by: Austin Gilmour <gilmoursa@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 07:58:15 -04:00
RD WebDesign e6fe47c2e9 Register event listeners on document scope to call updateLineNumbers()
Also fix 2 issues on validation functions:
- better regex for validateMAC()
- make sure validateIPv6Brackets() correctly trims the value before
  validation

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2026-05-06 00:09:51 -03:00
RD WebDesign bc01113163 Enforce hostname and IPv6 validation on the static DHCP table
Only accept valid hostnames:
  Previously, invalid hostnames were trigerring the cell highlighting,
  but invalid entries were still accepted when using the green "save"
  button. Now, hostnames are saved only if they pass the validation,
  like other values.

Only allow IPv6 enclosed in square brackets:
  The previous validation function used to validate IPv6 didn't accept
  brackets, resulting in errors when an IPv6 was typed directly on the
  table cell. A new function was created to validate IPv6 enclosed in
  brackets.

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2026-04-24 15:10:06 -03:00
RD WebDesign 3501ad003c Merge branch 'development' into new/simple-dhcp-static-leases
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2026-03-29 11:14:59 -03:00
yubiuser 68542383ea Apply suggestions from code review
Co-authored-by: RD WebDesign <github@rdwebdesign.com.br>
Signed-off-by: yubiuser <github@yubiuser.dev>
2026-03-16 22:06:16 +01:00
yubiuser c02e66fe04 Fix xo errors
Signed-off-by: yubiuser <github@yubiuser.dev>
2026-03-16 08:55:20 +01:00
RD WebDesign 356666122b Remove unused filter_dnsmasq_warnings=true option
Also remove the old code used to read hideNonfatalDnsmasqWarnings_chkbox
from localstorage. This value was a leftover from v5 web interface.

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2025-10-27 19:50:17 -03:00
DL6ER 3489ddf284 Validate hwaddr and IP address while typing
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-07-20 20:33:35 +02:00
DL6ER 69b461ae8e Add IPv6 support for static DHCP lease management
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-07-15 20:16:30 +02:00
Adam Warner acc8583f43 utils: modernize hex functions (#3546) 2025-07-11 18:42:41 +01:00
XhmikosR 9c00467a6d utils: remove duplicate function and convert changeTableButtonStates to vanilla JS
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2025-07-01 16:38:57 +03:00
Adam Warner 387ad34927 settings-dns: expand custom servers box if it has custom servers (#3514) 2025-06-29 12:28:48 +02:00
XhmikosR 4ce43a304f utils: modernize hex functions
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2025-06-28 08:48:43 +03:00
XhmikosR 4ac3fd060f Drop htmlPass util since it's only used once
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2025-06-27 17:12:48 +03:00
XhmikosR 5efe33bbab Abstract collapsing box to a new util
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2025-06-21 08:49:23 +03:00
Adam Warner f683631afd Use proper Object methods (#3441) 2025-05-19 18:26:44 +01:00
Adam Warner d078d1fd09 utils: improve readability for validateIPv* functions (#3423) 2025-05-16 17:22:14 +01:00
XhmikosR a69a65d95e utils: improve readability for validateIPv* functions
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2025-05-16 11:33:34 +03:00
XhmikosR c03c740710 utils: remove the unused objectToArray util
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2025-05-15 18:23:24 +03:00
XhmikosR 408334380e Use Object methods when possible
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2025-05-12 18:46:36 +03:00
XhmikosR ba3b76421b Use proper Object methods
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2025-05-12 18:46:36 +03:00
XhmikosR 756239a6dd xo: enable strict mode
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2025-04-23 20:50:12 +03:00
XhmikosR f598a8e35c Manual xo fixes and suppressions
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2025-04-23 07:53:16 +03:00
XhmikosR f8a0a1d4ec Tighten xo rules
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2025-04-23 07:53:13 +03:00
XhmikosR a95f6c88ae utils: fix typo in showAlert()
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2025-04-21 11:15:16 +03:00
DL6ER b524a2f4b6 Always use document.body.dataset.apiurl instead of the intermediate const apiUrl
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-03-31 22:00:16 +02:00
yubiuser 621ec801e9 Use modernized waitMe plugin
Signed-off-by: yubiuser <github@yubiuser.dev>
2025-03-27 22:01:58 +01:00
Dominik 7c72c0cc7f parseQueryString: switch to URLSearchParams and remove unused param (#3340) 2025-03-27 13:29:44 +01:00
XhmikosR 6c29d5dab8 Logout: fix redirect
Without this, we were getting into a loop with keep alive enabled
when using Firefox.

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2025-03-24 08:29:40 +02:00
XhmikosR 1801e9535b parseQueryString: switch to URLSearchParams and remove unused param
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2025-03-23 18:34:49 +02:00
DL6ER a7f1ca7800 Allow path prefix multiplexing the dashboard and API. See https://github.com/pi-hole/FTL/pull/2319 for further details
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-03-02 20:20:10 +01:00
yubiuser e7f97baab1 Fix prefer-global-this error
Signed-off-by: yubiuser <github@yubiuser.dev>
2024-12-07 16:11:35 +01:00
yubiuser 1e922a8b29 Move all files from /scripts/pi-hole/ to /scripts/
Signed-off-by: yubiuser <github@yubiuser.dev>
2024-10-28 20:22:09 +01:00