Add config options to remove fields from Connect dialog
This commit is contained in:
parent
5f2798e78c
commit
ad3669d8bc
|
@ -3,6 +3,14 @@
|
||||||
// configuration options. Use the [config.local.js] file instead!
|
// configuration options. Use the [config.local.js] file instead!
|
||||||
|
|
||||||
window.mumbleWebConfig = {
|
window.mumbleWebConfig = {
|
||||||
|
// Which fields to show on the Connect to Server dialog
|
||||||
|
'connectDialog': {
|
||||||
|
'address': true,
|
||||||
|
'port': true,
|
||||||
|
'token': true,
|
||||||
|
'username': true,
|
||||||
|
'password': true
|
||||||
|
},
|
||||||
// Default values (can be changed by passing a query parameter of the same name)
|
// Default values (can be changed by passing a query parameter of the same name)
|
||||||
'defaults': {
|
'defaults': {
|
||||||
// Connect Dialog
|
// Connect Dialog
|
||||||
|
|
|
@ -31,23 +31,23 @@
|
||||||
</div>
|
</div>
|
||||||
<form data-bind="submit: connect">
|
<form data-bind="submit: connect">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr data-bind="if: $root.config.connectDialog.address">
|
||||||
<td>Address</td>
|
<td>Address</td>
|
||||||
<td><input id="address" type="text" data-bind="value: address" required></td>
|
<td><input id="address" type="text" data-bind="value: address" required></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr data-bind="if: $root.config.connectDialog.port">
|
||||||
<td>Port</td>
|
<td>Port</td>
|
||||||
<td><input id="port" type="text" data-bind="value: port" required></td>
|
<td><input id="port" type="text" data-bind="value: port" required></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr data-bind="if: $root.config.connectDialog.token">
|
||||||
<td>Token</td>
|
<td>Token</td>
|
||||||
<td><input id="token" type="text" data-bind="value: token"></td>
|
<td><input id="token" type="text" data-bind="value: token"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr data-bind="if: $root.config.connectDialog.username">
|
||||||
<td>Username</td>
|
<td>Username</td>
|
||||||
<td><input id="username" type="text" data-bind="value: username" required></td>
|
<td><input id="username" type="text" data-bind="value: username" required></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr data-bind="if: $root.config.connectDialog.password">
|
||||||
<td>Password</td>
|
<td>Password</td>
|
||||||
<td><input id="password" type="password" data-bind="value: password"></td>
|
<td><input id="password" type="password" data-bind="value: password"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -260,7 +260,8 @@ class Settings {
|
||||||
}
|
}
|
||||||
|
|
||||||
class GlobalBindings {
|
class GlobalBindings {
|
||||||
constructor () {
|
constructor (config) {
|
||||||
|
this.config = config
|
||||||
this.settings = new Settings()
|
this.settings = new Settings()
|
||||||
this.connector = new WorkerBasedMumbleConnector()
|
this.connector = new WorkerBasedMumbleConnector()
|
||||||
this.client = null
|
this.client = null
|
||||||
|
@ -860,7 +861,7 @@ class GlobalBindings {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var ui = new GlobalBindings()
|
var ui = new GlobalBindings(window.mumbleWebConfig)
|
||||||
|
|
||||||
// Used only for debugging
|
// Used only for debugging
|
||||||
window.mumbleUi = ui
|
window.mumbleUi = ui
|
||||||
|
|
Loading…
Reference in a new issue