Clear, crisp, resolution independent vector graphics replace the trusty
microscopic PNG. Some minor CSS changes were needed to constrain images
in some locations to make sure they don't consume too much space.
Iconography taken from Mate desktop theme with minor adjustments:
https://github.com/mate-desktop/mate-icon-theme/
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Password managers (like LastPass etc) tend to add additional elements
into the DOM for their own context menus. If this happens between the
hide/reveal button and the password input, then the logic to reveal the
password breaks.
This change updates the onclick handler to look for the first `<input>`
element with the class `password-input` that is under the parent of the
toggle button, and then to toggle the password/text type on that
element.
This change deliberately only updates the main ui.js file, not any
application files.
Signed-off-by: Andrew Dodd <andrew.john.dodd@gmail.com>
Browsing the root path was problematic and the breadcrumb links behaved
inconsistently, requiring a page reload to recover.
canonicalizePath(), splitPath() and renderListing() now handle any path
location properly, including root: '/', and clicks at any breadcrumb
correctly navigate.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Introduce addTimeLimitedNotification which extends addNotification,
with the addition of the 'timeout' parameter.
timeout: a millisecond value after which the notification will disappear
automatically. If omitted, the notification will remain until it
receives the click event.
Improved implementation of 53e36e3293
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
The function signature changed and all function call to addNotification
that add a CSS class does not work anymore. A direct revert is not
possible.
If this feature is needed than a new function musst be added, that does
not break the function signature.
Fixes: 53e36e3293
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
The button text is very long and breaks the css layout, so it is changed to
'Apply checked'. This also has the advantage that the button is structured
in the same way as the other one, which is called 'Appply unchecked'.
This enhances the look and feel
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Add member `allowduplicates` to `DynamicList` to allow duplicate
underlying form values.
`allowduplicates` defaults is `null`, `DynamicList` will keep the
same behavior as before.
If `true`, the underlying form value will not be checked
for duplication.
Signed-off-by: Anya Lin <hukk1996@gmail.com>
Convert existing JavaScript code in LuCI base to utilize ES6 standard
features such as spread arguments, arrow functions, object method
declarations etc.
This makes the code somewhat easier to follow and slightly smaller.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Convert existing JavaScript code in LuCI base to utilize ES6 standard
features such as spread arguments, arrow functions, object method
declarations etc.
This makes the code somewhat easier to follow and slightly smaller.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
A millisecond value after which the notification will disappear
automatically. If omitted, the notification will remain until it
receives the click event.
Existing calls are unaffected.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This change is required, so that the cancel button is the first and thus
closes the modal when the 'ESC' button is pressed.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Allow downloading from a file browser.
The Download button is located near to Delete.
It's shown only for files: folders or /dev/ devices can't be downloaded.
The downloading is made via fs.read_direct() which internally calls cgi-download.
Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
This reverts commit 97ebdcbddb.
The commit seems to cause errors already before the login screen.
Discussion in 97ebdcbddb (commitcomment-139871175)
Errors like:
In error(), file [C]
called from function [anonymous function] (/usr/lib/lua/luci/ucodebridge.lua:23)
called from function ((tail call))
In [anonymous function](), file /usr/share/ucode/luci/runtime.uc, line 148, byte 45:
called from function build_pagetree (/usr/share/ucode/luci/dispatcher.uc:382:73)
called from function menu_json (/usr/share/ucode/luci/dispatcher.uc:439:26)
called from function [anonymous function] (/usr/share/ucode/luci/dispatcher.uc:898:24)
called from anonymous function (/www/cgi-bin/luci:39:13)
` return lcall.call(modname, method, ...args);`
Near here ----------------------------------------^
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Because the menu JSON can have 'depends' in them, uci changes
should force the menu to regenerate.
Closes#6423
Signed-off-by: James Haggerty <james.haggerty@morsemicro.com>
Signed-off-by: Paul Donald <newtwen@gmail.com>
The call function was based on the legacy XHR interface and it has not
been updated to comply with the new request interface which passes the
duration as part of the response object rather than as a separate
argument. This resulted in polling in a tight loop in certain cases
since the duration was undefined.
In addition there is no need to adjust apply_holdoff based on elapsed
time as no significant amount of time has elapsed at this point.
Signed-off-by: Erik Karlsson <erik.karlsson@genexis.eu>
In the Browser mode the file tree dialog won't be closed when clicking on a file.
The mode is used by a File Browser.
Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
- Ensure that pressing escape within the custom choice input closes the
dropdown list but not the parent modal dialog
- Ensure that added custom choice elements are tabbable
- Retain focus on dropdown when closing dropdown
- Consistently focus input textarea when tabbing into custom choice item
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Drop mouse following focus behavior as it interferes with custom value inputs,
rely on CSS based hover effects instead.
Also slightly improve keyboard navigation by auto-focussing the custom value
input when entering the last dropdown choice via arrow down or tab key, and
by allowing to leave the text input again with the arrow up key.
Fixes: #6903
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
- Populate id option from table id attribute
- Update column head sort indicator in UITable.update()
- Don't store sort state for tables without id
Ref: https://github.com/openwrt/luci/issues/6640
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
In some places argument name was renamed but in the JsDoc it's remain old.
Added more typing for string enum fields like:
@param {string} [type=text]
replaced with:
@param {"blob"|"text"|"blob"} [type=text]
Signed-off-by: Sergey Ponomarev <stokito@gmail.com>
Attempt to prevent Firefox from randomly filling nonesense into arbitrary
password fields such as the WireGuard private key field by setting the
`autocomplete="new-password"` attribute on any password type fields.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
The OpenConnect configuration form incorrectly assumed that the server
setting must be hostname while it actually may be a full URL.
Fixes: #6184
Signed-off-by: Jo-Philipp Wich <jo@mein.io>