Commit Graph
33 Commits
Author SHA1 Message Date
yubiuser d4518cfc65 Re-Implement updating toasts
Signed-off-by: yubiuser <github@yubiuser.dev>
2026-08-07 22:25:15 +02:00
RD WebDesign e21c6203a9 Fix revServers table after migrating to datatables v2
- remove from the table footer some elements created by datatables.
  These elements are automatically created to allow table sorting, but the
  footer here is used as an interface to add new reverser servers. We
  don't need them. Also, the elements will interfere with the placeholder
  text (added using CSS, but only to completely empty cells).
- adjust CSS `.actions` class to force right aligned text on the footer.

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2026-08-05 22:36:07 -03:00
RD WebDesignandGitHub 01e8530944 Fix merge conflict
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2026-08-02 18:27:06 -03:00
RD WebDesignandGitHub d156625334 Merge branch 'development' into new/adminLTE4
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2026-08-02 17:51:10 -03:00
yubiuser db57bf1e06 Filter table-selected upstreams from the custom upstream server input field
Signed-off-by: yubiuser <github@yubiuser.dev>
2026-07-31 21:17:10 +02:00
3fb6e7ad88 Also remove empty lines
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: yubiuser <github@yubiuser.dev>
2026-07-31 17:29:11 +02:00
yubiuser 4914bf747e Simplify selector
Signed-off-by: yubiuser <github@yubiuser.dev>
2026-07-28 22:14:48 +02:00
yubiuser 2691919645 Fix DNS upstream table
Signed-off-by: yubiuser <github@yubiuser.dev>
2026-07-28 15:26:40 +02:00
DL6ERandAdam Warner 15b11525a4 Restore form spacing and tone down more dark-theme accents
- Bootstrap 5 also removed `.form-group` (row bottom margin) and `.help-block`
  (muted helper text); both are used across the settings and query-log forms,
  so restore them. This recovers the vertical spacing that was missing between
  form rows throughout the interface.
- Dark theme: mute the active pagination link and the filled `.card-info` /
  `.card-primary` card headers (e.g. the query-log "Advanced filtering" box),
  which used Bootstrap's over-bright `#0d6efd`/`#0dcaf0` on the dark background.
  The headers are recoloured via AdminLTE 4's `--lte-card-variant-*` variables.
- Widen the reverse-DNS servers table's "Enabled" column so its header no
  longer overflows into the next column.

