feat: Add a link to copy the feed on the banner (close #41)
This commit is contained in:
parent
ff23be4f91
commit
22ef756a2d
@ -12,8 +12,10 @@ OC.L10N.register(
|
|||||||
"New podcasts" : "Nouveautés",
|
"New podcasts" : "Nouveautés",
|
||||||
"Hot podcasts" : "Tendances",
|
"Hot podcasts" : "Tendances",
|
||||||
"Could not fetch tops" : "Impossible de récupérer les tops",
|
"Could not fetch tops" : "Impossible de récupérer les tops",
|
||||||
|
"Copy feed" : "Copier le flux",
|
||||||
"Subscribe" : "S'abonner",
|
"Subscribe" : "S'abonner",
|
||||||
"Error while adding the feed" : "Erreur lors de l'ajout du flux",
|
"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",
|
"Play" : "Lecture",
|
||||||
"Stop" : "Arrêter",
|
"Stop" : "Arrêter",
|
||||||
"Could not fetch episodes" : "Impossible de récuprer les épisodes",
|
"Could not fetch episodes" : "Impossible de récuprer les épisodes",
|
||||||
|
@ -10,8 +10,10 @@
|
|||||||
"New podcasts" : "Nouveautés",
|
"New podcasts" : "Nouveautés",
|
||||||
"Hot podcasts" : "Tendances",
|
"Hot podcasts" : "Tendances",
|
||||||
"Could not fetch tops" : "Impossible de récupérer les tops",
|
"Could not fetch tops" : "Impossible de récupérer les tops",
|
||||||
|
"Copy feed" : "Copier le flux",
|
||||||
"Subscribe" : "S'abonner",
|
"Subscribe" : "S'abonner",
|
||||||
"Error while adding the feed" : "Erreur lors de l'ajout du flux",
|
"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",
|
"Play" : "Lecture",
|
||||||
"Stop" : "Arrêter",
|
"Stop" : "Arrêter",
|
||||||
"Could not fetch episodes" : "Impossible de récuprer les épisodes",
|
"Could not fetch episodes" : "Impossible de récuprer les épisodes",
|
||||||
|
@ -3,11 +3,16 @@
|
|||||||
<div class="header">
|
<div class="header">
|
||||||
<img class="background" :src="imageUrl">
|
<img class="background" :src="imageUrl">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<NcAvatar class="avatar"
|
<div>
|
||||||
:display-name="author || title"
|
<NcAvatar :display-name="author || title"
|
||||||
:is-no-user="true"
|
:is-no-user="true"
|
||||||
:size="128"
|
:size="128"
|
||||||
:url="imageUrl" />
|
: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="inner">
|
||||||
<div class="infos">
|
<div class="infos">
|
||||||
<h2>{{ title }}</h2>
|
<h2>{{ title }}</h2>
|
||||||
@ -33,12 +38,13 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { NcAppNavigationNew, NcAvatar } from '@nextcloud/vue'
|
import { NcAppNavigationNew, NcAvatar } from '@nextcloud/vue'
|
||||||
|
import { showError, showSuccess } from '@nextcloud/dialogs'
|
||||||
import Plus from 'vue-material-design-icons/Plus.vue'
|
import Plus from 'vue-material-design-icons/Plus.vue'
|
||||||
|
import Rss from 'vue-material-design-icons/Rss.vue'
|
||||||
import axios from '@nextcloud/axios'
|
import axios from '@nextcloud/axios'
|
||||||
import { cleanHtml } from '../../utils/text.js'
|
import { cleanHtml } from '../../utils/text.js'
|
||||||
import { decodeUrl } from '../../utils/url.js'
|
import { decodeUrl } from '../../utils/url.js'
|
||||||
import { generateUrl } from '@nextcloud/router'
|
import { generateUrl } from '@nextcloud/router'
|
||||||
import { showError } from '@nextcloud/dialogs'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Banner',
|
name: 'Banner',
|
||||||
@ -46,6 +52,7 @@ export default {
|
|||||||
NcAvatar,
|
NcAvatar,
|
||||||
NcAppNavigationNew,
|
NcAppNavigationNew,
|
||||||
Plus,
|
Plus,
|
||||||
|
Rss,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
author: {
|
author: {
|
||||||
@ -91,16 +98,15 @@ export default {
|
|||||||
|
|
||||||
this.$store.dispatch('subscriptions/fetch')
|
this.$store.dispatch('subscriptions/fetch')
|
||||||
},
|
},
|
||||||
|
copyFeed() {
|
||||||
|
window.navigator.clipboard.writeText(this.url)
|
||||||
|
showSuccess(t('repod', 'Feed\'s link copied to the clipboard'))
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.avatar {
|
|
||||||
height: 8rem;
|
|
||||||
width: 8rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.background {
|
.background {
|
||||||
filter: blur(1rem) brightness(50%);
|
filter: blur(1rem) brightness(50%);
|
||||||
height: auto;
|
height: auto;
|
||||||
@ -119,6 +125,12 @@ export default {
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.feed {
|
||||||
|
display: flex;
|
||||||
|
gap: .2rem;
|
||||||
|
margin: .5rem;
|
||||||
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
height: 14rem;
|
height: 14rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -65,12 +65,18 @@ msgstr "Tendances"
|
|||||||
msgid "Could not fetch tops"
|
msgid "Could not fetch tops"
|
||||||
msgstr "Impossible de récupérer les tops"
|
msgstr "Impossible de récupérer les tops"
|
||||||
|
|
||||||
|
msgid "Copy feed"
|
||||||
|
msgstr "Copier le flux"
|
||||||
|
|
||||||
msgid "Subscribe"
|
msgid "Subscribe"
|
||||||
msgstr "S'abonner"
|
msgstr "S'abonner"
|
||||||
|
|
||||||
msgid "Error while adding the feed"
|
msgid "Error while adding the feed"
|
||||||
msgstr "Erreur lors de l'ajout du flux"
|
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"
|
msgid "Play"
|
||||||
msgstr "Lecture"
|
msgstr "Lecture"
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Nextcloud 3.14159\n"
|
"Project-Id-Version: Nextcloud 3.14159\n"
|
||||||
"Report-Msgid-Bugs-To: translations\\@example.com\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"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@ -72,69 +72,77 @@ msgid "Could not fetch tops"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:7
|
#: /app/specialVueFakeDummyForL10nScript.js:7
|
||||||
msgid "Subscribe"
|
msgid "Copy feed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:8
|
#: /app/specialVueFakeDummyForL10nScript.js:8
|
||||||
msgid "Error while adding the feed"
|
msgid "Subscribe"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:9
|
#: /app/specialVueFakeDummyForL10nScript.js:9
|
||||||
msgid "Play"
|
msgid "Error while adding the feed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:10
|
#: /app/specialVueFakeDummyForL10nScript.js:10
|
||||||
msgid "Stop"
|
msgid "Feed's link copied to the clipboard"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:11
|
#: /app/specialVueFakeDummyForL10nScript.js:11
|
||||||
msgid "Could not fetch episodes"
|
msgid "Play"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:12
|
#: /app/specialVueFakeDummyForL10nScript.js:12
|
||||||
msgid "Are you sure you want to delete this subscription?"
|
msgid "Stop"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:13
|
#: /app/specialVueFakeDummyForL10nScript.js:13
|
||||||
msgid "Error while removing the feed"
|
msgid "Could not fetch episodes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:14
|
#: /app/specialVueFakeDummyForL10nScript.js:14
|
||||||
msgid "Playback speed"
|
msgid "Are you sure you want to delete this subscription?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:15
|
#: /app/specialVueFakeDummyForL10nScript.js:15
|
||||||
msgid "Import subscriptions"
|
msgid "Error while removing the feed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:16
|
#: /app/specialVueFakeDummyForL10nScript.js:16
|
||||||
msgid "Import OPML file"
|
msgid "Playback speed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:17
|
#: /app/specialVueFakeDummyForL10nScript.js:17
|
||||||
msgid "Export subscriptions"
|
msgid "Import subscriptions"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:18
|
#: /app/specialVueFakeDummyForL10nScript.js:18
|
||||||
msgid "Add a podcast"
|
msgid "Import OPML file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:19
|
#: /app/specialVueFakeDummyForL10nScript.js:19
|
||||||
msgid "Could not fetch subscriptions"
|
msgid "Export subscriptions"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:20
|
#: /app/specialVueFakeDummyForL10nScript.js:20
|
||||||
msgid "Find a podcast"
|
msgid "Add a podcast"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:21
|
#: /app/specialVueFakeDummyForL10nScript.js:21
|
||||||
msgid "Error loading feed"
|
msgid "Could not fetch subscriptions"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:22
|
#: /app/specialVueFakeDummyForL10nScript.js:22
|
||||||
msgid "Missing required app"
|
msgid "Find a podcast"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /app/specialVueFakeDummyForL10nScript.js:23
|
#: /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"
|
msgid "Install GPodder Sync"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
Loading…
Reference in New Issue
Block a user