luci-theme-argon: update from upstream
This commit is contained in:
parent
ea8a0c74e6
commit
ec50c0aac2
@ -7,9 +7,8 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
LUCI_TITLE:=Argon Theme
|
LUCI_TITLE:=Argon Theme
|
||||||
LUCI_DEPENDS:=
|
PKG_VERSION:=2.3.1
|
||||||
PKG_VERSION:=2.2.7
|
PKG_RELEASE:=20230420
|
||||||
PKG_RELEASE:=20210318
|
|
||||||
|
|
||||||
include $(TOPDIR)/feeds/luci/luci.mk
|
include $(TOPDIR)/feeds/luci/luci.mk
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1 +1,3 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1597500707209" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9192" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M484.430769 51.2L236.307692 354.461538H118.153846c-43.323077 0-78.769231 35.446154-78.769231 78.769231v157.538462c0 43.323077 35.446154 78.769231 78.769231 78.769231h118.153846l248.123077 303.261538c25.6 25.6 66.953846 7.876923 66.953846-27.569231V78.769231c0-35.446154-43.323077-53.169231-66.953846-27.569231z m354.461539 120.123077c-7.876923-7.876923-19.692308-7.876923-27.569231 0l-27.569231 27.569231c-7.876923 7.876923-7.876923 21.661538 0 27.56923C858.584615 299.323077 905.846154 399.753846 905.846154 512c0 112.246154-47.261538 212.676923-122.092308 285.538462-7.876923 7.876923-7.876923 19.692308 0 27.56923l27.569231 27.569231c7.876923 7.876923 19.692308 7.876923 27.569231 0C927.507692 768 984.615385 645.907692 984.615385 512c0-133.907692-55.138462-256-145.723077-340.676923z m-124.061539 126.030769c-7.876923-7.876923-19.692308-7.876923-27.569231 0l-27.56923 27.569231c-7.876923 7.876923-7.876923 19.692308 0 27.569231 43.323077 39.384615 68.923077 96.492308 68.923077 159.507692 0 63.015385-27.569231 120.123077-70.892308 159.507692-7.876923 7.876923-7.876923 19.692308 0 27.569231l27.569231 27.569231c7.876923 7.876923 19.692308 7.876923 27.56923 0 57.107692-53.169231 94.523077-129.969231 94.523077-216.615385 0-82.707692-35.446154-159.507692-92.553846-212.676923z" p-id="9193" fill="#ffffff"></path></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" class="icon" viewBox="0 0 1024 1024">
|
||||||
|
<path fill="#fff" d="M484.430769 51.2 236.307692 354.461538H118.153846c-43.323077 0-78.769231 35.446154-78.769231 78.769231v157.538462c0 43.323077 35.446154 78.769231 78.769231 78.769231h118.153846L484.430769 972.8c25.6 25.6 66.953846 7.876923 66.953846-27.569231V78.769231c0-35.446154-43.323077-53.169231-66.953846-27.569231zm354.461539 120.123077c-7.876923-7.876923-19.692308-7.876923-27.569231 0l-27.569231 27.569231c-7.876923 7.876923-7.876923 21.661538 0 27.56923C858.584615 299.323077 905.846154 399.753846 905.846154 512c0 112.246154-47.261538 212.676923-122.092308 285.538462-7.876923 7.876923-7.876923 19.692308 0 27.56923l27.569231 27.569231c7.876923 7.876923 19.692308 7.876923 27.569231 0C927.507692 768 984.615385 645.907692 984.615385 512s-55.138462-256-145.723077-340.676923zM714.830769 297.353846c-7.876923-7.876923-19.692308-7.876923-27.569231 0l-27.56923 27.569231c-7.876923 7.876923-7.876923 19.692308 0 27.569231C703.015385 391.876923 728.615385 448.984616 728.615385 512c0 63.015385-27.569231 120.123077-70.892308 159.507692-7.876923 7.876923-7.876923 19.692308 0 27.569231l27.569231 27.569231c7.876923 7.876923 19.692308 7.876923 27.56923 0 57.107692-53.169231 94.523077-129.969231 94.523077-216.615385 0-82.707692-35.446154-159.507692-92.553846-212.676923z"/>
|
||||||
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.4 KiB |
@ -1 +1,3 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1597500723732" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9385" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M484.430769 51.2L236.307692 354.461538H118.153846c-43.323077 0-78.769231 35.446154-78.769231 78.769231v157.538462c0 43.323077 35.446154 78.769231 78.769231 78.769231h118.153846l248.123077 303.261538c25.6 25.6 66.953846 7.876923 66.953846-27.569231V78.769231c0-35.446154-43.323077-53.169231-66.953846-27.569231zM882.215385 512l96.492307-96.492308c7.876923-7.876923 7.876923-19.692308 0-27.56923l-27.56923-27.569231c-7.876923-7.876923-19.692308-7.876923-27.569231 0L827.076923 456.861538l-96.492308-96.492307c-7.876923-7.876923-19.692308-7.876923-27.56923 0l-27.569231 27.569231c-7.876923 7.876923-7.876923 19.692308 0 27.56923l96.492308 96.492308-96.492308 96.492308c-7.876923 7.876923-7.876923 19.692308 0 27.56923l27.569231 27.569231c7.876923 7.876923 19.692308 7.876923 27.56923 0l96.492308-96.492307 96.492308 96.492307c7.876923 7.876923 19.692308 7.876923 27.569231 0l27.56923-27.569231c7.876923-7.876923 7.876923-19.692308 0-27.56923L882.215385 512z" p-id="9386" fill="#ffffff"></path></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" class="icon" viewBox="0 0 1024 1024">
|
||||||
|
<path fill="#fff" d="M484.430769 51.2 236.307692 354.461538H118.153846c-43.323077 0-78.769231 35.446154-78.769231 78.769231v157.538462c0 43.323077 35.446154 78.769231 78.769231 78.769231h118.153846L484.430769 972.8c25.6 25.6 66.953846 7.876923 66.953846-27.569231V78.769231c0-35.446154-43.323077-53.169231-66.953846-27.569231zM882.215385 512l96.492307-96.492308c7.876923-7.876923 7.876923-19.692308 0-27.56923l-27.56923-27.569231c-7.876923-7.876923-19.692308-7.876923-27.569231 0l-96.492308 96.492307-96.492308-96.492307c-7.876923-7.876923-19.692308-7.876923-27.56923 0l-27.569231 27.569231c-7.876923 7.876923-7.876923 19.692308 0 27.56923L771.938462 512l-96.492308 96.492308c-7.876923 7.876923-7.876923 19.692308 0 27.56923l27.569231 27.569231c7.876923 7.876923 19.692308 7.876923 27.56923 0l96.492308-96.492307 96.492308 96.492307c7.876923 7.876923 19.692308 7.876923 27.569231 0l27.56923-27.569231c7.876923-7.876923 7.876923-19.692308 0-27.56923L882.215385 512z"/>
|
||||||
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.1 KiB |
@ -1,219 +0,0 @@
|
|||||||
/**
|
|
||||||
* Argon is a clean HTML5 theme for LuCI. It is based on luci-theme-material and Argon Template
|
|
||||||
*
|
|
||||||
* luci-theme-argon
|
|
||||||
* Copyright 2019 Jerrykuku <jerrykuku@qq.com>
|
|
||||||
*
|
|
||||||
* Have a bug? Please create an issue here on GitHub!
|
|
||||||
* https://github.com/jerrykuku/luci-theme-argon/issues
|
|
||||||
*
|
|
||||||
* luci-theme-material:
|
|
||||||
* Copyright 2015 Lutty Yang <lutty@wcan.in>
|
|
||||||
* https://github.com/LuttyYang/luci-theme-material/
|
|
||||||
*
|
|
||||||
* Agron Theme
|
|
||||||
* https://demos.creative-tim.com/argon-dashboard/index.html
|
|
||||||
*
|
|
||||||
* Login background
|
|
||||||
* https://unsplash.com/
|
|
||||||
* Font generate by Icomoon<icomoon.io>
|
|
||||||
*
|
|
||||||
* Licensed to the public under the Apache License 2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
document.addEventListener('luci-loaded', function(ev) {
|
|
||||||
(function ($) {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* trim text, Remove spaces, wrap
|
|
||||||
* @param text
|
|
||||||
* @returns {string}
|
|
||||||
*/
|
|
||||||
function trimText(text) {
|
|
||||||
return text.replace(/[ \t\n\r]+/g, " ");
|
|
||||||
}
|
|
||||||
|
|
||||||
var lastNode = undefined;
|
|
||||||
var mainNodeName = undefined;
|
|
||||||
|
|
||||||
var nodeUrl = "";
|
|
||||||
(function(node){
|
|
||||||
var luciLocation;
|
|
||||||
if (node[0] == "admin"){
|
|
||||||
luciLocation = [node[1], node[2]];
|
|
||||||
}else{
|
|
||||||
luciLocation = node;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(var i in luciLocation){
|
|
||||||
nodeUrl += luciLocation[i];
|
|
||||||
if (i != luciLocation.length - 1){
|
|
||||||
nodeUrl += "/";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})(luciLocation);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* get the current node by Burl (primary)
|
|
||||||
* @returns {boolean} success?
|
|
||||||
*/
|
|
||||||
function getCurrentNodeByUrl() {
|
|
||||||
var ret = false;
|
|
||||||
if (!$('body').hasClass('logged-in')) {
|
|
||||||
luciLocation = ["Main", "Login"];
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$(".main > .main-left > .nav > .slide > .menu").each(function () {
|
|
||||||
var ulNode = $(this);
|
|
||||||
ulNode.next().find("a").each(function () {
|
|
||||||
var that = $(this);
|
|
||||||
var href = that.attr("href");
|
|
||||||
|
|
||||||
if (href.indexOf(nodeUrl) != -1) {
|
|
||||||
ulNode.click();
|
|
||||||
ulNode.next(".slide-menu").stop(true, true);
|
|
||||||
lastNode = that.parent();
|
|
||||||
lastNode.addClass("active");
|
|
||||||
ret = true;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* menu click
|
|
||||||
*/
|
|
||||||
$(".main > .main-left > .nav > .slide > .menu").click(function () {
|
|
||||||
var ul = $(this).next(".slide-menu");
|
|
||||||
var menu = $(this);
|
|
||||||
$(".main > .main-left > .nav > .slide > .menu").each(function () {
|
|
||||||
var ulNode = $(this);
|
|
||||||
ulNode.removeClass("active");
|
|
||||||
ulNode.next(".slide-menu").stop(true).slideUp("fast")
|
|
||||||
});
|
|
||||||
if (!ul.is(":visible")) {
|
|
||||||
menu.addClass("active");
|
|
||||||
ul.addClass("active");
|
|
||||||
ul.stop(true).slideDown("fast");
|
|
||||||
} else {
|
|
||||||
ul.stop(true).slideUp("fast", function () {
|
|
||||||
menu.removeClass("active");
|
|
||||||
ul.removeClass("active");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* hook menu click and add the hash
|
|
||||||
*/
|
|
||||||
$(".main > .main-left > .nav > .slide > .slide-menu > li > a").click(function () {
|
|
||||||
if (lastNode != undefined) lastNode.removeClass("active");
|
|
||||||
$(this).parent().addClass("active");
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* fix menu click
|
|
||||||
*/
|
|
||||||
$(".main > .main-left > .nav > .slide > .slide-menu > li").click(function () {
|
|
||||||
if (lastNode != undefined) lastNode.removeClass("active");
|
|
||||||
$(this).addClass("active");
|
|
||||||
window.location = $($(this).find("a")[0]).attr("href");
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* get current node and open it
|
|
||||||
*/
|
|
||||||
if (getCurrentNodeByUrl()) {
|
|
||||||
mainNodeName = "node-" + luciLocation[0] + "-" + luciLocation[1];
|
|
||||||
mainNodeName = mainNodeName.replace(/[ \t\n\r\/]+/g, "_").toLowerCase();
|
|
||||||
$("body").addClass(mainNodeName);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sidebar expand
|
|
||||||
*/
|
|
||||||
var showSide = false;
|
|
||||||
$(".showSide").click(function () {
|
|
||||||
if (showSide) {
|
|
||||||
$(".darkMask").stop(true).fadeOut("fast");
|
|
||||||
$(".main-left").width(0);
|
|
||||||
$(".main-right").css("overflow-y", "visible");
|
|
||||||
showSide = false;
|
|
||||||
} else {
|
|
||||||
$(".darkMask").stop(true).fadeIn("fast");
|
|
||||||
$(".main-left").width("13rem")
|
|
||||||
$(".main-right").css("overflow-y", "hidden");
|
|
||||||
showSide = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$(".darkMask").click(function () {
|
|
||||||
if (showSide) {
|
|
||||||
showSide = false;
|
|
||||||
$(".darkMask").stop(true).fadeOut("fast");
|
|
||||||
$(".main-left").width(0);
|
|
||||||
$(".main-right").css("overflow-y", "visible");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$(window).resize(function () {
|
|
||||||
if ($(window).width() > 921) {
|
|
||||||
$(".main-left").css("width", "");
|
|
||||||
$(".darkMask").stop(true);
|
|
||||||
$(".darkMask").css("display", "none");
|
|
||||||
showSide = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* fix legend position
|
|
||||||
*/
|
|
||||||
$("legend").each(function () {
|
|
||||||
var that = $(this);
|
|
||||||
that.after("<span class='panel-title'>" + that.text() + "</span>");
|
|
||||||
});
|
|
||||||
|
|
||||||
$(".cbi-section-table-titles, .cbi-section-table-descr, .cbi-section-descr").each(function () {
|
|
||||||
var that = $(this);
|
|
||||||
if (that.text().trim() == ""){
|
|
||||||
that.css("display", "none");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$(".main-right").focus();
|
|
||||||
$(".main-right").blur();
|
|
||||||
$("input").attr("size", "0");
|
|
||||||
$(".cbi-button-up").val("__");
|
|
||||||
$(".cbi-button-down").val("__");
|
|
||||||
$(".slide > a").removeAttr("href");
|
|
||||||
|
|
||||||
if (mainNodeName != undefined) {
|
|
||||||
console.log(mainNodeName);
|
|
||||||
switch (mainNodeName) {
|
|
||||||
case "node-status-system_log":
|
|
||||||
case "node-status-kernel_log":
|
|
||||||
$("#syslog").focus(function () {
|
|
||||||
$("#syslog").blur();
|
|
||||||
$(".main-right").focus();
|
|
||||||
$(".main-right").blur();
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
case "node-status-firewall":
|
|
||||||
var button = $(".node-status-firewall > .main fieldset li > a");
|
|
||||||
button.addClass("cbi-button cbi-button-reset a-to-btn");
|
|
||||||
break;
|
|
||||||
case "node-system-reboot":
|
|
||||||
var button = $(".node-system-reboot > .main > .main-right p > a");
|
|
||||||
button.addClass("cbi-button cbi-input-reset a-to-btn");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
})(jQuery);
|
|
||||||
});
|
|
158
luci-theme-argon/htdocs/luci-static/resources/menu-argon.js
Normal file
158
luci-theme-argon/htdocs/luci-static/resources/menu-argon.js
Normal file
@ -0,0 +1,158 @@
|
|||||||
|
'use strict';
|
||||||
|
'require baseclass';
|
||||||
|
'require ui';
|
||||||
|
|
||||||
|
return baseclass.extend({
|
||||||
|
__init__: function () {
|
||||||
|
ui.menu.load().then(L.bind(this.render, this));
|
||||||
|
},
|
||||||
|
|
||||||
|
render: function (tree) {
|
||||||
|
var node = tree,
|
||||||
|
url = '',
|
||||||
|
children = ui.menu.getChildren(tree);
|
||||||
|
|
||||||
|
for (var i = 0; i < children.length; i++) {
|
||||||
|
var isActive = (L.env.requestpath.length ? children[i].name == L.env.requestpath[0] : i == 0);
|
||||||
|
|
||||||
|
if (isActive)
|
||||||
|
this.renderMainMenu(children[i], children[i].name);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (L.env.dispatchpath.length >= 3) {
|
||||||
|
for (var i = 0; i < 3 && node; i++) {
|
||||||
|
node = node.children[L.env.dispatchpath[i]];
|
||||||
|
url = url + (url ? '/' : '') + L.env.dispatchpath[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (node)
|
||||||
|
this.renderTabMenu(node, url);
|
||||||
|
}
|
||||||
|
|
||||||
|
document.querySelector('a.showSide')
|
||||||
|
.addEventListener('click', ui.createHandlerFn(this, 'handleSidebarToggle'));
|
||||||
|
document.querySelector('.darkMask')
|
||||||
|
.addEventListener('click', ui.createHandlerFn(this, 'handleSidebarToggle'));
|
||||||
|
},
|
||||||
|
|
||||||
|
handleMenuExpand: function (ev) {
|
||||||
|
var a = ev.target, slide = a.parentNode, slide_menu = a.nextElementSibling;
|
||||||
|
var collapse = false;
|
||||||
|
|
||||||
|
document.querySelectorAll('.main .main-left .nav > li >ul.active').forEach(function (ul) {
|
||||||
|
$(ul).stop(true).slideUp("fast", function () {
|
||||||
|
ul.classList.remove('active');
|
||||||
|
ul.previousElementSibling.classList.remove('active');
|
||||||
|
});
|
||||||
|
if (!collapse && ul === slide_menu) {
|
||||||
|
collapse = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!slide_menu)
|
||||||
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
if (!collapse) {
|
||||||
|
$(slide).find(".slide-menu").slideDown("fast",function(){
|
||||||
|
slide_menu.classList.add('active');
|
||||||
|
a.classList.add('active');
|
||||||
|
});
|
||||||
|
a.blur();
|
||||||
|
}
|
||||||
|
ev.preventDefault();
|
||||||
|
ev.stopPropagation();
|
||||||
|
},
|
||||||
|
|
||||||
|
renderMainMenu: function (tree, url, level) {
|
||||||
|
var l = (level || 0) + 1,
|
||||||
|
ul = E('ul', { 'class': level ? 'slide-menu' : 'nav' }),
|
||||||
|
children = ui.menu.getChildren(tree);
|
||||||
|
|
||||||
|
if (children.length == 0 || l > 2)
|
||||||
|
return E([]);
|
||||||
|
|
||||||
|
for (var i = 0; i < children.length; i++) {
|
||||||
|
var isActive = ((L.env.dispatchpath[l] == children[i].name) && (L.env.dispatchpath[l - 1] == tree.name)),
|
||||||
|
submenu = this.renderMainMenu(children[i], url + '/' + children[i].name, l),
|
||||||
|
hasChildren = submenu.children.length,
|
||||||
|
slideClass = hasChildren ? 'slide' : null,
|
||||||
|
menuClass = hasChildren ? 'menu' : 'food';
|
||||||
|
if (isActive) {
|
||||||
|
ul.classList.add('active');
|
||||||
|
slideClass += " active";
|
||||||
|
menuClass += " active";
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.appendChild(E('li', { 'class': slideClass }, [
|
||||||
|
E('a', {
|
||||||
|
'href': L.url(url, children[i].name),
|
||||||
|
'click': (l == 1) ? ui.createHandlerFn(this, 'handleMenuExpand') : null,
|
||||||
|
'class': menuClass,
|
||||||
|
'data-title': hasChildren ? children[i].title.replace(" ", "_") : children[i].title.replace(" ", "_"),
|
||||||
|
}, [_(children[i].title)]),
|
||||||
|
submenu
|
||||||
|
]));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (l == 1) {
|
||||||
|
document.querySelector('#mainmenu').appendChild(ul);
|
||||||
|
document.querySelector('#mainmenu').style.display = '';
|
||||||
|
|
||||||
|
}
|
||||||
|
return ul;
|
||||||
|
},
|
||||||
|
|
||||||
|
renderTabMenu: function (tree, url, level) {
|
||||||
|
var container = document.querySelector('#tabmenu'),
|
||||||
|
l = (level || 0) + 1,
|
||||||
|
ul = E('ul', { 'class': 'tabs' }),
|
||||||
|
children = ui.menu.getChildren(tree),
|
||||||
|
activeNode = null;
|
||||||
|
|
||||||
|
if (children.length == 0)
|
||||||
|
return E([]);
|
||||||
|
|
||||||
|
for (var i = 0; i < children.length; i++) {
|
||||||
|
var isActive = (L.env.dispatchpath[l + 2] == children[i].name),
|
||||||
|
activeClass = isActive ? ' active' : '',
|
||||||
|
className = 'tabmenu-item-%s %s'.format(children[i].name, activeClass);
|
||||||
|
|
||||||
|
ul.appendChild(E('li', { 'class': className }, [
|
||||||
|
E('a', { 'href': L.url(url, children[i].name) }, [_(children[i].title)])
|
||||||
|
]));
|
||||||
|
|
||||||
|
if (isActive)
|
||||||
|
activeNode = children[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
container.appendChild(ul);
|
||||||
|
container.style.display = '';
|
||||||
|
|
||||||
|
if (activeNode)
|
||||||
|
container.appendChild(this.renderTabMenu(activeNode, url + '/' + activeNode.name, l));
|
||||||
|
|
||||||
|
return ul;
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSidebarToggle: function (ev) {
|
||||||
|
var showside = document.querySelector('a.showSide'),
|
||||||
|
sidebar = document.querySelector('#mainmenu'),
|
||||||
|
darkmask = document.querySelector('.darkMask'),
|
||||||
|
scrollbar = document.querySelector('.main-right');
|
||||||
|
|
||||||
|
if (showside.classList.contains('active')) {
|
||||||
|
showside.classList.remove('active');
|
||||||
|
sidebar.classList.remove('active');
|
||||||
|
scrollbar.classList.remove('active');
|
||||||
|
darkmask.classList.remove('active');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
showside.classList.add('active');
|
||||||
|
sidebar.classList.add('active');
|
||||||
|
scrollbar.classList.add('active');
|
||||||
|
darkmask.classList.add('active');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
@ -40,6 +40,6 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<script src="<%=media%>/js/script.js"></script>
|
<script type="text/javascript">L.require('menu-argon')</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -40,6 +40,5 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<script src="<%=media%>/js/script.js"></script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
local util = require "luci.util"
|
local util = require "luci.util"
|
||||||
local http = require "luci.http"
|
local http = require "luci.http"
|
||||||
local disp = require "luci.dispatcher"
|
local disp = require "luci.dispatcher"
|
||||||
|
local ver = require "luci.version"
|
||||||
|
|
||||||
local boardinfo = util.ubus("system", "board")
|
local boardinfo = util.ubus("system", "board")
|
||||||
|
|
||||||
@ -58,33 +59,32 @@
|
|||||||
<html lang="<%=luci.i18n.context.lang%>">
|
<html lang="<%=luci.i18n.context.lang%>">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>
|
<title>
|
||||||
<%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %>
|
<%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %>
|
||||||
- LuCI</title>
|
- LuCI</title>
|
||||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
|
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
|
||||||
<meta name="format-detection" content="telephone=no, email=no" />
|
<meta name="format-detection" content="telephone=no, email=no" />
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<meta name="mobile-web-app-capable" content="yes">
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
<meta name="x5-fullscreen" content="true">
|
<meta name="x5-fullscreen" content="true">
|
||||||
<meta name="full-screen" content="yes">
|
<meta name="full-screen" content="yes">
|
||||||
<meta name="x5-page-mode" content="app">
|
<meta name="x5-page-mode" content="app">
|
||||||
<meta name="browsermode" content="application">
|
<meta name="browsermode" content="application">
|
||||||
<meta name="msapplication-tap-highlight" content="no">
|
<meta name="msapplication-tap-highlight" content="no">
|
||||||
<meta name="msapplication-TileColor" content="<%=bar_color%>">
|
<meta name="msapplication-TileColor" content="<%=bar_color%>">
|
||||||
<meta name="application-name" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
|
<meta name="application-name" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
|
||||||
<meta name="apple-mobile-web-app-title" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
|
<meta name="apple-mobile-web-app-title" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
|
||||||
<meta itemprop="image" content="<%=media%>/icon/android-icon-192x192.png">
|
<link rel="apple-touch-icon" sizes="60x60" href="<%=media%>/icon/apple-icon-60x60.png">
|
||||||
<link rel="apple-touch-icon" sizes="60x60" href="<%=media%>/icon/apple-icon-60x60.png">
|
<link rel="apple-touch-icon" sizes="72x72" href="<%=media%>/icon/apple-icon-72x72.png">
|
||||||
<link rel="apple-touch-icon" sizes="72x72" href="<%=media%>/icon/apple-icon-72x72.png">
|
<link rel="apple-touch-icon" sizes="144x144" href="<%=media%>/icon/apple-icon-144x144.png">
|
||||||
<link rel="apple-touch-icon" sizes="144x144" href="<%=media%>/icon/apple-icon-144x144.png">
|
<link rel="icon" type="image/png" sizes="192x192" href="<%=media%>/icon/android-icon-192x192.png">
|
||||||
<link rel="icon" type="image/png" sizes="192x192" href="<%=media%>/icon/android-icon-192x192.png">
|
<link rel="icon" type="image/png" sizes="32x32" href="<%=media%>/icon/favicon-32x32.png">
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="<%=media%>/icon/favicon-32x32.png">
|
<link rel="icon" type="image/png" sizes="96x96" href="<%=media%>/icon/favicon-96x96.png">
|
||||||
<link rel="icon" type="image/png" sizes="96x96" href="<%=media%>/icon/favicon-96x96.png">
|
<link rel="icon" type="image/png" sizes="16x16" href="<%=media%>/icon/favicon-16x16.png">
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="<%=media%>/icon/favicon-16x16.png">
|
<link rel="manifest" href="<%=media%>/icon/manifest.json" crossorigin="use-credentials">
|
||||||
<link rel="manifest" href="<%=media%>/icon/manifest.json" crossorigin="use-credentials">
|
<meta name="msapplication-TileColor" content="<%=bar_color%>">
|
||||||
<meta name="msapplication-TileColor" content="<%=bar_color%>">
|
<meta name="msapplication-TileImage" content="<%=media%>/icon/ms-icon-144x144.png">
|
||||||
<meta name="msapplication-TileImage" content="<%=media%>/icon/ms-icon-144x144.png">
|
|
||||||
<% if mode == 'normal' then %>
|
<% if mode == 'normal' then %>
|
||||||
<meta name="theme-color" content="<%=bar_color%>">
|
<meta name="theme-color" content="<%=bar_color%>">
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@ -99,7 +99,7 @@
|
|||||||
<% elseif mode == 'light' then %>
|
<% elseif mode == 'light' then %>
|
||||||
<meta name="theme-color" content="<%=bar_color%>">
|
<meta name="theme-color" content="<%=bar_color%>">
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<link rel="stylesheet" href="<%=media%>/css/cascade.css?v=<%=math.random(1,100000)%>">
|
<link rel="stylesheet" href="<%=media%>/css/cascade.css<%# ?v=PKG_VERSION %>">
|
||||||
<style title="text/css">
|
<style title="text/css">
|
||||||
<% if mode == 'normal' then %>
|
<% if mode == 'normal' then %>
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
@ -129,110 +129,10 @@
|
|||||||
</style>
|
</style>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<script src="<%=media%>/js/polyfill.min.js"></script>
|
<script src="<%=media%>/js/polyfill.min.js"></script>
|
||||||
<script src="<%=url('admin/translations', luci.i18n.context.lang)%>?v=2.2.4"></script>
|
<script src="<%=url('admin/translations', luci.i18n.context.lang)%>?v=<%=ver.luciversion%>"></script>
|
||||||
<script src="<%=resource%>/cbi.js?v=2.2.4"></script>
|
<script src="<%=resource%>/cbi.js?v=<%=ver.luciversion%>"></script>
|
||||||
<script src="<%=resource%>/luci.js?v=2.2.4"></script>
|
<script src="<%=resource%>/luci.js?v=<%=ver.luciversion%>"></script>
|
||||||
<script src="<%=media%>/js/jquery.min.js?v=2.2.4"></script>
|
<script src="<%=media%>/js/jquery.min.js?v=3.5.1"></script>
|
||||||
<script type="text/javascript">//<![CDATA[
|
|
||||||
function EF() { return L.dom.create.apply(L.dom, arguments) }
|
|
||||||
(function() {
|
|
||||||
function get_children(node) {
|
|
||||||
var children = [];
|
|
||||||
for (var k in node.children) {
|
|
||||||
if (!node.children.hasOwnProperty(k))
|
|
||||||
continue;
|
|
||||||
if (!node.children[k].satisfied)
|
|
||||||
continue;
|
|
||||||
if (!node.children[k].hasOwnProperty('title'))
|
|
||||||
continue;
|
|
||||||
children.push(Object.assign(node.children[k], { name: k }));
|
|
||||||
}
|
|
||||||
return children.sort(function(a, b) {
|
|
||||||
return ((a.order || 1000) - (b.order || 1000));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function render_mainmenu(tree, url, level) {
|
|
||||||
var l = (level || 0) + 1,
|
|
||||||
ul = EF('ul', { 'class': level ? 'slide-menu' : 'nav' }),
|
|
||||||
children = get_children(tree);
|
|
||||||
if (children.length == 0 || l > 2)
|
|
||||||
return EF([]);
|
|
||||||
for (var i = 0; i < children.length; i++) {
|
|
||||||
var submenu = render_mainmenu(children[i], url + '/' + children[i].name, l),
|
|
||||||
hasChildren = submenu.children.length;
|
|
||||||
ul.appendChild(EF('li', { 'class': hasChildren ? 'slide' : null }, [
|
|
||||||
EF('a', {
|
|
||||||
'href': hasChildren ? '#' : L.url(url, children[i].name),
|
|
||||||
'class': hasChildren ? 'menu' : null,
|
|
||||||
'data-title': hasChildren ? children[i].title.replace(" ", "_") : children[i].title.replace(" ", "_"),
|
|
||||||
}, [ _(children[i].title) ]),
|
|
||||||
submenu
|
|
||||||
]));
|
|
||||||
}
|
|
||||||
if (l == 1) {
|
|
||||||
var container = document.querySelector('#mainmenu');
|
|
||||||
container.appendChild(ul);
|
|
||||||
container.style.display = '';
|
|
||||||
}
|
|
||||||
return ul;
|
|
||||||
}
|
|
||||||
function render_modemenu(tree) {
|
|
||||||
var ul = document.querySelector('#modemenu'),
|
|
||||||
children = get_children(tree);
|
|
||||||
for (var i = 0; i < children.length; i++) {
|
|
||||||
var isActive = (L.env.requestpath.length ? children[i].name == L.env.requestpath[0] : i == 0);
|
|
||||||
ul.appendChild(EF('li', {}, [
|
|
||||||
EF('a', {
|
|
||||||
'href': L.url(children[i].name),
|
|
||||||
'class': isActive ? 'active' : null
|
|
||||||
}, [ _(children[i].title) ])
|
|
||||||
]));
|
|
||||||
if (isActive)
|
|
||||||
render_mainmenu(children[i], children[i].name);
|
|
||||||
}
|
|
||||||
if (ul.children.length > 1)
|
|
||||||
ul.style.display = '';
|
|
||||||
}
|
|
||||||
function render_tabmenu(tree, url, level) {
|
|
||||||
var container = document.querySelector('#tabmenu'),
|
|
||||||
l = (level || 0) + 1,
|
|
||||||
ul = EF('ul', { 'class': 'tabs' }),
|
|
||||||
children = get_children(tree),
|
|
||||||
activeNode = null;
|
|
||||||
if (children.length == 0)
|
|
||||||
return EF([]);
|
|
||||||
for (var i = 0; i < children.length; i++) {
|
|
||||||
var isActive = (L.env.dispatchpath[l + 2] == children[i].name),
|
|
||||||
activeClass = isActive ? ' active' : '',
|
|
||||||
className = 'tabmenu-item-%s %s'.format(children[i].name, activeClass);
|
|
||||||
ul.appendChild(EF('li', { 'class': className }, [
|
|
||||||
EF('a', { 'href': L.url(url, children[i].name) }, [ _(children[i].title) ] )
|
|
||||||
]));
|
|
||||||
if (isActive)
|
|
||||||
activeNode = children[i];
|
|
||||||
}
|
|
||||||
container.appendChild(ul);
|
|
||||||
container.style.display = '';
|
|
||||||
if (activeNode)
|
|
||||||
container.appendChild(render_tabmenu(activeNode, url + '/' + activeNode.name, l));
|
|
||||||
return ul;
|
|
||||||
}
|
|
||||||
document.addEventListener('luci-loaded', function(ev) {
|
|
||||||
var tree = <%= luci.http.write_json(luci.dispatcher.menu_json() or {}) %>,
|
|
||||||
node = tree,
|
|
||||||
url = '';
|
|
||||||
render_modemenu(tree);
|
|
||||||
if (L.env.dispatchpath.length >= 3) {
|
|
||||||
for (var i = 0; i < 3 && node; i++) {
|
|
||||||
node = node.children[L.env.dispatchpath[i]];
|
|
||||||
url = url + (url ? '/' : '') + L.env.dispatchpath[i];
|
|
||||||
}
|
|
||||||
if (node)
|
|
||||||
render_tabmenu(node, url);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
//]]></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body
|
<body
|
||||||
@ -260,14 +160,11 @@
|
|||||||
<header class="bg-primary">
|
<header class="bg-primary">
|
||||||
<div class="fill">
|
<div class="fill">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<a class="showSide"></a>
|
<div class="flex1">
|
||||||
<a class="brand" href="/"><%=brand_name%></a>
|
<a class="showSide"></a>
|
||||||
<div class="status" id="indicators">
|
<a class="brand" href="/"><%=brand_name%></a>
|
||||||
<span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
|
</div>
|
||||||
<span class="label success" id="xhr_poll_status_on"><span class="mobile-hide"><%:Auto Refresh%></span> <%:on%></span>
|
<div class="status" id="indicators"></div>
|
||||||
<span class="label" id="xhr_poll_status_off" style="display:none"><span class="mobile-hide"><%:Auto Refresh%></span> <%:off%></span>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
local util = require "luci.util"
|
local util = require "luci.util"
|
||||||
local http = require "luci.http"
|
local http = require "luci.http"
|
||||||
local disp = require "luci.dispatcher"
|
local disp = require "luci.dispatcher"
|
||||||
|
local ver = require "luci.version"
|
||||||
|
|
||||||
local boardinfo = util.ubus("system", "board")
|
local boardinfo = util.ubus("system", "board")
|
||||||
|
|
||||||
@ -55,32 +56,32 @@
|
|||||||
<html lang="<%=luci.i18n.context.lang%>">
|
<html lang="<%=luci.i18n.context.lang%>">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>
|
<title>
|
||||||
<%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %>
|
<%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %>
|
||||||
- LuCI</title>
|
- LuCI</title>
|
||||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
|
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
|
||||||
<meta name="format-detection" content="telephone=no, email=no" />
|
<meta name="format-detection" content="telephone=no, email=no" />
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<meta name="mobile-web-app-capable" content="yes">
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
<meta name="x5-fullscreen" content="true">
|
<meta name="x5-fullscreen" content="true">
|
||||||
<meta name="full-screen" content="yes">
|
<meta name="full-screen" content="yes">
|
||||||
<meta name="x5-page-mode" content="app">
|
<meta name="x5-page-mode" content="app">
|
||||||
<meta name="browsermode" content="application">
|
<meta name="browsermode" content="application">
|
||||||
<meta name="msapplication-tap-highlight" content="no">
|
<meta name="msapplication-tap-highlight" content="no">
|
||||||
<meta name="msapplication-TileColor" content="<%=bar_color%>">
|
<meta name="msapplication-TileColor" content="<%=bar_color%>">
|
||||||
<meta name="application-name" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
|
<meta name="application-name" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
|
||||||
<meta name="apple-mobile-web-app-title" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
|
<meta name="apple-mobile-web-app-title" content="<%=striptags( (boardinfo.hostname or "?") ) %> - LuCI">
|
||||||
<link rel="apple-touch-icon" sizes="60x60" href="<%=media%>/icon/apple-icon-60x60.png">
|
<link rel="apple-touch-icon" sizes="60x60" href="<%=media%>/icon/apple-icon-60x60.png">
|
||||||
<link rel="apple-touch-icon" sizes="72x72" href="<%=media%>/icon/apple-icon-72x72.png">
|
<link rel="apple-touch-icon" sizes="72x72" href="<%=media%>/icon/apple-icon-72x72.png">
|
||||||
<link rel="apple-touch-icon" sizes="144x144" href="<%=media%>/icon/apple-icon-144x144.png">
|
<link rel="apple-touch-icon" sizes="144x144" href="<%=media%>/icon/apple-icon-144x144.png">
|
||||||
<link rel="icon" type="image/png" sizes="192x192" href="<%=media%>/icon/android-icon-192x192.png">
|
<link rel="icon" type="image/png" sizes="192x192" href="<%=media%>/icon/android-icon-192x192.png">
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="<%=media%>/icon/favicon-32x32.png">
|
<link rel="icon" type="image/png" sizes="32x32" href="<%=media%>/icon/favicon-32x32.png">
|
||||||
<link rel="icon" type="image/png" sizes="96x96" href="<%=media%>/icon/favicon-96x96.png">
|
<link rel="icon" type="image/png" sizes="96x96" href="<%=media%>/icon/favicon-96x96.png">
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="<%=media%>/icon/favicon-16x16.png">
|
<link rel="icon" type="image/png" sizes="16x16" href="<%=media%>/icon/favicon-16x16.png">
|
||||||
<link rel="manifest" href="<%=media%>/icon/manifest.json" crossorigin="use-credentials">
|
<link rel="manifest" href="<%=media%>/icon/manifest.json" crossorigin="use-credentials">
|
||||||
<meta name="msapplication-TileColor" content="<%=bar_color%>">
|
<meta name="msapplication-TileColor" content="<%=bar_color%>">
|
||||||
<meta name="msapplication-TileImage" content="<%=media%>/icon/ms-icon-144x144.png">
|
<meta name="msapplication-TileImage" content="<%=media%>/icon/ms-icon-144x144.png">
|
||||||
<% if mode == 'normal' then %>
|
<% if mode == 'normal' then %>
|
||||||
<meta name="theme-color" content="<%=bar_color%>">
|
<meta name="theme-color" content="<%=bar_color%>">
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@ -95,42 +96,37 @@
|
|||||||
<% elseif mode == 'light' then %>
|
<% elseif mode == 'light' then %>
|
||||||
<meta name="theme-color" content="<%=bar_color%>">
|
<meta name="theme-color" content="<%=bar_color%>">
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<link rel="stylesheet" href="<%=media%>/css/cascade.css?v=<%=math.random(1,100000)%>">
|
<link rel="stylesheet" href="<%=media%>/css/cascade.css<%# ?v=PKG_VERSION %>">
|
||||||
<style title="text/css">
|
<style title="text/css">
|
||||||
<% if mode == 'normal' then %>
|
<% if mode == 'normal' then %>
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
<%=dark_css%>
|
<%=dark_css%>
|
||||||
}
|
}
|
||||||
<% elseif mode == 'dark' then %>
|
<% elseif mode == 'dark' then %>
|
||||||
<%=dark_css%>
|
<%=dark_css%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% if fs.access('/etc/config/argon') then %>
|
<% if fs.access('/etc/config/argon') then %>
|
||||||
:root {
|
:root {
|
||||||
--primary: <%=primary%>;
|
--primary: <%=primary%>;
|
||||||
--dark-primary: <%=dark_primary%>;
|
--dark-primary: <%=dark_primary%>;
|
||||||
--blur-radius:<%=blur_radius%>px;
|
--blur-radius:<%=blur_radius%>px;
|
||||||
--blur-opacity:<%=blur_opacity%>;
|
--blur-opacity:<%=blur_opacity%>;
|
||||||
--blur-radius-dark:<%=blur_radius_dark%>px;
|
--blur-radius-dark:<%=blur_radius_dark%>px;
|
||||||
--blur-opacity-dark:<%=blur_opacity_dark%>;
|
--blur-opacity-dark:<%=blur_opacity_dark%>;
|
||||||
}
|
}
|
||||||
<% end -%>
|
<% end -%>
|
||||||
</style>
|
</style>
|
||||||
<link rel="shortcut icon" href="<%=media%>/favicon.ico">
|
<link rel="shortcut icon" href="<%=media%>/favicon.ico">
|
||||||
<% if node and node.css then %>
|
<% if node and node.css then %>
|
||||||
<link rel="stylesheet" href="<%=resource%>/<%=node.css%>">
|
<link rel="stylesheet" href="<%=resource%>/<%=node.css%>">
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% if css then %>
|
<% if css then %>
|
||||||
<style title="text/css">
|
<style title="text/css">
|
||||||
<%=css %>
|
<%=css %>
|
||||||
</style>
|
</style>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<script src="<%=url('admin/translations', luci.i18n.context.lang)%><%# ?v=PKG_VERSION %>"></script>
|
<script src="<%=media%>/js/jquery.min.js?v=3.5.1"></script>
|
||||||
<script src="<%=resource%>/cbi.js<%# ?v=PKG_VERSION %>"></script>
|
|
||||||
<script src="<%=resource%>/xhr.js<%# ?v=PKG_VERSION %>"></script>
|
|
||||||
<script src="<%=media%>/js/jquery.min.js<%# ?v=PKG_VERSION %>"></script>
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body
|
<body>
|
||||||
class="lang_<%=luci.i18n.context.lang%> <% if node then %><%= striptags( node.title ) %><% end %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %>"
|
|
||||||
data-page="<%= table.concat(disp.context.requestpath, "-") %>">
|
|
||||||
|
@ -5,34 +5,10 @@
|
|||||||
-%>
|
-%>
|
||||||
|
|
||||||
<%
|
<%
|
||||||
|
local ver = require "luci.version"
|
||||||
|
|
||||||
if not luci.dispatcher.context.template_header_sent then
|
if not luci.dispatcher.context.template_header_sent then
|
||||||
include("themes/" .. theme .. "/header_login")
|
include("themes/" .. theme .. "/header_login")
|
||||||
luci.dispatcher.context.template_header_sent = true
|
luci.dispatcher.context.template_header_sent = true
|
||||||
end
|
end
|
||||||
|
|
||||||
local applyconf = luci.config and luci.config.apply
|
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<script type="text/javascript" src="<%=resource%>/promis.min.js"></script>
|
|
||||||
<script type="text/javascript" src="<%=resource%>/luci.js"></script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
L = new LuCI(<%= luci.http.write_json({
|
|
||||||
token = token,
|
|
||||||
media = media,
|
|
||||||
resource = resource,
|
|
||||||
scriptname = luci.http.getenv("SCRIPT_NAME"),
|
|
||||||
pathinfo = luci.http.getenv("PATH_INFO"),
|
|
||||||
documentroot = luci.http.getenv("DOCUMENT_ROOT"),
|
|
||||||
requestpath = luci.dispatcher.context.requestpath,
|
|
||||||
dispatchpath = luci.dispatcher.context.path,
|
|
||||||
pollinterval = luci.config.main.pollinterval or 5,
|
|
||||||
ubuspath = luci.config.main.ubuspath or '/ubus/',
|
|
||||||
sessionid = luci.dispatcher.context.authsession,
|
|
||||||
nodespec = luci.dispatcher.context.dispatched,
|
|
||||||
apply_rollback = math.max(applyconf and applyconf.rollback or 90, 90),
|
|
||||||
apply_holdoff = math.max(applyconf and applyconf.holdoff or 4, 1),
|
|
||||||
apply_timeout = math.max(applyconf and applyconf.timeout or 5, 1),
|
|
||||||
apply_display = math.max(applyconf and applyconf.display or 1.5, 1),
|
|
||||||
rollback_token = rollback_token
|
|
||||||
}) %>);
|
|
||||||
</script>
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user