diff options
author | Paul Donald <newtwen@gmail.com> | 2023-12-18 00:22:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-18 00:22:05 +0100 |
commit | c3fc80c92a2ed30214ed039c6189e2c06023117a (patch) | |
tree | 1b3dcdb919b53ca4ee8e12a959e95423c17037c7 /modules/luci-base/htdocs/luci-static/resources | |
parent | 8b651996ff25cff94cf37608d775f0cbf7fd177a (diff) | |
parent | e02df6505f63dc1670a3482750b8d6acb34aaceb (diff) |
Merge pull request #6755 from EvanTheB/modemaster
luci-base: Display 'Access Point' in the wireless page instead of 'Master'
Diffstat (limited to 'modules/luci-base/htdocs/luci-static/resources')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/network.js | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/network.js b/modules/luci-base/htdocs/luci-static/resources/network.js index fc58c3d758..5c48d3c900 100644 --- a/modules/luci-base/htdocs/luci-static/resources/network.js +++ b/modules/luci-base/htdocs/luci-static/resources/network.js @@ -3823,8 +3823,8 @@ WifiNetwork = baseclass.extend(/** @lends LuCI.network.WifiNetwork.prototype */ * Query the current operation mode from runtime information. * * @returns {string} - * Returns the human readable mode name as reported by `ubus` runtime - * state. Possible returned values are: + * Returns the human readable mode name as reported by iwinfo or uci mode. + * Possible returned values are: * - `Master` * - `Ad-Hoc` * - `Client` @@ -3837,13 +3837,13 @@ WifiNetwork = baseclass.extend(/** @lends LuCI.network.WifiNetwork.prototype */ * - `Unknown` */ getActiveMode: function() { - var mode = this.ubus('net', 'iwinfo', 'mode') || this.ubus('net', 'config', 'mode') || this.get('mode') || 'ap'; + var mode = this.ubus('net', 'iwinfo', 'mode') || this.getMode(); switch (mode) { case 'ap': return 'Master'; case 'sta': return 'Client'; case 'adhoc': return 'Ad-Hoc'; - case 'mesh': return 'Mesh'; + case 'mesh': return 'Mesh Point'; case 'monitor': return 'Monitor'; default: return mode; } @@ -3861,12 +3861,17 @@ WifiNetwork = baseclass.extend(/** @lends LuCI.network.WifiNetwork.prototype */ var mode = this.getActiveMode(); switch (mode) { - case 'Master': return _('Master'); - case 'Client': return _('Client'); - case 'Ad-Hoc': return _('Ad-Hoc'); - case 'Mash': return _('Mesh'); - case 'Monitor': return _('Monitor'); - default: return mode; + case 'Master': return _('Access Point'); + case 'Ad-Hoc': return _('Ad-Hoc'); + case 'Client': return _('Client'); + case 'Monitor': return _('Monitor'); + case 'Master(VLAN)': return _('Master (VLAN)'); + case 'WDS': return _('WDS'); + case 'Mesh Point': return _('Mesh Point'); + case 'P2P Client': return _('P2P Client'); + case 'P2P Go': return _('P2P Go'); + case 'Unknown': return _('Unknown'); + default: return mode; } }, |