Commit graph

77 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
Jo-Philipp Wich
b0e56a39aa luci-theme-openwrt: 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
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
y04
5a3cc88a67
luci-theme-openwrt: optimized image filesize
Optimized PNG filesize from 152 to 80 bytes without any quality loss.

Signed-off-by: Alexander Semukhin <semukhin@mail.com>
2022-06-25 01:44:22 +02:00
Jo-Philipp Wich
1c3b32dc1b luci-theme-openwrt: add success style for alert messages
Fixes: #5427
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-10-12 22:40:25 +02: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
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
Daniel Golle
4c64aedb3e
luci-mod-failsafe: kill old failsafe mod
It's been unmaintained for ages and became useless.
Better just limit regular luci-mod-admin to only show basic
functionality in case `ubus call system board` indicates we are running
off initramfs.

Singed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-02-24 14:40:10 +00: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
Jo-Philipp Wich
48269ade61 luci-theme-openwrt: rework menu rendering
Utilize the LuCI.ui.menu class to load, traverse and cache the menu tree
in the local session store.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-16 13:30:35 +02:00
Chen Minqiang
fc150636b9 luci-theme-*: set mediaurlbase if it is the first time to be installed
If we build multi-themes into firmware, each of them set itself
to be the default theme, what theme should it be?

To make it clear, we only set mediaurlbase if the theme is the
first time to be installed/built-in.

This resolve the issue that theme always change to somewhat default
after upgrading the firmware even with a config-keep-upgrade

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2020-04-03 21:44:28 +08:00
Jo-Philipp Wich
63057a08dc luci-theme-openwrt: work around cssmin bug breaking the minified CSS.
The cssmin utility incorrectly breaks up calc() expressions when
minifying rules. Avoid the problem by trimming uneeded spaces.

Fixes: #3801
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-31 15:27:13 +02:00
Jo-Philipp Wich
ccb7e4a4a7 themes: generalize indicator markup and styling
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-30 17:12:07 +02:00
Jo-Philipp Wich
5d7dc391d4 themes: ensure that data-page attribute is escaped
Fixes: #3757
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-03-15 17:48:40 +01:00
Jo-Philipp Wich
0130e2b08c themes: render menu even when not logged in
Ref: #3563
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-01-25 23:28:24 +01:00
Jo-Philipp Wich
185b84bc9d
Merge pull request #3401 from MartB/modal-heightfixv2
luci-theme-*: remove modal max-height #3383 v2
2019-12-25 17:58:06 +01:00
Jo-Philipp Wich
ebc99a6ab3 luci-theme-openwrt: render menu on client side
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-12-16 18:07:17 +01:00
MartB
c6122af7ea luci-theme-*: remove modal max-height #3383 v2
Signed-off-by: MartB <mart.b@outlook.de>
2019-12-10 17:26:10 +01:00
Jo-Philipp Wich
13e9e3e9e8 treewide: fix "Unhandled token" errors with Lua CBI maps
The `data-type` attribute is used to bind datatype validators to a widget
while some templates used the same attribute to denote the name of the
underlying widget.

Change the `data-type` attributes referring to the widget name to
`data-widget` in order to stop the JS token error spam.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-16 18:25:52 +01:00
Jo-Philipp Wich
3a82faf21a themes: add necessary styles for ComboButton
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-11-10 18:20:56 +01:00
mpratt14
24fbd754aa luci-theme-openwrt: fix scrolling issue in syslog
Depending on the browser, it is sometimes difficult to scroll if moused
over or after clicking or highlighting text. I often have to click outside
the text to be able to scroll again. The browser perceives that there is
scrolling space/content within the <textarea> element because it is
almost, but not exactly, the same size as its parent <div> element,
when in reality, there is no more text content. This causes scrolling
within the element with a range of just a few pixels, and the rest of
the page remains static.

This is easily solved by adding the "overflow-y" property with value
"hidden". Tested by myself on Chrome 64-bit Windows 10

Signed-off-by: Michael Pratt <mpratt51@gmail.com>
[rewrap commit message, fix Sob syntax]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-09-24 08:15:08 +02:00
Jo-Philipp Wich
fda4ba598c luci-base: replace uci change pages with client side modal dialog
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-07-07 15:25:49 +02:00
Jo-Philipp Wich
5fd071aadb themes: don't reset theme on package upgrades
Fixes: #2743
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2019-06-03 16:49:10 +02:00
Jo-Philipp Wich
357096d15f luci-theme-openwrt: add required CSS rules for new tabbing code
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-12-10 13:41:34 +01:00
Jo-Philipp Wich
747e10bae6 luci-theme-openwrt: style tweaks
- Collapse table borders by default
 - Vertically align table cell content
 - Inherit font family and size for form widgets
 - Fix redundant horizontal padding for cell labels

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-12-10 13:41:34 +01:00
Jo-Philipp Wich
9a6e584449 luci-theme-bootstrap, luci-theme-openwrt: allow dynlist item content to wrap
Very long values without whitespace can easily overflow the dynlist item
container, so allow the browser to forcibly break such lines.

