Commit graph

156 commits

Author SHA1 Message Date
Fengyu Wu
98a6ba28de luci-themes: add luci-base to depends
Signed-off-by: Fengyu Wu <saldry@proton.me>
2024-03-02 17:57:01 +01:00
Fengyu Wu
f01347d3be luci-theme-bootstrap: open footer links in new tab
Also set Referrer Policy

Signed-off-by: Fengyu Wu <saldry@proton.me>
2024-03-02 17:57:01 +01:00
Jo-Philipp Wich
f57514d63c luci-theme-bootstrap: add dropdown option hover styles
Subsequent commits will drop the JS based mouse following focus behavior,
so add appropriate replacement CSS hover styles.

Ref: #6903
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2024-02-19 00:04:16 +01:00
Daniel Nilsson
8200c5d49e luci-theme-bootstrap: allow network interfaces to line break
The inherited nowrap of white-space causes the interface boxes to not line break, resulting in a horizontal scroll bar when many interfaces are present.

Tested on Chrome and Firefox.

Signed-off-by: Daniel Nilsson <daniel.nilsson94@outlook.com>
2024-02-18 00:55:20 +01:00
Sergey Ponomarev
9ce280af95 luci-theme-bootstrap: Use a new OpenWrt logo
The new OpenWrt logo.svg is copied from luci-theme-openwrt-2020.
The logo.png was copied too but resized from 180px 3.9Kb down to 48px 2.3Kb.
This is enough when used as icon for app pinned to desktop.

Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
2023-12-12 20:24:12 +02:00
Paul Donald
16470a0ab8
Merge pull request #6296 from jjm2473/patch-2
luci-theme-bootstrap: set scroll-margin-top for all elements
2023-12-04 03:44:24 +01:00
Kristian Skramstad
04d9820f17 luci-theme-bootstrap: better readability in System Log/Kernel Log.
Signed-off-by: Kristian Skramstad <kristian+github@83.no>
2023-09-06 22:16:12 +02:00
Paul Dee
2c3018d426 luci-base: grammar fixes
Login (n) -> Log (v) in

Logout (n) -> Log (v) out

Signed-off-by: Paul Dee <itsascambutmailmeanyway@gmail.com>
2023-08-11 13:17:04 +02:00
Santiago Kozak
d94a7285e5
luci-theme-bootstrap: File input background color
Remove the white background color for the file input elements, this way it'll use the default color defined for input elements, matching the light/dark theme.

Signed-off-by: Santiago Kozak <santikzk1406@gmail.com>
2023-03-26 06:31:10 -03:00
Liangbin Lian
7a023b3245 luci-theme-bootstrap: set scroll-margin-top for all elements
so we can use element.scrollIntoView() with fixed header

Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
2023-03-17 16:59:45 +08:00
Jo-Philipp Wich
f416c27b90 luci-theme-bootstrap: minor style fixes
- Apply CSS reset to before/after pseudo elements as well and fix
   resulting shifted offsets
 - Apply focus highlight to select elements too
 - Improve radio button styling

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-02-07 10:09:42 +01:00
Jo-Philipp Wich
56a737ec53 luci-theme-bootstrap: add focus indication for tabs
Underline the link text if a tab has keyboard focus in order to give a
visual indication of the focus state.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2023-02-05 20:22:44 +01:00
Florian Eckert
21b40652d9 luci-theme-: add postrm script
Remove uci theme config section on uninstall.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2023-01-09 13:07:42 +01:00
Jo-Philipp Wich
2e3282e624 luci-theme-bootstrap: translate Lua templates to ucode equivalents
Add ucode template equivalents for the Lua templates used by the theme.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-25 01:03:37 +02:00
Viktor Tsvetkov
3e9d9a9dbb sysauth: add autocomplete and id attributes to login inputs
this let browser automatically fill according to HTML spec for input elements.
luci-theme-bootstrap and luci-base are affected.

Signed-off-by: Viktor Tsvetkov <zwetvik@gmail.com>
[indentation fix]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-10-15 14:31:47 +02:00
y04
d4c4afeabc
luci-theme-bootstrap: optimized favicon filesize
Optimized PNG filesize from 733 to 592 bytes without any quality loss.

Signed-off-by: Alexander Semukhin <semukhin@mail.com>
2022-06-25 01:42:30 +02:00
Jo-Philipp Wich
c19020b2a4 luci-theme-bootstrap: various style tweaks
- Make control-group containers flex and ensure proper spacing between
   elements, fixes e.g. unwanted break for reveal/hide password button
   on narrow mobile views

 - Decrease top margin of modal popups

 - Fix displaying cell titles on mobile wrapped table rows

 - Tune mobile flex table styles

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-05-17 15:09:25 +02:00
Jo-Philipp Wich
56fab648ca luci-theme-bootstrap: restore initramfs warning
Restore accidentally removed the initramfs boot warning banner.

