From 6d30afefad8052362379b1ccfa64ad47073a9236 Mon Sep 17 00:00:00 2001 From: fujr Date: Sat, 5 Apr 2025 14:49:37 +0800 Subject: [PATCH] feat: add disabled features configuration for modems --- .../luasrc/model/cbi/qmodem/modem_cfg.lua | 9 +++ .../luasrc/model/cbi/qmodem/modem_config.lua | 4 ++ luci/luci-app-qmodem/po/template/qmodem.po | 72 +++++++++++++++++++ luci/luci-app-qmodem/po/zh-cn/qmodem.po | 66 +++++++++++++++++ luci/luci-app-qmodem/po/zh_Hans/qmodem.po | 66 +++++++++++++++++ 5 files changed, 217 insertions(+) diff --git a/luci/luci-app-qmodem/luasrc/model/cbi/qmodem/modem_cfg.lua b/luci/luci-app-qmodem/luasrc/model/cbi/qmodem/modem_cfg.lua index 5df326a..131ff78 100644 --- a/luci/luci-app-qmodem/luasrc/model/cbi/qmodem/modem_cfg.lua +++ b/luci/luci-app-qmodem/luasrc/model/cbi/qmodem/modem_cfg.lua @@ -19,5 +19,14 @@ return { qmi = "QMI", ncm = "NCM", rndis = "RNDIS" + }, + disabled_features = { + DialMode = "Dial Mode", + RatPrefer = "Rat Prefer", + IMEI = "Set IMEI", + NeighborCell = "Neighbor Cell", + LockBand = "Lock Band", + RebootModem = "Reboot Modem", + AtDebug = "AT Debug" } } diff --git a/luci/luci-app-qmodem/luasrc/model/cbi/qmodem/modem_config.lua b/luci/luci-app-qmodem/luasrc/model/cbi/qmodem/modem_config.lua index 41ceffd..a2b123d 100644 --- a/luci/luci-app-qmodem/luasrc/model/cbi/qmodem/modem_config.lua +++ b/luci/luci-app-qmodem/luasrc/model/cbi/qmodem/modem_config.lua @@ -93,6 +93,10 @@ populate_options(modes, modem_cfg.modes) enabled = s:option(Flag, "enabled", translate("Enable")) enabled.default = "1" +disabled_features = s:option(DynamicList, "disabled_features", translate("Disabled Features")) +disabled_features.description = translate("Select features to disable for this modem.") +populate_options(disabled_features, modem_cfg.disabled_features) + -- Band Configurations local band_options = { { name = "wcdma_band", label = "WCDMA Band", placeholder = "Enter WCDMA band" }, diff --git a/luci/luci-app-qmodem/po/template/qmodem.po b/luci/luci-app-qmodem/po/template/qmodem.po index db1621e..9fde754 100644 --- a/luci/luci-app-qmodem/po/template/qmodem.po +++ b/luci/luci-app-qmodem/po/template/qmodem.po @@ -677,3 +677,75 @@ msgstr "SA频段配置,例如:1/2/3" msgid "Enter SA band" msgstr "输入SA频段" + +msgid "Modem Config List" +msgstr "模组配置列表" + +msgid "Please Select" +msgstr "请选择" + +msgid "Quectel" +msgstr "移远通信" + +msgid "Simcom" +msgstr "芯讯通" + +msgid "Sierra Wireless" +msgstr "Sierra无线" + +msgid "Fibocom" +msgstr "广和通" + +msgid "LTE" +msgstr "LTE" + +msgid "LTE12" +msgstr "LTE12" + +msgid "Qualcomm" +msgstr "高通" + +msgid "MediaTek" +msgstr "联发科" + +msgid "Unisoc" +msgstr "紫光展锐" + +msgid "Intel" +msgstr "英特尔" + +msgid "ECM" +msgstr "ECM模式" + +msgid "MBIM" +msgstr "MBIM模式" + +msgid "QMI" +msgstr "QMI模式" + +msgid "NCM" +msgstr "NCM模式" + +msgid "RNDIS" +msgstr "RNDIS模式" + +msgid "Dial Mode" +msgstr "拨号模式" + +msgid "Rat Prefer" +msgstr "网络制式优先" + +msgid "Set IMEI" +msgstr "设置IMEI" + +msgid "Neighbor Cell" +msgstr "邻小区信息" + +msgid "Lock Band" +msgstr "锁频段" + +msgid "Reboot Modem" +msgstr "重启调制解调器" + +msgid "AT Debug" +msgstr "AT调试" diff --git a/luci/luci-app-qmodem/po/zh-cn/qmodem.po b/luci/luci-app-qmodem/po/zh-cn/qmodem.po index 68ccb8a..1b6356a 100644 --- a/luci/luci-app-qmodem/po/zh-cn/qmodem.po +++ b/luci/luci-app-qmodem/po/zh-cn/qmodem.po @@ -705,3 +705,69 @@ msgstr "模组配置列表" msgid "Please Select" msgstr "请选择" + +msgid "Quectel" +msgstr "移远通信" + +msgid "Simcom" +msgstr "芯讯通" + +msgid "Sierra Wireless" +msgstr "Sierra无线" + +msgid "Fibocom" +msgstr "广和通" + +msgid "LTE" +msgstr "LTE" + +msgid "LTE12" +msgstr "LTE12" + +msgid "Qualcomm" +msgstr "高通" + +msgid "MediaTek" +msgstr "联发科" + +msgid "Unisoc" +msgstr "紫光展锐" + +msgid "Intel" +msgstr "英特尔" + +msgid "ECM" +msgstr "ECM模式" + +msgid "MBIM" +msgstr "MBIM模式" + +msgid "QMI" +msgstr "QMI模式" + +msgid "NCM" +msgstr "NCM模式" + +msgid "RNDIS" +msgstr "RNDIS模式" + +msgid "Dial Mode" +msgstr "拨号模式" + +msgid "Rat Prefer" +msgstr "网络制式优先" + +msgid "Set IMEI" +msgstr "设置IMEI" + +msgid "Neighbor Cell" +msgstr "邻小区信息" + +msgid "Lock Band" +msgstr "锁频段" + +msgid "Reboot Modem" +msgstr "重启调制解调器" + +msgid "AT Debug" +msgstr "AT调试" diff --git a/luci/luci-app-qmodem/po/zh_Hans/qmodem.po b/luci/luci-app-qmodem/po/zh_Hans/qmodem.po index 68ccb8a..1b6356a 100644 --- a/luci/luci-app-qmodem/po/zh_Hans/qmodem.po +++ b/luci/luci-app-qmodem/po/zh_Hans/qmodem.po @@ -705,3 +705,69 @@ msgstr "模组配置列表" msgid "Please Select" msgstr "请选择" + +msgid "Quectel" +msgstr "移远通信" + +msgid "Simcom" +msgstr "芯讯通" + +msgid "Sierra Wireless" +msgstr "Sierra无线" + +msgid "Fibocom" +msgstr "广和通" + +msgid "LTE" +msgstr "LTE" + +msgid "LTE12" +msgstr "LTE12" + +msgid "Qualcomm" +msgstr "高通" + +msgid "MediaTek" +msgstr "联发科" + +msgid "Unisoc" +msgstr "紫光展锐" + +msgid "Intel" +msgstr "英特尔" + +msgid "ECM" +msgstr "ECM模式" + +msgid "MBIM" +msgstr "MBIM模式" + +msgid "QMI" +msgstr "QMI模式" + +msgid "NCM" +msgstr "NCM模式" + +msgid "RNDIS" +msgstr "RNDIS模式" + +msgid "Dial Mode" +msgstr "拨号模式" + +msgid "Rat Prefer" +msgstr "网络制式优先" + +msgid "Set IMEI" +msgstr "设置IMEI" + +msgid "Neighbor Cell" +msgstr "邻小区信息" + +msgid "Lock Band" +msgstr "锁频段" + +msgid "Reboot Modem" +msgstr "重启调制解调器" + +msgid "AT Debug" +msgstr "AT调试"