Commit graph

610 commits

Author SHA1 Message Date
Viktor Tsvetkov
afd0012939 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>
(cherry picked from commit 3e9d9a9dbb)
2022-10-15 14:32:35 +02:00
Jo-Philipp Wich
f1d687eeae luci-theme-bootstrap: fix incorrect wrap arounds in nested cbi sections
Fixes: #5743
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 8e09f1833b)
2022-03-25 11:50:47 +01:00
Jo-Philipp Wich
2dba71e4e8 luci-theme-bootstrap: fix display glitch with combo buttons in row actions
Fixes: #5693
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit edbde448b8)
2022-02-21 23:43:22 +01:00
Jo-Philipp Wich
cc582ebfb3 luci-theme-bootstrap: fix style quirk introduced by backport
Fixes: 883834c3dd ("luci-theme-bootstrap: overhaul styles")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2022-02-16 10:49:33 +01:00
Jo-Philipp Wich
41f18098bb 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>
(cherry picked from commit 6a60d2434e)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
40051f0302 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>
(cherry picked from commit c81b09ec3d)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
1390f78fad 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>
(cherry picked from commit 1a9afa2a90)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
2cc139ce6a 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>
(cherry picked from commit e0888d70a9)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
18cc1c79d7 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>
(cherry picked from commit b11a7d8e49)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
119cfee890 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>
(cherry picked from commit 4720a025e8)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
071a3b0d12 luci-theme-bootstrap: fix inner border radius in ifaceboxes, progressbars
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 6f4708ca68)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
f1e5639df1 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>
(cherry picked from commit 7f26e86a9f)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
c1745bdb85 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>
(cherry picked from commit 00dc07bb84)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
7884d8ac01 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>
(cherry picked from commit 5bd111f58f)
2022-02-16 00:43:35 +01:00
Jo-Philipp Wich
883834c3dd luci-theme-bootstrap: overhaul styles
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from commit 8055acc9be)
2022-02-16 00:42:42 +01:00
Jo-Philipp Wich
0cee46bc63 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>
(cherry picked from commit 0bc09cc749)
2021-11-16 13:20:46 +01:00
Jo-Philipp Wich
6df9ae0234 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>
(cherry picked from commit f16a2f3fba)
2021-11-08 09:58:57 +01:00
Jo-Philipp Wich
c14cac4eb9 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>
(cherry picked from commit ed86f03a9f)
2021-11-07 11:07:10 +01:00
Jo-Philipp Wich
a706a9c867 luci-theme-bootstrap: work around csstidy bug
Ref: 26047fb967 (commitcomment-58638390)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 37e40e04ef)
2021-10-25 23:59:42 +02:00
Paul Dee
d24760e60a 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>
(cherry picked from commit d1035c1f69)
2021-10-25 20:59:22 +02:00
Jo-Philipp Wich
26047fb967 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>
(cherry picked from commit 8fc78a26da)
2021-10-25 19:40:06 +02:00
Jo-Philipp Wich
4a6927fa67 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>
(cherry picked from commit 588e24f9ca)
2021-10-22 20:37:12 +02:00
Jo-Philipp Wich
92ae018d61 luci-theme-bootstrap: rework uci changelog styling
Fixes: #5405
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 72d13da94c)
2021-10-22 20:36:18 +02:00
Teoh Han Hui
83e19dcda6 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>
(cherry picked from commit 6dd71eaebe)
2021-10-22 20:36:12 +02:00
Petr Štetiar
f9e9fcff9c luci-theme-openwrt-2020: add styling of hyperlinks
Currently it's not possible to distinguish between normal text and
hyperlink.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 60fbadfa36)
2021-10-22 20:36:01 +02:00
Petr Štetiar
0ef4b2f1b3 luci-theme-openwrt-2020: add styling of abbreviations and acronyms
Style abbreviations and acronyms with dotted underline text-decoration
as without the style it's quite hard to find out which text is
abbreviation or acronym.

References: https://developer.mozilla.org/en-US/docs/Archive/Web_Standards/Styling_Abbreviations_and_Acronyms
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit b5faba1244)
2021-10-22 20:35:48 +02:00
Ansuel Smith
fc702bcbf5 luci-theme-material: fix cut syslog
Remove line-height css for syslog textarea as it cause some
problem with displaying all the rows of the syslog.
(Row line are calculated with a line-height of 1)

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
(cherry picked from commit a9ff8d3468)
2021-10-22 20:34:48 +02:00
Ansuel Smith
1300f4df4a luci-theme-material: improve support for dashboard module
Fix sidebar styling to improve support for dashboard module.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
(cherry picked from commit 78de736a95)
2021-10-22 20:34:42 +02:00
Ansuel Smith
9d2c8cb429 luci-theme-material: add support for modmenu
Improve support for modmenu.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
(cherry picked from commit 05d100442b)
2021-10-22 20:34:03 +02:00
Ansuel Smith
bec2c7e2b5 luci-theme-material: standardize menu and drop jquery
- Drop jquery lib
- Move to the new menu.js implementation
- Rework css to mimic old js transition
- Rework footer and header to new implementation

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
(cherry picked from commit 031424c0d3)
2021-10-22 20:33:34 +02:00
Fritz D. Ansel
55a9f9516f theme openwrt-2020: set maximum menu width
more space for it does not have an advance

