• R/O
  • HTTP
  • SSH
  • HTTPS

luci: Commit

LuCI - OpenWrt Configuration Interface


Commit MetaInfo

Revisãobc7fccdd43483a50e57293bbe1ca134bd102a478 (tree)
Hora2022-01-26 17:10:56
AutorTianling Shen <cnsztl@immo...>
CommiterTianling Shen

Mensagem de Log

luci-theme-bootstrap-mod: sync with upstream source

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>

Mudança Sumário

Diff

--- a/themes/luci-theme-bootstrap-mod/Makefile
+++ b/themes/luci-theme-bootstrap-mod/Makefile
@@ -1,4 +1,4 @@
1-# Copyright (C) 2020 Lienol <lawlienol@gmail.com>
1+# Copyright (C) 2018-2022 Lienol <lawlienol@gmail.com>
22 #
33 # This is free software, licensed under the GNU General Public License v3.
44 #
@@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk
77
88 LUCI_TITLE:=Bootstrap Mod Theme By Lienol
99 LUCI_DEPENDS:=
10-PKG_VERSION:=2
11-PKG_DATE:=20200912
10+PKG_VERSION:=20220102
11+PKG_RELEASE:=1
1212
1313 include ../../luci.mk
1414
--- a/themes/luci-theme-bootstrap-mod/htdocs/luci-static/bootstrap_mod/cascade.css
+++ b/themes/luci-theme-bootstrap-mod/htdocs/luci-static/bootstrap_mod/cascade.css
@@ -6,8 +6,8 @@ body {
66 body {
77 background: #ffffff;
88 color: #333;
9- font-family: Helvetica, Arial, sans-serif;
10- font-size: 14px;
9+ font-family: "Helvetica Neue, Helvetica, Arial, sans-serif";
10+ font-size: 13px;
1111 line-height: 1.8;
1212 margin: 0;
1313 /* padding-top: 60px; */
@@ -122,6 +122,7 @@ header {
122122 box-shadow: 0 2px 2px rgba(0, 0, 0, .1);
123123 z-index: 100;
124124 border-bottom: 2px solid #ccc;
125+ background-image: linear-gradient(to bottom, #333333, #222222);
125126 }
126127
127128 .brand {
@@ -556,23 +557,23 @@ p {
556557
557558 .tabs,
558559 .cbi-tabmenu {
559- border-bottom: 2px solid #ddd;
560- margin-bottom: 20px;
560+ border-bottom: 1px solid #ddd;
561+ margin-bottom: 15px;
561562 }
562563
563564 .tabs li,
564565 .cbi-tabmenu li {
565566 display: inline-block;
567+ margin-bottom: -1px;
566568 }
567569
568570 .tabs a,
569571 .cbi-tabmenu a {
570572 display: block;
571- color: #404040;
573+ /* color: #404040; */
572574 line-height: 34px;
573- margin-bottom: -2px;
574- margin-right: 20px;
575- padding: 0 3px;
575+ margin-right: 3px;
576+ padding: 0 15px;
576577 }
577578
578579 .active a,
@@ -581,6 +582,13 @@ p {
581582 color: #111;
582583 }
583584
585+.tabs>li>a:hover,
586+.cbi-tabmenu>li>a:hover {
587+ text-decoration: none;
588+ background-color: #eee;
589+ border-color: #eee #eee #ddd;
590+}
591+
584592
585593 /* Fieldset */
586594
@@ -603,6 +611,7 @@ fieldset fieldset {
603611 table .cbi-value-field,
604612 .table .cbi-value-field {
605613 display: table-cell;
614+ width: unset;
606615 }
607616
608617 .cbi-value-title {
@@ -613,7 +622,7 @@ table .cbi-value-field,
613622 padding-top: 0.4em;
614623 line-height: 1.2em;
615624 float: left;
616- width: 13em;
625+ width: 14em;
617626 margin-right: 1.5em;
618627 text-align: right;
619628 color: #404040;
@@ -622,6 +631,7 @@ table .cbi-value-field,
622631 .cbi-value-field {
623632 color: #811;
624633 display: table-cell;
634+ width: 0.1%;
625635 }
626636
627637 .cbi-section-table-cell {
@@ -808,6 +818,17 @@ select {
808818 line-height: 18px;
809819 }
810820
821+input[disabled],
822+select[disabled],
823+textarea[disabled],
824+input[readonly],
825+select[readonly],
826+textarea[readonly] {
827+ background-color: #f5f5f5;
828+ border-color: #ddd;
829+ color: unset;
830+}
831+
811832 table.cbi-section-table input,
812833 table.cbi-section-table textarea,
813834 table.cbi-section-table select,
@@ -880,11 +901,11 @@ input[type=file] {
880901 }
881902
882903 .cbi-value-description {
883- /* display: inline; */
904+ display: inline;
884905 background-image: url(/luci-static/resources/cbi/help.gif);
885906 /* background-position-x: 0px;
886907 background-position-y: 1px; */
887- background-position: 0em 0.3em;
908+ background-position: 0em 0.2em;
888909 background-repeat: no-repeat;
889910 padding: 0 1.2rem;
890911 }
@@ -906,15 +927,13 @@ input[type=file] {
906927
907928 /* Button */
908929
909-.btn,
910930 .cbi-button,
911931 button {
912- border-radius: 6px !important;
932+ border-radius: 4px;
913933 display: inline-block;
914- background: #fff;
934+ background: linear-gradient(#fff, #fff 25%, #e6e6e6) no-repeat;
915935 border: 1px solid #ccc;
916- border-radius: 2px;
917- box-shadow: 0 2px 2px rgba(0, 0, 0, .05);
936+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
918937 color: #333;
919938 line-height: 16px;
920939 padding: 0.5em;
@@ -922,16 +941,12 @@ button {
922941 margin-left: 0.2em;
923942 }
924943
925-.btn:active,
926-.btn:focus,
927944 .cbi-button:active,
928-.cbi-button:focus,
929-button:active,
945+.cbi-button:focus button:active,
930946 button:focus {
931947 border-color: #bbb;
932948 }
933949
934-/*
935950 .cbi-button-up,
936951 .cbi-input-up {
937952 background-position: center;
@@ -949,27 +964,23 @@ button:focus {
949964 padding-left: 15px;
950965 padding-right: 15px;
951966 }
952-*/
953967
954968 .cbi-button-add,
955969 .cbi-input-add {
956- background: #404040;
957- border-color: #404040;
958- color: #fff;
970+ border-color: #4a4;
971+ color: #4a4;
959972 }
960973
961974 .cbi-button-add:active,
962975 .cbi-button-add:focus,
963976 .cbi-input-add:active,
964-.cbi-input-add:focus {
965-}
977+.cbi-input-add:focus {}
966978
967979 .cbi-button-remove,
968980 .cbi-input-remove,
969981 .cbi-section-remove input {
970- border-color: red;
971- background-color: red;
972- color: #fff;
982+ border-color: #c44;
983+ color: #c44;
973984 }
974985
975986 .cbi-button-remove:active,
@@ -977,79 +988,74 @@ button:focus {
977988 .cbi-input-remove:active,
978989 .cbi-input-remove:focus,
979990 .cbi-section-remove input:active,
980-.cbi-section-remove input:focus {
981-}
991+.cbi-section-remove input:focus {}
982992
983993 .cbi-button-reload,
984994 .cbi-input-reload {
985- background: rgb(148, 143, 225);
986995 border-color: rgb(148, 143, 225);
987- color: #fff;
996+ color: rgb(148, 143, 225);
988997 }
989998
990999 .cbi-button-reload:active,
9911000 .cbi-button-reload:focus,
9921001 .cbi-input-reload:active,
993-.cbi-input-reload:focus {
994-}
1002+.cbi-input-reload:focus {}
9951003
9961004 .cbi-button-reset,
9971005 .cbi-input-reset {
998- background: #6bde84;
999- border-color: #6bde84;
1000- color: #fff;
1006+ border-color: #4a4;
1007+ color: #4a4;
10011008 }
10021009
10031010 .cbi-button-reset:active,
10041011 .cbi-button-reset:focus,
10051012 .cbi-input-reset:active,
1006-.cbi-input-reset:focus {
1007-}
1013+.cbi-input-reset:focus {}
10081014
10091015 .cbi-button-edit,
10101016 .cbi-input-edit {
1011- background: #ff7700;
10121017 border-color: #ff7700;
1013- color: #fff;
1018+ color: #ff7700;
10141019 }
10151020
10161021 .cbi-button-edit:active,
10171022 .cbi-button-edit:focus,
10181023 .cbi-input-edit:active,
1019-.cbi-input-edit:focus {
1020-}
1024+.cbi-input-edit:focus {}
10211025
10221026 .cbi-button-apply,
10231027 .cbi-input-apply {
1024- color: #fff;
1025- background: #0069d6;
1026- border: 1px solid #0069d6;
1028+ border-color: #0069d6;
1029+ color: #0069d6;
10271030 }
10281031
10291032 .cbi-button-apply:active,
10301033 .cbi-button-apply:focus,
10311034 .cbi-input-apply:active,
1032-.cbi-input-apply:focus {
1033-}
1035+.cbi-input-apply:focus {}
10341036
10351037 .cbi-button-save,
10361038 .cbi-input-save {
1037- background: rgb(148, 143, 225);
10381039 border-color: rgb(148, 143, 225);
1039- color: #fff;
1040+ color: rgb(148, 143, 225);
10401041 }
10411042
10421043 .cbi-button-save:active,
10431044 .cbi-button-save:focus,
10441045 .cbi-input-save:active,
1045-.cbi-input-save:focus {
1046-}
1046+.cbi-input-save:focus {}
10471047
10481048 /* LuCI 18 DynamicList */
1049-input[type="text"] + .cbi-button,
1050-input[type="password"] + .cbi-button,
1051-select + .cbi-button {
1052- padding: 4px 8px;
1049+input[type="text"]+.cbi-button,
1050+input[type="password"]+.cbi-button,
1051+select+.cbi-button {
1052+ vertical-align: top;
1053+ padding: 0.4em;
1054+ border-color: #ccc;
1055+ margin: 0 0 1px -3px;
1056+ font-size: 14px;
1057+ line-height: 18px;
1058+ border-radius: 5px;
10531059 }
10541060
10551061
@@ -1121,9 +1127,9 @@ select + .cbi-button {
11211127 text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
11221128 border-radius: 4px;
11231129 box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
1124- display: inline-flex;
1130+ /* display: inline-flex; */
11251131 flex-direction: column;
1126- line-height: 1.2em;
1132+ line-height: 1.6em;
11271133 min-width: 100px;
11281134 }
11291135
@@ -1259,8 +1265,7 @@ footer a {
12591265
12601266 /* login */
12611267 body.node-main-login {
1262- /* background: url(bg.jpg); */
1263- background: linear-gradient(#22b9a4, #9a87d4);
1268+ background: rgba(0, 0, 0, 0.7);
12641269 background-repeat: no-repeat;
12651270 background-size: 100% 100%;
12661271 -moz-background-size: 100% 100%;
@@ -1272,8 +1277,13 @@ body.node-main-login>header {
12721277 border-bottom: none;
12731278 }
12741279
1280+body.node-main-login>header .brand {
1281+ display: none;
1282+}
1283+
12751284 body.node-main-login .alert-message {
12761285 z-index: 999;
1286+ display: none;
12771287 }
12781288
12791289 .node-main-login>.container>form {
@@ -1283,32 +1293,18 @@ body.node-main-login .alert-message {
12831293 border-radius: .375rem;
12841294 text-align: center;
12851295 position: absolute;
1286- top: 50%;
1296+ top: 30%;
12871297 left: 50%;
12881298 transform: translate(-50%, -50%);
1299+ background: #fff;
12891300 }
12901301
1291-.node-main-login>.container>form .errorbox {
1292- color: red;
1302+.node-main-login>.container>form .errorbox,
1303+.node-main-login>.container>form .errorbox>p {
1304+ color: red !important;
12931305 }
12941306
1295-.node-main-login>.container>form>.cbi-map>h2 {
1296- width: 100px;
1297- height: 100px;
1298- color: #fff;
1299- text-align: center;
1300- letter-spacing: 4px;
1301- display: block;
1302- margin: -100px auto 15px auto;
1303- padding: 0;
1304- text-indent: -500px;
1305- overflow: hidden;
1306- border-radius: 60px;
1307- /* border: #ccc 3px solid; */
1308- background-image: url(wifi.png);
1309- background-size: cover;
1310- /* box-shadow: 0 4px 20px 0px rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(156, 39, 176, 0.4); */
1311-}
1307+.node-main-login>.container>form>.cbi-map>h2 {}
13121308
13131309 .node-main-login>.container>form input[name='luci_username'],
13141310 .node-main-login>.container>form input[name='luci_password'] {
@@ -1334,6 +1330,14 @@ body.node-main-login .alert-message {
13341330 text-align: center !important;
13351331 }
13361332
1333+.node-main-login>.container .cbi-button-apply {
1334+ width: 100% !important;
1335+}
1336+
1337+.node-main-login>.container .cbi-button-reset {
1338+ display: none;
1339+}
1340+
13371341 /* luci18 */
13381342 .cbi-section-table-titles.named::before {
13391343 content: attr(data-title) " ";
@@ -1365,6 +1369,10 @@ body.node-main-login .alert-message {
13651369 }
13661370
13671371 /* luci 19 */
1372+.node-main-login>header .nav {
1373+ display: none;
1374+}
1375+
13681376 body.modal-overlay-active {
13691377 overflow: hidden;
13701378 height: 100vh;
@@ -1386,7 +1394,7 @@ body.modal-overlay-active #modal_overlay>.modal {
13861394 max-width: unset;
13871395 min-height: 32px;
13881396 min-width: 270px;
1389- /* background: linear-gradient(to bottom, #fceec1, #eedc94) repeat-x !important; */
1397+ background: linear-gradient(to bottom, #fceec1, #eedc94) repeat-x !important;
13901398 border-radius: 3px;
13911399 padding: 1em;
13921400 margin: 0;
@@ -1427,14 +1435,14 @@ body.modal-overlay-active #modal_overlay>.modal {
14271435
14281436 .modal>* {
14291437 flex-basis: 100%;
1430- /* line-height: normal; */
1438+ line-height: normal;
14311439 margin-bottom: .5em;
14321440 max-width: 100%;
14331441 }
14341442
14351443 #modal_overlay .modal>* {
14361444 flex-basis: 100%;
1437- /* line-height: normal; */
1445+ line-height: normal;
14381446 margin-bottom: .5em;
14391447 }
14401448
@@ -1470,10 +1478,10 @@ body.modal-overlay-active #modal_overlay>.modal {
14701478 max-width: 400px;
14711479 width: auto;
14721480 background: white;
1473- /* border: 1px solid #ccc; */
1481+ border: 1px solid #ccc;
14741482 border-radius: 5px;
14751483 box-sizing: border-box;
1476- /* padding: 0 0.4em !important; */
1484+ padding: 0 0.4em !important;
14771485 }
14781486
14791487 .cbi-dynlist>.item {
@@ -1484,7 +1492,7 @@ body.modal-overlay-active #modal_overlay>.modal {
14841492 border-radius: 3px;
14851493 position: relative;
14861494 pointer-events: none;
1487- padding: 2px 2em 2px 10px;
1495+ padding: 2px 2em 2px 4px;
14881496 }
14891497
14901498 .cbi-dynlist>.item::after {
@@ -1530,9 +1538,8 @@ body.modal-overlay-active #modal_overlay>.modal {
15301538
15311539 .btn.primary,
15321540 .cbi-button-action.important {
1533- color: #fff;
1534- background: #0069d6;
1535- border: 1px solid #0069d6;
1541+ border-color: #ff7700;
1542+ color: #ff7700;
15361543 }
15371544
15381545 .cbi-dropdown {
@@ -1572,21 +1579,4 @@ body.modal-overlay-active #modal_overlay>.modal {
15721579 white-space: pre;
15731580 overflow: hidden;
15741581 text-overflow: ellipsis;
1575-}
1576-
1577-header [data-indicator] {
1578- padding: 1px 3px 2px;
1579- font-size: 9.75px;
1580- font-weight: bold;
1581- color: #fff !important;
1582- text-transform: uppercase;
1583- white-space: nowrap;
1584- background-color: #bfbfbf;
1585- border-radius: 3px;
1586- text-shadow: none;
1587- margin-left: .4em;
1588-}
1589-
1590-header [data-indicator][data-style="active"] {
1591- background-color: #62cffc;
15921582 }
\ No newline at end of file
Binary files a/themes/luci-theme-bootstrap-mod/htdocs/luci-static/bootstrap_mod/wifi.png and /dev/null differ
--- a/themes/luci-theme-bootstrap-mod/luasrc/view/themes/bootstrap_mod/footer.htm
+++ b/themes/luci-theme-bootstrap-mod/luasrc/view/themes/bootstrap_mod/footer.htm
@@ -2,24 +2,44 @@
22 Copyright 2008 Steven Barth <steven@midlink.org>
33 Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
44 Copyright 2012 David Menting <david@nut-bolt.nl>
5- Copyright 2020 Lienol <lawlienol@gmail.com>
5+ Copyright 2018-2020 Lienol <lawlienol@gmail.com>
66 Licensed to the public under the Apache License 2.0.
77 -%>
88
99 <%
1010 local ver = require "luci.version"
11+ local disp = require "luci.dispatcher"
12+ local request = disp.context.path
13+ local category = request[1]
14+ local tree = disp.node()
15+ local categories = disp.node_childs(tree)
1116 %>
12-
1317 <footer>
14- <a href="https://github.com/Lienol/openwrt-luci">Powered by <%= ver.luciname %> (<%= ver.luciversion %>)</a> / <%= ver.distversion %>
15- <ul class="breadcrumb pull-right" id="modemenu" style="display:none"></ul>
18+ <a href="https://github.com/openwrt/luci">Powered by <%= ver.luciname %></a> / <%= ver.distversion %>
19+ <% if #categories > 1 then %>
20+ <ul class="breadcrumb pull-right" id="modemenu">
21+ <% for i, r in ipairs(categories) do %>
22+ <li<% if request[1] == r then %> class="active"<%end%>><a href="<%=controller%>/<%=r%>/"><%=striptags(translate(tree.nodes[r].title))%></a> <span class="divider">|</span></li>
23+ <% end %>
24+ </ul>
25+ <% end %>
1626 </footer>
27+ </div>
1728 </div>
18- <script type="text/javascript">L.require('menu-bootstrap')</script>
1929 </body>
20-</html>
21-<script>
22- window.onload = function(){
30+ <script>
31+ function addLoadEvent(func) {
32+ var oldonload = window.onload;
33+ if (typeof window.onload != 'function') {
34+ window.onload = func;
35+ } else {
36+ window.onload = function () {
37+ oldonload();
38+ func();
39+ }
40+ }
41+ }
42+ addLoadEvent(function(){
2343 var content = document.getElementsByName("content");
2444 var luci_username = document.getElementsByName("luci_username");
2545 var luci_password = document.getElementsByName("luci_password");
@@ -49,6 +69,6 @@
4969 }
5070 }
5171 }
52- }
53-</script>
72+ });
73+ </script>
5474 </html>
--- a/themes/luci-theme-bootstrap-mod/luasrc/view/themes/bootstrap_mod/header.htm
+++ b/themes/luci-theme-bootstrap-mod/luasrc/view/themes/bootstrap_mod/header.htm
@@ -1,8 +1,8 @@
11 <%#
22 Copyright 2008 Steven Barth <steven@midlink.org>
3- Copyright 2008-2016 Jo-Philipp Wich <jow@openwrt.org>
3+ Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
44 Copyright 2012 David Menting <david@nut-bolt.nl>
5- Copyright 2020 Lienol <lawlienol@gmail.com>
5+ Copyright 2018-2019 Lienol <lawlienol@gmail.com>
66 Licensed to the public under the Apache License 2.0.
77 -%>
88
@@ -14,24 +14,157 @@
1414
1515 local boardinfo = util.ubus("system", "board")
1616
17+ local request = disp.context.path
18+ local request2 = disp.context.request
19+
20+ local category = request[1]
21+ local cattree = category and disp.node(category)
22+
23+ local leaf = request2[#request2]
24+
25+ local tree = disp.node()
1726 local node = disp.context.dispatched
1827
28+ local categories = disp.node_childs(tree)
29+
30+ local c = tree
31+ local i, r
32+
33+ -- tag all nodes leading to this page
34+ for i, r in ipairs(request) do
35+ if c.nodes and c.nodes[r] then
36+ c = c.nodes[r]
37+ c._menu_selected = true
38+ end
39+ end
40+
1941 -- send as HTML5
2042 http.prepare_content("text/html")
43+
44+ local function nodeurl(prefix, name, query)
45+ local u = url(prefix, name)
46+ if query then
47+ u = u .. http.build_querystring(query)
48+ end
49+ return pcdata(u)
50+ end
51+
52+ local function render_tabmenu(prefix, node, level)
53+ if not level then
54+ level = 1
55+ end
56+
57+ local childs = disp.node_childs(node)
58+ if #childs > 0 then
59+ if level > 2 then
60+ write('<ul class="tabs">')
61+ end
62+
63+ local selected_node
64+ local selected_name
65+ local i, v
66+
67+ for i, v in ipairs(childs) do
68+ local nnode = node.nodes[v]
69+ if nnode._menu_selected then
70+ selected_node = nnode
71+ selected_name = v
72+ end
73+
74+ if level > 2 then
75+ write('<li class="tabmenu-item-%s %s"><a href="%s">%s</a></li>' %{
76+ v, (nnode._menu_selected or (node.leaf and v == leaf)) and 'active' or '',
77+ nodeurl(prefix, v, nnode.query),
78+ striptags(translate(nnode.title))
79+ })
80+ end
81+ end
82+
83+ if level > 2 then
84+ write('</ul>')
85+ end
86+
87+ if selected_node then
88+ render_tabmenu(prefix .. "/" .. selected_name, selected_node, level + 1)
89+ end
90+ end
91+ end
92+
93+ local function render_submenu(prefix, node)
94+ local childs = disp.node_childs(node)
95+ if #childs > 0 then
96+ write('<ul class="dropdown-menu">')
97+
98+ for i, r in ipairs(childs) do
99+ local nnode = node.nodes[r]
100+ write('<li><a href="%s">%s</a></li>' %{
101+ nodeurl(prefix, r, nnode.query),
102+ pcdata(striptags(translate(nnode.title)))
103+ })
104+ end
105+
106+ write('</ul>')
107+ end
108+ end
109+
110+ local function render_topmenu()
111+ local childs = disp.node_childs(cattree)
112+ if #childs > 0 then
113+ write('<ul class="nav">')
114+
115+ for i, r in ipairs(childs) do
116+ local nnode = cattree.nodes[r]
117+ local grandchildren = disp.node_childs(nnode)
118+
119+ if #grandchildren > 0 then
120+ write('<li class="dropdown"><a class="menu" href="#">%s</a>' % pcdata(striptags(translate(nnode.title))))
121+ render_submenu(category .. "/" .. r, nnode)
122+ write('</li>')
123+ else
124+ write('<li><a href="%s">%s</a></li>' %{
125+ nodeurl(category, r, nnode.query),
126+ pcdata(striptags(translate(nnode.title)))
127+ })
128+ end
129+ end
130+
131+ write('</ul>')
132+ end
133+ end
134+
135+ local function render_changes()
136+ -- calculate the number of unsaved changes
137+ if tree.nodes[category] and tree.nodes[category].ucidata then
138+ local ucichanges = 0
139+
140+ for i, j in pairs(require("luci.model.uci").cursor():changes()) do
141+ for k, l in pairs(j) do
142+ for m, n in pairs(l) do
143+ ucichanges = ucichanges + 1;
144+ end
145+ end
146+ end
147+
148+ if ucichanges > 0 then
149+ write('<a class="uci_change_indicator label notice" href="%s?redir=%s">%s: %d</a>' %{
150+ url(category, 'uci/changes'),
151+ http.urlencode(http.formvalue('redir') or table.concat(disp.context.request, "/")),
152+ translate('Unsaved Changes'),
153+ ucichanges
154+ })
155+ end
156+ end
157+ end
21158 -%>
22159 <!DOCTYPE html>
23160 <html lang="<%=luci.i18n.context.lang%>">
24-<style>
25-body {
26- margin-top: unset !important
27-}
28-</style>
29161 <head>
30162 <meta charset="utf-8">
31163 <title><%=striptags( (boardinfo.hostname or "?") .. ( (node and node.title) and ' - ' .. translate(node.title) or '')) %> - LuCI</title>
164+ <!--[if lt IE 9]><script src="<%=media%>/html5.js"></script><![endif]-->
32165 <meta name="viewport" content="initial-scale=1.0">
33166 <link rel="stylesheet" href="<%=media%>/cascade.css">
34- <link rel="stylesheet" media="only screen and (max-device-width: 1600px)" href="<%=media%>/mobile.css" type="text/css" />
167+ <link rel="stylesheet" media="only screen and (max-width: 1600px)" href="<%=media%>/mobile.css" type="text/css" />
35168 <link rel="shortcut icon" href="<%=media%>/favicon.ico">
36169 <% if node and node.css then %>
37170 <link rel="stylesheet" href="<%=resource%>/<%=node.css%>">
@@ -39,38 +172,45 @@ body {
39172 <% if css then %>
40173 <style title="text/css"><%= css %></style>
41174 <% end -%>
42- <script src="<%=url('admin/translations', luci.i18n.context.lang)%>"></script>
175+
176+ <!-- <script src="<%=url('admin/translations', luci.i18n.context.lang)%>"></script> -->
43177 <script src="<%=resource%>/cbi.js"></script>
44- <!-- <script src="<%=resource%>/xhr.js"></script> -->
178+ <script src="<%=resource%>/xhr.js"></script>
45179 </head>
46-
47- <body class="lang_<%=luci.i18n.context.lang%> <% if node then %><%= striptags( node.title ) %><%- end %>" data-page="<%= pcdata(table.concat(disp.context.requestpath, "-")) %>">
180+
181+ <body class="lang_<%=luci.i18n.context.lang%> <% if node then %><%= striptags( node.title ) %><%- end %>" data-page="<%= table.concat(disp.context.requestpath, "-") %>">
48182 <header>
49183 <div class="fill">
50184 <div class="container">
51- <a class="brand" href="/"><%=boardinfo.hostname or "?"%></a>
52- <ul class="nav" id="topmenu" style="display:none"></ul>
53- <div id="indicators" class="pull-right"></div>
185+ <a class="brand" href="#"><%=boardinfo.hostname or "?"%></a>
186+ <% render_topmenu() %>
187+ <div class="pull-right">
188+ <% render_changes() %>
189+ <span id="xhr_poll_status" style="display:none" onclick="XHR.running() ? XHR.halt() : XHR.run()">
190+ <span class="label success" id="xhr_poll_status_on"><span class="mobile-hide"><%:Auto Refresh%> </span><%:on%></span>
191+ <span class="label" id="xhr_poll_status_off" style="display:none"><span class="mobile-hide"><%:Auto Refresh%> </span><%:off%></span>
192+ </span>
193+ </div>
54194 </div>
55195 </div>
56196 </header>
57197
58- <div id="maincontent" class="container">
59- <%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
198+ <%- if luci.sys.process.info("uid") == 0 and luci.sys.user.getuser("root") and not luci.sys.user.getpasswd("root") then -%>
199+ <div class="container">
60200 <div class="alert-message warning">
61201 <h4><%:No password set!%></h4>
62- <p><%:There is no password set on this router. Please configure a root password to protect the web interface.%></p>
63- <% if disp.lookup("admin/system/admin") then %>
64- <div class="right"><a class="btn" href="<%=url("admin/system/admin")%>"><%:Go to password configuration...%></a></div>
65- <% end %>
202+ <%:There is no password set on this router. Please configure a root password to protect the web interface and enable SSH.%><br>
203+ <a href="<%=pcdata(luci.dispatcher.build_url("admin/system/admin"))%>"><%:Go to password configuration...%></a>
66204 </div>
67- <%- end -%>
205+ </div>
206+ <%- end -%>
68207
69- <noscript>
70- <div class="alert-message warning">
71- <h4><%:JavaScript required!%></h4>
72- <p><%:You must enable JavaScript in your browser or LuCI will not work properly.%></p>
73- </div>
74- </noscript>
208+ <noscript>
209+ <div class="alert-message warning">
210+ <strong><%:JavaScript required!%></strong><br />
211+ <%:You must enable JavaScript in your browser or LuCI will not work properly.%>
212+ </div>
213+ </noscript>
75214
76- <div id="tabmenu" style="display:none"></div>
\ No newline at end of file
215+ <div id="maincontent" class="container">
216+ <% if category then render_tabmenu(category, cattree) end %>
Show on old repository browser