Signed-off-by: DL6ER <dl6er@dl6er.de>
2026-07-17 22:39:59 +01:00
3d5193154a Replace icheck-bootstrap checkboxes/radios with native Bootstrap 5 form-check
Convert all 35 static checkbox/radio inputs across 9 templates (queries,
search, settings-api, settings-dhcp, groups-domains, settings-dns,
settings-privacy, settings-teleporter) plus the dynamically-generated
ones (settings-advanced.js's per-setting boolean/enum controls,
settings-dns.js's DNS-upstream picker) from icheck-bootstrap's
JS-post-processed styling to Bootstrap 5's native .form-check/
.form-check-input/.form-check-label markup, which needs no JS at all.

Remove footer.js's applyCheckboxRadioStyle() (and its call sites in
settings-advanced.js/settings-dns.js) entirely - it used to strip and
re-add classes on every checkbox/radio's parent after page load, which
would have destroyed the new static .form-check classes at runtime.
Drop the icheck-bootstrap dependency, its vendor CSS and the <link> in
header.lp, and replace its now-dead pseudo-element checkbox styling in
pi-hole.css with a couple of plain .form-check-input/.form-check-label
rules for the one spot that needs a smaller checkbox size (the domain
list's filter-by-type row).

Two "no-icheck"-excluded checkboxes (a table-header select-all in both
settings-dns.lp and settings-dns.js) are left as bare native checkboxes,
matching their original deliberate exclusion.

Also confirmed pi-hole's own text-red/text-green/bg-*/etc. color utility
classes are unaffected by the AdminLTE core removal - each theme file
already defines them fully rather than only overriding an AdminLTE base,
so no fix was needed there.

Verified against a live container: settings/dns (checkbox/radio styling,
custom-servers card-collapse toggle) and settings/privacy (privacy-level
radios) render correctly with zero console errors.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2026-07-17 22:39:57 +01:00
Adam WarnerandRD WebDesign f79f71f415 Add DoT/DoH tabs to the Upstream DNS Servers picker
FTL's DoT/DoH client work (pi-hole/FTL#2940) pins tls:// and https://
URIs onto the well-known resolver list, but the picker only rendered
checkboxes for the plain addresses.

- Plain / DoT / DoH tabs, one checkbox per address family per tab
- DoT/DoH tabs omit vendors with no pinned URI for that protocol,
  instead of showing empty rows
- keeps the table narrow as more protocols (DoQ, DoH3, ...) get added
- each tab shows a label with how many upstreams are selected there,
  positioned top-right with a tooltip, per rdwebdesign's review
  comments

Co-authored-by: RD WebDesign <github@rdwebdesign.com.br>
Signed-off-by: Adam Warner <github@promofaux.dev>
2026-07-17 22:19:11 +01:00
yubiuser 7f14ef6731 Fix settings-dns.js
Signed-off-by: yubiuser <github@yubiuser.dev>
2026-07-08 09:09:33 +02:00
yubiuser 39504966a6 Use xo --fix to fix huge load of fixable issues, revert fixes to regex for manual inspection
Signed-off-by: yubiuser <github@yubiuser.dev>
2026-07-07 16:30:05 +02:00
Mordy OvitsandGitHub f1c7122b1f Fix typo in emptyTable message for DNS settings
Signed-off-by: Mordy Ovits <mordyovits@users.noreply.github.com>
2026-07-06 18:27:06 -04:00
RD WebDesign cec359a63f Do not show the table and edit buttons when the option is set via ENV VAR
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2026-06-30 00:00:30 -03:00
RD WebDesign 6b5e9dfa50 Make sure the "Add" button won't trigger the saveRecord() function
The "Add" button has the same `.saveRevServers` CSS class as the other
normal "Save" buttons. This is fine and simplifies the code, as all rows
(including the last one) use the same validation pattern and functions.

The only difference is the `addRevServer` function, used to save the new
values.

Preceding the selector with `tbody`, makes sure only the normal "Save"
buttons will use the `saveRecord()` function.

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2026-06-29 20:23:32 -03:00
RD WebDesign 3dc97c6ccf Add a placeholder text to the footer cells, to show they are editable
- add a placeholder using CSS
- use a javascript to trim undesired spaces. This command also removes the
  "hidden" line break automatically added by browsers when the content of
  an editable element is cleared/deleted.

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2026-06-29 20:23:15 -03:00
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 770a7ca8b5 Add validation to editabled table cells and simplify the table
- remove `<input>` tags and add contenteditable attribute to all
  editable cells
- rows are always enabled now (no "edit" button to enable them)
- Simplify javascript code:
  - use classNames to simplify column selection, instead of unique ids
  - use datatables "columnDefs" and "createdCell" to add attributes
  - use CSS class "editing" and CSS rules to handle buttons
- remove unused and unnecessary attributes from elements

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2026-06-13 21:50:14 -03:00
RD WebDesign 2467c748b0 Refactor the code to actually save the Conditional Forwarding data
Previously, the same function was used to initialize the table and update
the table rows, when lines were added, edited or deleted.

Now, one function initializes the table and another function saves the
changes, shows a message and updates the table to reflect the changes.

The values are "saved and applied" immediately using an AJAX call.
The waitMe overlay is also shown, but the page is NOT reloaded.

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2026-06-13 17:36:06 -03:00
RD WebDesign e7b0b778c9 Use a table to show and edit Reverse DNS Servers
- add functions and buttons to add, modify, undo changes and delete lines
- generate the table using data already on the textarea
- add functions to read textarea contents and parse then into an array
- add functions to update the textarea contents from the table
- hide the textarea. Only the table will be visible
- make sure the table is not shown when the option was set by ENV VARS
- move some help paragraphs to the table legend
- remove usused original help text for the textarea
- use fixed size for all action buttons
- don't use "icheck" styling on the checkboxes in the table

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2026-06-13 16:54:05 -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
XhmikosR 65e2917b74 settings-dns: expand custom servers box if it has custom servers
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2025-06-21 08:45:53 +03:00
RD WebDesign cb575a5dfb Use the same interface name used by FTL
If `dns.interface` is empty in pihole.toml we use the first interface, just like FTL.

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2025-05-21 21:27:44 -03:00
XhmikosR f69df08a08 Fix deprecated ready function
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2025-05-15 18:17:31 +03:00
RD WebDesign 263d01a866 Use the same default interface used by FTL if none is set in pihole.toml
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2025-05-04 15:47:19 -03:00
XhmikosR 756239a6dd xo: enable strict mode
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2025-04-23 20:50:12 +03:00
XhmikosR f8a0a1d4ec Tighten xo rules
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2025-04-23 07:53:13 +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
DL6ER 5f3bcdac3c Merge branch 'development' into new/web_prefix
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-03-09 20:15:59 +01: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
RD WebDesign 6cad52b8d1 Set the interface name in Settings > DNS page
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2025-02-27 23:29:23 -03: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