Signed-off-by: Fritz D. Ansel <fdansel@yandex.ru>
(cherry picked from commit b2bea34586)
2021-10-22 20:33:29 +02:00
Fritz D. Ansel
7ef76bcf6f theme openwrt-2020: larger bridge-boxes
they are to small for devices like e8450
as it has 4x LAN + 2x WLAN + 1x Bridge

Signed-off-by: Fritz D. Ansel <fdansel@yandex.ru>
(cherry picked from commit c592ef4f84)
2021-10-22 20:33:24 +02:00
Jo-Philipp Wich
137ede6354 luci-theme-openwrt: add success style for alert messages
Fixes: #5427
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 1c3b32dc1b)
2021-10-12 23:05:29 +02:00
Florian Eckert
678ee038c0 luci-theme-openwrt-2020: add css success label
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit a655389032)
2021-08-31 08:52:10 +02:00
Jo-Philipp Wich
ecc58e7fcb luci-theme-openwrt-2020: fix spinning disk animation
Fixes: #4824
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e8a6f0bb7c)
2021-06-21 12:06:44 +02:00
Jo-Philipp Wich
bd36169e8c luci-theme-bootstrap: mobile style fixes for vlan filter matrix
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit e6a2cdbdab)
2021-06-13 21:50:18 +02:00
Jo-Philipp Wich
2afd4b78c8 luci-theme-openwrt-2020: rework table styles
Target table, tr, th and td tags directly and stop using the corresponding
CSS class names.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 7057108400)
2021-06-12 20:01:58 +02:00
Jo-Philipp Wich
1818ddcac3 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>
(cherry picked from commit 6960819997)
2021-06-12 19:23:01 +02:00
Sven Roederer
904fb39c31 luci-theme-openwrt-2020: use SVG-file for favicon and logo
Using the scalable graphic in place of the static png file saves some
ressources in flash and network. It also aligns the filetype to the type
announced to the browser.

fixes GitHub-issue #5051

Signed-off-by: Sven Roederer <freifunk@it-solutions.geroedel.de>
(cherry picked from commit 184e93df5f)
2021-06-12 19:22:37 +02:00
Jan Breuer
87daaa24c8 luci-theme-openwrt-2020: remove submenu margin-bottom when submenu not visible
Signed-off-by: Jan Breuer <jan.breuer@jaybee.cz>
(cherry picked from commit 2b5f78e893)
2021-06-12 19:21:24 +02:00
Hauke Mehrtens
139edfce8b 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>
(cherry picked from commit 5cbd79d7e3)
2021-06-09 20:53:15 +02:00
Liangbin Lian
ac0bcc2d10 luci-theme-material: fix wrong active state on common prefix node
Before fixed, if we have two nodes: 'services/ddns' and 'services/ddnsto',
click any one of they, will show they all actived.

Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
(cherry picked from commit 97d50d2c6b)
2021-05-26 10:09:05 +03:00
Jo-Philipp Wich
6137c9ff33 luci-theme-openwrt-2020: honor CSS definitions passed by views
Legacy Lua views might declare a global `css` variable to inject custom
styles into the template header. Support this mechanism in the OpenWrt 2020
theme as well.

Ref: https://github.com/openwrt/luci/issues/4972
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit c5ff3244e9)
2021-04-09 14:31:06 +02:00
Florian Eckert
4c6fb6bb97 luci-theme-openwrt-2020: add missing css success color
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit e0c0e468e6)
2021-03-12 15:03:02 +01:00
Bryan Forbes
4a00f5bd8e luci-theme-openwrt-2000: Add doctype to header
Fix table rendering in the small responsive breakpoint on Safari (which
ignores `display: block;` for `<td>` elements).

Signed-off-by: Bryan Forbes <bryan@reigndropsfall.net>
2021-02-04 14:47:43 -06:00
Hannu Nyman
db15e3f695 luci-theme-rosy: Remove BROKEN theme
The Rosy theme has been marked broken for over a year,
since 23 Dec 2019. Remove it now, so that it does not
get into the next release branch 20.xx (or 21.xx).

Reference to
https://github.com/openwrt/luci/issues/3759#issuecomment-599436159

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2020-12-29 14:23:13 +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
Ansuel Smith
01cefed7f0
luci-theme-material: fix bigger button for combo-box
Combobox are bigger than any other button. Align the dimension to all the other buttons.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2020-10-30 21:34:10 +01:00
Oldřich Jedlička
b03a508c6c luci-theme-material: Fix section title padding.
After moving section title from `legend`, which was translated to `span`
with style `panel-title`, to `h3`, update also CSS style to match first
`h3` in `cbi-section`.

Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
2020-10-25 12:11:24 +01: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