Ref: 8055acc9be (commitcomment-73447330)
Fixes: 8055acc9be ("luci-theme-bootstrap: overhaul styles")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-05-16 11:47:00 +02:00
Jo-Philipp Wich
c40dd71b84 luci-theme-bootstrap: use medium dark text color for version footer
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-05-06 13:42:54 +02:00
Jo-Philipp Wich
8e09f1833b luci-theme-bootstrap: fix incorrect wrap arounds in nested cbi sections
Fixes: #5743
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-03-25 11:49:57 +01:00
Jo-Philipp Wich
06b351722e luci-theme-bootstrap: add table column sort indicators
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-02-24 23:45:18 +01:00
Jo-Philipp Wich
edbde448b8 luci-theme-bootstrap: fix display glitch with combo buttons in row actions
Fixes: #5693
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-02-21 23:42:16 +01:00
Jo-Philipp Wich
6a60d2434e luci-theme-bootstrap: fix translation for username and password captions
Fixes: c81b09ec3d ("luci-theme-bootstrap: simplify login dialog")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-12-21 09:57:33 +01:00
Jo-Philipp Wich
c81b09ec3d luci-theme-bootstrap: simplify login dialog
Use an traditional HTML form with post submit action to the same URL in
order to simplify the login process and not rely on the discarded login
XHR reply properly setting the login cookie.

This will also avoid one useless request on login and hopefully fix login
issues reported with various browser environments.

As a bonus, the resulting code is somewhat smaller as well.

Ref: https://forum.openwrt.org/t/login-does-not-work/113360
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-12-09 19:52:48 +01:00
Jo-Philipp Wich
1a9afa2a90 luci-theme-bootstrap: add bottom margin to log views
Prevent the log output textareas to touch the footer border.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-12-01 15:09:44 +01:00
Jo-Philipp Wich
e0888d70a9 luci-theme-bootstrap: prevent hiding header bar on long vertical scrolls
Ref: b11a7d8e49 (commitcomment-60968071)
Fixes: 8055acc9be ("luci-theme-bootstrap: overhaul styles")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-11-27 19:50:27 +01:00
Jo-Philipp Wich
b11a7d8e49 luci-theme-bootstrap: various style corrections
- Add proper top and bottom margin for tab descriptions
 - Allow flex wrapping for cbi-value rows
 - Ensure that nested table/grid sections always take the full width
 - Make table/grid section row action buttons are as narrow as possible

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-11-22 09:43:12 +01:00
Jo-Philipp Wich
4720a025e8 luci-theme-bootstrap: fix cbi-value caption alignment
Since the removal of the clearfix styles, overlong captions will displace
subsequent input field rows.

Fix the issue by replace floating label + field margin with flexbox styles.

Fixes: #5535
Fixes: 8055acc9be ("luci-theme-bootstrap: overhaul styles")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-11-21 23:03:49 +01:00
Jo-Philipp Wich
6f4708ca68 luci-theme-bootstrap: fix inner border radius in ifaceboxes, progressbars
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-11-21 18:53:59 +01:00
Jo-Philipp Wich
7f26e86a9f luci-theme-bootstrap: hide scrollbars in modal overlay
Only enable scrollbars if content overflows.

Fixes: #5505
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-11-18 11:27:36 +01:00
Jo-Philipp Wich
00dc07bb84 luci-theme-bootstrap: further uci changelog style fixes
- Use the proper dialog class name to apply changelog styles
 - Darken grey background and borders

Fixes: 5bd111f58f ("luci-theme-bootstrap: fix uci changelog and readonly input styles")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-11-17 13:12:09 +01:00
Jo-Philipp Wich
5bd111f58f luci-theme-bootstrap: fix uci changelog and readonly input styles
- Rework uci changelog styling rules to work with unmodified markup
 - Drop redundant readonly input styles, don't fade readonly input texts

Fixes: 8055acc9be ("luci-theme-bootstrap: overhaul styles")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-11-17 00:34:54 +01:00
Jo-Philipp Wich
0bc09cc749 luci-theme-bootstrap: don't overwrite theme selection upon install
Revert to the previous uci-defaults behaviour of only setting the
selected theme to Bootstrap if the Bootstrap entry didn't exist yet
in the configuration.

Ref: https://forum.openwrt.org/t/luci-theme-behaviour-change/112047
Fixes: ed86f03a9f ("luci-theme-bootstrap: add explicit dark/light mode selection")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-11-16 13:19:29 +01:00
Jo-Philipp Wich
8055acc9be luci-theme-bootstrap: overhaul styles
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-11-16 13:06:04 +01:00
Jo-Philipp Wich
f16a2f3fba luci-theme-bootstrap: light/dark mode releated CSS fixes
- Fix progress bar shadow in light mode
 - Fix color schema preference in light and dark modes

Fixes: #5498
Fixes: #5499
Fixes: ed86f03a9f ("luci-theme-bootstrap: add explicit dark/light mode selection")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-11-08 09:58:36 +01:00
Jo-Philipp Wich
ed86f03a9f luci-theme-bootstrap: add explicit dark/light mode selection
Register two further "virtual" themes called BootstrapDark and
BootstrapLight which force dark and light mode respectively.

