mirror of
https://github.com/Screenly/Anthias.git
synced 2026-01-23 05:28:18 -05:00
321 lines
17 KiB
HTML
321 lines
17 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block head %}
|
|
<script src="{{ url_for('static', filename='js/popper.min.js') }}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script> <!-- needs jquery -->
|
|
<script src="{{ url_for('static', filename='js/jquery-ui-1.10.1.custom.min.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='js/jquery.fileupload.js') }}"></script> <!-- needs jqueryui.widget -->
|
|
<script src="{{ url_for('static', filename='js/bootstrap-datepicker.js') }}"></script>
|
|
|
|
<script src="{{ url_for('static', filename='js/settings.js') }}"></script>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container">
|
|
<div class="row py-2">
|
|
<div class="col-12">
|
|
<h4 class="page-header text-white">
|
|
<b>Settings</b>
|
|
</h4>
|
|
</div>
|
|
</div>
|
|
<div class="row content px-3">
|
|
<div class="col-12 my-3">
|
|
{% if context.flash %}
|
|
<div class="alert alert-{{ context.flash['class'] }}">
|
|
{{ context.flash['message'] }}
|
|
</div>
|
|
{% endif %}
|
|
<form method="post" class="row">
|
|
<div class="form-group col-6 d-flex flex-column justify-content-between">
|
|
<div class="form-group">
|
|
<label class="small text-secondary">Player name</label>
|
|
<input class="form-control" name="player_name" type="text"
|
|
value="{{ context.player_name }}">
|
|
</div>
|
|
<div class="row">
|
|
<div class="form-group col-6">
|
|
<label class="small text-secondary">Default duration (seconds)</label>
|
|
<input class="form-control" name="default_duration" type="number"
|
|
value="{{ context.default_duration }}"/>
|
|
</div>
|
|
<div class="form-group col-6">
|
|
<label class="small text-secondary">Default streaming duration (seconds)</label>
|
|
<input class="form-control" name="default_streaming_duration" type="number"
|
|
value="{{ context.default_streaming_duration }}"/>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="small text-secondary">Audio output</label>
|
|
<select class="form-control" name="audio_output">
|
|
{% if context.audio_output == 'hdmi' %}
|
|
<option value="hdmi" selected="selected">HDMI</option>
|
|
<option value="local">3.5mm jack</option>
|
|
{% else %}
|
|
<option value="hdmi">HDMI</option>
|
|
<option value="local" selected="selected">3.5mm jack</option>
|
|
{% endif %}
|
|
</select>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="small text-secondary">Date format</label>
|
|
<select class="form-control" name="date_format">
|
|
<option value="mm/dd/yyyy"
|
|
{% if context.date_format == 'mm/dd/yyyy' %} selected="selected" {% endif %}>
|
|
month/day/year
|
|
</option>
|
|
<option value="dd/mm/yyyy"
|
|
{% if context.date_format == 'dd/mm/yyyy' %} selected="selected" {% endif %}>
|
|
day/month/year
|
|
</option>
|
|
<option value="yyyy/mm/dd"
|
|
{% if context.date_format == 'yyyy/mm/dd' %} selected="selected" {% endif %}>
|
|
year/month/day
|
|
</option>
|
|
<option value="mm-dd-yyyy"
|
|
{% if context.date_format == 'mm-dd-yyyy' %} selected="selected" {% endif %}>
|
|
month-day-year
|
|
</option>
|
|
<option value="dd-mm-yyyy"
|
|
{% if context.date_format == 'dd-mm-yyyy' %} selected="selected" {% endif %}>
|
|
day-month-year
|
|
</option>
|
|
<option value="yyyy-mm-dd"
|
|
{% if context.date_format == 'yyyy-mm-dd' %} selected="selected" {% endif %}>
|
|
year-month-day
|
|
</option>
|
|
<option value="mm.dd.yyyy"
|
|
{% if context.date_format == 'mm.dd.yyyy' %} selected="selected" {% endif %}>
|
|
month.day.year
|
|
</option>
|
|
<option value="dd.mm.yyyy"
|
|
{% if context.date_format == 'dd.mm.yyyy' %} selected="selected" {% endif %}>
|
|
day.month.year
|
|
</option>
|
|
<option value="yyyy.mm.dd"
|
|
{% if context.date_format == 'yyyy.mm.dd' %} selected="selected" {% endif %}>
|
|
year.month.day
|
|
</option>
|
|
</select>
|
|
</div>
|
|
<div class="form-group mb-0">
|
|
<label class="small text-secondary">Authentication</label>
|
|
<select class="form-control" id="auth_backend" name="auth_backend">
|
|
{% for opt in context.auth_backends %}
|
|
<option value="{{ opt.name }}" {{ opt.selected }}>{{ opt.text }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
{% if context.need_current_password %}
|
|
<div class="form-group" id="curpassword_group">
|
|
<label class="small text-secondary">Current Password</label>
|
|
<input class="form-control" name="current-password" type="password" value="">
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% for backend in context.auth_backends %}
|
|
{% if backend.template %}
|
|
<div id="auth_backend-{{ backend.name }}">
|
|
{% include backend.template %}
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<div class="form-group col-6 d-flex flex-column justify-content-start">
|
|
<div class="form-inline mt-4">
|
|
<label>Show splash screen</label>
|
|
<div class="ml-auto">
|
|
<label id="splash_checkbox"
|
|
class="is_enabled-toggle toggle switch-light switch-material small m-0">
|
|
{% if context.show_splash %}
|
|
<input name="show_splash" checked="checked" type="checkbox"/>
|
|
{% else %}
|
|
<input name="show_splash" type="checkbox"/>
|
|
{% endif %}
|
|
<span><span></span><span></span><a></a></span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<div class="form-inline mt-4">
|
|
<label>Default assets</label>
|
|
<div class="ml-auto">
|
|
<label id="default_assets_checkbox"
|
|
class="is_enabled-toggle toggle switch-light switch-material small m-0">
|
|
{% if context.default_assets %}
|
|
<input name="default_assets" checked="checked" type="checkbox"/>
|
|
{% else %}
|
|
<input name="default_assets" type="checkbox"/>
|
|
{% endif %}
|
|
<span><span></span><span></span><a></a></span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<div class="form-inline mt-4">
|
|
<label>Shuffle playlist</label>
|
|
<div class="ml-auto">
|
|
<label id="shuffle_checkbox"
|
|
class="is_enabled-toggle toggle switch-light switch-material small m-0">
|
|
{% if context.shuffle_playlist %}
|
|
<input name="shuffle_playlist" checked="checked" type="checkbox"/>
|
|
{% else %}
|
|
<input name="shuffle_playlist" type="checkbox"/>
|
|
{% endif %}
|
|
<span><span></span><span></span><a></a></span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<div class="form-inline mt-4">
|
|
<label>Use 24-hour clock</label>
|
|
<div class="ml-auto">
|
|
<label id="use_24_hour_clock_checkbox"
|
|
class="is_enabled-toggle toggle switch-light switch-material small m-0">
|
|
{% if context.use_24_hour_clock %}
|
|
<input name="use_24_hour_clock" checked="checked" type="checkbox"/>
|
|
{% else %}
|
|
<input name="use_24_hour_clock" type="checkbox"/>
|
|
{% endif %}
|
|
<span><span></span><span></span><a></a></span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<div class="form-inline mt-4">
|
|
<label>Debug logging</label>
|
|
<div class="ml-auto">
|
|
<label id="debug_checkbox"
|
|
class="is_enabled-toggle toggle switch-light switch-material small m-0">
|
|
{% if context.debug_logging %}
|
|
<input name="debug_logging" checked="checked" type="checkbox">
|
|
{% else %}
|
|
<input name="debug_logging" type="checkbox">
|
|
{% endif %}
|
|
<span><span></span><span></span><a></a></span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group col-6 offset-6">
|
|
</div>
|
|
|
|
<div class="form-group col-12">
|
|
<div class="text-right">
|
|
<a class="btn btn-long btn-outline-primary" href="/">Cancel</a>
|
|
<input class="btn btn-long btn-primary" type="submit" value="Save Settings">
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% if not context.up_to_date and not context.is_balena and context.is_docker %}
|
|
<div class="container mt-4">
|
|
<div class="row py-2">
|
|
<div class="col-12">
|
|
<h4 class="page-header text-white">
|
|
<b>Upgrade Anthias</b>
|
|
</h4>
|
|
</div>
|
|
</div>
|
|
<div class="row content px-3">
|
|
<div id="upgrade-section" class="col-12 my-3">
|
|
<p>Do the following steps to upgrade Anthias:</p>
|
|
<ul>
|
|
<li>
|
|
Go to the <a href="#backup-section" class="text-danger">backup section</a> and click <em>Get Backup</em>.
|
|
</li>
|
|
<li>
|
|
Open up a terminal and SSH to this device using any of the following commands:
|
|
<ul>
|
|
{% for ip_address in context.ip_addresses %}
|
|
<li><code>ssh {{ context.host_user }}@{{ ip_address }}</code></li>
|
|
{% endfor %}
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
Go to the project root directory — <code>cd ~/screenly</code>
|
|
</li>
|
|
<li>
|
|
Run the following upgrade script — <code>./bin/run_upgrade.sh</code>. The script is essentially a wrapper around
|
|
the install script, so it will prompt you with the same questions as when you first installed Anthias.
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="container mt-4">
|
|
<div class="row py-2">
|
|
<div class="col-12">
|
|
<h4 class="page-header text-white">
|
|
<b>Backup</b>
|
|
</h4>
|
|
</div>
|
|
</div>
|
|
<div class="row content px-3">
|
|
{# Backup #}
|
|
<div id="backup-section" class="col-12 my-3">
|
|
<div class="text-right">
|
|
<input name="backup_upload" style="display:none" type="file">
|
|
<button id="btn-backup" class="btn btn-long btn-outline-primary">Get Backup</button>
|
|
<button id="btn-upload" class="btn btn-primary" type="button">Upload and Recover
|
|
</button>
|
|
</div>
|
|
<div class="progress-bar progress-bar-striped progress active w-100" style="display:none">
|
|
<div class="bar"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% if not (context.is_balena or context.is_docker) %}
|
|
{# Reset Wifi #}
|
|
<div class="container mt-4">
|
|
<div class="row py-2">
|
|
<div class="col-12">
|
|
<h4 class="page-header text-white">
|
|
<b>Reset Wi-Fi Config</b>
|
|
</h4>
|
|
</div>
|
|
</div>
|
|
<div class="row content px-3">
|
|
<div id="wifi-section" class="col-12 my-3">
|
|
<p>Run it, and if the next boot does not have a network connection, you will be prompted to select a
|
|
WiFi
|
|
network. <b>Warning:</b> After pressing, a reboot is required. Web interface will not be
|
|
available
|
|
until reboot.</p>
|
|
<div class="text-right">
|
|
<button id="btn-reset" class="btn btn-danger btn-long" type="button">Reset Wi-Fi</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{# System controls #}
|
|
<div class="container mt-4">
|
|
<div class="row py-2">
|
|
<div class="col-12">
|
|
<h4 class="page-header text-white">
|
|
<b>System Controls</b>
|
|
</h4>
|
|
</div>
|
|
</div>
|
|
<div class="row content px-3">
|
|
<div id="system-controls-section" class="col-12 my-3">
|
|
<div class="text-right">
|
|
<button id="btn-reboot-system" class="btn btn-danger btn-long" type="button">Reboot</button>
|
|
<button id="btn-shutdown-system" class="btn btn-danger btn-long" type="button">Shutdown</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|