fix
|
@ -1,16 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (C) 2008-2014 The LuCI Team <luci@lists.subsignal.org>
|
|
||||||
# Copyright (C) 2018-2019 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
LUCI_TITLE:=ezengreen Theme (default)
|
|
||||||
LUCI_DEPENDS:=
|
|
||||||
|
|
||||||
#include ../luci/luci.mk
|
|
||||||
include $(TOPDIR)/feeds/luci/luci.mk
|
|
||||||
|
|
||||||
# call BuildPackage - OpenWrt buildroot signature
|
|
Before Width: | Height: | Size: 8 KiB |
Before Width: | Height: | Size: 8 KiB |
|
@ -1,3 +0,0 @@
|
||||||
// HTML5 Shiv v3 | @jon_neal @afarkas @rem | MIT/GPL2 Licensed
|
|
||||||
// Uncompressed source: https://github.com/aFarkas/html5shiv
|
|
||||||
(function(a,b){function f(a){var c,d,e,f;b.documentMode>7?(c=b.createElement("font"),c.setAttribute("data-html5shiv",a.nodeName.toLowerCase())):c=b.createElement("shiv:"+a.nodeName);while(a.firstChild)c.appendChild(a.childNodes[0]);for(d=a.attributes,e=d.length,f=0;f<e;++f)d[f].specified&&c.setAttribute(d[f].nodeName,d[f].nodeValue);c.style.cssText=a.style.cssText,a.parentNode.replaceChild(c,a),c.originalElement=a}function g(a){var b=a.originalElement;while(a.childNodes.length)b.appendChild(a.childNodes[0]);a.parentNode.replaceChild(b,a)}function h(a,b){b=b||"all";var c=-1,d=[],e=a.length,f,g;while(++c<e){f=a[c],g=f.media||b;if(f.disabled||!/print|all/.test(g))continue;d.push(h(f.imports,g),f.cssText)}return d.join("")}function i(c){var d=new RegExp("(^|[\\s,{}])("+a.html5.elements.join("|")+")","gi"),e=c.split("{"),f=e.length,g=-1;while(++g<f)e[g]=e[g].split("}"),b.documentMode>7?e[g][e[g].length-1]=e[g][e[g].length-1].replace(d,'$1font[data-html5shiv="$2"]'):e[g][e[g].length-1]=e[g][e[g].length-1].replace(d,"$1shiv\\:$2"),e[g]=e[g].join("}");return e.join("{")}var c=function(a){return a.innerHTML="<x-element></x-element>",a.childNodes.length===1}(b.createElement("a")),d=function(a,b,c){return b.appendChild(a),(c=(c?c(a):a.currentStyle).display)&&b.removeChild(a)&&c==="block"}(b.createElement("nav"),b.documentElement,a.getComputedStyle),e={elements:"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video".split(" "),shivDocument:function(a){a=a||b;if(a.documentShived)return;a.documentShived=!0;var f=a.createElement,g=a.createDocumentFragment,h=a.getElementsByTagName("head")[0],i=function(a){f(a)};c||(e.elements.join(" ").replace(/\w+/g,i),a.createElement=function(a){var b=f(a);return b.canHaveChildren&&e.shivDocument(b.document),b},a.createDocumentFragment=function(){return e.shivDocument(g())});if(!d&&h){var j=f("div");j.innerHTML=["x<style>","article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}","audio{display:none}","canvas,video{display:inline-block;*display:inline;*zoom:1}","[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}","mark{background:#FF0;color:#000}","</style>"].join(""),h.insertBefore(j.lastChild,h.firstChild)}return a}};e.shivDocument(b),a.html5=e;if(c||!a.attachEvent)return;a.attachEvent("onbeforeprint",function(){if(a.html5.supportsXElement||!b.namespaces)return;b.namespaces.shiv||b.namespaces.add("shiv");var c=-1,d=new RegExp("^("+a.html5.elements.join("|")+")$","i"),e=b.getElementsByTagName("*"),g=e.length,j,k=i(h(function(a,b){var c=[],d=a.length;while(d)c.unshift(a[--d]);d=b.length;while(d)c.unshift(b[--d]);c.sort(function(a,b){return a.sourceIndex-b.sourceIndex}),d=c.length;while(d)c[--d]=c[d].styleSheet;return c}(b.getElementsByTagName("style"),b.getElementsByTagName("link"))));while(++c<g)j=e[c],d.test(j.nodeName)&&f(j);b.appendChild(b._shivedStyleSheet=b.createElement("style")).styleSheet.cssText=k}),a.attachEvent("onafterprint",function(){if(a.html5.supportsXElement||!b.namespaces)return;var c=-1,d=b.getElementsByTagName("*"),e=d.length,f;while(++c<e)f=d[c],f.originalElement&&g(f);b._shivedStyleSheet&&b._shivedStyleSheet.parentNode.removeChild(b._shivedStyleSheet)})})(this,document)
|
|
|
@ -1,61 +0,0 @@
|
||||||
#content-desktop {display: block;}
|
|
||||||
#content-mobile {display: none;}
|
|
||||||
|
|
||||||
@media screen and (max-width: 600px) {
|
|
||||||
|
|
||||||
#content-desktop {display: none;}
|
|
||||||
#content-mobile {display: block;}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
header h3 a, header .brand {
|
|
||||||
float: left;
|
|
||||||
display: block;
|
|
||||||
padding: 12px 6px 12px 6px;
|
|
||||||
margin: 0 0 0 10px;
|
|
||||||
font-size: 22px;
|
|
||||||
font-weight: 240;
|
|
||||||
}
|
|
||||||
|
|
||||||
header div > ul, .nav {
|
|
||||||
display: block;
|
|
||||||
float: left;
|
|
||||||
margin: 7px 8px 0 8px;
|
|
||||||
position: relative;
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
header div > ul a, .nav a {
|
|
||||||
display: block;
|
|
||||||
float: left;
|
|
||||||
padding: 12px 6px 12px 6px;
|
|
||||||
line-height: 14px;
|
|
||||||
letter-spacing: 0.2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-dropdown, .dropdown-menu {
|
|
||||||
top: 38px;
|
|
||||||
min-width: 180px;
|
|
||||||
max-width: 260px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-device-width: 660px) {
|
|
||||||
#maincontent.container {
|
|
||||||
width: 98%;
|
|
||||||
margin: 30px 0 0 6px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-device-width: 360px) {
|
|
||||||
#maincontent.container {
|
|
||||||
width: 96%;
|
|
||||||
margin: 30px 0 0 6px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-device-width: 200px) {
|
|
||||||
#maincontent.container {
|
|
||||||
width: 94%;
|
|
||||||
margin: 40px 0 0 2px;
|
|
||||||
}
|
|
||||||
}
|
|
Before Width: | Height: | Size: 553 B |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 836 B |
|
@ -1,61 +0,0 @@
|
||||||
#content-desktop {display: block;}
|
|
||||||
#content-mobile {display: none;}
|
|
||||||
|
|
||||||
@media screen and (max-width: 600px) {
|
|
||||||
|
|
||||||
#content-desktop {display: none;}
|
|
||||||
#content-mobile {display: block;}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
header h3 a, header .brand {
|
|
||||||
float: left;
|
|
||||||
display: block;
|
|
||||||
padding: 12px 6px 12px 6px;
|
|
||||||
margin: 0 0 0 10px;
|
|
||||||
font-size: 22px;
|
|
||||||
font-weight: 240;
|
|
||||||
}
|
|
||||||
|
|
||||||
header div > ul, .nav {
|
|
||||||
display: block;
|
|
||||||
float: left;
|
|
||||||
margin: 7px 8px 0 8px;
|
|
||||||
position: relative;
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
header div > ul a, .nav a {
|
|
||||||
display: block;
|
|
||||||
float: left;
|
|
||||||
padding: 12px 6px 12px 6px;
|
|
||||||
line-height: 14px;
|
|
||||||
letter-spacing: 0.2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu-dropdown, .dropdown-menu {
|
|
||||||
top: 38px;
|
|
||||||
min-width: 180px;
|
|
||||||
max-width: 260px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-device-width: 660px) {
|
|
||||||
#maincontent.container {
|
|
||||||
width: 98%;
|
|
||||||
margin: 30px 0 0 6px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-device-width: 360px) {
|
|
||||||
#maincontent.container {
|
|
||||||
width: 96%;
|
|
||||||
margin: 30px 0 0 6px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (max-device-width: 200px) {
|
|
||||||
#maincontent.container {
|
|
||||||
width: 94%;
|
|
||||||
margin: 40px 0 0 2px;
|
|
||||||
}
|
|
||||||
}
|
|
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 3.7 KiB |
|
@ -1,118 +0,0 @@
|
||||||
'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 = '';
|
|
||||||
|
|
||||||
this.renderModeMenu(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)
|
|
||||||
this.renderTabMenu(node, url);
|
|
||||||
}
|
|
||||||
|
|
||||||
document.addEventListener('poll-start', this.handleBodyMargin);
|
|
||||||
document.addEventListener('poll-stop', this.handleBodyMargin);
|
|
||||||
document.addEventListener('uci-new-changes', this.handleBodyMargin);
|
|
||||||
document.addEventListener('uci-clear-changes', this.handleBodyMargin);
|
|
||||||
window.addEventListener('resize', this.handleBodyMargin);
|
|
||||||
|
|
||||||
this.handleBodyMargin();
|
|
||||||
},
|
|
||||||
|
|
||||||
renderTabMenu: function(tree, url, level) {
|
|
||||||
var container = document.querySelector('#tabmenu'),
|
|
||||||
ul = E('ul', { 'class': 'tabs' }),
|
|
||||||
children = ui.menu.getChildren(tree),
|
|
||||||
activeNode = null;
|
|
||||||
|
|
||||||
for (var i = 0; i < children.length; i++) {
|
|
||||||
var isActive = (L.env.dispatchpath[3 + (level || 0)] == 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];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ul.children.length == 0)
|
|
||||||
return E([]);
|
|
||||||
|
|
||||||
container.appendChild(ul);
|
|
||||||
container.style.display = '';
|
|
||||||
|
|
||||||
if (activeNode)
|
|
||||||
this.renderTabMenu(activeNode, url + '/' + activeNode.name, (level || 0) + 1);
|
|
||||||
|
|
||||||
return ul;
|
|
||||||
},
|
|
||||||
|
|
||||||
renderMainMenu: function(tree, url, level) {
|
|
||||||
var ul = level ? E('ul', { 'class': 'dropdown-menu' }) : document.querySelector('#topmenu'),
|
|
||||||
children = ui.menu.getChildren(tree);
|
|
||||||
|
|
||||||
if (children.length == 0 || level > 1)
|
|
||||||
return E([]);
|
|
||||||
|
|
||||||
for (var i = 0; i < children.length; i++) {
|
|
||||||
var submenu = this.renderMainMenu(children[i], url + '/' + children[i].name, (level || 0) + 1),
|
|
||||||
subclass = (!level && submenu.firstElementChild) ? 'dropdown' : null,
|
|
||||||
linkclass = (!level && submenu.firstElementChild) ? 'menu' : null,
|
|
||||||
linkurl = submenu.firstElementChild ? '#' : L.url(url, children[i].name);
|
|
||||||
|
|
||||||
var li = E('li', { 'class': subclass }, [
|
|
||||||
E('a', { 'class': linkclass, 'href': linkurl }, [ _(children[i].title) ]),
|
|
||||||
submenu
|
|
||||||
]);
|
|
||||||
|
|
||||||
ul.appendChild(li);
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.style.display = '';
|
|
||||||
|
|
||||||
return ul;
|
|
||||||
},
|
|
||||||
|
|
||||||
renderModeMenu: function(tree) {
|
|
||||||
var ul = document.querySelector('#modemenu'),
|
|
||||||
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);
|
|
||||||
|
|
||||||
ul.appendChild(E('li', { 'class': isActive ? 'active' : null }, [
|
|
||||||
E('a', { 'href': L.url(children[i].name) }, [ _(children[i].title) ]),
|
|
||||||
' ',
|
|
||||||
E('span', { 'class': 'divider' }, [ '|' ])
|
|
||||||
]));
|
|
||||||
|
|
||||||
if (isActive)
|
|
||||||
this.renderMainMenu(children[i], children[i].name);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ul.children.length > 1)
|
|
||||||
ul.style.display = '';
|
|
||||||
},
|
|
||||||
|
|
||||||
handleBodyMargin: function(ev) {
|
|
||||||
var body = document.querySelector('body'),
|
|
||||||
head = document.querySelector('header');
|
|
||||||
|
|
||||||
body.style.marginTop = head.offsetHeight + 'px';
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,19 +0,0 @@
|
||||||
<%#
|
|
||||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
|
||||||
Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
|
|
||||||
Copyright 2012 David Menting <david@nut-bolt.nl>
|
|
||||||
Licensed to the public under the Apache License 2.0.
|
|
||||||
-%>
|
|
||||||
|
|
||||||
<% local ver = require "luci.version" %>
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
<a href="https://55860.com">Powered by business 版本号:<%= ver.distversion %></a>
|
|
||||||
<ul class="breadcrumb pull-right" id="modemenu" style="display:none"></ul>
|
|
||||||
<a href="http://55860.com" target="_blank"><img src="https://55860.com/bak/footer.png" alt="" width="100%" height="100%" /></a>
|
|
||||||
</footer>
|
|
||||||
</div>
|
|
||||||
<script type="text/javascript">L.require('menu-openmptcprouter')</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
|
@ -1,90 +0,0 @@
|
||||||
<%#
|
|
||||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
|
||||||
Copyright 2008-2016 Jo-Philipp Wich <jow@openwrt.org>
|
|
||||||
Copyright 2012 David Menting <david@nut-bolt.nl>
|
|
||||||
Licensed to the public under the Apache License 2.0.
|
|
||||||
-%>
|
|
||||||
|
|
||||||
<%
|
|
||||||
local sys = require "luci.sys"
|
|
||||||
local util = require "luci.util"
|
|
||||||
local http = require "luci.http"
|
|
||||||
local disp = require "luci.dispatcher"
|
|
||||||
|
|
||||||
local boardinfo = util.ubus("system", "board")
|
|
||||||
|
|
||||||
local node = disp.context.dispatched
|
|
||||||
|
|
||||||
-- send as HTML5
|
|
||||||
http.prepare_content("text/html")
|
|
||||||
|
|
||||||
-- Get current and latest OMR version
|
|
||||||
local current_omr_version = luci.model.uci.cursor():get("openmptcprouter","settings","version") or ""
|
|
||||||
local latest_omr_version = luci.model.uci.cursor():get("openmptcprouter","latest_versions","omr") or ""
|
|
||||||
|
|
||||||
-%>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="<%=luci.i18n.context.lang%>">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title><%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - system</title>
|
|
||||||
<meta name="viewport" content="initial-scale=1.0">
|
|
||||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
|
||||||
<meta http-equiv="Pragma" content="no-cache" />
|
|
||||||
<meta http-equiv="Expires" content="0" />
|
|
||||||
<link rel="stylesheet" href="<%=media%>/cascade.css">
|
|
||||||
<link rel="stylesheet" media="only screen and (max-device-width: 854px)" href="<%=media%>/mobile.css" type="text/css" />
|
|
||||||
<link rel="shortcut icon" type="image/png" href="<%=media%>/favicon.png">
|
|
||||||
<link rel="apple-touch-icon" href="<%=media%>/1omr-logo-apple.png">
|
|
||||||
<% if node and node.css then %>
|
|
||||||
<link rel="stylesheet" href="<%=resource%>/<%=node.css%>">
|
|
||||||
<% end -%>
|
|
||||||
<% if css then %>
|
|
||||||
<style title="text/css"><%= css %></style>
|
|
||||||
<% end -%>
|
|
||||||
<script src="<%=url('admin/translations', luci.i18n.context.lang)%><%# ?v=PKG_VERSION %>"></script>
|
|
||||||
<script src="<%=resource%>/cbi.js"></script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body class="lang_<%=luci.i18n.context.lang%> <% if node then %><%= striptags( node.title ) %><%- end %>" data-page="<%= table.concat(disp.context.requestpath, "-") %>">
|
|
||||||
<header>
|
|
||||||
<div class="fill">
|
|
||||||
<div class="container">
|
|
||||||
<a class="brand" href="#" alt="openmptcprouter business"><img src="<%=resource%>/ezengreen/images/outdoorrouter.png" height="40" width="85" alt="openmptcprouter business" />OpenMPTCProuter_5G</a>
|
|
||||||
<ul class="nav" id="topmenu" style="display:none"></ul>
|
|
||||||
<div id="indicators" class="pull-right"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div id="maincontent" class="container">
|
|
||||||
<%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
|
|
||||||
<div class="alert-message warning">
|
|
||||||
<h4><%:No password set!%></h4>
|
|
||||||
<p><%:There is no password set on this router. Please configure a root password to protect the web interface.%></p>
|
|
||||||
<% if disp.lookup("admin/system/admin") then %>
|
|
||||||
<div class="right"><a class="btn" href="<%=url("admin/system/admin")%>"><%:Go to password configuration...%></a></div>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<%- end -%>
|
|
||||||
<%- if current_omr_version ~= "" and latest_omr_version ~= "" and current_omr_version < latest_omr_version then -%>
|
|
||||||
<div class="alert-message notice">
|
|
||||||
<p><%=translatef("你的蚂蚁聚合openmptcprouter of china商业版 版本号 %s 最新 版本号 %s 现在可以升级",current_omr_version,latest_omr_version)%></p>
|
|
||||||
<div class="right"><a class="btn" href="https://55860.com/serverstatus.php"><%:点击查看最新版本 请联系客服进行升级...%></a></div>
|
|
||||||
</div>
|
|
||||||
<%- end -%>
|
|
||||||
<div class="alert-message notice">
|
|
||||||
|
|
||||||
<iframe src ="https://55860.com/bak/gonggao.php" width="100%" height="100%">
|
|
||||||
<p>最新公告</p>
|
|
||||||
</iframe>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<noscript>
|
|
||||||
<div class="alert-message warning">
|
|
||||||
<h4><%:JavaScript required!%></h4>
|
|
||||||
<p><%:You must enable JavaScript in your browser or LuCI will not work properly.%></p>
|
|
||||||
</div>
|
|
||||||
</noscript>
|
|
||||||
|
|
||||||
<div id="tabmenu" style="display:none"></div>
|
|
|
@ -1,10 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$(uci -q get luci.themes.ezengreen)" = "" ]; then
|
|
||||||
uci batch <<-EOF
|
|
||||||
set luci.themes.ezengreen=/luci-static/ezengreen
|
|
||||||
set luci.main.mediaurlbase=/luci-static/ezengreen
|
|
||||||
commit luci
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
exit 0
|
|
|
@ -1,14 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (C) 2020 Jo-Philipp Wich <jo@mein.io>
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
LUCI_TITLE:=LuCI modern OpenWrt theme
|
|
||||||
LUCI_DEPENDS:=
|
|
||||||
|
|
||||||
include $(TOPDIR)/feeds/luci/luci.mk
|
|
||||||
|
|
||||||
# call BuildPackage - OpenWrt buildroot signature
|
|
Before Width: | Height: | Size: 535 B |
Before Width: | Height: | Size: 50 KiB |
|
@ -1,12 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="132 132 264 264">
|
|
||||||
<defs>
|
|
||||||
<radialGradient id="g" cx="0%" cy="0%" r="60%">
|
|
||||||
<stop offset=".8" style="stop-opacity:1" />
|
|
||||||
<stop offset="1" style="stop-opacity:.5" />
|
|
||||||
</radialGradient>
|
|
||||||
</defs>
|
|
||||||
<g>
|
|
||||||
<path style="fill:url(#g)" d="M 264 132 A 132 132 0 0 0 132 264 A 132 132 0 0 0 264 396 A 132 132 0 0 0 396 264 A 132 132 0 0 0 264 132 z M 264 170 A 94 94 0 0 1 359 264 A 94 94 0 0 1 264 359 A 94 94 0 0 1 170 264 A 94 94 0 0 1 264 170 z " />
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 582 B |
|
@ -1,147 +0,0 @@
|
||||||
'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 = '';
|
|
||||||
|
|
||||||
this.renderModeMenu(node);
|
|
||||||
|
|
||||||
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('#menubar > .navigation')
|
|
||||||
.addEventListener('click', ui.createHandlerFn(this, 'handleSidebarToggle'));
|
|
||||||
},
|
|
||||||
|
|
||||||
handleMenuExpand: function(ev) {
|
|
||||||
var a = ev.target, ul1 = a.parentNode.parentNode, ul2 = a.nextElementSibling;
|
|
||||||
|
|
||||||
document.querySelectorAll('ul.mainmenu.l1 > li.active').forEach(function(li) {
|
|
||||||
if (li !== a.parentNode)
|
|
||||||
li.classList.remove('active');
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!ul2)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (ul2.parentNode.offsetLeft + ul2.offsetWidth <= ul1.offsetLeft + ul1.offsetWidth)
|
|
||||||
ul2.classList.add('align-left');
|
|
||||||
|
|
||||||
ul1.classList.add('active');
|
|
||||||
a.parentNode.classList.add('active');
|
|
||||||
a.blur();
|
|
||||||
|
|
||||||
ev.preventDefault();
|
|
||||||
ev.stopPropagation();
|
|
||||||
},
|
|
||||||
|
|
||||||
renderMainMenu: function(tree, url, level) {
|
|
||||||
var l = (level || 0) + 1,
|
|
||||||
ul = E('ul', { 'class': 'mainmenu l%d'.format(l) }),
|
|
||||||
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),
|
|
||||||
isReadonly = children[i].readonly,
|
|
||||||
activeClass = 'mainmenu-item-%s%s'.format(children[i].name, isActive ? ' selected' : '');
|
|
||||||
|
|
||||||
ul.appendChild(E('li', { 'class': activeClass }, [
|
|
||||||
E('a', {
|
|
||||||
'href': L.url(url, children[i].name),
|
|
||||||
'click': (l == 1) ? ui.createHandlerFn(this, 'handleMenuExpand') : null
|
|
||||||
}, [ _(children[i].title) ]),
|
|
||||||
this.renderMainMenu(children[i], url + '/' + children[i].name, l)
|
|
||||||
]));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (l == 1)
|
|
||||||
document.querySelector('#mainmenu').appendChild(E('div', [ ul ]));
|
|
||||||
|
|
||||||
return ul;
|
|
||||||
},
|
|
||||||
|
|
||||||
renderModeMenu: function(tree) {
|
|
||||||
var menu = document.querySelector('#modemenu'),
|
|
||||||
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 (i > 0)
|
|
||||||
menu.appendChild(E([], ['\u00a0|\u00a0']));
|
|
||||||
|
|
||||||
menu.appendChild(E('div', { 'class': isActive ? 'active' : null }, [
|
|
||||||
E('a', { 'href': L.url(children[i].name) }, [ _(children[i].title) ])
|
|
||||||
]));
|
|
||||||
|
|
||||||
if (isActive)
|
|
||||||
this.renderMainMenu(children[i], children[i].name);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (menu.children.length > 1)
|
|
||||||
menu.style.display = '';
|
|
||||||
},
|
|
||||||
|
|
||||||
renderTabMenu: function(tree, url, level) {
|
|
||||||
var container = document.querySelector('#tabmenu'),
|
|
||||||
l = (level || 0) + 1,
|
|
||||||
ul = E('ul', { 'class': 'cbi-tabmenu' }),
|
|
||||||
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 ? ' cbi-tab' : '',
|
|
||||||
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 btn = ev.currentTarget,
|
|
||||||
bar = document.querySelector('#mainmenu');
|
|
||||||
|
|
||||||
if (btn.classList.contains('active')) {
|
|
||||||
btn.classList.remove('active');
|
|
||||||
bar.classList.remove('active');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
btn.classList.add('active');
|
|
||||||
bar.classList.add('active');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
|
@ -1,17 +0,0 @@
|
||||||
<%#
|
|
||||||
Copyright 2020 Jo-Philipp Wich <jo@mein.io>
|
|
||||||
Licensed to the public under the Apache License 2.0.
|
|
||||||
-%>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="luci">
|
|
||||||
<% local ver = require "luci.version" -%>
|
|
||||||
Powered by <%= ver.luciname %> (<%= ver.luciversion %>)
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<script type="text/javascript">L.require('menu-openwrt2020')</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,63 +0,0 @@
|
||||||
<%#
|
|
||||||
Copyright 2020 Jo-Philipp Wich <jo@mein.io>
|
|
||||||
Licensed to the public under the Apache License 2.0.
|
|
||||||
-%>
|
|
||||||
|
|
||||||
<%
|
|
||||||
local sys = require "luci.sys"
|
|
||||||
local util = require "luci.util"
|
|
||||||
local http = require "luci.http"
|
|
||||||
local disp = require "luci.dispatcher"
|
|
||||||
local ver = require "luci.version"
|
|
||||||
|
|
||||||
local boardinfo = util.ubus("system", "board") or { }
|
|
||||||
|
|
||||||
local node = disp.context.dispatched
|
|
||||||
local path = table.concat(disp.context.path, "-")
|
|
||||||
|
|
||||||
http.prepare_content("text/html; charset=UTF-8")
|
|
||||||
-%>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="<%=luci.i18n.context.lang%>">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
||||||
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
||||||
<link rel="stylesheet" type="text/css" media="screen" href="<%=media%>/cascade.css" />
|
|
||||||
<link rel="icon" href="<%=media%>/favicon.png" type="image/svg+xml" />
|
|
||||||
<script type="text/javascript" src="<%=url('admin/translations', luci.i18n.context.lang)%><%# ?v=PKG_VERSION %>"></script>
|
|
||||||
<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
|
|
||||||
<title><%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI</title>
|
|
||||||
</head>
|
|
||||||
<body class="lang_<%=luci.i18n.context.lang%>" data-page="<%= pcdata(path) %>">
|
|
||||||
|
|
||||||
<p class="skiplink">
|
|
||||||
<span id="skiplink1"><a href="#navigation"><%:Skip to navigation%></a></span>
|
|
||||||
<span id="skiplink2"><a href="#content"><%:Skip to content%></a></span>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div id="menubar">
|
|
||||||
<h2 class="navigation"><a id="navigation" name="navigation"><%:Navigation%></a></h2>
|
|
||||||
|
|
||||||
<span class="hostname"><a href="/"><%=(boardinfo.hostname or "?")%></a></span>
|
|
||||||
<span class="distversion"><%=ver.distversion%></span>
|
|
||||||
<span id="indicators"></span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="modemenu" style="display:none"></div>
|
|
||||||
|
|
||||||
<div id="maincontainer">
|
|
||||||
<div id="mainmenu"></div>
|
|
||||||
|
|
||||||
<div id="maincontent">
|
|
||||||
<%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") and category ~= "failsafe" and path ~= "admin-system-admin-password" then -%>
|
|
||||||
<div class="alert-message warning">
|
|
||||||
<h4><%:No password set!%></h4>
|
|
||||||
<p><%:There is no password set on this router. Please configure a root password to protect the web interface.%></p>
|
|
||||||
<% if disp.lookup("admin/system/admin") then %>
|
|
||||||
<div class="right"><a class="btn" href="<%=url("admin/system/admin")%>"><%:Go to password configuration...%></a></div>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<%- end -%>
|
|
||||||
|
|
||||||
<div id="tabmenu" style="display:none"></div>
|
|
|
@ -1,11 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$PKG_UPGRADE" != 1 ]; then
|
|
||||||
uci get luci.themes.OpenWrt2020 >/dev/null 2>&1 || \
|
|
||||||
uci batch <<-EOF
|
|
||||||
set luci.themes.OpenWrt2020=/luci-static/openwrt2020
|
|
||||||
commit luci
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
|