feat: Skip back or forward (fix #159)
All checks were successful
repod / xml (push) Successful in 18s
repod / php (push) Successful in 42s
repod / nodejs (push) Successful in 1m14s
repod / release (push) Has been skipped

This commit is contained in:
Michel Roux 2024-11-09 00:28:19 +01:00
parent a9be73b88d
commit 8cb58fe388
9 changed files with 81 additions and 30 deletions

View File

@ -22,7 +22,9 @@ OC.L10N.register(
"Open website" : "Webseite aufrufen", "Open website" : "Webseite aufrufen",
"Could not change the status of the episode" : "Kann den Status der Folge nicht ändern", "Could not change the status of the episode" : "Kann den Status der Folge nicht ändern",
"Could not fetch episodes" : "Folgen können nicht abgerufen werden", "Could not fetch episodes" : "Folgen können nicht abgerufen werden",
"Rewind 10 seconds" : "10 Sekunden zurückspulen",
"Pause" : "Pause", "Pause" : "Pause",
"Fast forward 30 seconds" : "30 Sekunden vorspulen",
"Mute" : "Stumm", "Mute" : "Stumm",
"Unmute" : "Stummschalten", "Unmute" : "Stummschalten",
"Export subscriptions" : "Abonnements exportieren", "Export subscriptions" : "Abonnements exportieren",

View File

@ -20,7 +20,9 @@
"Open website" : "Webseite aufrufen", "Open website" : "Webseite aufrufen",
"Could not change the status of the episode" : "Kann den Status der Folge nicht ändern", "Could not change the status of the episode" : "Kann den Status der Folge nicht ändern",
"Could not fetch episodes" : "Folgen können nicht abgerufen werden", "Could not fetch episodes" : "Folgen können nicht abgerufen werden",
"Rewind 10 seconds" : "10 Sekunden zurückspulen",
"Pause" : "Pause", "Pause" : "Pause",
"Fast forward 30 seconds" : "30 Sekunden vorspulen",
"Mute" : "Stumm", "Mute" : "Stumm",
"Unmute" : "Stummschalten", "Unmute" : "Stummschalten",
"Export subscriptions" : "Abonnements exportieren", "Export subscriptions" : "Abonnements exportieren",

View File

@ -22,7 +22,9 @@ OC.L10N.register(
"Open website" : "Ouvrir le site web", "Open website" : "Ouvrir le site web",
"Could not change the status of the episode" : "Impossible de changer le status de l'épisode", "Could not change the status of the episode" : "Impossible de changer le status de l'épisode",
"Could not fetch episodes" : "Impossible de récuprer les épisodes", "Could not fetch episodes" : "Impossible de récuprer les épisodes",
"Rewind 10 seconds" : "Retour rapide de 10 secondes",
"Pause" : "Pause", "Pause" : "Pause",
"Fast forward 30 seconds" : "Avance rapide de 30 secondes",
"Mute" : "Silencer", "Mute" : "Silencer",
"Unmute" : "Paroler", "Unmute" : "Paroler",
"Export subscriptions" : "Exporter les abonnements", "Export subscriptions" : "Exporter les abonnements",

View File

@ -20,7 +20,9 @@
"Open website" : "Ouvrir le site web", "Open website" : "Ouvrir le site web",
"Could not change the status of the episode" : "Impossible de changer le status de l'épisode", "Could not change the status of the episode" : "Impossible de changer le status de l'épisode",
"Could not fetch episodes" : "Impossible de récuprer les épisodes", "Could not fetch episodes" : "Impossible de récuprer les épisodes",
"Rewind 10 seconds" : "Retour rapide de 10 secondes",
"Pause" : "Pause", "Pause" : "Pause",
"Fast forward 30 seconds" : "Avance rapide de 30 secondes",
"Mute" : "Silencer", "Mute" : "Silencer",
"Unmute" : "Paroler", "Unmute" : "Paroler",
"Export subscriptions" : "Exporter les abonnements", "Export subscriptions" : "Exporter les abonnements",

View File

@ -6,7 +6,9 @@
"dev": "vite --mode development build", "dev": "vite --mode development build",
"watch": "vite --mode development build --watch", "watch": "vite --mode development build --watch",
"lint": "vue-tsc && eslint src", "lint": "vue-tsc && eslint src",
"stylelint": "stylelint src/**/*.vue src/**/*.scss src/**/*.css" "lint:fix": "vue-tsc && eslint src --fix",
"stylelint": "stylelint src/**/*.vue src/**/*.scss src/**/*.css",
"stylelint:fix": "stylelint src/**/*.vue src/**/*.scss src/**/*.css --fix"
}, },
"type": "module", "type": "module",
"browserslist": [ "browserslist": [

View File

@ -1,5 +1,10 @@
<template> <template>
<div class="controls"> <div class="controls">
<Rewind10Icon
class="pointer rewind"
:size="20"
:title="t('repod', 'Rewind 10 seconds')"
@click="seek((currentTime ?? 0) - 10)" />
<PauseIcon <PauseIcon
v-if="!paused" v-if="!paused"
class="pointer" class="pointer"
@ -12,27 +17,36 @@
:size="50" :size="50"
:title="t('repod', 'Play')" :title="t('repod', 'Play')"
@click="play" /> @click="play" />
<FastForward30Icon
class="pointer forward"
:size="20"
:title="t('repod', 'Fast forward 30 seconds')"
@click="seek((currentTime ?? 0) + 30)" />
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { mapActions, mapState } from 'pinia' import { mapActions, mapState } from 'pinia'
import FastForward30Icon from 'vue-material-design-icons/FastForward30.vue'
import PauseIcon from 'vue-material-design-icons/Pause.vue' import PauseIcon from 'vue-material-design-icons/Pause.vue'
import PlayIcon from 'vue-material-design-icons/Play.vue' import PlayIcon from 'vue-material-design-icons/Play.vue'
import Rewind10Icon from 'vue-material-design-icons/Rewind10.vue'
import { t } from '@nextcloud/l10n' import { t } from '@nextcloud/l10n'
import { usePlayer } from '../../store/player.ts' import { usePlayer } from '../../store/player.ts'
export default { export default {
name: 'Controls', name: 'Controls',
components: { components: {
FastForward30Icon,
PauseIcon, PauseIcon,
PlayIcon, PlayIcon,
Rewind10Icon,
}, },
computed: { computed: {
...mapState(usePlayer, ['paused']), ...mapState(usePlayer, ['currentTime', 'paused']),
}, },
methods: { methods: {
...mapActions(usePlayer, ['play', 'pause']), ...mapActions(usePlayer, ['play', 'pause', 'seek']),
t, t,
}, },
} }
@ -46,4 +60,11 @@ export default {
.pointer { .pointer {
cursor: pointer; cursor: pointer;
} }
@media only screen and (max-width: 768px) {
.forward,
.rewind {
display: none;
}
}
</style> </style>

View File

@ -103,9 +103,15 @@ msgstr "Kann den Status der Folge nicht ändern"
msgid "Could not fetch episodes" msgid "Could not fetch episodes"
msgstr "Folgen können nicht abgerufen werden" msgstr "Folgen können nicht abgerufen werden"
msgid "Rewind 10 seconds"
msgstr "10 Sekunden zurückspulen"
msgid "Pause" msgid "Pause"
msgstr "Pause" msgstr "Pause"
msgid "Fast forward 30 seconds"
msgstr "30 Sekunden vorspulen"
msgid "Mute" msgid "Mute"
msgstr "Stumm" msgstr "Stumm"

View File

@ -107,9 +107,15 @@ msgstr "Impossible de changer le status de l'épisode"
msgid "Could not fetch episodes" msgid "Could not fetch episodes"
msgstr "Impossible de récuprer les épisodes" msgstr "Impossible de récuprer les épisodes"
msgid "Rewind 10 seconds"
msgstr "Retour rapide de 10 secondes"
msgid "Pause" msgid "Pause"
msgstr "Pause" msgstr "Pause"
msgid "Fast forward 30 seconds"
msgstr "Avance rapide de 30 secondes"
msgid "Mute" msgid "Mute"
msgstr "Silencer" msgstr "Silencer"

View File

@ -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-11-08 22:57+0000\n" "POT-Creation-Date: 2024-11-08 23:27+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"
@ -101,7 +101,7 @@ msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:15 #: /app/specialVueFakeDummyForL10nScript.js:15
#: /app/specialVueFakeDummyForL10nScript.js:16 #: /app/specialVueFakeDummyForL10nScript.js:16
#: /app/specialVueFakeDummyForL10nScript.js:30 #: /app/specialVueFakeDummyForL10nScript.js:31
msgid "Play" msgid "Play"
msgstr "" msgstr ""
@ -131,106 +131,114 @@ msgid "Could not fetch episodes"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:29 #: /app/specialVueFakeDummyForL10nScript.js:29
msgid "Rewind 10 seconds"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:30
msgid "Pause" msgid "Pause"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:31
#: /app/specialVueFakeDummyForL10nScript.js:32 #: /app/specialVueFakeDummyForL10nScript.js:32
msgid "Fast forward 30 seconds"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:33 #: /app/specialVueFakeDummyForL10nScript.js:33
#: /app/specialVueFakeDummyForL10nScript.js:34
#: /app/specialVueFakeDummyForL10nScript.js:35
msgid "Mute" msgid "Mute"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:34 #: /app/specialVueFakeDummyForL10nScript.js:36
msgid "Unmute" msgid "Unmute"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:35 #: /app/specialVueFakeDummyForL10nScript.js:37
msgid "Export subscriptions" msgid "Export subscriptions"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:36 #: /app/specialVueFakeDummyForL10nScript.js:38
msgid "Filtering episodes" msgid "Filtering episodes"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:37 #: /app/specialVueFakeDummyForL10nScript.js:39
msgid "Show all" msgid "Show all"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:38 #: /app/specialVueFakeDummyForL10nScript.js:40
msgid "Listened" msgid "Listened"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:39 #: /app/specialVueFakeDummyForL10nScript.js:41
msgid "Listening" msgid "Listening"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:40 #: /app/specialVueFakeDummyForL10nScript.js:42
msgid "Unlistened" msgid "Unlistened"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:41 #: /app/specialVueFakeDummyForL10nScript.js:43
msgid "Import subscriptions" msgid "Import subscriptions"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:42 #: /app/specialVueFakeDummyForL10nScript.js:44
msgid "Import OPML file" msgid "Import OPML file"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:43 #: /app/specialVueFakeDummyForL10nScript.js:45
msgid "Rate RePod ❤️" msgid "Rate RePod ❤️"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:44 #: /app/specialVueFakeDummyForL10nScript.js:46
msgid "Playback speed" msgid "Playback speed"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:45
#: /app/specialVueFakeDummyForL10nScript.js:46
#: /app/specialVueFakeDummyForL10nScript.js:47 #: /app/specialVueFakeDummyForL10nScript.js:47
#: /app/specialVueFakeDummyForL10nScript.js:48
#: /app/specialVueFakeDummyForL10nScript.js:49
msgid "Favorite" msgid "Favorite"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:48 #: /app/specialVueFakeDummyForL10nScript.js:50
msgid "Are you sure you want to delete this subscription?" msgid "Are you sure you want to delete this subscription?"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:49 #: /app/specialVueFakeDummyForL10nScript.js:51
msgid "Error while removing the feed" msgid "Error while removing the feed"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:50 #: /app/specialVueFakeDummyForL10nScript.js:52
msgid "You can only have 10 favorites" msgid "You can only have 10 favorites"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:51 #: /app/specialVueFakeDummyForL10nScript.js:53
msgid "Add a podcast" msgid "Add a podcast"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:52 #: /app/specialVueFakeDummyForL10nScript.js:54
msgid "Could not fetch subscriptions" msgid "Could not fetch subscriptions"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:53 #: /app/specialVueFakeDummyForL10nScript.js:55
msgid "Find a podcast" msgid "Find a podcast"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:54 #: /app/specialVueFakeDummyForL10nScript.js:56
msgid "Error loading feed" msgid "Error loading feed"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:55 #: /app/specialVueFakeDummyForL10nScript.js:57
msgid "Missing required app" msgid "Missing required app"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:56 #: /app/specialVueFakeDummyForL10nScript.js:58
msgid "Install GPodder Sync" msgid "Install GPodder Sync"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:57 #: /app/specialVueFakeDummyForL10nScript.js:59
msgid "Pin some subscriptions to see their latest updates" msgid "Pin some subscriptions to see their latest updates"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:58 #: /app/specialVueFakeDummyForL10nScript.js:60
msgid "No favorites" msgid "No favorites"
msgstr "" msgstr ""