- use AdminLTE v4 classes to style toasts.
- simplify the javascript code a little, reducing the number of added
CSS classes.
- remove redundant classes: align-items-center, shadow and rounded
(styles already applied by the `.toast` class)
- use `toast-danger` when the toast type is "error"
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
- 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>
The functions should only accept IPs with an optional port:
- IPs are valid: "a.b.c.d"
- IPs with port ("a.b.c.d#p") are allowed if the port is valid
- network ranges (CIDR) should be rejected
- empty ports ("a.b.c.d#") should be rejected
- all other strings should be rejected
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
Adding a domain from the query log opens a modal that, on any HTTP
error, showed a fixed "Timeout or Network Connection Error!" text. The
most common case - the domain is already on the list - is returned by
FTL as HTTP 400 with `{"error":{"hint":"The item is already present"}}`,
so it surfaced as a misleading network error.
We now read the JSON error body and show its hint (or message), falling
back to the network-error text only when there genuinely is no response
body.
Signed-off-by: DL6ER <dl6er@dl6er.de>
- Replace the old `.hidden-*` classes and use the new `.d-*-none`. This
classes apply `display: none` to the elements matching the size or above
- remove unused/unnecessary classes from pi-hole.css
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
This branch's code predates development's xo 2 -> 3 upgrade and hadn't been checked against its stricter ruleset. Fix the new violations: drop unnecessary globalThis prefixes on location/matchMedia, prefer location.assign() over href assignment, use early returns instead of wrapping onDropdownClose bodies in an if, fix a parameter shadow in getGroups, and use {capture: true} instead of a bare boolean for addEventListener.
Signed-off-by: Adam Warner <github@promofaux.dev>
- simplify function to avoid code duplication;
- remove unnecessary CSS classes from the buttons;
- set button colors using CSS variables;
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
- remove old `.page-title` from all pages;
- add the the new header structure and place the title inside the new
`.app-content-header` element;
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
This class job was basically make the element 100% wide.
We can replace it with the Bootstrap class: `w-100`, or (if the element
already has its own class) we add `width: 100%`.
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
- use "btn-primary" buttons (TODO: set primary color as the theme color);
- adjust font-sizes, colors, margins and paddings;
- clean up old/unnecessary CSS rules
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
- add `.list-inline-item` class to the versions;
- remove unused/invalid classes;
- use bootstrap 5 classes to adjust the layout;
- only add class `w-100` when there is content.
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
The new theme (AdminLTE 4 + Bootstrap 5) uses different z-index for some
elements. The `nav#navigation` element uses z-index=1034, which is higher
than the default inital z-index (1030) used by bootstrap-notify, resulting
in notifications partially hidden under the navigation bar.
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
- add `data-bs-theme` to the body, accordingly to the current theme;
- add `data-bs-theme=dark` the the top bar, because we always use some
background color with white text, on this element;
- change the default theme font-size to 15px. The previous theme used 14px
(too small) and the original AdminLTE uses 16px (maybe too big);
- use `bg-body-secondary` class on the body to match the previous gray
background color on the content area;
- use `bg-body-tertiary` class on the sidebar. It is still a dark color,
but it will be changed according to the selected themes (when all themes
are implemented);
- adjust the top bar text color and border color to match the previous
theme look;
- adjust (or remove) the height on some elements on the top bar, to avoid
breaking the layout;
- move the old "logo" element to the sidebar (`.sidebar-brand` element);
- use CSS to show a smaller "Pi-hole" text logo in the collapse sidebar;
- adjust the collapsed sidebar layout, adding `.nav-badge` class to the
every badge on the sidebar;
- remove the outdated `pull-left` class;
- remove other outdated CSS rules;
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>