From 40350a9c9125908408f1395df1db3a0e49ce778e Mon Sep 17 00:00:00 2001 From: Hilman Maulana Date: Thu, 22 Feb 2024 22:47:02 +0700 Subject: [PATCH] luci-app-alpha-config: Migration for navbar --- template/footer.htm | 77 ++++++++++++++++++++++++++------------------- 1 file changed, 45 insertions(+), 32 deletions(-) diff --git a/template/footer.htm b/template/footer.htm index 55e3ec2..635f9d4 100644 --- a/template/footer.htm +++ b/template/footer.htm @@ -17,49 +17,62 @@ Licensed to the public under the Apache License 2.0 -%> +<% +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' +} -<% local ver = require "luci.version" %> - - +local function getLink(nav) + local link = config[nav] + return (link ~= "none") and link or nil +end +%> + + - - - -