Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 8530f4e1 rédigé par Kubat's avatar Kubat
Parcourir les fichiers

Also place radio buttons inside templates

parent d0c4ae7f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!11Work done on the instance side of Amadeus
......@@ -13,74 +13,41 @@
<form>
<h3>Running processes</h3>
<p>Here is a list of related processes that may run. The box is checked when the process is running.</p>
<%- include('settingsCheckBox.ejs', {id: 'running-lektord', name: 'Lektord', disable: true}); %>
<%- include('settingsCheckBox.ejs', {id: 'running-klkt', name: 'Klkt', disable: true}); %>
<%- include('settings/checkBox.ejs', {id: 'running-lektord', name: 'Lektord', disable: true}); %>
<%- include('settings/checkBox.ejs', {id: 'running-klkt', name: 'Klkt', disable: true}); %>
<hr />
<h3>Lektord settings</h3>
<p>Configure which lektord to use or if 'attach' mode is enabled.</p>
<%- include('settingsInput.ejs', {id: 'inputHost', name: 'Host', type: 'text'}); %>
<%- include('settingsInput.ejs', {id: 'inputPort', name: 'Port', type: 'int'}); %>
<%- include('settingsCheckBox.ejs', {id: 'inputAttachMode', name: 'Attach mode', label: 'Enable attach mode'}); %>
<%- include('settings/input.ejs', {id: 'inputHost', name: 'Host', type: 'text'}); %>
<%- include('settings/input.ejs', {id: 'inputPort', name: 'Port', type: 'int'}); %>
<%- include('settings/checkBox.ejs', {id: 'inputAttachMode', name: 'Attach mode', label: 'Enable attach mode'}); %>
<hr />
<h3>Client interface settings</h3>
<p>Express server settings for the client interface.</p>
<%- include('settingsInput.ejs', {id: 'inputClientPort', name: 'Port', type: 'int'}); %>
<%- include('settings/input.ejs', {id: 'inputClientPort', name: 'Port', type: 'int'}); %>
<hr />
<h3>Database settings</h3>
<p>Which database to use, and other options.</p>
<%- include('settingsInput.ejs', {id: 'inputDbPath', name: 'Database', type: 'text'}); %>
<%- include('settings/input.ejs', {id: 'inputDbPath', name: 'Database', type: 'text'}); %>
<hr />
<h3>Kurisu settings</h3>
<p>Where to find Kurisu.</p>
<%- include('settingsInput.ejs', {id: 'inputKurisuUrl', name: 'URL', type: 'text'}); %>
<%- include('settings/input.ejs', {id: 'inputKurisuUrl', name: 'URL', type: 'text'}); %>
<hr />
<h3>Log settings</h3>
<p>Log options, this is a developper section.</p>
<fieldset class="form-group">
<div class="row">
<legend class="col-form-label col-sm-2 pt-0">Log level</legend>
<div class="col-sm-10" id="inputLogLevel">
<div class="form-check">
<input class="form-check-input" type="radio" name="gridRadios" id="logERROR" value="ERROR" checked />
<label class="form-check-label" for="logERROR">Error</label>
</div>
<div class="form-check">
<input
class="form-check-input"
type="radio"
name="gridRadios"
id="logWARNING"
value="WARNING"
/>
<label class="form-check-label" for="logWARNING">Warning</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="gridRadios" id="logINFO" value="INFO" />
<label class="form-check-label" for="logINFO">Info</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="gridRadios" id="logDEBUG" value="DEBUG" />
<label class="form-check-label" for="logDEBUG">Debug</label>
</div>
</div>
</div>
</fieldset>
<div class="form-group row">
<div class="col-sm-2">Lektord logs</div>
<div class="col-sm-10">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="inputLogLektord" />
<label class="form-check-label" for="inputLogLektord">
Enable lektord logs when possible
</label>
</div>
</div>
</div>
<%- include('settings/radioButtons.ejs', {id: 'inputLogLevel', name: 'Log level', buttons: [
{name: 'Error', value: 'ERROR', id: 'logERROR', checked: true},
{name: 'Warning', value: 'WARNING', id: 'logWARNING'},
{name: 'Info', value: 'INFO', id: 'logINFO'},
{name: 'Debug', value: 'DEBUG', id: 'logDEBUG'}
]}); %>
<%- include('settings/checkBox.ejs', {id: 'inputLogLektord', name: 'Lektord logs', label: 'Enable lektord logs when possible'}); %>
</form>
</div>
<div class="modal-footer"> For changes to be applied you need to restart Amadeus. </div>
......
Fichier déplacé
Fichier déplacé
<%# vim: ts=4 syntax=html
The template for radio settings %>
<fieldset class="form-group">
<div class="row">
<legend class="col-form-label col-sm-2 pt-0"><%= name %></legend>
<div class="col-sm-10" id="<%= id %>">
<% buttons.forEach(function(btn) { %>
<div class="form-check">
<input class="form-check-input" type="radio" name="gridRadios" id="<%= btn.id %>" value="<%= btn.value %>" <% if (typeof btn.checked != 'undefined' && btn.checked) { %> checked <% } %> />
<label class="form-check-label" for="<%= btn.id %>"><%= btn.name %></label>
</div>
<% }); %>
</div>
</div>
</fieldset>
......@@ -78,7 +78,7 @@ function createInstanceWindow() {
win = new BrowserWindow({
width: 1280,
height: 720,
minWidth: 1200,
minWidth: 1000,
minHeight: 360,
hasShadow: false,
frame: false,
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter