From 5366491215ae32350d5d7c44709f764d897f070b Mon Sep 17 00:00:00 2001 From: actions-user Date: Mon, 15 Jul 2024 02:04:02 +0800 Subject: [PATCH] update 2024-07-15 02:04:02 --- ddns-go/Makefile | 4 +- luci-theme-alpha/luasrc/gaya/gaya.css | 89 ++++++++++++++++++ .../icon/navbar/{nas.png => filemanager.png} | Bin .../navbar/{interface.png => network.png} | Bin .../icon/navbar/{oc.png => openclash.png} | Bin .../icon/navbar/{status.png => overview.png} | Bin luci-theme-alpha/root/etc/config/alpha | 59 ++++++++++-- luci-theme-alpha/template/footer.htm | 85 ++++++++++------- luci-theme-alpha/template/sysauth.htm | 4 +- 9 files changed, 196 insertions(+), 45 deletions(-) rename luci-theme-alpha/luasrc/gaya/icon/navbar/{nas.png => filemanager.png} (100%) rename luci-theme-alpha/luasrc/gaya/icon/navbar/{interface.png => network.png} (100%) rename luci-theme-alpha/luasrc/gaya/icon/navbar/{oc.png => openclash.png} (100%) rename luci-theme-alpha/luasrc/gaya/icon/navbar/{status.png => overview.png} (100%) diff --git a/ddns-go/Makefile b/ddns-go/Makefile index ce003846..9045eda8 100644 --- a/ddns-go/Makefile +++ b/ddns-go/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ddns-go -PKG_VERSION:=6.6.3 +PKG_VERSION:=6.6.4 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/jeessy2/ddns-go/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=72ddbcaa380e61c3cda758dbc2d9831e17bceb34ec1e4ff4d0fe9f0ed5f7e913 +PKG_HASH:=69e90cff0be0cc7968a884109209765cf4d7de346cd13b7e147f1a0f332b63ab PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENSE diff --git a/luci-theme-alpha/luasrc/gaya/gaya.css b/luci-theme-alpha/luasrc/gaya/gaya.css index 7e45b962..e16a8e0d 100755 --- a/luci-theme-alpha/luasrc/gaya/gaya.css +++ b/luci-theme-alpha/luasrc/gaya/gaya.css @@ -3592,6 +3592,95 @@ font-size: 0.9rem; } +.cbi-filebrowser { + min-width: 210px; + max-width: 100%; + border: 1px solid #ccc; + border-radius: 3px; + display: flex; + flex-direction: column; + opacity: 0; + height: 0; + overflow: hidden; +} + +.cbi-filebrowser.open { + opacity: 1; + height: auto; + overflow: visible; + transition: opacity .25s ease-in; +} + +.cbi-filebrowser > * { + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; + padding: 0 0 .25em 0; + margin: .25em .25em 0px .25em; + margin-left: 0!important; + white-space: nowrap; + border-bottom: 1px solid #ccc; +} + +.cbi-filebrowser .cbi-button-positive { + margin-right: .25em; +} + +.cbi-filebrowser > div { + border-bottom: none; +} + +.cbi-filebrowser > ul > li { + display: flex; + flex-direction: row; +} + +.cbi-filebrowser > ul > li:hover { + background: #f5f5f5; +} + +.cbi-filebrowser > ul > li > div:first-child { + flex: 10; + overflow: hidden; + text-overflow: ellipsis; +} + +.cbi-filebrowser > ul > li > div:last-child { + flex: 3; + text-align: right; +} + +.cbi-filebrowser > ul > li > div:last-child > button { + padding: .125em .25em; + margin: 1px 0 1px .25em; +} + +.cbi-filebrowser .upload { + display: flex; + flex-direction: row; + flex-wrap: wrap; + margin: 0 -.125em .25em -.125em; + padding: 0 0 .125em 0px; + border-bottom: 1px solid #ccc; +} + +.cbi-filebrowser .upload > * { + margin: .125em; + flex: 1; +} + +.cbi-filebrowser .upload > .btn { + flex-basis: 60px; +} + +.cbi-filebrowser .upload > div { + flex: 10; + min-width: 150px; +} + +.cbi-filebrowser .upload > div > input { + width: 100%; +} @media screen and (min-width: 600px) { ::-webkit-scrollbar { diff --git a/luci-theme-alpha/luasrc/gaya/icon/navbar/nas.png b/luci-theme-alpha/luasrc/gaya/icon/navbar/filemanager.png similarity index 100% rename from luci-theme-alpha/luasrc/gaya/icon/navbar/nas.png rename to luci-theme-alpha/luasrc/gaya/icon/navbar/filemanager.png diff --git a/luci-theme-alpha/luasrc/gaya/icon/navbar/interface.png b/luci-theme-alpha/luasrc/gaya/icon/navbar/network.png similarity index 100% rename from luci-theme-alpha/luasrc/gaya/icon/navbar/interface.png rename to luci-theme-alpha/luasrc/gaya/icon/navbar/network.png diff --git a/luci-theme-alpha/luasrc/gaya/icon/navbar/oc.png b/luci-theme-alpha/luasrc/gaya/icon/navbar/openclash.png similarity index 100% rename from luci-theme-alpha/luasrc/gaya/icon/navbar/oc.png rename to luci-theme-alpha/luasrc/gaya/icon/navbar/openclash.png diff --git a/luci-theme-alpha/luasrc/gaya/icon/navbar/status.png b/luci-theme-alpha/luasrc/gaya/icon/navbar/overview.png similarity index 100% rename from luci-theme-alpha/luasrc/gaya/icon/navbar/status.png rename to luci-theme-alpha/luasrc/gaya/icon/navbar/overview.png diff --git a/luci-theme-alpha/root/etc/config/alpha b/luci-theme-alpha/root/etc/config/alpha index 8fb5864a..c3cf6736 100644 --- a/luci-theme-alpha/root/etc/config/alpha +++ b/luci-theme-alpha/root/etc/config/alpha @@ -1,10 +1,53 @@ -config alpha 'config' - option nav_01 '/cgi-bin/luci/admin/status/overview' - option nav_02 '/cgi-bin/luci/admin/services/ttyd' - option nav_03 '/cgi-bin/luci/admin/services/openclash' - option nav_04 '/cgi-bin/luci/admin/nas/tinyfm' - option nav_05 '/cgi-bin/luci/admin/modem/main' - option nav_06 '/cgi-bin/luci/admin/network/network' - option blur '20' +config theme 'theme' option color '#2222359a' + option blur '00' + option navbar '1' + +config navbar + option name 'Overview' + option enable 'Enable' + option line '1' + option newtab 'No' + option icon '/www/luci-static/alpha/gaya/icon/navbar/overview.png' + option address '/cgi-bin/luci/admin/status/overview' + +config navbar + option name 'Terminal' + option enable 'Enable' + option line '2' + option newtab 'No' + option icon '/www/luci-static/alpha/gaya/icon/navbar/terminal.png' + option address '/cgi-bin/luci/admin/services/ttyd' + +config navbar + option name 'Open Clash' + option enable 'Enable' + option line '3' + option newtab 'No' + option icon '/www/luci-static/alpha/gaya/icon/navbar/openclash.png' + option address '/cgi-bin/luci/admin/services/openclash' + +config navbar + option name 'Neko' + option enable 'Enable' + option line '4' + option newtab 'No' + option icon '/www/luci-static/alpha/gaya/icon/navbar/neko.png' + option address '/cgi-bin/luci/admin/services/neko' + +config navbar + option name 'Modem' + option enable 'Enable' + option line '5' + option newtab 'No' + option icon '/www/luci-static/alpha/gaya/icon/navbar/modem.png' + option address '/cgi-bin/luci/admin/modem/main' + +config navbar + option name 'Network' + option enable 'Enable' + option line '6' + option newtab 'No' + option icon '/www/luci-static/alpha/gaya/icon/navbar/network.png' + option address '/cgi-bin/luci/admin/network/network' diff --git a/luci-theme-alpha/template/footer.htm b/luci-theme-alpha/template/footer.htm index 71faefbd..37d6091d 100644 --- a/luci-theme-alpha/template/footer.htm +++ b/luci-theme-alpha/template/footer.htm @@ -20,39 +20,45 @@ <% local ver = require "luci.version" local uci = require "luci.model.uci".cursor() -local config = uci:get_all("alpha", "config") -local icon = { - ['/cgi-bin/luci/admin/status/overview'] = '/gaya/icon/navbar/status.png', - ['/cgi-bin/luci/admin/services/ttyd'] = '/gaya/icon/navbar/terminal.png', - ['/cgi-bin/luci/admin/services/openclash'] = '/gaya/icon/navbar/oc.png', - ['/cgi-bin/luci/admin/nas/tinyfm'] = '/gaya/icon/navbar/nas.png', - ['/cgi-bin/luci/admin/modem/main'] = '/gaya/icon/navbar/modem.png', - ['/cgi-bin/luci/admin/network/network'] = '/gaya/icon/navbar/interface.png', - ['/cgi-bin/luci/admin/services/neko'] = '/gaya/icon/navbar/neko.png' -} +local config = uci:get_all("alpha", "theme") -local function getLink(nav) - local link = config[nav] - return (link and link ~= "none") and link or nil -end +-- Table to store navbar icons +local icon = {} +-- Iterate through all navbar entries +uci:foreach("alpha", "navbar", function(section) + local address = section.address + local icon_url = section.icon + + if address and icon_url then + -- Remove '/www/luci-static/alpha/' from icon_url + icon_url = string.gsub(icon_url, "^/www/luci%-static/alpha/", "") + icon[address] = icon_url + end +end) + +-- Check navbar enable status +local navbar_enabled = config.navbar == "1" + +-- Calculate number of enabled navbar links local num_links = 0 -for i = 1, 6 do - local nav_key = 'nav_0' .. i - local link = getLink(nav_key) - if link then +uci:foreach("alpha", "navbar", function(section) + if section.enable == "Enable" then num_links = num_links + 1 end -end +end) +-- Calculate link width for responsive design local link_width = string.format("calc(100%% / %d)", num_links) -local blur_value = tonumber(config.blur) + +-- Retrieve theme properties +local background_color = config.color or '#2222359a' +local blur_value = tonumber(config.blur) or 20 local link_blur = string.format("blur(%dpx)", blur_value) -local background_color = config.color %> @@ -71,17 +83,25 @@ local background_color = config.color