The actual Bootstrap theme itself will continue to auto-select
dark mode preference based on OS/Browser preference settings.

Fixes: #5492
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-11-07 11:06:33 +01:00
Jo-Philipp Wich
37e40e04ef luci-theme-bootstrap: work around csstidy bug
Ref: 26047fb967 (commitcomment-58638390)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-10-25 23:59:02 +02:00
Paul Dee
d1035c1f69 luci-theme-bootstrap: fix overlay display failures
Fixed overlay display failures for users on mobile, or users who booted
up in safe mode XD. Noticeable when vertical or horizontal real-estate
is too small for the displayed overlay.

This failure is most evident when you "edit" an interface, or display
your unsaved changes.

When content is wider than the screen view, the table hugs the (widest)
content maximally, and the overlay window becomes scrollable.

Disabled -webkit-overflow-scrolling, left, and right, because both FF
and Safari disable them as invalid anyway.

Signed-off-by: Paul Dee <systemcrash@users.noreply.github.com>
[Merge duplicate modal declarations, remove not applicable modal
 flexbox properties]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-10-25 20:55:10 +02:00
Jo-Philipp Wich
8fc78a26da luci-theme-bootstrap: fix header width
Fixes: 588e24f9ca ("luci-theme-bootstrap: various tweaks and cleanups")
Ref: 588e24f9ca (r58625289)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-10-25 19:39:47 +02:00
Jo-Philipp Wich
588e24f9ca luci-theme-bootstrap: various tweaks and cleanups
- introduce new variable --text-color-highest which results in #000/#fff
   for bright and dark modes respectively
 - drop unused navigation style rules and selectors
 - use sticky positioning for header bar and drop top margin hacks
 - use flex box layout for header bar contents
 - use uniform line-height for button elements instead of pixel paddings
 - fix too bright .cbi-value bottom border in mobile dark mode
 - avoid rendering duplicate .cbi-value bottom borders for nested sections
 - simplify header markup, get rid of unused container elements
 - use non-wrapping flex box layout for page actions, prioritize primary
   action button in automatic width calculation
 - fix border radius of ifacebox headers
 - use brightest color for log output textareas
 - fix dark mode colors for mode menu
 - use flex layout for footer

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-10-10 19:45:31 +02:00
Jo-Philipp Wich
72d13da94c luci-theme-bootstrap: rework uci changelog styling
Fixes: #5405
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-10-08 19:53:02 +02:00
Teoh Han Hui
6dd71eaebe luci-theme-bootstrap: add dark theme variant
Add a dark theme variant which is enabled by default when
prefers-color-scheme is set to dark.

Signed-off-by: Teoh Han Hui <teohhanhui@gmail.com>
2021-10-07 23:30:31 -10:00
Paul Spooren
c8d9819c9a themes: warn if booted from initramfs
Some devices offer a full LuCI interface from their recovery interface.
As it's read-only it should only be used for installing sysupgrades and
therefore warn users that no settings are saved.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-10-05 15:33:15 -10:00
Ansuel Smith
be028dce56
luci-theme: fix css for flash advanced settings
Fix themes for broken display of advanced button in the sysupgrade modal.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-08-05 15:51:02 +02:00
Jo-Philipp Wich
e6a2cdbdab luci-theme-bootstrap: mobile style fixes for vlan filter matrix
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-06-13 21:49:49 +02:00
Hauke Mehrtens
5cbd79d7e3 themes: Call striptags() on hostname to prevent XSS
This calls striptags() on the hostname to prevent any XSS over the
hostname. This should fix CVE-2021-33425 as far as I understood it.

If someone adds some Javascript into system.@system[0].hostname it would
have been directly added to the page, this prevents the problem.

This can only be exploited by someone being able to modify the uci
configuration, normally a user with such privileges could also just
modify the webpage.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-06-09 01:33:44 +02:00
Jo-Philipp Wich
6960819997 luci-theme-bootstrap: add svg help icon to form field descriptions
The still referenced help.gif icon is absent by default since it has been
moved to luci-compat.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-06-01 15:34:11 +02:00
Dirk Brenken
6ffd1592ce luci-theme-bootstrap: fix text wrapping in buttons
* should fix #4647

Signed-off-by: Dirk Brenken <dev@brenken.org>
2020-12-27 23:02:50 -10:00
Hannu Nyman
258e74c1c3 themes: remove deprecated reference to enabling SSH
Remove the reference to setting a password being linked to SSH capability.
(SSH has been initially enabled since year 2015.)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2020-08-16 22:19:37 +03:00
Russell Morris
27fc7a8b4e luci-theme-bootstrap: update href for Bootstrap "brand"
In the Material theme, clicking on the logo takes you to the status page.
This seems logical, and is very helpful. But in Bootstrap, it doesn't
do anything, so just pulling the same href from Material to Bootstrap,
so the link works in Bootstrap as well.

Signed-off-by: Russell Morris <rmorris@rkmorris.us>
[adjust commit subject, squash commits]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-06-16 17:09:19 +02:00