Merge pull request #24 from Unending/bubble_color

added type to toasted bubble
pull/18/merge
Akhil Gupta 4 years ago committed by GitHub
commit e15815d648
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -182,6 +182,7 @@
.then(function (response) {
Vue.toasted.show("File uploaded successfully.", {
theme: "bubble",
type: "success",
position: "top-right",
duration: 5000,
});
@ -191,6 +192,7 @@
if (error.response) {
Vue.toasted.show(error.response.data?.message, {
theme: "bubble",
type: "error",
position: "top-right",
duration: 5000,
});
@ -237,6 +239,7 @@
.then(function (response) {
Vue.toasted.show("Podcast added successfully.", {
theme: "bubble",
type: "success",
position: "top-right",
duration: 5000,
});
@ -246,6 +249,7 @@
if (error.response) {
Vue.toasted.show(error.response.data?.message, {
theme: "bubble",
type: "error",
position: "top-right",
duration: 5000,
});

@ -168,6 +168,7 @@
.then(function (response) {
Vue.toasted.show("Podcast download enqueued.", {
theme: "bubble",
type: "info",
position: "top-right",
duration: 5000,
});
@ -178,6 +179,7 @@
if (error.response) {
Vue.toasted.show(error.response.data?.message, {
theme: "bubble",
type: "error",
position: "top-right",
duration: 5000,
});
@ -192,6 +194,7 @@
.then(function (response) {
Vue.toasted.show("Podcast file deleted.", {
theme: "bubble",
type: "success",
position: "top-right",
duration: 5000,
});
@ -202,6 +205,7 @@
if (error.response) {
Vue.toasted.show(error.response.data?.message, {
theme: "bubble",
type: "error",
position: "top-right",
duration: 5000,
});
@ -219,6 +223,7 @@
.then(function (response) {
Vue.toasted.show("Podcast played status updated.", {
theme: "bubble",
type: "info",
position: "top-right",
duration: 5000,
});
@ -229,6 +234,7 @@
if (error.response) {
Vue.toasted.show(error.response.data?.message, {
theme: "bubble",
type: "error",
position: "top-right",
duration: 5000,
});

@ -70,16 +70,16 @@
<div class="columns four">
Last Ep : {{ latestEpisodeDate .PodcastItems}}
</div>
{{$downloading:=downloadingEpisodes .PodcastItems}}
{{$downloading:=downloadingEpisodes .PodcastItems}}
<div
class="columns five"
title="{{downloadedEpisodes .PodcastItems}} episodes downloaded out of total {{ len .PodcastItems}} episodes.
{{if gt $downloading 0}} {{$downloading}} episodes in queue {{end}}
"
>
{{if gt $downloading 0}} ({{$downloading}})/{{end}}{{downloadedEpisodes .PodcastItems}}/{{ len .PodcastItems }} episodes
</div>
<div class="columns three" style="">
<button
@ -138,6 +138,7 @@
"All episodes of this podcast have been enqueued to download.",
{
theme: "bubble",
type: "info",
position: "top-right",
duration: 5000,
}
@ -147,6 +148,7 @@
if (error.response) {
Vue.toasted.show(error.response.data?.message, {
theme: "bubble",
type: "error",
position: "top-right",
duration: 5000,
});
@ -168,6 +170,7 @@
.then(function (response) {
Vue.toasted.show("Podcast deleted successfully.", {
theme: "bubble",
type: "success",
position: "top-right",
duration: 5000,
});
@ -178,6 +181,7 @@
if (error.response) {
Vue.toasted.show(error.response.data?.message, {
theme: "bubble",
type: "error",
position: "top-right",
duration: 5000,
});
@ -200,6 +204,7 @@
.then(function (response) {
Vue.toasted.show("Podcast Episodes deleted successfully.", {
theme: "bubble",
type: "success",
position: "top-right",
duration: 5000,
});
@ -208,6 +213,7 @@
if (error.response) {
Vue.toasted.show(error.response.data?.message, {
theme: "bubble",
type: "error",
position: "top-right",
duration: 5000,
});

@ -64,7 +64,7 @@
white-space: pre;
word-wrap: break-word }
.example {
position: relative;
position: relative;
margin-top: 4rem; }
.example-header {
font-weight: 600;
@ -121,14 +121,14 @@
/* Larger than tablet */
@media (min-width: 750px) {
}
</style>
</head>
<body>
<div class="container">
<section class="header">
<h1>{{ .title }}</h1>
</section>
{{template "navbar"}}
@ -143,7 +143,7 @@
<h4>{{.Title}}</h4>
<small>{{ formatDate .PubDate }}</small>
<p>{{ .Summary }}</p>
{{if .DownloadPath}}
<a class="button button-primary" href="{{ .DownloadPath }}" download>Download</a>
{{else}}
@ -154,22 +154,23 @@
</div>
<div class="columns one">
</div>
</div>
<hr>
{{end}}
</div>
{{template "scripts"}}
<script>
<script>
function downloadToDisk(id){
axios.get("/podcastitems/"+id+"/download")
.then(function(response){
Vue.toasted.show('Podcast download enqueued.' ,{
theme: "bubble",
position: "top-right",
Vue.toasted.show('Podcast download enqueued.' ,{
theme: "bubble",
position: "top-right",
type: "info",
duration : 5000
});
var row = document.getElementById('podcast-'+id);
@ -177,14 +178,15 @@ function downloadToDisk(id){
})
.catch(function(error){
if(error.response){
Vue.toasted.show(error.response.data?.message, {
theme: "bubble",
position: "top-right",
Vue.toasted.show(error.response.data?.message, {
theme: "bubble",
position: "top-right",
type: "error",
duration : 5000
})
}
}).
then(function(){
})
@ -192,4 +194,4 @@ function downloadToDisk(id){
}
</script>
</body>
</html>
</html>

@ -23,13 +23,13 @@
img{
display: block
}
}
</style>
</head>
<body>
<div class="container">
{{template "navbar" .}}
<br>
<div class="row">
@ -48,13 +48,13 @@
<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>
@ -70,7 +70,7 @@
</div>
{{template "scripts"}}
<script>
<script>
var app = new Vue({
delimiters: ['${', '}'],
el: '#app',
@ -87,27 +87,29 @@ var app = new Vue({
})
.then(function(response){
Vue.toasted.show('Settings saved successfully.' ,{
theme: "bubble",
position: "top-right",
Vue.toasted.show('Settings saved successfully.' ,{
theme: "bubble",
type: "success",
position: "top-right",
duration : 5000
})
})
.catch(function(error){
if(error.response){
Vue.toasted.show(error.response.data?.message, {
theme: "bubble",
position: "top-right",
Vue.toasted.show(error.response.data?.message, {
theme: "bubble",
type: "error",
position: "top-right",
duration : 5000
})
}
}).
then(function(){
})
return false;
}
@ -116,10 +118,10 @@ var app = new Vue({
downloadOnAdd: {{ .setting.DownloadOnAdd }},
initialDownloadCount: {{ .setting.InitialDownloadCount }},
autoDownload: {{ .setting.AutoDownload }},
},
})
</script>
</body>
</html>
</html>

Loading…
Cancel
Save