luci-app-nikki: sync upstream

last commit: 4bc36f86a4
This commit is contained in:
gitea-action 2025-03-18 00:00:43 +08:00
parent ea8a50c055
commit faaa600264
3 changed files with 9 additions and 7 deletions

View File

@ -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

View File

@ -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,

View File

@ -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;