diff --git a/luci-theme-alpha/Makefile b/luci-theme-alpha/Makefile index 6b62eaf53..c5e780987 100644 --- a/luci-theme-alpha/Makefile +++ b/luci-theme-alpha/Makefile @@ -10,8 +10,8 @@ THEME_NAME:=alpha THEME_TITLE:=Alpha PKG_NAME:=luci-theme-$(THEME_NAME) -PKG_VERSION:=3.9.5-beta -PKG_RELEASE:=1 +PKG_VERSION:=3.9.6_beta +PKG_RELEASE:=2 include $(INCLUDE_DIR)/package.mk @@ -36,8 +36,15 @@ define Package/luci-theme-$(THEME_NAME)/install echo "uci set luci.themes.$(THEME_TITLE)=/luci-static/$(THEME_NAME); uci commit luci" > $(1)/etc/uci-defaults/30-luci-theme-$(THEME_NAME) $(INSTALL_DIR) $(1)/www/luci-static/$(THEME_NAME) $(CP) -a ./luasrc/* $(1)/www/luci-static/$(THEME_NAME)/ 2>/dev/null || true + + # Install HTML templates for OpenWrt 23.xx and older (Lua) $(INSTALL_DIR) $(1)/usr/lib/lua/luci/view/themes/$(THEME_NAME) - $(CP) -a ./template/* $(1)/usr/lib/lua/luci/view/themes/$(THEME_NAME)/ 2>/dev/null || true + $(CP) -a ./template/*.htm $(1)/usr/lib/lua/luci/view/themes/$(THEME_NAME)/ 2>/dev/null || true + + # Install Ucode templates for OpenWrt 24.xx / 25.xx and newer (ucode) + $(INSTALL_DIR) $(1)/usr/share/ucode/luci/template/themes/$(THEME_NAME) + $(CP) -a ./template/*.ut $(1)/usr/share/ucode/luci/template/themes/$(THEME_NAME)/ 2>/dev/null || true + $(INSTALL_DIR) $(1)/www/luci-static/resources $(CP) -a ./js/* $(1)/www/luci-static/resources/ 2>/dev/null || true $(INSTALL_DIR) $(1)/etc/config diff --git a/luci-theme-alpha/template/footer.ut b/luci-theme-alpha/template/footer.ut new file mode 100644 index 000000000..888b0e552 --- /dev/null +++ b/luci-theme-alpha/template/footer.ut @@ -0,0 +1,102 @@ +{# + Alpha os is made from me for all .. especially for indo wrt members and fan of OpenWrt or DBAI Community + luci-theme-alpha + Copyright 2024 derisamedia +-#} +{% + import { cursor } from 'uci'; + let uci = cursor(); + let config = uci.get_all("alpha", "theme") || {}; + let icon = {}; + + uci.foreach("alpha", "navbar", function(section) { + let address = section.address; + let icon_url = section.icon; + if (address && icon_url) { + icon_url = replace(icon_url, /^\/www\/luci\-static\/alpha\//, ""); + icon[address] = icon_url; + } + }); + + let navbar_enabled = (config.navbar == "1"); + let num_links = 0; + uci.foreach("alpha", "navbar", function(section) { + if (section.enable == "Enable") { + num_links++; + } + }); + + let link_width = `calc(100% / ${num_links})`; + let background_color = config.color || '#2222359a'; + let blur_value = config.blur || 20; + let link_blur = `blur(${blur_value}px)`; +%} + + + + + + + + + + + + + diff --git a/luci-theme-alpha/template/header.ut b/luci-theme-alpha/template/header.ut new file mode 100644 index 000000000..0c516788c --- /dev/null +++ b/luci-theme-alpha/template/header.ut @@ -0,0 +1,92 @@ +{# + Alpha os is made from me for all .. especially for indo wrt members and fan of OpenWrt or DBAI Community + luci-theme-alpha + Copyright 2022 derisamedia +-#} +{% + import { getuid, getspnam } from 'luci.core'; + + const boardinfo = ubus.call('system', 'board') || {}; + + http.prepare_content("text/html; charset=UTF-8"); +-%} + + + + + + + + + + + + + + +{% if (node?.css): %} + +{% endif %} + + +{{ striptags(`${boardinfo.hostname ?? '?'}${dispatched?.title ? ` - ${_(dispatched.title)}` : ''}`) }} - LuCI +{% if (css): %} + +{% endif %} + + +
+
+
+ +
+
+ Keluar +
+
+ +
+
+
+
+
+
+ +
+ +
+
+
+ {% if (getuid() == 0 && getspnam('root')?.pwdp === '' && join('-', ctx.request_path) != "admin-system-admin-password"): %} +
+

{{ _('No password set!') }}

+

{{ _('There is no password set on this router. Please configure a root password to protect the web interface.') }}

+ {% if (dispatcher.lookup("admin/system/admin")): %} + + {% endif %} +
+ {% endif %} + + {% if (boardinfo.rootfs_type == "initramfs"): %} +
+

{{ _('System running in recovery (initramfs) mode.') }}

+

{{ _('No changes to settings will be stored and are lost after rebooting. This mode should only be used to install a firmware upgrade') }}

+ {% if (dispatcher.lookup("admin/system/flash")): %} + + {% endif %} +
+ {% endif %} + + + diff --git a/luci-theme-alpha/template/sysauth.ut b/luci-theme-alpha/template/sysauth.ut new file mode 100644 index 000000000..a6c3e7307 --- /dev/null +++ b/luci-theme-alpha/template/sysauth.ut @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + Alpha - Login + + + +
+
+
+ + + + +
+
+
+ + + + +
+
+
+
+ +
+
+
+ +