|
1 | | -<div id="settings_plugin_netconnectd_dialog" data-bind="allowBindings: true" class="scrollable" style="padding-bottom:2em; overflow-y: auto; height: calc(100vh - 100px);"> |
| 1 | +<div id="settings_plugin_netconnectd_dialog" data-bind="allowBindings: true" class="scrollable" |
| 2 | + style="padding-bottom:2em; overflow-y: auto; height: calc(100vh - 100px);"> |
2 | 3 | <h3>{{ _('Network Connection') }}</h3> |
3 | 4 |
|
4 | 5 | <p> |
|
7 | 8 | <p> |
8 | 9 | <strong>{{ _('Wifi') }}:</strong> <span data-bind="text: connectionStateTextWifi"></span> |
9 | 10 | </p> |
10 | | - <div class="control-group"> |
11 | | - <label class="control-labelt"><strong>Country</strong></label> |
12 | | - <div class="controls"> |
13 | | - <select data-bind="options: countries, |
14 | | - optionsText: 'country', |
15 | | - optionsValue: 'code', |
16 | | - optionsCaption: 'Select Country...', |
17 | | - value: country, |
18 | | - event: {change: selectedValueChanged}"> |
19 | | - </select> |
20 | | - </div> |
21 | | - </div> |
22 | 11 | <div class="pull-right" data-bind="visible: enableQualitySorting"> |
23 | 12 | <small> |
24 | | - {{ _('Sort by') }}: <a href="#" data-bind="click: function() { listHelper.changeSorting('ssid'); }">{{ _('SSID') }} ({{ _('ascending') }})</a> | <a href="#" data-bind="click: function() { listHelper.changeSorting('quality'); }">{{ _('Quality') }} ({{ _('descending') }})</a> |
| 13 | + {{ _('Sort by') }}: <a href="#" |
| 14 | + data-bind="click: function() { listHelper.changeSorting('ssid'); }">{{ _('SSID') }} |
| 15 | + ({{ _('ascending') }})</a> | <a href="#" |
| 16 | + data-bind="click: function() { listHelper.changeSorting('quality'); }">{{ _('Quality') }} |
| 17 | + ({{ _('descending') }})</a> |
25 | 18 | </small> |
26 | 19 | </div> |
27 | 20 | <table class="table table-striped table-hover table-condensed table-hover" id="settings_plugin_netconnectd_wifis"> |
28 | 21 | <thead> |
29 | 22 | <tr> |
30 | 23 | <th class="settings_plugin_netconnectd_wifis_ssid">{{ _('SSID') }}</th> |
31 | | - <th class="settings_plugin_netconnectd_wifis_quality" data-bind="visible: enableQualitySorting">{{ _('Quality') }}</th> |
| 24 | + <th class="settings_plugin_netconnectd_wifis_quality" |
| 25 | + data-bind="visible: enableQualitySorting">{{ _('Quality') }}</th> |
32 | 26 | <th class="settings_plugin_netconnectd_wifis_action">{{ _('Action') }}</th> |
33 | 27 | </tr> |
34 | 28 | </thead> |
35 | 29 | <tbody data-bind="foreach: listHelper.paginatedItems"> |
36 | | - <tr data-bind="attr: {title: name}"> |
37 | | - <td class="settings_plugin_netconnectd_wifis_ssid"><span class="icon-lock" data-bind="invisible: !encrypted"></span> <span data-bind="text: ssid"></span> <small class="muted">({{ _('Address') }}: <span data-bind="text: address"></span>)</small></td> |
38 | | - <td class="settings_plugin_netconnectd_wifis_quality" data-bind="visible: $root.enableQualitySorting, text: qualityText"></td> |
39 | | - <td class="settings_plugin_netconnectd_wifis_action"> |
40 | | - <button class="btn btn-small" data-bind="click: function() { $parent.configureWifi($data); }, css: {disabled: !$root.loginState.isUser() || $root.working() || $root.error() || $root.getEntryId($data) == $root.statusCurrentWifi()}"><i class="icon-spinner icon-spin" data-bind="visible: $root.working"></i><i class="icon-signin" data-bind="visible: !$root.working()"></i> {{ _('Connect') }}</button> |
41 | | - </td> |
42 | | - </tr> |
| 30 | + <tr data-bind="attr: {title: name}"> |
| 31 | + <td class="settings_plugin_netconnectd_wifis_ssid"><span class="icon-lock" |
| 32 | + data-bind="invisible: !encrypted"></span> <span |
| 33 | + data-bind="text: ssid"></span> <small class="muted">({{ _('Address') }}: <span |
| 34 | + data-bind="text: address"></span>)</small></td> |
| 35 | + <td class="settings_plugin_netconnectd_wifis_quality" |
| 36 | + data-bind="visible: $root.enableQualitySorting"> |
| 37 | + <div data-bind="css: $root.signalQuality(quality)" class="signal-bars mt1 sizing-box"> |
| 38 | + <div class="first-bar bar"></div> |
| 39 | + <div class="second-bar bar"></div> |
| 40 | + <div class="third-bar bar"></div> |
| 41 | + <div class="fourth-bar bar"></div> |
| 42 | + <div class="fifth-bar bar"></div> |
| 43 | + </div> |
| 44 | + </td> |
| 45 | + <td class="settings_plugin_netconnectd_wifis_action"> |
| 46 | + <button class="btn btn-small" |
| 47 | + data-bind="click: function() { $parent.configureWifi($data); }, css: {disabled: !$root.loginState.isUser() || $root.working() || $root.error() || $root.getEntryId($data) == $root.statusCurrentWifi()}"> |
| 48 | + <i class="icon-spinner icon-spin" data-bind="visible: $root.working"></i><i class="icon-signin" |
| 49 | + data-bind="visible: !$root.working()"></i> {{ _('Connect') }} |
| 50 | + </button> |
| 51 | + </td> |
| 52 | + </tr> |
43 | 53 | </tbody> |
44 | 54 | </table> |
45 | 55 | <div class="pagination pagination-mini pagination-centered"> |
|
50 | 60 | </ul> |
51 | 61 | <ul data-bind="foreach: listHelper.pages"> |
52 | 62 | <li data-bind="css: { active: $data.number === $root.listHelper.currentPage(), disabled: $data.number === -1 }"> |
53 | | - <a href="#" data-bind="text: $data.text, click: function() { $root.listHelper.changePage($data.number); }"></a> |
| 63 | + <a href="#" |
| 64 | + data-bind="text: $data.text, click: function() { $root.listHelper.changePage($data.number); }"></a> |
54 | 65 | </li> |
55 | 66 | </ul> |
56 | 67 | <ul> |
|
60 | 71 | </ul> |
61 | 72 | </div> |
62 | 73 |
|
63 | | - <button class="btn btn-primary btn-block" data-bind="click: function() { $root.refresh() }, enable: $root.daemonOnline() && $root.status.wifi.present()">{{ _('Refresh') }}</button> |
| 74 | + <button class="btn btn-primary btn-block" |
| 75 | + data-bind="click: function() { $root.refresh() }, enable: $root.daemonOnline() && $root.status.wifi.present()">{{ _('Refresh') }}</button> |
64 | 76 |
|
65 | 77 | <div> |
66 | | - <small class="muted">{{ _('netconnectd socket') }}: <span data-bind="text: settings.plugins.netconnectd.socket"></span></small> |
| 78 | + <small class="muted">{{ _('netconnectd socket') }}: <span |
| 79 | + data-bind="text: settings.plugins.netconnectd.socket"></span></small> |
67 | 80 | </div> |
68 | 81 |
|
69 | 82 | <div> |
70 | | - <div><small><a href="#" class="muted" onclick="$(this).children().toggleClass('icon-caret-right icon-caret-down').parent().parent().parent().next().slideToggle('fast')"><i class="icon-caret-right"></i> {{ _('Advanced options') }}</a></small></div> |
71 | | - <div class="hide row-fluid"> |
72 | | - <button class="btn span6" data-bind="click: function() { if ($root.apRunning()) { $root.sendStopAp(); } else { $root.sendStartAp(); } }, enable: $root.daemonOnline()"><span data-bind="visible: !$root.apRunning() && $root.daemonOnline()">{{ _('Start AP') }}</span><span data-bind="visible: $root.apRunning() && $root.daemonOnline()">{{ _('Stop AP') }}</span><span data-bind="visible: !$root.daemonOnline()">{{ _('Daemon offline') }}</span></button> |
73 | | - <button class="btn span6" data-bind="click: function() { $root.sendReset() }, enable: $root.daemonOnline()">{{ _('Reset daemon') }}</button> |
| 83 | + <div><small><a href="#" class="muted" |
| 84 | + onclick="$(this).children().toggleClass('icon-caret-right icon-caret-down').parent().parent().parent().next().slideToggle('fast')"><i |
| 85 | + class="icon-caret-right"></i> {{ _('Advanced options') }}</a></small></div> |
| 86 | + <div class="hide"> |
| 87 | + <div class="row-fluid" data-bind="visible: $root.countries().length != 0"> |
| 88 | + <div class="control-group"> |
| 89 | + <label class="control-labelt"><strong>Country</strong></label> |
| 90 | + <div class="controls"> |
| 91 | + <select data-bind="options: countries, |
| 92 | + optionsText: 'country', |
| 93 | + optionsValue: 'code', |
| 94 | + optionsCaption: 'Select Country...', |
| 95 | + value: country, |
| 96 | + event: {change: selectedValueChanged}"> |
| 97 | + </select> |
| 98 | + </div> |
| 99 | + </div> |
| 100 | + </div> |
| 101 | + <div class="row-fluid"> |
| 102 | + <button class="btn span6" |
| 103 | + data-bind="click: function() { if ($root.apRunning()) { $root.sendStopAp(); } else { $root.sendStartAp(); } }, enable: $root.daemonOnline()"> |
| 104 | + <span data-bind="visible: !$root.apRunning() && $root.daemonOnline()">{{ _('Start AP') }}</span><span |
| 105 | + data-bind="visible: $root.apRunning() && $root.daemonOnline()">{{ _('Stop AP') }}</span><span |
| 106 | + data-bind="visible: !$root.daemonOnline()">{{ _('Daemon offline') }}</span></button> |
| 107 | + <button class="btn span6" |
| 108 | + data-bind="click: function() { $root.sendReset() }, enable: $root.daemonOnline()">{{ _('Reset daemon') }}</button> |
| 109 | + </div> |
74 | 110 | </div> |
75 | 111 | </div> |
76 | 112 |
|
|
81 | 117 | </div> |
82 | 118 | <div class="modal-body"> |
83 | 119 | <form class="form-horizontal"> |
84 | | - <div class="control-group" data-bind="css: {success: $root.editorWifiPassphrase2() && !$root.editorWifiPassphraseMismatch()}"> |
85 | | - <label class="control-label" for="settings_plugin_netconnectd_wificonfig_passphrase1">{{ _('Password') }}</label> |
| 120 | + <div class="control-group" |
| 121 | + data-bind="css: {success: $root.editorWifiPassphrase2() && !$root.editorWifiPassphraseMismatch()}"> |
| 122 | + <label class="control-label" |
| 123 | + for="settings_plugin_netconnectd_wificonfig_passphrase1">{{ _('Password') }}</label> |
86 | 124 | <div class="controls"> |
87 | | - <input type="password" class="input-block-level" id="settings_plugin_netconnectd_wificonfig_passphrase1" data-bind="value: $root.editorWifiPassphrase1, valueUpdate: 'input'" required> |
| 125 | + <input type="password" class="input-block-level" |
| 126 | + id="settings_plugin_netconnectd_wificonfig_passphrase1" |
| 127 | + data-bind="value: $root.editorWifiPassphrase1, valueUpdate: 'input'" required> |
88 | 128 | </div> |
89 | 129 | </div> |
90 | | - <div class="control-group" data-bind="css: {success: $root.editorWifiPassphrase2() && !$root.editorWifiPassphraseMismatch(), error: $root.editorWifiPassphrase2() && $root.editorWifiPassphraseMismatch()}"> |
91 | | - <label class="control-label" for="settings_plugin_netconnectd_wificonfig_passphrase2">{{ _('Repeat Password') }}</label> |
| 130 | + <div class="control-group" |
| 131 | + data-bind="css: {success: $root.editorWifiPassphrase2() && !$root.editorWifiPassphraseMismatch(), error: $root.editorWifiPassphrase2() && $root.editorWifiPassphraseMismatch()}"> |
| 132 | + <label class="control-label" |
| 133 | + for="settings_plugin_netconnectd_wificonfig_passphrase2">{{ _('Repeat Password') }}</label> |
92 | 134 | <div class="controls"> |
93 | | - <input type="password" class="input-block-level" id="settings_plugin_netconnectd_wificonfig_passphrase2" data-bind="value: $root.editorWifiPassphrase2, valueUpdate: 'input'" required> |
94 | | - <span class="help-inline" data-bind="visible: $root.editorWifiPassphrase2() && $root.editorWifiPassphraseMismatch()">{{ _('Passwords do not match') }}</span> |
| 135 | + <input type="password" class="input-block-level" |
| 136 | + id="settings_plugin_netconnectd_wificonfig_passphrase2" |
| 137 | + data-bind="value: $root.editorWifiPassphrase2, valueUpdate: 'input'" required> |
| 138 | + <span class="help-inline" |
| 139 | + data-bind="visible: $root.editorWifiPassphrase2() && $root.editorWifiPassphraseMismatch()">{{ _('Passwords do not match') }}</span> |
95 | 140 | </div> |
96 | 141 | </div> |
97 | 142 | </form> |
98 | 143 | </div> |
99 | 144 | <div class="modal-footer"> |
100 | | - <button class="btn" data-dismiss="modal" data-bind="enable: !$root.working() && !$root.error()" aria-hidden="true">{{ _('Abort') }}</button> |
101 | | - <button class="btn btn-primary" data-bind="click: function() { $root.confirmWifiConfiguration(); }, enable: !$root.editorWifiPassphraseMismatch() && !$root.working() && !$root.error()"><i class="icon-spinner icon-spin" data-bind="visible: working"></i> {{ _('Confirm') }}</button> |
| 145 | + <button class="btn" data-dismiss="modal" data-bind="enable: !$root.working() && !$root.error()" |
| 146 | + aria-hidden="true">{{ _('Abort') }}</button> |
| 147 | + <button class="btn btn-primary" |
| 148 | + data-bind="click: function() { $root.confirmWifiConfiguration(); }, enable: !$root.editorWifiPassphraseMismatch() && !$root.working() && !$root.error()"> |
| 149 | + <i class="icon-spinner icon-spin" data-bind="visible: working"></i> {{ _('Confirm') }}</button> |
102 | 150 | </div> |
103 | 151 | </div> |
104 | 152 | </div> |
0 commit comments