diff --git a/src/components/Discover/AddRss.vue b/src/components/Discover/AddRss.vue
index ec9cecb..ca1e4aa 100644
--- a/src/components/Discover/AddRss.vue
+++ b/src/components/Discover/AddRss.vue
@@ -1,7 +1,7 @@
+ @new-item="$router.push(encodeUrl(feedUrl))">
@@ -21,9 +21,7 @@ export default {
Plus,
},
methods: {
- addSubscription(feedUrl) {
- this.$router.push(encodeUrl(feedUrl))
- },
+ encodeUrl,
},
}
diff --git a/src/components/Discover/Search.vue b/src/components/Discover/Search.vue
index ca6a919..906ff0c 100644
--- a/src/components/Discover/Search.vue
+++ b/src/components/Discover/Search.vue
@@ -26,10 +26,10 @@ import AdaptativeList from '../Atoms/AdaptativeList.vue'
import Loading from '../Atoms/Loading.vue'
import axios from '@nextcloud/axios'
import { debounce } from '../../utils/debounce.js'
-import { encodeUrl } from '../../utils/url.js'
import { generateUrl } from '@nextcloud/router'
import moment from '@nextcloud/moment'
import { showError } from '@nextcloud/dialogs'
+import { toUrl } from '../../utils/url.js'
export default {
name: 'Search',
@@ -58,6 +58,7 @@ export default {
},
methods: {
moment,
+ toUrl,
search: debounce(async function value() {
try {
this.loading = true
@@ -75,9 +76,6 @@ export default {
}
}
}, 200),
- toUrl(url) {
- return `/${encodeUrl(url)}`
- },
},
}
diff --git a/src/components/Discover/TopItem.vue b/src/components/Discover/TopItem.vue
index 2855c25..9abdc16 100644
--- a/src/components/Discover/TopItem.vue
+++ b/src/components/Discover/TopItem.vue
@@ -1,11 +1,11 @@
-
+
diff --git a/src/components/Feed/Episodes.vue b/src/components/Feed/Episodes.vue
index 227d99f..69d922c 100644
--- a/src/components/Feed/Episodes.vue
+++ b/src/components/Feed/Episodes.vue
@@ -36,7 +36,7 @@
+ @close="closeModal">
import { NcActionButton, NcAvatar, NcListItem, NcModal } from '@nextcloud/vue'
+import { decodeUrl, encodeUrl } from '../../utils/url.js'
import AdaptativeList from '../Atoms/AdaptativeList.vue'
import Loading from '../Atoms/Loading.vue'
import Modal from './Modal.vue'
import PlayButton from 'vue-material-design-icons/Play.vue'
import StopButton from 'vue-material-design-icons/Stop.vue'
import axios from '@nextcloud/axios'
-import { decodeUrl } from '../../utils/url.js'
import { formatTimer } from '../../utils/time.js'
import { generateUrl } from '@nextcloud/router'
import moment from '@nextcloud/moment'
@@ -110,6 +110,10 @@ export default {
load(episode) {
this.$store.dispatch('player/load', episode)
},
+ closeModal() {
+ this.modalEpisode = null
+ this.$router.push(encodeUrl(this.url))
+ },
},
}
diff --git a/src/components/Player/Infos.vue b/src/components/Player/Infos.vue
index 8683525..e4f445e 100644
--- a/src/components/Player/Infos.vue
+++ b/src/components/Player/Infos.vue
@@ -10,7 +10,7 @@
diff --git a/src/components/Sidebar/Item.vue b/src/components/Sidebar/Item.vue
index 8e90c4b..cace164 100644
--- a/src/components/Sidebar/Item.vue
+++ b/src/components/Sidebar/Item.vue
@@ -1,7 +1,7 @@
+ :to="toUrl(url)">
encodeURIComponent(btoa(url))
export const decodeUrl = (url) => atob(decodeURIComponent(url))
+export const toUrl = (url) => `/${encodeUrl(url)}`