mirror of
https://github.com/lubosz/overte.git
synced 2025-04-07 15:22:09 +02:00
Merge pull request #546 from kasenvr/fix/domain-threading-defaults
Enable automatic avatar and audio mixer threading defaults
This commit is contained in:
commit
35643e89f1
2 changed files with 67 additions and 15 deletions
|
@ -56,7 +56,7 @@
|
|||
<div class="wizard-step col-md-9 col-centered" style="display: none;">
|
||||
<h4 class="step-title"></h4>
|
||||
<div class="row">
|
||||
<p id="permissions-description" class="col-md-12 step-info"><b>Localhost</b> has been granted administrator privileges to this domain. (Localhost is any</br>user on the same machine as the Vircadia Server)</p>
|
||||
<p id="permissions-description" class="col-md-12 step-info"><b>Localhost</b> has been granted administrator privileges to this domain. (Localhost is any</br>user on the same machine as the Vircadia server)</p>
|
||||
</div>
|
||||
<div id="admin-row" class="row">
|
||||
<p class="col-md-6">
|
||||
|
@ -186,7 +186,37 @@
|
|||
<button type="button" class="btn btn-md btn-block btn-default back-button">Back</button>
|
||||
</dd>
|
||||
<dd class="col-md-3 col-md-offset-6">
|
||||
<button id="save-username-password" type="button" class="btn btn-md btn-block btn-primary">Finish</button>
|
||||
<button id="save-username-password" type="button" class="btn btn-md btn-block btn-primary next-button">Next</button>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<div class="wizard-step col-md-8 col-centered" style="display: none;">
|
||||
<h4 class="step-title"></h4>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<span class='step-description'>
|
||||
Would you like use automatic threading for your server's avatars and audio?
|
||||
If you are hosting this server on your local computer and it is not very powerful, then consider leaving this off because the server will use more resources if it is being utilized extensively, thereby slowing down your computer.
|
||||
If you are running this server on a powerful system and intend to have a large audience, then turn this setting on.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="automatic-threading-options-row" class="row">
|
||||
<p class="col-md-2">
|
||||
<label>
|
||||
<input id="enable-automatic-threading" name="threading-checkbox" type="checkbox" value="true"> Enable Automatic Threading
|
||||
</label>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<dl class="row">
|
||||
<dd class="col-md-3">
|
||||
<button type="button" class="btn btn-md btn-block btn-default back-button">Back</button>
|
||||
</dd>
|
||||
<dd class="col-md-3 col-md-offset-6">
|
||||
<button id="save-threading-settings" type="button" class="btn btn-md btn-block btn-primary">Finish</button>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
@ -201,7 +231,7 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="col-xs-10 col-xs-offset-1">
|
||||
<p id="main-description" class="step-info">You have successfully setup and configured your cloud hosted domain.</p>
|
||||
<p id="main-description" class="step-info">You have successfully setup and configured your Vircadia domain.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -52,10 +52,14 @@ $(document).ready(function(){
|
|||
saveAccessToken();
|
||||
});
|
||||
});
|
||||
|
||||
$('body').on('click', '#save-permissions', function() {
|
||||
savePermissions();
|
||||
});
|
||||
|
||||
$('body').on('click', '#save-permissions', function() {
|
||||
savePermissions();
|
||||
});
|
||||
|
||||
$('body').on('click', '#save-threading-settings', function() {
|
||||
saveThreadingSettings();
|
||||
});
|
||||
|
||||
function triggerSaveUsernamePassword(event) {
|
||||
if (event.keyCode === 13) {
|
||||
|
@ -151,7 +155,7 @@ function setupWizardSteps() {
|
|||
$('#admin-description').html('Add more Metaverse usernames');
|
||||
} else {
|
||||
$('.cloud-only').remove();
|
||||
$('#save-permissions').text("Finish");
|
||||
$('#save-threading-settings').text("Finish");
|
||||
|
||||
steps = $('.wizard-step');
|
||||
$(steps).each(function(i) {
|
||||
|
@ -260,10 +264,6 @@ function goToNextStep() {
|
|||
var currentStep = $('body').find('.wizard-step:visible');
|
||||
var nextStep = currentStep.next('.wizard-step');
|
||||
|
||||
var formJSON = {
|
||||
"wizard": {}
|
||||
}
|
||||
|
||||
if (nextStep.length > 0) {
|
||||
currentStep.hide();
|
||||
nextStep.show();
|
||||
|
@ -521,7 +521,29 @@ function saveUsernamePassword() {
|
|||
$(this).blur();
|
||||
|
||||
// POST the form JSON to the domain-server settings.json endpoint so the settings are saved
|
||||
postSettings(formJSON, function() {
|
||||
location.reload();
|
||||
});
|
||||
postSettings(formJSON, goToNextStep);
|
||||
}
|
||||
|
||||
function saveThreadingSettings() {
|
||||
var enable_automatic_threading = $("#enable-automatic-threading").prop("checked");
|
||||
|
||||
currentStepNumber += 1;
|
||||
|
||||
var formJSON = {
|
||||
"audio_threading": {
|
||||
"auto_threads": enable_automatic_threading
|
||||
},
|
||||
"avatar_mixer": {
|
||||
"auto_threads": enable_automatic_threading
|
||||
},
|
||||
"wizard": {
|
||||
"steps_completed": currentStepNumber.toString()
|
||||
}
|
||||
}
|
||||
|
||||
// remove focus from the button
|
||||
$(this).blur();
|
||||
|
||||
// POST the form JSON to the domain-server settings.json endpoint so the settings are saved
|
||||
postSettings(formJSON, goToNextStep);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue