luci-theme-argon
luci-theme-argon copied to clipboard
最新luci snapshot无法正确显示登陆界面
Describe the bug 大约4天前,在最新的snapshot版本luci上使用argon主题是正常的,但是今天更新feeds后,Argon登陆背景无法显示
To Reproduce Steps to reproduce the behavior:
- 更新feeds并编译openwrt snapshot(master分支)
- 安装argon主题
- 访问luci
- 看到以下界面
Expected behavior 显示正常的argon登陆界面
Openwrt (please complete the following information):
- Versiosn: Powered by LuCI Master (git-22.314.85334-0141732 / ArgonTheme v2.2.9.4 / OpenWrt SNAPSHOT r21247+64-2403428c75
- Theme argon
- Version ArgonTheme v2.2.9.4
Desktop (please complete the following information):
- OS: windows11
- Browser: edge/chrome
- Version: latest
Smartphone (please complete the following information):
- Device: MI 8
- OS: android12
- Browser: chrome android
- Version: 108.0.5359.28
Additional context
我以为是我的问题,那没事了
我以为是我的问题,那没事了
目前作者好像是好久不维护了😢你会修这个问题吗?
近期会检查修复
近期会检查修复
感谢作者大大
官方的最新的 openwrt snapshot是么?
官方的最新的 openwrt snapshot是么?
我的是22.03.2
官方的最新的 openwrt snapshot是么?
是的,我的openwrt版本就是当天才pull过并更新过feeds的官方snapshot版本,看样子jkfujr的22.03版本用了和我同版本的luci也有同样的问题。
插个眼
@jerrykuku or @jjm2473 I reproduced here with latest snapshot using base language (English) system. The menus are OK, but the sysauth login page is not working fine, no background at all.
It is completely missing the background, both in desktop and mobile profiles.
For some reason, latest Luci releases are executing /usr/share/ucode/luci/template/sysauth.ut
instead of /usr/lib/lua/luci/view/themes/argon/sysauth.htm
It seems the new approach for OpenWrt going forward is to use js instead of lua in those files, locating them in /usr/share/ucode/luci/template/themes/argon/
instead of in /usr/lib/lua/luci/view/themes/argon/
with a .ut
extension instead of .htm
Maybe it is time to start moving on with js and ucode.
Lua is now being deprecated in OpenWrt. It is still stuck in lua 5.1 and instead of updating it to a newer version, the best option is to move to a lighter language as they explain here. The project has chosen ucode to replace lua. So this allows for a lighter implementation, more similar to js. The change is effective now and old themes using lua will stop working in OpenWrt snapshots.
I really hope you guys could easily port those .htm files to ucode .ut as it is the standard going forward.
@jerrykuku or @jjm2473 I reproduced here with latest snapshot using base language (English) system. The menus are OK, but the sysauth login page is not working fine, no background at all.
It is completely missing the background, both in desktop and mobile profiles.
For some reason, latest Luci releases are executing
/usr/share/ucode/luci/template/sysauth.ut
instead of/usr/lib/lua/luci/view/themes/argon/sysauth.htm
It seems the new approach for OpenWrt going forward is to use js instead of lua in those files, locating them in
/usr/share/ucode/luci/template/themes/argon/
instead of in/usr/lib/lua/luci/view/themes/argon/
with a.ut
extension instead of.htm
Maybe it is time to start moving on with js and ucode.Lua is now being deprecated in OpenWrt. It is still stuck in lua 5.1 and instead of updating it to a newer version, the best option is to move to a lighter language as they explain here. The project has chosen ucode to replace lua. So this allows for a lighter implementation, more similar to js. The change is effective now and old themes using lua will stop working in OpenWrt snapshots.
I really hope you guys could easily port those .htm files to ucode .ut as it is the standard going forward.
Thanks for analysing the issue!
@jerrykuku or @jjm2473 I reproduced here with latest snapshot using base language (English) system. The menus are OK, but the sysauth login page is not working fine, no background at all.
It is completely missing the background, both in desktop and mobile profiles.
For some reason, latest Luci releases are executing
/usr/share/ucode/luci/template/sysauth.ut
instead of/usr/lib/lua/luci/view/themes/argon/sysauth.htm
It seems the new approach for OpenWrt going forward is to use js instead of lua in those files, locating them in
/usr/share/ucode/luci/template/themes/argon/
instead of in/usr/lib/lua/luci/view/themes/argon/
with a.ut
extension instead of.htm
Maybe it is time to start moving on with js and ucode.Lua is now being deprecated in OpenWrt. It is still stuck in lua 5.1 and instead of updating it to a newer version, the best option is to move to a lighter language as they explain here. The project has chosen ucode to replace lua. So this allows for a lighter implementation, more similar to js. The change is effective now and old themes using lua will stop working in OpenWrt snapshots.
I really hope you guys could easily port those .htm files to ucode .ut as it is the standard going forward.
Thanks, I will test it asap.
Hey, @jerrykuku thanks for taking care of this. I am not proficient in node.js, but as far as I know, there is a new template for LuCI themes. for instance, this is the new version of the bootstrap theme.
I see you have other repositories using js, so I hope you could port the Lua code in argon to js without major problems. As far as I see, the code can use any js code, so basically, you can use any js lib on the server side of those ut (code template) files.
I hope this could help you to get to speed with this code rewrite.
Well, after some conversations, it seems that Lua is still supported, but upon errors, it goes to the default ut file. So far LuCI retains by default the capability of using old , this actually is a kind of bug in the Argon theme itself. The shipped sysauth.htm
is rendered but throws a runtime exception, which causes LuCI to fall back to it's builtin default sysauth.ut
.
The issue is within this line:
https://github.com/jerrykuku/luci-theme-argon/blob/master/luasrc/view/themes/argon/sysauth.htm#L132
On 22.03, the global node
variable is not defined which causes the .. ( (node and node.title) and ' - ' .. translate(node.title) or '')
part to be skipped. On current snapshots, node
is defined and refers to the dispatcher's node()
function, leading to a Lua attempt to index a function value exception due to the node.title
expression. After removing the extraneous code which has never been rendered anyway, the theme appears to function normally.
For those willing to make it work right now before @jerrykuku updates the code, you can just open a console to your router by typing ssh [email protected]
(use the IP of your router) in PowerShell or Linux, and in your OpenWrt router CLI type:
sed -i "s/ .. ( (node and node.title) and ' - ' .. translate(node.title) or '')//g" /usr/lib/lua/luci/view/themes/argon/sysauth.htm
新版Luci编译后再次无法正常显示
lua不是用得好好的吗,怎么又要发明一个语言
The objective is to remove lua to reduce even more the space requirements. The goal of OpenWRT is to fit inside the smallest routers as well as larger routers.
22.03.5 进pw卡好一会每次
因为pw还是使用旧版的luci插件框架,数据都是直接后端渲染的
因为pw还是使用旧版的luci插件框架,数据都是直接后端渲染的
问题是pw2也这样
你们的正常显示了么?我是(lede)Powered by LuCI Master (git-23.242.63652-d82d969) / ArgonTheme v1.8.3 / OpenWrt R23.8.23 按照上边issue的方法依旧不显示
你们的正常显示了么?我是(lede)Powered by LuCI Master (git-23.242.63652-d82d969) / ArgonTheme v1.8.3 / OpenWrt R23.8.23 安装上边issue的方法依旧不显示
薛定谔的LEDE
你们的正常显示了么?我是(lede)Powered by LuCI Master (git-23.242.63652-d82d969) / ArgonTheme v1.8.3 / OpenWrt R23.8.23 安装上边issue的方法依旧不显示
薛定谔的LEDE
😭
😭
LEDE和官方master的LuCI分支很难分辨...LEDE的LuCI编译出来也是Powered by LuCI Master ...
建议你看下目前固件的加载动画来区分,18.06的LuCI需要加载完才能继续操作,21.02+则可以在加载的同时操作Web界面.
😭
LEDE和官方master的LuCI分支很难分辨...LEDE的LuCI编译出来也是
Powered by LuCI Master ...
建议你看下目前固件的加载动画来区分,18.06的LuCI需要加载完才能继续操作,21.02+则可以在加载的同时操作Web界面.
我感觉我的像是21.02+以后的版本(以前点开一些界面加载的时候点别的没反应,现在可以直接中断加载切过去了
我感觉我的像是21.02+以后的版本(以前点开一些界面加载的时候点别的没反应,现在可以直接中断加载切过去了
这种加载动画就是18.06的
我感觉我的像是21.02+以后的版本(以前点开一些界面加载的时候点别的没反应,现在可以直接中断加载切过去了
这种加载动画就是18.06的
那没事了(我是18.06
emmm 怪(同时也能同时操作背后的Web界面)
emmm 怪(同时也能同时操作背后的Web界面)
抱歉,我的错;确实可以进行其他操作;21.02+样式不同. 所以,你所述的无法显示登录界面是怎样的情况?
emmm 怪(同时也能同时操作背后的Web界面)
抱歉,我的错;确实可以进行其他操作;21.02+样式不同. 所以,你所述的无法显示登录界面是怎样的情况?
(没事 问题不大)
登录页面的壁纸没法正常显示 我已经添加了 不知道为什么 上边的Issuse有个解决方案我试了一下没有用 就问了一下
请检查下: luci-base luci-compat luci-mod-admin-full 这三个软件包是否均安装,版本是否相同.
都安装了 且版本相同