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",
"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",
"Rewind 10 seconds" : "10 Sekunden zurückspulen",
"Pause" : "Pause",
"Fast forward 30 seconds" : "30 Sekunden vorspulen",
"Mute" : "Stumm",
"Unmute" : "Stummschalten",
"Export subscriptions" : "Abonnements exportieren",

View File

@ -20,7 +20,9 @@
"Open website" : "Webseite aufrufen",
"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",
"Rewind 10 seconds" : "10 Sekunden zurückspulen",
"Pause" : "Pause",
"Fast forward 30 seconds" : "30 Sekunden vorspulen",
"Mute" : "Stumm",
"Unmute" : "Stummschalten",
"Export subscriptions" : "Abonnements exportieren",

View File

@ -22,7 +22,9 @@ OC.L10N.register(
"Open website" : "Ouvrir le site web",
"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",
"Rewind 10 seconds" : "Retour rapide de 10 secondes",
"Pause" : "Pause",
"Fast forward 30 seconds" : "Avance rapide de 30 secondes",
"Mute" : "Silencer",
"Unmute" : "Paroler",
"Export subscriptions" : "Exporter les abonnements",

View File

@ -20,7 +20,9 @@
"Open website" : "Ouvrir le site web",
"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",
"Rewind 10 seconds" : "Retour rapide de 10 secondes",
"Pause" : "Pause",
"Fast forward 30 seconds" : "Avance rapide de 30 secondes",
"Mute" : "Silencer",
"Unmute" : "Paroler",
"Export subscriptions" : "Exporter les abonnements",

View File

@ -6,7 +6,9 @@
"dev": "vite --mode development build",
"watch": "vite --mode development build --watch",
"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",
"browserslist": [

View File

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

View File

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

View File

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

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