Reported-by: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-12-02 16:57:24 +01:00
Jo-Philipp Wich
12ed0274a9 luci-base: CSS accessibility improvements for modal dialog
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-24 21:31:28 +01:00
Jo-Philipp Wich
6a0c1d1ab6 luci-mod-status: move index and iptables page JS code into external files
Also adjust the Bootstrap and OpenWrt themes accordingly

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-22 13:07:33 +01:00
Jo-Philipp Wich
515562be27 luci-theme-bootstrap, luci-theme-openwrt: allow dynlist .add-item to expand
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-20 13:32:31 +01:00
Jo-Philipp Wich
e69d05cac4 luci-theme-openwrt: modal display fixes
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-15 23:00:34 +01:00
Jo-Philipp Wich
cbd0d7c5de luci-theme-openwrt: modal/progressbar rules, mobile improvements
- Add rules for modal dialogs and progress bar widgets
 - Increase button and input size on mobile devices
 - Convert pt to px units
 - Add label and h5 styles
 - Add common flash and spin utility classes

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-14 20:46:04 +01:00
Jo-Philipp Wich
4791180eb3 luci-base, themes: dropdown behaviour improvements
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-14 20:46:04 +01:00
Jo-Philipp Wich
fa391e4f96 luci-theme-openwrt: dropdown style tweaks
- Remove 2em min height, this looks out of place with the OpenWrt theme
- Only colorize invalid dropdown when not open
- Drop use of image background for invalid fields while we're at it

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-14 20:46:04 +01:00
Jo-Philipp Wich
aea8c89c0c luci-theme-{freifunk-generic,material,openwrt}: z-index fixes
Ensure that open dropdowns cover active tooltips.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-14 20:46:04 +01:00
Jo-Philipp Wich
7c78218339 luci-base, themes: rework dynlist and dropdown widgets
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:05:12 +01:00
Jo-Philipp Wich
7f613be500 luci-base, themes: add tooltip helpers & styles
Add the required JS and CSS infrastructure to support rich hover/focus
tooltips for element.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:01:45 +01:00
Jo-Philipp Wich
21a151ac1a themes: load client side translations
Extend the theme headers to include the translation string scripts,
allowing client side code to translate strings without server side
support.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-11-05 11:01:45 +01:00
Jo-Philipp Wich
82dea9ca30 themes: add data-page attribute to body elements
This is useful to write page specific CSS rules.

Also fix a missing space in the body CSS class name in the bootstrap theme
while we're at it.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-09-29 14:21:28 +02:00
Daniel F. Dickinson
6ec0353201 modules: Make luci-base sufficient to use luci apps
Per the discussion in https://github.com/openwrt/luci/issues/869, make
luci-base sufficient to login, logout, and review and apply or revert
uci changes.  This allows most luci-app-xxx to work without having
luci-mod-admin-full installed.

It has been tested with some apps and not luci-mod-admin-full, as well
as with luci-mod-admin-full (to make sure the usual case doesn't break).

Instead of creating a new module namespace (e.g. 'Base') we reduce the
opportunities for breakage by having luci-base take over the 'shell' of
the 'Administration' (admin/....) namespace.

Since admin is assumed by all current building LuCI components (including
Freifunk), this doesn't introduce the 'Administration' tab into any
situation where it would not already be present (but includes it where it
was before).

We also add a "Component not installed" page to avoid fatal errors and
backtrace when e.g. luci-mod-admin-full is not installed.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
2018-09-19 20:08:19 +02:00
Jo-Philipp Wich
849d153851 treewide: rework uci change display
- Use native rpcd uci changes format instead of incompletely converting
   back and forth between the old and the new format
 - Rework uci changelog template to print the equivalent uci commands
   for the various changes
 - Rework theme headers to properly count the uncomitted changes
 - Rework theme CSS to properly style new changelog

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-08-13 09:23:22 +02:00
Ansuel Smith
327e284b74
luci-mod-admin-full: fix broken applyreboot page
This improve applyreboot page and fix problem with luci-nginx that doesn't refresh the page when the router reboot.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2018-08-08 10:11:12 +02:00
Jo-Philipp Wich
6d74a82bf6 luci-theme-openwrt: style tweaks for DSL status display
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-29 21:12:30 +02:00
Jo-Philipp Wich
efc1a5261a luci-theme-openwrt: fix button placement quirk
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-23 15:09:10 +02:00
Jo-Philipp Wich
2287e79a5c luci-theme-openwrt: add styling for input-adjacent buttons
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-23 14:26:56 +02:00
Jo-Philipp Wich
e3f76c255a luci-theme-openwrt: support rendering tblsection cell descriptions
Add support for rendering the "data-description" attribute when rendering
decomposed tables for small screen resolutions.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-22 17:45:03 +02:00
Jo-Philipp Wich
369553cd14 luci-theme-openwrt: fix another instance of misplaced page action button
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-18 14:49:02 +02:00
Jo-Philipp Wich
68dae07225 luci-theme-openwrt: fixes for page action button placement
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-18 12:05:05 +02:00
Jo-Philipp Wich
58cee79869 luci-theme-openwrt: cleanup CSS
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-13 09:38:31 +02:00
Jo-Philipp Wich
0d96655f8b luci-theme-openwrt: consolidate font sizes and button styles
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2018-07-12 18:10:10 +02:00