feat: Add a link to copy the feed on the banner (close #41)

This commit is contained in:
Michel Roux 2024-01-21 12:16:59 +01:00
parent ff23be4f91
commit 22ef756a2d
5 changed files with 58 additions and 28 deletions

View File

@ -12,8 +12,10 @@ OC.L10N.register(
"New podcasts" : "Nouveautés",
"Hot podcasts" : "Tendances",
"Could not fetch tops" : "Impossible de récupérer les tops",
"Copy feed" : "Copier le flux",
"Subscribe" : "S'abonner",
"Error while adding the feed" : "Erreur lors de l'ajout du flux",
"Feed's link copied to the clipboard" : "Lien vers le flux copié dans le presse-papiers",
"Play" : "Lecture",
"Stop" : "Arrêter",
"Could not fetch episodes" : "Impossible de récuprer les épisodes",

View File

@ -10,8 +10,10 @@
"New podcasts" : "Nouveautés",
"Hot podcasts" : "Tendances",
"Could not fetch tops" : "Impossible de récupérer les tops",
"Copy feed" : "Copier le flux",
"Subscribe" : "S'abonner",
"Error while adding the feed" : "Erreur lors de l'ajout du flux",
"Feed's link copied to the clipboard" : "Lien vers le flux copié dans le presse-papiers",
"Play" : "Lecture",
"Stop" : "Arrêter",
"Could not fetch episodes" : "Impossible de récuprer les épisodes",

View File

@ -3,11 +3,16 @@
<div class="header">
<img class="background" :src="imageUrl">
<div class="content">
<NcAvatar class="avatar"
:display-name="author || title"
<div>
<NcAvatar :display-name="author || title"
:is-no-user="true"
:size="128"
:url="imageUrl" />
<a class="feed" :href="url" @click.prevent="copyFeed">
<Rss :size="20" />
<i>{{ t('repod', 'Copy feed') }}</i>
</a>
</div>
<div class="inner">
<div class="infos">
<h2>{{ title }}</h2>
@ -33,12 +38,13 @@
<script>
import { NcAppNavigationNew, NcAvatar } from '@nextcloud/vue'
import { showError, showSuccess } from '@nextcloud/dialogs'
import Plus from 'vue-material-design-icons/Plus.vue'
import Rss from 'vue-material-design-icons/Rss.vue'
import axios from '@nextcloud/axios'
import { cleanHtml } from '../../utils/text.js'
import { decodeUrl } from '../../utils/url.js'
import { generateUrl } from '@nextcloud/router'
import { showError } from '@nextcloud/dialogs'
export default {
name: 'Banner',
@ -46,6 +52,7 @@ export default {
NcAvatar,
NcAppNavigationNew,
Plus,
Rss,
},
props: {
author: {
@ -91,16 +98,15 @@ export default {
this.$store.dispatch('subscriptions/fetch')
},
copyFeed() {
window.navigator.clipboard.writeText(this.url)
showSuccess(t('repod', 'Feed\'s link copied to the clipboard'))
},
},
}
</script>
<style scoped>
.avatar {
height: 8rem;
width: 8rem;
}
.background {
filter: blur(1rem) brightness(50%);
height: auto;
@ -119,6 +125,12 @@ export default {
position: relative;
}
.feed {
display: flex;
gap: .2rem;
margin: .5rem;
}
.header {
height: 14rem;
overflow: hidden;

View File

@ -65,12 +65,18 @@ msgstr "Tendances"
msgid "Could not fetch tops"
msgstr "Impossible de récupérer les tops"
msgid "Copy feed"
msgstr "Copier le flux"
msgid "Subscribe"
msgstr "S'abonner"
msgid "Error while adding the feed"
msgstr "Erreur lors de l'ajout du flux"
msgid "Feed's link copied to the clipboard"
msgstr "Lien vers le flux copié dans le presse-papiers"
msgid "Play"
msgstr "Lecture"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Nextcloud 3.14159\n"
"Report-Msgid-Bugs-To: translations\\@example.com\n"
"POT-Creation-Date: 2024-01-18 16:22+0000\n"
"POT-Creation-Date: 2024-01-21 11:14+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -72,69 +72,77 @@ msgid "Could not fetch tops"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:7
msgid "Subscribe"
msgid "Copy feed"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:8
msgid "Error while adding the feed"
msgid "Subscribe"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:9
msgid "Play"
msgid "Error while adding the feed"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:10
msgid "Stop"
msgid "Feed's link copied to the clipboard"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:11
msgid "Could not fetch episodes"
msgid "Play"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:12
msgid "Are you sure you want to delete this subscription?"
msgid "Stop"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:13
msgid "Error while removing the feed"
msgid "Could not fetch episodes"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:14
msgid "Playback speed"
msgid "Are you sure you want to delete this subscription?"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:15
msgid "Import subscriptions"
msgid "Error while removing the feed"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:16
msgid "Import OPML file"
msgid "Playback speed"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:17
msgid "Export subscriptions"
msgid "Import subscriptions"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:18
msgid "Add a podcast"
msgid "Import OPML file"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:19
msgid "Could not fetch subscriptions"
msgid "Export subscriptions"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:20
msgid "Find a podcast"
msgid "Add a podcast"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:21
msgid "Error loading feed"
msgid "Could not fetch subscriptions"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:22
msgid "Missing required app"
msgid "Find a podcast"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:23
msgid "Error loading feed"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:24
msgid "Missing required app"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:25
msgid "Install GPodder Sync"
msgstr ""