mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 15:09:33 +00:00
Added per user theme (#5539)
This commit is contained in:
parent
4e048b6433
commit
9023c0538a
6 changed files with 27 additions and 22 deletions
|
|
@ -259,7 +259,7 @@ end
|
|||
function page_utils.is_dark_mode_enabled(theme)
|
||||
|
||||
local dark_mode
|
||||
local theme = theme or ntop.getPref("ntopng.prefs.theme")
|
||||
local theme = theme or ntop.getPref("ntopng.user." .. _SESSION["user"] .. ".theme")
|
||||
|
||||
if (isEmptyString(theme)) then
|
||||
dark_mode = false
|
||||
|
|
@ -582,7 +582,7 @@ function page_utils.print_menubar()
|
|||
logo_path = ntop.getHttpPrefix().."/img/custom_logo.png"
|
||||
end
|
||||
|
||||
local navbar_style = _POST["toggle_theme"] or ntop.getPref("ntopng.prefs.theme")
|
||||
local navbar_style = _POST["toggle_theme"] or ntop.getPref("ntopng.user." .. _SESSION["user"] .. ".theme")
|
||||
|
||||
if ((navbar_style == nil) or (navbar_style == "")) then
|
||||
navbar_style = "default"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue