themes: warn if booted from initramfs
[project/luci.git] / themes / luci-theme-openwrt-2020 / luasrc / view / themes / openwrt2020 / header.htm
index 28589ff78194bdfd80ec46a323ed78e536a647b3..34c52f4b12288ad2561c323c10c48369a72609db 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 -%>
+
                <div id="tabmenu" style="display:none"></div>