jerrykuku / luci-theme-argon

Argon is a clean and tidy OpenWrt LuCI theme that allows users to customize their login interface with images or videos. It also supports automatic and manual switching between light and dark modes.
Apache License 2.0
3.85k stars 773 forks source link

Luci-app-diskman 应用 格式化窗口背景没有适配深色模式。 #504

Open Zisbusy opened 1 month ago

Zisbusy commented 1 month ago

Describe the bug Luci-app-diskman 应用 格式化窗口背景没有适配深色模式。 Chrome 125.0.6422.142 OpenWrt v23.05.3 WeChat8e25e3765b2be867a9e924d0ca3b4cd5

Zisbusy commented 1 month ago

[data-page="admin-system-diskman-partition-sdb"] #dialog_format .dialog_box { background-color: #1e1e1e; }

添加这个样式可以解决。

sbwml commented 3 weeks ago

牛逼。够细节的,这样都能发现。

不过从你截图来看,这个估计单靠主题无法改变它的样式,因为它是 CBI 页面,只能从 diskman luci 应用自身来做深色模式兼容

sbwml commented 3 weeks ago

大概这可以这样改

  @media (prefers-color-scheme: dark) {
    #dialog_format .dialog_box {
      background: #222222 !important;
  }

https://github.com/sbwml/openwrt_pkgs/commit/ef5087960ca62152981150c4f1d00deb799ad5a8

image image

Zisbusy commented 3 weeks ago

并不需要添加 @media 样式文件已经有了,https://github.com/Zisbusy/OpenWrt-Auto/blob/main/file/argon/dark.css 替换即可

sbwml commented 3 weeks ago

并不需要添加 @media 样式文件已经有了,https://github.com/Zisbusy/OpenWrt-Auto/blob/main/file/argon/dark.css 替换即可

因为我上面的不是luci-theme-argon 主题 css 内容。反而现在我更好奇的是你是如何让 luci-theme-argon 主题css去改变 ubi 模板样式的。

https://github.com/lisaac/luci-app-diskman/blob/master/applications/luci-app-diskman/luasrc/model/cbi/diskman/partition.lua#L20

https://github.com/lisaac/luci-app-diskman/blob/master/applications/luci-app-diskman/luasrc/view/diskman/partition_info.htm