luci-theme-bootstrap: restore initramfs warning
authorJo-Philipp Wich <jo@mein.io>
Thu, 12 May 2022 07:32:02 +0000 (09:32 +0200)
committerJo-Philipp Wich <jo@mein.io>
Mon, 16 May 2022 09:47:00 +0000 (11:47 +0200)
Restore accidentally removed the initramfs boot warning banner.

Ref: https://github.com/openwrt/luci/commit/8055acc9be89f0bed31b6692ad08e6196611d478#commitcomment-73447330
Fixes: 8055acc9be ("luci-theme-bootstrap: overhaul styles")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/header.htm

index 0a93165f57f676b345ac434c350bfaad4f30a779..37d18a2f07115ba59358b2d352e4eac24fa5bd64 100644 (file)
                                </div>
                        <%- end -%>
 
+                       <%- if boardinfo.rootfs_type == "initramfs" then -%>
+                               <div class="alert-message warning">
+                                       <h4><%:System running in recovery (initramfs) mode.%></h4>
+                                       <p><%:No changes to settings will be stored and are lost after rebooting. This mode should only be used to install a firmware upgrade%></p>
+                                       <% if disp.lookup("admin/system/flash") then %>
+                                         <div class="right"><a class="btn" href="<%=url("admin/system/flash")%>"><%:Go to firmware upgrade...%></a></div>
+                                       <% end %>
+                               </div>
+                       <%- end -%>
+
                        <noscript>
                                <div class="alert-message warning">
                                        <h4><%:JavaScript required!%></h4>