You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
121 lines
3.2 KiB
121 lines
3.2 KiB
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css" integrity="sha512-EZLkOqwILORob+p0BXZc+Vm3RgJBOe1Iq/0fiI7r/wJgzOFZMlsqTa29UEl6v6U6gsV4uIpsNZoV32YZqrCRCQ==" crossorigin="anonymous" />
|
|
<title>PodGrab</title>
|
|
{{template "commoncss"}}
|
|
<style>
|
|
.button-delete{
|
|
background-color: indianred;
|
|
color:wheat;
|
|
}
|
|
img{
|
|
display: none;
|
|
}
|
|
@media (max-width: 750px) {
|
|
.label-body{
|
|
display: inline!important;
|
|
}
|
|
}
|
|
/* Larger than tablet */
|
|
@media (min-width: 750px) {
|
|
img{
|
|
display: block
|
|
}
|
|
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<section class="header">
|
|
<h1>{{ .title }}</h1>
|
|
</section>
|
|
{{template "navbar"}}
|
|
<br>
|
|
<div class="row" id="app">
|
|
<div class="columns twelve">
|
|
<form action="/saveSettings" method="post" @submit="saveSettings">
|
|
<div class="row">
|
|
<label for="downloadOnAdd">
|
|
<input type="checkbox" name="downloadOnAdd" v-model="downloadOnAdd">
|
|
<span class="label-body">Download episodes whenever new podcast is added</span>
|
|
</label>
|
|
</div>
|
|
|
|
<div v-if="downloadOnAdd">
|
|
<br>
|
|
<label for="initialDownloadCount" >
|
|
<span class="label-body">How many episodes to be downloaded when a new podcast is added</span>
|
|
|
|
|
|
</label>
|
|
<input type="number" name="initialDownloadCount" v-model.number="initialDownloadCount" min="0">
|
|
</div>
|
|
<br>
|
|
<label for="autoDownload">
|
|
<input type="checkbox" name="autoDownload" v-model="autoDownload">
|
|
<span class="label-body">Automatically download new episodes to the disk</span>
|
|
</label>
|
|
<br>
|
|
<input type="submit" value="Save" class="button button-primary">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
{{template "scripts"}}
|
|
<script>
|
|
var app = new Vue({
|
|
delimiters: ['${', '}'],
|
|
el: '#app',
|
|
|
|
methods:{
|
|
saveSettings:function(e){
|
|
e.preventDefault();
|
|
var self=this;
|
|
self.searching=true;
|
|
axios.post("/settings",{
|
|
downloadOnAdd: self.downloadOnAdd,
|
|
initialDownloadCount:self.initialDownloadCount,
|
|
autoDownload:self.autoDownload
|
|
|
|
})
|
|
.then(function(response){
|
|
Vue.toasted.show('Settings saved successfully.' ,{
|
|
theme: "bubble",
|
|
position: "top-right",
|
|
duration : 5000
|
|
})
|
|
|
|
|
|
})
|
|
.catch(function(error){
|
|
if(error.response){
|
|
|
|
Vue.toasted.show(error.response.data?.message, {
|
|
theme: "bubble",
|
|
position: "top-right",
|
|
duration : 5000
|
|
})
|
|
}
|
|
|
|
}).
|
|
then(function(){
|
|
|
|
})
|
|
return false;
|
|
}
|
|
},
|
|
data: {
|
|
downloadOnAdd: {{ .setting.DownloadOnAdd }},
|
|
initialDownloadCount: {{ .setting.InitialDownloadCount }},
|
|
autoDownload: {{ .setting.AutoDownload }},
|
|
|
|
},
|
|
|
|
})
|
|
</script>
|
|
</body>
|
|
</html> |