repod/src/components/Discover/AddRss.vue

35 lines
641 B
Vue
Raw Normal View History

2023-07-07 14:35:14 +00:00
<template>
2024-01-10 16:50:06 +00:00
<ul class="bar">
<NcAppNavigationNewItem :name="t('repod', 'Add a RSS link')" @new-item="addSubscription">
2023-07-07 14:35:14 +00:00
<template #icon>
2023-07-07 16:38:53 +00:00
<Plus :size="20" />
2023-07-07 14:35:14 +00:00
</template>
</NcAppNavigationNewItem>
</ul>
</template>
<script>
import { NcAppNavigationNewItem } from '@nextcloud/vue'
import Plus from 'vue-material-design-icons/Plus.vue'
import { encodeUrl } from '../../utils/url.js'
2023-07-07 14:35:14 +00:00
export default {
name: 'AddRss',
components: {
NcAppNavigationNewItem,
Plus,
},
methods: {
2024-01-11 21:29:14 +00:00
addSubscription(feedUrl) {
this.$router.push(encodeUrl(feedUrl))
},
2023-07-07 14:35:14 +00:00
},
}
</script>
2024-01-10 16:50:06 +00:00
<style scoped>
.bar {
2024-01-10 16:56:00 +00:00
margin-top: 2rem;
2024-01-10 16:50:06 +00:00
}
</style>