gluon-web-wifi-config, gluon-web-private-wifi: hide pages on devices without WLAN

Fixes: #2311
This commit is contained in:
Matthias Schiffer 2021-09-13 17:47:38 +02:00
parent 5f1f960753
commit a40a89d906
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,8 @@
local uci = require("simple-uci").cursor()
local wireless = require 'gluon.wireless'
package 'gluon-web-private-wifi' package 'gluon-web-private-wifi'
entry({"admin", "privatewifi"}, model("admin/privatewifi"), _("Private WLAN"), 30) if wireless.device_uses_wlan(uci) then
entry({"admin", "privatewifi"}, model("admin/privatewifi"), _("Private WLAN"), 30)
end

View File

@ -1,3 +1,8 @@
local uci = require("simple-uci").cursor()
local wireless = require 'gluon.wireless'
package 'gluon-web-wifi-config' package 'gluon-web-wifi-config'
entry({"admin", "wifi-config"}, model("admin/wifi-config"), _("WLAN"), 20) if wireless.device_uses_wlan(uci) then
entry({"admin", "wifi-config"}, model("admin/wifi-config"), _("WLAN"), 20)
end