2018-10-24 16:56:35 +00:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html>
|
|
|
|
|
<head>
|
2018-10-24 17:12:43 +00:00
|
|
|
|
<title>Sonar</title>
|
2018-10-24 16:56:35 +00:00
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
|
|
|
<meta http-equiv="content-type" value="text/html; encoding=UTF-8">
|
|
|
|
|
<link rel="stylesheet" href="/css/bootstrap.min.css">
|
|
|
|
|
<style type="text/css">
|
|
|
|
|
button {
|
|
|
|
|
min-height: 4rem;
|
|
|
|
|
}
|
|
|
|
|
code { /* comment out to see debug output from fork command */
|
|
|
|
|
display: inline;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
|
|
<div class="container">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col">
|
|
|
|
|
{{ range .Flashes }}
|
|
|
|
|
<div class="alert alert-info">{{ . }}</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col">
|
|
|
|
|
<div class="card mb-4">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
Volume Control: <strong>{{ .Volume }}</strong>%
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<form method="POST" action="/volume/lower">
|
|
|
|
|
<button name="action" value="vol-lower" class="form-control btn btn-danger">➖</button>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<form method="POST" action="/volume/mute">
|
|
|
|
|
<button name="action" value="vol-mute" class="form-control btn btn-secondary">🚫</button>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-4">
|
|
|
|
|
<form method="POST" action="/volume/higher">
|
|
|
|
|
<button name="action" value="vol-higher" class="form-control btn btn-success">➕</button>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col">
|
|
|
|
|
<div class="card mb-4">
|
|
|
|
|
<div class="card-header">
|
2018-10-24 17:12:43 +00:00
|
|
|
|
Alarm Clock Playlist
|
2018-10-24 16:56:35 +00:00
|
|
|
|
</div>
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
<p>
|
|
|
|
|
<strong>Status:</strong> {{ .PlaylistStatus }}
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<form method="POST" action="/playlist/start">
|
|
|
|
|
<p>
|
|
|
|
|
<button name="action" value="playlist-start" class="form-control btn btn-success">Start Playlist</button>
|
|
|
|
|
</p>
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
<form method="POST" action="/playlist/stop">
|
|
|
|
|
<p>
|
|
|
|
|
<button name="action" value="playlist-stop" class="form-control btn btn-danger">Stop Playlist</button>
|
|
|
|
|
</p>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col">
|
|
|
|
|
<div class="card mb-4">
|
|
|
|
|
<div class="card-header">
|
|
|
|
|
Schedule
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-body">
|
2018-10-24 17:12:43 +00:00
|
|
|
|
<form method="POST" action="/playlist/schedule">
|
|
|
|
|
|
2018-10-24 16:56:35 +00:00
|
|
|
|
<label for="time">Time:</label>
|
2018-10-24 17:12:43 +00:00
|
|
|
|
<input type="time" name="time" class="form-control mb-2" value="{{ printf "%02d" .Hour }}:{{ .Minute }}">
|
2018-10-24 16:56:35 +00:00
|
|
|
|
|
|
|
|
|
<label>Days of week:</label>
|
|
|
|
|
<ul class="list-unstyled">
|
|
|
|
|
<li>
|
|
|
|
|
<label>
|
2018-10-24 17:12:43 +00:00
|
|
|
|
<input type="checkbox" name="day" value="0"{{ if .Days.In "0" }} checked{{ end }}> Sunday
|
2018-10-24 16:56:35 +00:00
|
|
|
|
</label>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<label>
|
2018-10-24 17:12:43 +00:00
|
|
|
|
<input type="checkbox" name="day" value="1"{{ if .Days.In "1" }} checked{{ end }}> Monday
|
2018-10-24 16:56:35 +00:00
|
|
|
|
</label>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<label>
|
2018-10-24 17:12:43 +00:00
|
|
|
|
<input type="checkbox" name="day" value="2"{{ if .Days.In "2" }} checked{{ end }}> Tuesday
|
2018-10-24 16:56:35 +00:00
|
|
|
|
</label>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<label>
|
2018-10-24 17:12:43 +00:00
|
|
|
|
<input type="checkbox" name="day" value="3"{{ if .Days.In "3" }} checked{{ end }}> Wednesday
|
2018-10-24 16:56:35 +00:00
|
|
|
|
</label>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<label>
|
2018-10-24 17:12:43 +00:00
|
|
|
|
<input type="checkbox" name="day" value="4"{{ if .Days.In "4" }} checked{{ end }}> Thursday
|
2018-10-24 16:56:35 +00:00
|
|
|
|
</label>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<label>
|
2018-10-24 17:12:43 +00:00
|
|
|
|
<input type="checkbox" name="day" value="5"{{ if .Days.In "5" }} checked{{ end }}> Friday
|
2018-10-24 16:56:35 +00:00
|
|
|
|
</label>
|
|
|
|
|
</li>
|
|
|
|
|
<li>
|
|
|
|
|
<label>
|
2018-10-24 17:12:43 +00:00
|
|
|
|
<input type="checkbox" name="day" value="6"{{ if .Days.In "6" }} checked{{ end }}> Saturday
|
2018-10-24 16:56:35 +00:00
|
|
|
|
</label>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<button name="action" value="schedule" class="form-control btn btn-primary">Set Schedule</button>
|
2018-10-24 17:12:43 +00:00
|
|
|
|
</form>
|
2018-10-24 16:56:35 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|