From faaa6002647581731710df44f4363d10383221d0 Mon Sep 17 00:00:00 2001 From: gitea-action Date: Tue, 18 Mar 2025 00:00:43 +0800 Subject: [PATCH] luci-app-nikki: sync upstream last commit: https://github.com/nikkinikki-org/OpenWrt-nikki/commit/4bc36f86a4017a1694fef759c8323fe825223a23 --- luci-app-nikki/Makefile | 2 +- .../htdocs/luci-static/resources/tools/nikki.js | 12 +++++++----- .../htdocs/luci-static/resources/view/nikki/mixin.js | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/luci-app-nikki/Makefile b/luci-app-nikki/Makefile index 1ca25b78e..abafb9d34 100644 --- a/luci-app-nikki/Makefile +++ b/luci-app-nikki/Makefile @@ -1,6 +1,6 @@ include $(TOPDIR)/rules.mk -PKG_VERSION:=1.21.0 +PKG_VERSION:=1.21.1 LUCI_TITLE:=LuCI Support for nikki LUCI_DEPENDS:=+luci-base +nikki diff --git a/luci-app-nikki/htdocs/luci-static/resources/tools/nikki.js b/luci-app-nikki/htdocs/luci-static/resources/tools/nikki.js index faaf71e54..a8e3d2f4c 100644 --- a/luci-app-nikki/htdocs/luci-static/resources/tools/nikki.js +++ b/luci-app-nikki/htdocs/luci-static/resources/tools/nikki.js @@ -105,8 +105,9 @@ return baseclass.extend({ }, api: async function (method, path, query, body) { - const apiListen = uci.get('nikki', 'mixin', 'api_listen'); - const apiSecret = uci.get('nikki', 'mixin', 'api_secret') ?? ''; + const profile = await callNikkiProfile(); + const apiListen = profile['external-controller']; + const apiSecret = profile['secret'] ?? ''; const apiPort = apiListen.substring(apiListen.lastIndexOf(':') + 1); const url = `http://${window.location.hostname}:${apiPort}${path}`; return request.request(url, { @@ -118,9 +119,10 @@ return baseclass.extend({ }, openDashboard: async function () { - const uiName = uci.get('nikki', 'mixin', 'ui_name'); - const apiListen = uci.get('nikki', 'mixin', 'api_listen'); - const apiSecret = uci.get('nikki', 'mixin', 'api_secret') ?? ''; + const profile = await callNikkiProfile(); + const uiName = profile['external-ui-name']; + const apiListen = profile['external-controller']; + const apiSecret = profile['secret'] ?? ''; const apiPort = apiListen.substring(apiListen.lastIndexOf(':') + 1); const params = { host: window.location.hostname, diff --git a/luci-app-nikki/htdocs/luci-static/resources/view/nikki/mixin.js b/luci-app-nikki/htdocs/luci-static/resources/view/nikki/mixin.js index 5e9e6c860..f3215d37e 100644 --- a/luci-app-nikki/htdocs/luci-static/resources/view/nikki/mixin.js +++ b/luci-app-nikki/htdocs/luci-static/resources/view/nikki/mixin.js @@ -125,7 +125,7 @@ return view.extend({ o = s.taboption('external_control', form.Value, 'api_secret', _('API Secret')); o.password = true; - o.rmempty = false; + o.placeholder = _('Unmodified'); o = s.taboption('external_control', form.ListValue, 'selection_cache', _('Save Proxy Selection')); o.optional = true;