fix: 🐛 the #list slot breaks navigation on AppContent
All checks were successful
repod / xml (push) Successful in 22s
repod / php (push) Successful in 54s
repod / nodejs (push) Successful in 1m2s
repod / release (push) Has been skipped

This commit is contained in:
Michel Roux 2024-09-02 15:35:10 +02:00
parent 19c56ef31d
commit fb7780fead
3 changed files with 3 additions and 9 deletions

View File

@ -1,9 +1,6 @@
<template>
<NcAppContent :class="{ episode }">
<slot />
<template #list>
<slot name="list" />
</template>
</NcAppContent>
</template>

View File

@ -1,5 +1,5 @@
<template>
<NcAppNavigationList>
<NcAppNavigationList class="list">
<NcAppNavigationNewItem
:name="t('repod', 'Add a RSS link')"
@new-item="(url) => $router.push(toFeedUrl(url))">
@ -29,7 +29,7 @@ export default {
</script>
<style scoped>
ul {
.list {
margin-top: 2rem;
}
</style>

View File

@ -1,7 +1,4 @@
export const encodeUrl = (url) => encodeURIComponent(btoa(url))
export const decodeUrl = (url) => atob(decodeURIComponent(url))
export const toFeedUrl = (url) => `/feed/${encodeUrl(url)}`
export const filenameFromUrl = (str) => {
const url = new URL(str)
return url.pathname.split('/').pop()
}
export const filenameFromUrl = (url) => new URL(url).pathname.split('/').pop()