75 lines
3.3 KiB
Plaintext
75 lines
3.3 KiB
Plaintext
<% for (const service in config.services) { -%>
|
|
<section class="option-block" id="<%= service %>_page">
|
|
<div class="some-block option-block">
|
|
<h1 data-localise="__MSG_<%= service %>__"><%= config.services[service].name %></h1>
|
|
</div>
|
|
<hr />
|
|
<div class="some-block option-block">
|
|
<h4 data-localise="__MSG_enable__">Enable</h4>
|
|
<input id="<%= service %>-enabled" type="checkbox" />
|
|
</div>
|
|
<div class="some-block option-block">
|
|
<h4 data-localise="__MSG_show_in_popup__">Show in Popup</h4>
|
|
<input id="<%= service %>" type="checkbox" />
|
|
</div>
|
|
<% if (Object.keys(config.services[service].frontends).length> 1) { %>
|
|
<div class="some-block option-block">
|
|
<h4 data-localise="__MSG_frontend__">Frontend</h4>
|
|
<select id="<%= service %>-frontend">
|
|
<% for (const frontend in config.services[service].frontends) { -%>
|
|
<option value="<%= frontend %>"><%= config.services[service].frontends[frontend].name %></option>
|
|
<% } %>
|
|
</select>
|
|
</div>
|
|
<% if (config.services[service].embeddable) { _%>
|
|
<div class="some-block option-block">
|
|
<h4 data-localise="__MSG_embed_frontend__">Embed Frontend</h4>
|
|
<select id="<%= service %>-embedFrontend">
|
|
<% for (const frontend in config.services[service].frontends) { -%> <% if (config.services[service].frontends[frontend].embeddable) { _%>
|
|
<option value="<%= frontend %>"><%= config.services[service].frontends[frontend].name %></option>
|
|
<% } _%> <% } %>
|
|
</select>
|
|
</div>
|
|
<% } _%> <% } _%> <% if (config.services[service].embeddable) { _%>
|
|
<div class="some-block option-block">
|
|
<h4 data-localise="__MSG_redirectType__">Redirect Type</h4>
|
|
<select id="<%= service %>-redirectType">
|
|
<option value="both" data-localise="__MSG_both__">both</option>
|
|
<option value="sub_frame" data-localise="__MSG_onlyEmbedded__">Only Embedded</option>
|
|
<option value="main_frame" data-localise="__MSG_onlyNotEmbedded__">Only Not Embedded</option>
|
|
</select>
|
|
</div>
|
|
<% } _%>
|
|
<hr />
|
|
<% for (const frontend in config.services[service].frontends) { -%> <% if (config.services[service].frontends[frontend].instanceList) { _%>
|
|
<div id="<%= frontend %>">
|
|
<% for (const network in config.networks) { -%>
|
|
<div class="<%= network %>">
|
|
<div class="some-block option-block">
|
|
<h4 data-localise="__MSG_defaultInstances__">Default Instances</h4>
|
|
</div>
|
|
<div class="checklist"></div>
|
|
<hr />
|
|
<div class="some-block option-block">
|
|
<h4 data-localise="__MSG_customInstances__">Custom Instances</h4>
|
|
</div>
|
|
<form class="custom-instance-form">
|
|
<div class="some-block option-block">
|
|
<input class="custom-instance" placeholder="http://<%= frontend %>.<%= config.networks[network].tld %>" type="url" />
|
|
<button class="add add-instance" type="submit">
|
|
<svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor">
|
|
<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
</form>
|
|
<div class="checklist custom-checklist"></div>
|
|
<% if (network=="clearnet" ) { _%>
|
|
<% } _%>
|
|
</div>
|
|
<% } %>
|
|
</div>
|
|
<% } _%> <% } %>
|
|
</section>
|
|
<% } %>
|
|
<script type="module" src="./widgets/services.js"></script> |