feat: 🔍 add CTA rating to settings

This commit is contained in:
Michel Roux 2024-03-16 18:35:31 +01:00
parent bebd6bf5ed
commit 867afbe4df
16 changed files with 151 additions and 103 deletions

View File

@ -31,6 +31,7 @@ OC.L10N.register(
"Unlistened" : "Non lus",
"Import subscriptions" : "Importer les abonnements",
"Import OPML file" : "Importer un fichier OPML",
"Rate RePod ❤️" : "Donnez votre avis ❤️",
"Playback speed" : "Vitesse de lecture",
"Are you sure you want to delete this subscription?" : "Êtes-vous sûr de vouloir supprimer ce flux ?",
"Error while removing the feed" : "Erreur lors de la suppression du flux",

View File

@ -29,6 +29,7 @@
"Unlistened" : "Non lus",
"Import subscriptions" : "Importer les abonnements",
"Import OPML file" : "Importer un fichier OPML",
"Rate RePod ❤️" : "Donnez votre avis ❤️",
"Playback speed" : "Vitesse de lecture",
"Are you sure you want to delete this subscription?" : "Êtes-vous sûr de vouloir supprimer ce flux ?",
"Error while removing the feed" : "Erreur lors de la suppression du flux",

View File

@ -12,7 +12,7 @@
:href="link"
target="_blank">
<template #icon>
<OpenInNew :size="20" />
<OpenInNewIcon :size="20" />
</template>
{{ title }}
</NcButton>
@ -20,7 +20,7 @@
:href="url"
target="_blank">
<template #icon>
<Download :size="20" />
<DownloadIcon :size="20" />
</template>
{{ t('repod', 'Download') }} {{ size ? `(${episodeFileSize})` : '' }}
</NcButton>
@ -30,18 +30,18 @@
<script>
import { NcAvatar, NcButton } from '@nextcloud/vue'
import Download from 'vue-material-design-icons/Download.vue'
import OpenInNew from 'vue-material-design-icons/OpenInNew.vue'
import DownloadIcon from 'vue-material-design-icons/Download.vue'
import OpenInNewIcon from 'vue-material-design-icons/OpenInNew.vue'
import { cleanHtml } from '../../utils/text.js'
import { humanFileSize } from '../../utils/size.js'
export default {
name: 'Modal',
components: {
Download,
DownloadIcon,
NcAvatar,
NcButton,
OpenInNew,
OpenInNewIcon,
},
props: {
description: {

View File

@ -2,7 +2,7 @@
<NcAppNavigationList>
<NcAppNavigationNewItem :name="t('repod', 'Add a RSS link')" @new-item="addSubscription">
<template #icon>
<Plus :size="20" />
<PlusIcon :size="20" />
</template>
</NcAppNavigationNewItem>
</NcAppNavigationList>
@ -10,7 +10,7 @@
<script>
import { NcAppNavigationList, NcAppNavigationNewItem } from '@nextcloud/vue'
import Plus from 'vue-material-design-icons/Plus.vue'
import PlusIcon from 'vue-material-design-icons/Plus.vue'
import { encodeUrl } from '../../utils/url.js'
export default {
@ -18,7 +18,7 @@ export default {
components: {
NcAppNavigationList,
NcAppNavigationNewItem,
Plus,
PlusIcon,
},
methods: {
addSubscription(feedUrl) {

View File

@ -9,7 +9,7 @@
:size="128"
:url="imageUrl" />
<a class="feed" :href="url" @click.prevent="copyFeed">
<Rss :size="20" />
<RssIcon :size="20" />
<i>{{ t('repod', 'Copy feed') }}</i>
</a>
</div>
@ -28,7 +28,7 @@
:text="t('repod', 'Subscribe')"
@click="addSubscription">
<template #icon>
<Plus :size="20" />
<PlusIcon :size="20" />
</template>
</NcAppNavigationNew>
</div>
@ -39,8 +39,8 @@
<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 PlusIcon from 'vue-material-design-icons/Plus.vue'
import RssIcon from 'vue-material-design-icons/Rss.vue'
import axios from '@nextcloud/axios'
import { cleanHtml } from '../../utils/text.js'
import { decodeUrl } from '../../utils/url.js'
@ -51,8 +51,8 @@ export default {
components: {
NcAvatar,
NcAppNavigationNew,
Plus,
Rss,
PlusIcon,
RssIcon,
},
props: {
author: {

View File

@ -18,7 +18,7 @@
:title="t('repod', 'Play')"
@click="load(episode)">
<template #icon>
<PlayButton :size="20" />
<PlayIcon :size="20" />
</template>
</NcActionButton>
<NcActionButton v-if="isCurrentEpisode(episode)"
@ -27,7 +27,7 @@
:title="t('repod', 'Stop')"
@click="load(null)">
<template #icon>
<StopButton :size="20" />
<StopIcon :size="20" />
</template>
</NcActionButton>
</template>
@ -40,7 +40,7 @@
:title="t('repod', 'Mark as read')"
@click="markAs(episode, true)">
<template #icon>
<PlaylistPlay :size="20" />
<PlaylistPlayIcon :size="20" />
</template>
</NcActionButton>
<NcActionButton v-if="episode.duration && hasEnded(episode)"
@ -50,7 +50,7 @@
:title="t('repod', 'Mark as unread')"
@click="markAs(episode, false)">
<template #icon>
<PlaylistRemove :size="20" />
<PlaylistRemoveIcon :size="20" />
</template>
</NcActionButton>
<NcActionLink v-if="episode.link"
@ -59,7 +59,7 @@
target="_blank"
:title="t('repod', 'Open website')">
<template #icon>
<OpenInNew :size="20" />
<OpenInNewIcon :size="20" />
</template>
</NcActionLink>
<NcActionLink v-if="episode.url"
@ -68,7 +68,7 @@
target="_blank"
:title="t('repod', 'Download')">
<template #icon>
<Download :size="20" />
<DownloadIcon :size="20" />
</template>
</NcActionLink>
</NcActions>
@ -103,15 +103,15 @@
<script>
import { NcActionButton, NcActionLink, NcActions, NcAvatar, NcListItem, NcModal, NcProgressBar } from '@nextcloud/vue'
import { durationToSeconds, formatEpisodeTimestamp, formatLocaleDate } from '../../utils/time.js'
import Download from 'vue-material-design-icons/Download.vue'
import DownloadIcon from 'vue-material-design-icons/Download.vue'
import { EventBus } from '../../store/bus.js'
import Loading from '../Atoms/Loading.vue'
import Modal from '../Atoms/Modal.vue'
import OpenInNew from 'vue-material-design-icons/OpenInNew.vue'
import PlayButton from 'vue-material-design-icons/Play.vue'
import PlaylistPlay from 'vue-material-design-icons/PlaylistPlay.vue'
import PlaylistRemove from 'vue-material-design-icons/PlaylistRemove.vue'
import StopButton from 'vue-material-design-icons/Stop.vue'
import OpenInNewIcon from 'vue-material-design-icons/OpenInNew.vue'
import PlayIcon from 'vue-material-design-icons/Play.vue'
import PlaylistPlayIcon from 'vue-material-design-icons/PlaylistPlay.vue'
import PlaylistRemoveIcon from 'vue-material-design-icons/PlaylistRemove.vue'
import StopIcon from 'vue-material-design-icons/Stop.vue'
import axios from '@nextcloud/axios'
import { decodeUrl } from '../../utils/url.js'
import { generateUrl } from '@nextcloud/router'
@ -120,7 +120,7 @@ import { showError } from '@nextcloud/dialogs'
export default {
name: 'Episodes',
components: {
Download,
DownloadIcon,
Loading,
Modal,
NcActionButton,
@ -130,11 +130,11 @@ export default {
NcListItem,
NcModal,
NcProgressBar,
OpenInNew,
PlayButton,
PlaylistPlay,
PlaylistRemove,
StopButton,
OpenInNewIcon,
PlayIcon,
PlaylistPlayIcon,
PlaylistRemoveIcon,
StopIcon,
},
data() {
return {

View File

@ -1,10 +1,10 @@
<template>
<div class="controls">
<PauseButton v-if="!player.paused"
<PauseIcon v-if="!player.paused"
class="pointer"
:size="50"
@click="$store.dispatch('player/pause')" />
<PlayButton v-if="player.paused"
<PlayIcon v-if="player.paused"
class="pointer"
:size="50"
@click="$store.dispatch('player/play')" />
@ -12,14 +12,14 @@
</template>
<script>
import PauseButton from 'vue-material-design-icons/Pause.vue'
import PlayButton from 'vue-material-design-icons/Play.vue'
import PauseIcon from 'vue-material-design-icons/Pause.vue'
import PlayIcon from 'vue-material-design-icons/Play.vue'
export default {
name: 'Controls',
components: {
PauseButton,
PlayButton,
PauseIcon,
PlayIcon,
},
computed: {
player() {

View File

@ -1,18 +1,18 @@
<template>
<div>
<VolumeHigh v-if="player.volume > 0.7"
<VolumeHighIcon v-if="player.volume > 0.7"
class="pointer"
:size="30"
@click="mute" />
<VolumeLow v-if="player.volume > 0 && player.volume <= 0.3"
<VolumeLowIcon v-if="player.volume > 0 && player.volume <= 0.3"
class="pointer"
:size="30"
@click="mute" />
<VolumeMedium v-if="player.volume > 0.3 && player.volume <= 0.7"
<VolumeMediumIcon v-if="player.volume > 0.3 && player.volume <= 0.7"
class="pointer"
:size="30"
@click="mute" />
<VolumeMute v-if="player.volume === 0"
<VolumeMuteIcon v-if="player.volume === 0"
class="pointer"
:size="30"
@click="$store.dispatch('player/volume', volumeMuted)" />
@ -26,18 +26,18 @@
</template>
<script>
import VolumeHigh from 'vue-material-design-icons/VolumeHigh.vue'
import VolumeLow from 'vue-material-design-icons/VolumeLow.vue'
import VolumeMedium from 'vue-material-design-icons/VolumeMedium.vue'
import VolumeMute from 'vue-material-design-icons/VolumeMute.vue'
import VolumeHighIcon from 'vue-material-design-icons/VolumeHigh.vue'
import VolumeLowIcon from 'vue-material-design-icons/VolumeLow.vue'
import VolumeMediumIcon from 'vue-material-design-icons/VolumeMedium.vue'
import VolumeMuteIcon from 'vue-material-design-icons/VolumeMute.vue'
export default {
name: 'Volume',
components: {
VolumeHigh,
VolumeLow,
VolumeMedium,
VolumeMute,
VolumeHighIcon,
VolumeLowIcon,
VolumeMediumIcon,
VolumeMuteIcon,
},
data() {
return {

View File

@ -23,7 +23,7 @@
</template>
<template #icon>
<FilterIcon v-if="all" :size="20" />
<FilterSettings v-if="!all" :size="20" />
<FilterSettingsIcon v-if="!all" :size="20" />
</template>
</NcAppNavigationItem>
</template>
@ -31,13 +31,13 @@
<script>
import { NcActionCheckbox, NcAppNavigationItem } from '@nextcloud/vue'
import FilterIcon from 'vue-material-design-icons/Filter.vue'
import FilterSettings from 'vue-material-design-icons/FilterSettings.vue'
import FilterSettingsIcon from 'vue-material-design-icons/FilterSettings.vue'
export default {
name: 'Filters',
components: {
FilterIcon,
FilterSettings,
FilterSettingsIcon,
NcAppNavigationItem,
NcActionCheckbox,
},

View File

@ -0,0 +1,21 @@
<template>
<NcAppNavigationItem href="https://apps.nextcloud.com/apps/repod#comments"
:name="t('repod', 'Rate RePod ❤️')">
<template #icon>
<StarIcon :size="20" />
</template>
</NcAppNavigationItem>
</template>
<script>
import { NcAppNavigationItem } from '@nextcloud/vue'
import StarIcon from 'vue-material-design-icons/Star.vue'
export default {
name: 'Rate',
components: {
NcAppNavigationItem,
StarIcon,
},
}
</script>

View File

@ -0,0 +1,30 @@
<template>
<NcAppNavigationSettings>
<Filters />
<Speed />
<Import />
<Export />
<Rate />
</NcAppNavigationSettings>
</template>
<script>
import Export from './Export.vue'
import Filters from './Filters.vue'
import Import from './Import.vue'
import { NcAppNavigationSettings } from '@nextcloud/vue'
import Rate from './Rate.vue'
import Speed from './Speed.vue'
export default {
name: 'Settings',
components: {
Export,
Filters,
Import,
NcAppNavigationSettings,
Rate,
Speed,
},
}
</script>

View File

@ -2,43 +2,43 @@
<NcAppNavigationItem :name="t('repod', 'Playback speed')">
<template #extra>
<div class="extra">
<Minus class="pointer"
<MinusIcon class="pointer"
:size="20"
@click="changeRate(-.1)" />
<NcCounterBubble class="counter">
x{{ player.rate }}
</NcCounterBubble>
<Plus class="pointer"
<PlusIcon class="pointer"
:size="20"
@click="changeRate(.1)" />
</div>
</template>
<template #icon>
<SpeedometerSlow v-if="player.rate < 1" :size="20" />
<SpeedometerMedium v-if="player.rate === 1" :size="20" />
<Speedometer v-if="player.rate > 1" :size="20" />
<SpeedometerSlowIcon v-if="player.rate < 1" :size="20" />
<SpeedometerMediumIcon v-if="player.rate === 1" :size="20" />
<SpeedometerIcon v-if="player.rate > 1" :size="20" />
</template>
</NcAppNavigationItem>
</template>
<script>
import { NcAppNavigationItem, NcCounterBubble } from '@nextcloud/vue'
import Minus from 'vue-material-design-icons/Minus.vue'
import Plus from 'vue-material-design-icons/Plus.vue'
import Speedometer from 'vue-material-design-icons/Speedometer.vue'
import SpeedometerMedium from 'vue-material-design-icons/SpeedometerMedium.vue'
import SpeedometerSlow from 'vue-material-design-icons/SpeedometerSlow.vue'
import MinusIcon from 'vue-material-design-icons/Minus.vue'
import PlusIcon from 'vue-material-design-icons/Plus.vue'
import SpeedometerIcon from 'vue-material-design-icons/Speedometer.vue'
import SpeedometerMediumIcon from 'vue-material-design-icons/SpeedometerMedium.vue'
import SpeedometerSlowIcon from 'vue-material-design-icons/SpeedometerSlow.vue'
export default {
name: 'Speed',
components: {
NcAppNavigationItem,
NcCounterBubble,
Minus,
Plus,
Speedometer,
SpeedometerMedium,
SpeedometerSlow,
MinusIcon,
PlusIcon,
SpeedometerIcon,
SpeedometerMediumIcon,
SpeedometerSlowIcon,
},
computed: {
player() {

View File

@ -8,7 +8,7 @@
:title="t(`core`, 'Delete')"
@click="deleteSubscription">
<template #icon>
<Delete :size="20" />
<DeleteIcon :size="20" />
</template>
</NcActionButton>
</template>
@ -17,15 +17,15 @@
:display-name="feed.author || feed.title"
:is-no-user="true"
:url="feed.imageUrl" />
<Alert v-if="failed" />
<AlertIcon v-if="failed" />
</template>
</NcAppNavigationItem>
</template>
<script>
import { NcActionButton, NcAppNavigationItem, NcAvatar } from '@nextcloud/vue'
import Alert from 'vue-material-design-icons/Alert.vue'
import Delete from 'vue-material-design-icons/Delete.vue'
import AlertIcon from 'vue-material-design-icons/Alert.vue'
import DeleteIcon from 'vue-material-design-icons/Delete.vue'
import axios from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router'
import { showError } from '@nextcloud/dialogs'
@ -34,8 +34,8 @@ import { toUrl } from '../../utils/url.js'
export default {
name: 'Item',
components: {
Alert,
Delete,
AlertIcon,
DeleteIcon,
NcActionButton,
NcAppNavigationItem,
NcAvatar,

View File

@ -5,7 +5,7 @@
<router-link to="/">
<NcAppNavigationNew :text="t('repod', 'Add a podcast')">
<template #icon>
<Plus :size="20" />
<PlusIcon :size="20" />
</template>
</NcAppNavigationNew>
</router-link>
@ -18,43 +18,31 @@
</NcAppContentList>
</template>
<template #footer>
<NcAppNavigationSettings>
<Filters />
<Speed />
<Import />
<Export />
</NcAppNavigationSettings>
<Settings />
</template>
</AppNavigation>
</template>
<script>
import { NcAppContentList, NcAppNavigationList, NcAppNavigationNew, NcAppNavigationSettings } from '@nextcloud/vue'
import { NcAppContentList, NcAppNavigationList, NcAppNavigationNew } from '@nextcloud/vue'
import AppNavigation from '../Atoms/AppNavigation.vue'
import Export from '../Settings/Export.vue'
import Filters from '../Settings/Filters.vue'
import Import from '../Settings/Import.vue'
import Item from './Item.vue'
import Loading from '../Atoms/Loading.vue'
import Plus from 'vue-material-design-icons/Plus.vue'
import Speed from '../Settings/Speed.vue'
import PlusIcon from 'vue-material-design-icons/Plus.vue'
import Settings from '../Settings/Settings.vue'
import { showError } from '@nextcloud/dialogs'
export default {
name: 'Subscriptions',
components: {
AppNavigation,
Export,
Filters,
Import,
Item,
Loading,
NcAppContentList,
NcAppNavigationList,
NcAppNavigationNew,
NcAppNavigationSettings,
Plus,
Speed,
PlusIcon,
Settings,
},
data() {
return {

View File

@ -122,6 +122,9 @@ msgstr "Importer les abonnements"
msgid "Import OPML file"
msgstr "Importer un fichier OPML"
msgid "Rate RePod ❤️"
msgstr "Donnez votre avis ❤️"
msgid "Playback speed"
msgstr "Vitesse de 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-03-05 10:53+0000\n"
"POT-Creation-Date: 2024-03-16 17:33+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"
@ -159,37 +159,41 @@ msgid "Import OPML file"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:37
msgid "Playback speed"
msgid "Rate RePod ❤️"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:38
msgid "Are you sure you want to delete this subscription?"
msgid "Playback speed"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:39
msgid "Error while removing the feed"
msgid "Are you sure you want to delete this subscription?"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:40
msgid "Add a podcast"
msgid "Error while removing the feed"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:41
msgid "Could not fetch subscriptions"
msgid "Add a podcast"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:42
msgid "Find a podcast"
msgid "Could not fetch subscriptions"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:43
msgid "Error loading feed"
msgid "Find a podcast"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:44
msgid "Missing required app"
msgid "Error loading feed"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:45
msgid "Missing required app"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:46
msgid "Install GPodder Sync"
msgstr ""