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> <template>
<NcAppContent :class="{ episode }"> <NcAppContent :class="{ episode }">
<slot /> <slot />
<template #list>
<slot name="list" />
</template>
</NcAppContent> </NcAppContent>
</template> </template>

View File

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

View File

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