Browse Source

add helpText in connectionDialog

les 4 years ago
parent
commit
0475928025
3 changed files with 10 additions and 1 deletions
  1. 3 1
      app/config.js
  2. 3 0
      app/index.html
  3. 4 0
      app/index.js

+ 3 - 1
app/config.js

@@ -10,7 +10,8 @@ window.mumbleWebConfig = {
     'token': true,
     'username': true,
     'password': true,
-    'channelName': false
+    'channelName': false,
+    'helpText': false
   },
   // Default values for user settings
   // You can see your current value by typing `localStorage.getItem('mumble.$setting')` in the web console.
@@ -36,6 +37,7 @@ window.mumbleWebConfig = {
     'joinDialog': false, // replace whole dialog with single "Join Conference" button
     'matrix': false, // enable Matrix Widget support (mostly auto-detected; implies 'joinDialog')
     'avatarurl': '', // download and set the user's Mumble avatar to the image at this URL
+    'helpText': 'Mumble is an open source, low-latency, high quality voice chat software. This is <b>mumble-web</b>, a mumble web client. Need help? Check for <a href="https://wiki.mumble.info/wiki/Main_Page">documentation</a> ',
     // General
     'theme': 'MetroMumbleLight',
     'startMute': false,

+ 3 - 0
app/index.html

@@ -33,6 +33,9 @@
           </div>
           <form data-bind="submit: connect">
             <table>
+                <tr data-bind="if: $root.config.connectDialog.helpText">
+                  <td colspan="2" data-bind="html: helpText"></td>
+                </tr>
                 <tr data-bind="if: $root.config.connectDialog.address">
                   <td id="connect-dialog_input_address">Address</td>
                   <td><input id="address" type="text" data-bind="value: address" required></td>

+ 4 - 0
app/index.js

@@ -117,6 +117,7 @@ function ConnectDialog () {
   self.visible = ko.observable(true)
   self.show = self.visible.bind(self.visible, true)
   self.hide = self.visible.bind(self.visible, false)
+  self.helpText = ko.observable('')
   self.connect = function () {
     self.hide()
     if (ui.detectWebRTC) {
@@ -1109,6 +1110,9 @@ function initializeUI () {
   if (queryParams.channelName) {
     ui.connectDialog.channelName(queryParams.channelName)
   }
+  if (queryParams.helpText) {
+    ui.connectDialog.helpText(queryParams.helpText)
+  }
   if (queryParams.avatarurl) {
     // Download the avatar and upload it to the mumble server when connected
     let url = queryParams.avatarurl