Compare commits

...

8 Commits
3.5.0 ... main

Author SHA1 Message Date
df17f399d2 chore: ⬆️ update lock
All checks were successful
repod / xml (push) Successful in 12s
repod / php (push) Successful in 1m6s
repod / nodejs (push) Successful in 1m7s
repod / release (push) Has been skipped
2024-12-20 14:19:36 +00:00
a4af911ff3 fix: ⬇️ downgrade rector because of conflict with php 8.3
All checks were successful
repod / xml (push) Successful in 1m32s
repod / php (push) Successful in 1m29s
repod / nodejs (push) Successful in 3m19s
repod / release (push) Has been skipped
2024-12-13 20:39:39 +01:00
b0e68b6b4e Merge pull request 'chore(deps): update dependency nextcloud/ocp to ^30.0.4' (#221) from renovate/nextcloud-ocp-30.x into main
All checks were successful
repod / xml (push) Successful in 14s
repod / php (push) Successful in 58s
repod / nodejs (push) Successful in 1m4s
repod / release (push) Has been skipped
Reviewed-on: #221
2024-12-13 09:57:04 +00:00
9ad2e4f824 chore(deps): update dependency nextcloud/ocp to ^30.0.4
All checks were successful
repod / xml (push) Successful in 9s
repod / php (push) Successful in 53s
repod / nodejs (push) Successful in 1m6s
repod / release (push) Has been skipped
2024-12-13 09:36:52 +00:00
a104b7c460 Merge pull request 'chore(deps): update dependency rector/rector to v2' (#222) from renovate/rector-rector-2.x into main
All checks were successful
repod / xml (push) Successful in 12s
repod / php (push) Successful in 1m11s
repod / nodejs (push) Successful in 1m10s
repod / release (push) Has been skipped
Reviewed-on: #222
2024-12-13 09:28:10 +00:00
7045716799 chore(deps): update dependency rector/rector to v2
All checks were successful
repod / xml (push) Successful in 11s
repod / php (push) Successful in 53s
repod / nodejs (push) Successful in 1m6s
repod / release (push) Has been skipped
2024-12-13 06:49:00 +00:00
markus phi
ef3fc2d6ea Translated using Weblate (German)
All checks were successful
repod / xml (push) Successful in 28s
repod / php (push) Successful in 52s
repod / nodejs (push) Successful in 1m8s
repod / release (push) Has been skipped
Currently translated at 66.6% (40 of 60 strings)

Co-authored-by: markus phi <repodtranslate@solinetcafe.org>
Translate-URL: https://translate.crystalyx.net/projects/repod/gitea/de/
Translation: RePod/Gitea
2024-12-12 23:02:51 +00:00
6cd1058048 style: 🧑‍💻 update types ont loop functions
All checks were successful
repod / xml (push) Successful in 18s
repod / php (push) Successful in 58s
repod / nodejs (push) Successful in 1m7s
repod / release (push) Has been skipped
2024-12-11 21:43:22 +01:00
12 changed files with 537 additions and 473 deletions

View File

@ -19,11 +19,11 @@
"php": "^8.1" "php": "^8.1"
}, },
"require-dev": { "require-dev": {
"nextcloud/ocp": "^30.0.3", "nextcloud/ocp": "^30.0.4",
"roave/security-advisories": "dev-latest", "roave/security-advisories": "dev-latest",
"nextcloud/coding-standard": "^1.3.2", "nextcloud/coding-standard": "^1.3.2",
"nextcloud/rector": "^0.2.1", "nextcloud/rector": "^0.2.1",
"rector/rector": "^1.2.10", "rector/rector": "~1.2.10",
"vimeo/psalm": "^5.26.1" "vimeo/psalm": "^5.26.1"
}, },
"config": { "config": {

51
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "637d36247b6b2a581d855299334035e8", "content-hash": "8985893a48af49654e50784bda34fb89",
"packages": [], "packages": [],
"packages-dev": [ "packages-dev": [
{ {
@ -194,13 +194,13 @@
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": {
"dev-main": "3.x-dev"
},
"phpstan": { "phpstan": {
"includes": [ "includes": [
"extension.neon" "extension.neon"
] ]
},
"branch-alias": {
"dev-main": "3.x-dev"
} }
}, },
"autoload": { "autoload": {
@ -778,7 +778,7 @@
}, },
{ {
"name": "nextcloud/ocp", "name": "nextcloud/ocp",
"version": "v30.0.3", "version": "v30.0.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nextcloud-deps/ocp.git", "url": "https://github.com/nextcloud-deps/ocp.git",
@ -816,7 +816,7 @@
"description": "Composer package containing Nextcloud's public API (classes, interfaces)", "description": "Composer package containing Nextcloud's public API (classes, interfaces)",
"support": { "support": {
"issues": "https://github.com/nextcloud-deps/ocp/issues", "issues": "https://github.com/nextcloud-deps/ocp/issues",
"source": "https://github.com/nextcloud-deps/ocp/tree/v30.0.3" "source": "https://github.com/nextcloud-deps/ocp/tree/v30.0.4"
}, },
"time": "2024-11-29T00:46:59+00:00" "time": "2024-11-29T00:46:59+00:00"
}, },
@ -1214,16 +1214,16 @@
}, },
{ {
"name": "phpstan/phpstan", "name": "phpstan/phpstan",
"version": "1.12.12", "version": "1.12.13",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpstan.git", "url": "https://github.com/phpstan/phpstan.git",
"reference": "b5ae1b88f471d3fd4ba1aa0046234b5ca3776dd0" "reference": "9b469068840cfa031e1deaf2fa1886d00e20680f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/b5ae1b88f471d3fd4ba1aa0046234b5ca3776dd0", "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9b469068840cfa031e1deaf2fa1886d00e20680f",
"reference": "b5ae1b88f471d3fd4ba1aa0046234b5ca3776dd0", "reference": "9b469068840cfa031e1deaf2fa1886d00e20680f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1268,7 +1268,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2024-11-28T22:13:23+00:00" "time": "2024-12-17T17:00:20+00:00"
}, },
{ {
"name": "psr/clock", "name": "psr/clock",
@ -1536,12 +1536,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Roave/SecurityAdvisories.git", "url": "https://github.com/Roave/SecurityAdvisories.git",
"reference": "1fd8b74024b8938b25df3a9971c7ad9d57d4f592" "reference": "4aa68d3ea343b9576b5fdebef1332f701a7bc994"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/1fd8b74024b8938b25df3a9971c7ad9d57d4f592", "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/4aa68d3ea343b9576b5fdebef1332f701a7bc994",
"reference": "1fd8b74024b8938b25df3a9971c7ad9d57d4f592", "reference": "4aa68d3ea343b9576b5fdebef1332f701a7bc994",
"shasum": "" "shasum": ""
}, },
"conflict": { "conflict": {
@ -1651,7 +1651,7 @@
"contao/managed-edition": "<=1.5", "contao/managed-edition": "<=1.5",
"corveda/phpsandbox": "<1.3.5", "corveda/phpsandbox": "<1.3.5",
"cosenary/instagram": "<=2.3", "cosenary/instagram": "<=2.3",
"craftcms/cms": "<=4.12.6.1|>=5,<=5.4.7.1", "craftcms/cms": "<4.13.2|>=5,<5.5.2",
"croogo/croogo": "<4", "croogo/croogo": "<4",
"cuyz/valinor": "<0.12", "cuyz/valinor": "<0.12",
"czim/file-handling": "<1.5|>=2,<2.3", "czim/file-handling": "<1.5|>=2,<2.3",
@ -1865,6 +1865,7 @@
"laravel/fortify": "<1.11.1", "laravel/fortify": "<1.11.1",
"laravel/framework": "<6.20.45|>=7,<7.30.7|>=8,<8.83.28|>=9,<9.52.17|>=10,<10.48.23|>=11,<11.31", "laravel/framework": "<6.20.45|>=7,<7.30.7|>=8,<8.83.28|>=9,<9.52.17|>=10,<10.48.23|>=11,<11.31",
"laravel/laravel": ">=5.4,<5.4.22", "laravel/laravel": ">=5.4,<5.4.22",
"laravel/pulse": "<1.3.1",
"laravel/reverb": "<1.4", "laravel/reverb": "<1.4",
"laravel/socialite": ">=1,<2.0.10", "laravel/socialite": ">=1,<2.0.10",
"latte/latte": "<2.10.8", "latte/latte": "<2.10.8",
@ -1945,7 +1946,6 @@
"neos/swiftmailer": "<5.4.5", "neos/swiftmailer": "<5.4.5",
"netgen/tagsbundle": ">=3.4,<3.4.11|>=4,<4.0.15", "netgen/tagsbundle": ">=3.4,<3.4.11|>=4,<4.0.15",
"nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6", "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6",
"nette/database": "<=3.2.4",
"nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13", "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13",
"nilsteampassnet/teampass": "<3.0.10", "nilsteampassnet/teampass": "<3.0.10",
"nonfiction/nterchange": "<4.1.1", "nonfiction/nterchange": "<4.1.1",
@ -2090,6 +2090,7 @@
"shopware/storefront": "<=6.4.8.1|>=6.5.8,<6.5.8.7-dev", "shopware/storefront": "<=6.4.8.1|>=6.5.8,<6.5.8.7-dev",
"shopxo/shopxo": "<=6.1", "shopxo/shopxo": "<=6.1",
"showdoc/showdoc": "<2.10.4", "showdoc/showdoc": "<2.10.4",
"shuchkin/simplexlsx": ">=1.0.12,<1.1.12",
"silverstripe-australia/advancedreports": ">=1,<=2", "silverstripe-australia/advancedreports": ">=1,<=2",
"silverstripe/admin": "<1.13.19|>=2,<2.1.8", "silverstripe/admin": "<1.13.19|>=2,<2.1.8",
"silverstripe/assets": ">=1,<1.11.1", "silverstripe/assets": ">=1,<1.11.1",
@ -2127,7 +2128,7 @@
"snipe/snipe-it": "<=7.0.13", "snipe/snipe-it": "<=7.0.13",
"socalnick/scn-social-auth": "<1.15.2", "socalnick/scn-social-auth": "<1.15.2",
"socialiteproviders/steam": "<1.1", "socialiteproviders/steam": "<1.1",
"spatie/browsershot": "<3.57.4", "spatie/browsershot": "<5.0.2",
"spatie/image-optimizer": "<1.7.3", "spatie/image-optimizer": "<1.7.3",
"spencer14420/sp-php-email-handler": "<1", "spencer14420/sp-php-email-handler": "<1",
"spipu/html2pdf": "<5.2.8", "spipu/html2pdf": "<5.2.8",
@ -2240,7 +2241,7 @@
"typo3fluid/fluid": ">=2,<2.0.8|>=2.1,<2.1.7|>=2.2,<2.2.4|>=2.3,<2.3.7|>=2.4,<2.4.4|>=2.5,<2.5.11|>=2.6,<2.6.10", "typo3fluid/fluid": ">=2,<2.0.8|>=2.1,<2.1.7|>=2.2,<2.2.4|>=2.3,<2.3.7|>=2.4,<2.4.4|>=2.5,<2.5.11|>=2.6,<2.6.10",
"ua-parser/uap-php": "<3.8", "ua-parser/uap-php": "<3.8",
"uasoft-indonesia/badaso": "<=2.9.7", "uasoft-indonesia/badaso": "<=2.9.7",
"unisharp/laravel-filemanager": "<2.6.4", "unisharp/laravel-filemanager": "<2.9.1",
"unopim/unopim": "<0.1.5", "unopim/unopim": "<0.1.5",
"userfrosting/userfrosting": ">=0.3.1,<4.6.3", "userfrosting/userfrosting": ">=0.3.1,<4.6.3",
"usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2", "usmanhalalit/pixie": "<1.0.3|>=2,<2.0.2",
@ -2379,7 +2380,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-12-10T21:04:50+00:00" "time": "2024-12-18T20:05:40+00:00"
}, },
{ {
"name": "sebastian/diff", "name": "sebastian/diff",
@ -2450,16 +2451,16 @@
}, },
{ {
"name": "spatie/array-to-xml", "name": "spatie/array-to-xml",
"version": "3.3.0", "version": "3.4.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/spatie/array-to-xml.git", "url": "https://github.com/spatie/array-to-xml.git",
"reference": "f56b220fe2db1ade4c88098d83413ebdfc3bf876" "reference": "7dcfc67d60b0272926dabad1ec01f6b8a5fb5e67"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/spatie/array-to-xml/zipball/f56b220fe2db1ade4c88098d83413ebdfc3bf876", "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/7dcfc67d60b0272926dabad1ec01f6b8a5fb5e67",
"reference": "f56b220fe2db1ade4c88098d83413ebdfc3bf876", "reference": "7dcfc67d60b0272926dabad1ec01f6b8a5fb5e67",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2502,7 +2503,7 @@
"xml" "xml"
], ],
"support": { "support": {
"source": "https://github.com/spatie/array-to-xml/tree/3.3.0" "source": "https://github.com/spatie/array-to-xml/tree/3.4.0"
}, },
"funding": [ "funding": [
{ {
@ -2514,7 +2515,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2024-05-01T10:20:27+00:00" "time": "2024-12-16T12:45:15+00:00"
}, },
{ {
"name": "symfony/console", "name": "symfony/console",

847
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
<NcAppNavigationList class="list"> <NcAppNavigationList class="list">
<NcAppNavigationNewItem <NcAppNavigationNewItem
:name="t('repod', 'Add a RSS link')" :name="t('repod', 'Add a RSS link')"
@new-item="(url) => $router.push(toFeedUrl(url))"> @new-item="(url: string) => $router.push(toFeedUrl(url))">
<template #icon> <template #icon>
<PlusIcon :size="20" /> <PlusIcon :size="20" />
</template> </template>

View File

@ -110,7 +110,8 @@ export default {
) )
if (currentSearch === this.value) { if (currentSearch === this.value) {
this.feeds = [...feeds.data].sort( this.feeds = [...feeds.data].sort(
(a, b) => b.fetchedAtUnix - a.fetchedAtUnix, (a: PodcastDataInterface, b: PodcastDataInterface) =>
b.fetchedAtUnix - a.fetchedAtUnix,
) )
} }
} catch (e) { } catch (e) {

View File

@ -3,7 +3,7 @@
<Loading v-if="loading" /> <Loading v-if="loading" />
<ul v-if="!loading"> <ul v-if="!loading">
<NcListItem <NcListItem
v-if="!episodes.every((e) => !e.selected)" v-if="!episodes.every((e: EpisodeInterface) => !e.selected)"
:active="true" :active="true"
:force-display-actions="true" :force-display-actions="true"
:name=" :name="
@ -11,7 +11,7 @@
'repod', 'repod',
'%n episode selected', '%n episode selected',
'%n episodes selected', '%n episodes selected',
episodes.filter((e) => e.selected).length, episodes.filter((e: EpisodeInterface) => e.selected).length,
) )
" "
:one-line="true"> :one-line="true">
@ -19,14 +19,14 @@
<NcActionButton <NcActionButton
v-if=" v-if="
episodes episodes
.filter((e) => e.selected) .filter((e: EpisodeInterface) => e.selected)
.filter((e) => !hasEnded(e)).length .filter((e: EpisodeInterface) => !hasEnded(e)).length
" "
:aria-label="t('repod', 'Read all')" :aria-label="t('repod', 'Read all')"
:disabled=" :disabled="
!episodes !episodes
.filter((e) => e.selected) .filter((e: EpisodeInterface) => e.selected)
.every((e) => e.duration) .every((e: EpisodeInterface) => e.duration)
" "
:name="t('repod', 'Read all')" :name="t('repod', 'Read all')"
:title="t('repod', 'Read all')" :title="t('repod', 'Read all')"
@ -38,14 +38,14 @@
<NcActionButton <NcActionButton
v-if=" v-if="
episodes episodes
.filter((e) => e.selected) .filter((e: EpisodeInterface) => e.selected)
.every((e) => hasEnded(e)) .every((e: EpisodeInterface) => hasEnded(e))
" "
:aria-label="t('repod', 'Unread all')" :aria-label="t('repod', 'Unread all')"
:disabled=" :disabled="
!episodes !episodes
.filter((e) => e.selected) .filter((e: EpisodeInterface) => e.selected)
.every((e) => e.duration) .every((e: EpisodeInterface) => e.duration)
" "
:name="t('repod', 'Unread all')" :name="t('repod', 'Unread all')"
:title="t('repod', 'Unread all')" :title="t('repod', 'Unread all')"
@ -58,8 +58,8 @@
<template #icon> <template #icon>
<NcAvatar <NcAvatar
v-if=" v-if="
episodes.filter((e) => e.selected).length < episodes.filter((e: EpisodeInterface) => e.selected)
episodes.length .length < episodes.length
" "
:display-name="t('repod', 'Select all')" :display-name="t('repod', 'Select all')"
:is-no-user="true"> :is-no-user="true">
@ -72,8 +72,8 @@
</NcAvatar> </NcAvatar>
<NcAvatar <NcAvatar
v-if=" v-if="
episodes.filter((e) => e.selected).length >= episodes.filter((e: EpisodeInterface) => e.selected)
episodes.length .length >= episodes.length
" "
:display-name="t('repod', 'Unselect all')" :display-name="t('repod', 'Unselect all')"
:is-no-user="true"> :is-no-user="true">
@ -89,7 +89,9 @@
<Episode <Episode
v-for="episode in filteredEpisodes" v-for="episode in filteredEpisodes"
:key="episode.guid" :key="episode.guid"
:display-actions="episodes.every((e) => !e.selected)" :display-actions="
episodes.every((e: EpisodeInterface) => !e.selected)
"
:episode="episode" :episode="episode"
:url="url" :url="url"
@select="episode.selected = !episode.selected" /> @select="episode.selected = !episode.selected" />
@ -137,7 +139,7 @@ export default {
...mapState(usePlayer, ['episode']), ...mapState(usePlayer, ['episode']),
...mapState(useSettings, ['filters']), ...mapState(useSettings, ['filters']),
filteredEpisodes() { filteredEpisodes() {
return this.episodes.filter((episode) => { return this.episodes.filter((episode: EpisodeInterface) => {
if (!this.filters.listened && this.hasEnded(episode)) { if (!this.filters.listened && this.hasEnded(episode)) {
return false return false
} }
@ -157,7 +159,7 @@ export default {
watch: { watch: {
episode() { episode() {
if (this.episode) { if (this.episode) {
this.episodes = this.episodes.map((episode) => this.episodes = this.episodes.map((episode: EpisodeInterface) =>
episode.url === this.episode?.url ? this.episode : episode, episode.url === this.episode?.url ? this.episode : episode,
) )
} }
@ -172,7 +174,7 @@ export default {
}), }),
) )
this.episodes = [...episodes.data].sort( this.episodes = [...episodes.data].sort(
(a, b) => (a: EpisodeInterface, b: EpisodeInterface) =>
new Date(b.pubDate?.date || '').getTime() - new Date(b.pubDate?.date || '').getTime() -
new Date(a.pubDate?.date || '').getTime(), new Date(a.pubDate?.date || '').getTime(),
) )
@ -190,14 +192,14 @@ export default {
t, t,
async read(read: boolean) { async read(read: boolean) {
try { try {
this.episodes = this.episodes.map((episode) => this.episodes = this.episodes.map((episode: EpisodeInterface) =>
episode.selected ? markAs(episode, read, this.url) : episode, episode.selected ? markAs(episode, read, this.url) : episode,
) )
await axios.post( await axios.post(
generateUrl('/apps/gpoddersync/episode_action/create'), generateUrl('/apps/gpoddersync/episode_action/create'),
this.episodes this.episodes
.filter((episode) => episode.selected) .filter((episode: EpisodeInterface) => episode.selected)
.map((episode) => episode.action), .map((episode: EpisodeInterface) => episode.action),
) )
} catch (e) { } catch (e) {
console.error(e) console.error(e)
@ -205,7 +207,7 @@ export default {
} }
}, },
select(all: boolean) { select(all: boolean) {
this.episodes = this.episodes.map((episode) => { this.episodes = this.episodes.map((episode: EpisodeInterface) => {
episode.selected = all episode.selected = all
return episode return episode
}) })

View File

@ -63,11 +63,11 @@ export default {
) )
this.episodes = [...episodes.data] this.episodes = [...episodes.data]
.sort( .sort(
(a, b) => (a: EpisodeInterface, b: EpisodeInterface) =>
new Date(b.pubDate?.date || '').getTime() - new Date(b.pubDate?.date || '').getTime() -
new Date(a.pubDate?.date || '').getTime(), new Date(a.pubDate?.date || '').getTime(),
) )
.filter((episode) => !this.hasEnded(episode)) .filter((episode: EpisodeInterface) => !this.hasEnded(episode))
.slice(0, 4) .slice(0, 4)
} catch (e) { } catch (e) {
console.error(e) console.error(e)

View File

@ -39,10 +39,13 @@
<script lang="ts"> <script lang="ts">
import { NcActionButton, NcAppNavigationItem, NcAvatar } from '@nextcloud/vue' import { NcActionButton, NcAppNavigationItem, NcAvatar } from '@nextcloud/vue'
import type {
PersonalSettingsPodcastDataInterface,
SubscriptionInterface,
} from '../../utils/types.ts'
import { mapActions, mapState } from 'pinia' import { mapActions, mapState } from 'pinia'
import AlertIcon from 'vue-material-design-icons/Alert.vue' import AlertIcon from 'vue-material-design-icons/Alert.vue'
import DeleteIcon from 'vue-material-design-icons/Delete.vue' import DeleteIcon from 'vue-material-design-icons/Delete.vue'
import type { PersonalSettingsPodcastDataInterface } from '../../utils/types.ts'
import StarIcon from 'vue-material-design-icons/Star.vue' import StarIcon from 'vue-material-design-icons/Star.vue'
import StarPlusIcon from 'vue-material-design-icons/StarPlus.vue' import StarPlusIcon from 'vue-material-design-icons/StarPlus.vue'
import StarRemoveIcon from 'vue-material-design-icons/StarRemove.vue' import StarRemoveIcon from 'vue-material-design-icons/StarRemove.vue'
@ -128,7 +131,10 @@ export default {
}, },
switchFavorite(value: boolean) { switchFavorite(value: boolean) {
if (value) { if (value) {
if (this.subs.filter((sub) => sub.isFavorite).length >= 10) { if (
this.subs.filter((sub: SubscriptionInterface) => sub.isFavorite)
.length >= 10
) {
showError(t('repod', 'You can only have 10 favorites')) showError(t('repod', 'You can only have 10 favorites'))
return return
} }

View File

@ -1,6 +1,7 @@
import type { import type {
PersonalSettingsMetricsInterface, PersonalSettingsMetricsInterface,
PodcastDataInterface, PodcastDataInterface,
PodcastMetricsInterface,
SubscriptionInterface, SubscriptionInterface,
} from '../utils/types.ts' } from '../utils/types.ts'
import { getCookie, setCookie } from '../utils/cookies.ts' import { getCookie, setCookie } from '../utils/cookies.ts'
@ -14,7 +15,7 @@ export const useSubscriptions = defineStore('subscriptions', {
}), }),
getters: { getters: {
getSubByUrl: (state) => (url: string) => getSubByUrl: (state) => (url: string) =>
state.subs.find((sub) => sub.metrics.url === url), state.subs.find((sub: SubscriptionInterface) => sub.metrics.url === url),
}, },
actions: { actions: {
async fetch() { async fetch() {
@ -28,20 +29,23 @@ export const useSubscriptions = defineStore('subscriptions', {
) )
this.subs = [...metrics.data.subscriptions] this.subs = [...metrics.data.subscriptions]
.sort((a, b) => b.listenedSeconds - a.listenedSeconds) .sort(
.map((sub) => ({ (a: PodcastMetricsInterface, b: PodcastMetricsInterface) =>
b.listenedSeconds - a.listenedSeconds,
)
.map((sub: PodcastMetricsInterface) => ({
metrics: sub, metrics: sub,
isFavorite: favorites.includes(sub.url), isFavorite: favorites.includes(sub.url),
data: this.getSubByUrl(sub.url)?.data, data: this.getSubByUrl(sub.url)?.data,
})) }))
}, },
addMetadatas(link: string, data: PodcastDataInterface) { addMetadatas(link: string, data: PodcastDataInterface) {
this.subs = this.subs.map((sub) => this.subs = this.subs.map((sub: SubscriptionInterface) =>
sub.metrics.url === link ? { ...sub, data } : sub, sub.metrics.url === link ? { ...sub, data } : sub,
) )
}, },
setFavorite(link: string, isFavorite: boolean) { setFavorite(link: string, isFavorite: boolean) {
this.subs = this.subs.map((sub) => this.subs = this.subs.map((sub: SubscriptionInterface) =>
sub.metrics.url === link ? { ...sub, isFavorite } : sub, sub.metrics.url === link ? { ...sub, isFavorite } : sub,
) )
@ -49,8 +53,8 @@ export const useSubscriptions = defineStore('subscriptions', {
'repod.favorites', 'repod.favorites',
JSON.stringify( JSON.stringify(
this.subs this.subs
.filter((sub) => sub.isFavorite) .filter((sub: SubscriptionInterface) => sub.isFavorite)
.map((sub) => sub.metrics.url), .map((sub: SubscriptionInterface) => sub.metrics.url),
), ),
365, 365,
) )

View File

@ -6,7 +6,9 @@
*/ */
export const getCookie = (name: string): string | null => { export const getCookie = (name: string): string | null => {
const cookies = document.cookie.split('; ') const cookies = document.cookie.split('; ')
const value = cookies.find((c) => c.startsWith(name + '='))?.split('=')[1] const value = cookies
.find((c: string) => c.startsWith(name + '='))
?.split('=')[1]
if (value === undefined) { if (value === undefined) {
return null return null
} }

View File

@ -24,6 +24,7 @@ import AppContent from '../components/Atoms/AppContent.vue'
import EmptyContent from '../components/Atoms/EmptyContent.vue' import EmptyContent from '../components/Atoms/EmptyContent.vue'
import Favorite from '../components/Feed/Favorite.vue' import Favorite from '../components/Feed/Favorite.vue'
import StarOffIcon from 'vue-material-design-icons/StarOff.vue' import StarOffIcon from 'vue-material-design-icons/StarOff.vue'
import type { SubscriptionInterface } from '../utils/types.ts'
import { mapState } from 'pinia' import { mapState } from 'pinia'
import { t } from '@nextcloud/l10n' import { t } from '@nextcloud/l10n'
import { useSubscriptions } from '../store/subscriptions.ts' import { useSubscriptions } from '../store/subscriptions.ts'
@ -39,7 +40,7 @@ export default {
computed: { computed: {
...mapState(useSubscriptions, ['subs']), ...mapState(useSubscriptions, ['subs']),
favorites() { favorites() {
return this.subs.filter((sub) => sub.isFavorite) return this.subs.filter((sub: SubscriptionInterface) => sub.isFavorite)
}, },
}, },
methods: { methods: {

View File

@ -3,13 +3,14 @@
# This file is distributed under the same license as the Nextcloud package. # This file is distributed under the same license as the Nextcloud package.
# OiledAmoeba <florian+crystalyx@ruhnke.cloud>, 2024. # OiledAmoeba <florian+crystalyx@ruhnke.cloud>, 2024.
# Michel Roux <xefir@crystalyx.net>, 2024. # Michel Roux <xefir@crystalyx.net>, 2024.
# markus phi <repodtranslate@solinetcafe.org>, 2024.
msgid "" 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-12-11 20:03+0000\n" "POT-Creation-Date: 2024-12-11 20:03+0000\n"
"PO-Revision-Date: 2024-12-11 20:06+0000\n" "PO-Revision-Date: 2024-12-12 23:02+0000\n"
"Last-Translator: Michel Roux <xefir@crystalyx.net>\n" "Last-Translator: markus phi <repodtranslate@solinetcafe.org>\n"
"Language-Team: German <https://translate.crystalyx.net/projects/repod/gitea/" "Language-Team: German <https://translate.crystalyx.net/projects/repod/gitea/"
"de/>\n" "de/>\n"
"Language: de\n" "Language: de\n"
@ -38,7 +39,6 @@ msgid "🔊 Browse, manage and listen to podcasts"
msgstr "🔊 Suchen, Verwalten und Anhören von Podcasts" msgstr "🔊 Suchen, Verwalten und Anhören von Podcasts"
#: /app/specialAppInfoFakeDummyForL10nScript.php:5 #: /app/specialAppInfoFakeDummyForL10nScript.php:5
#, fuzzy
msgid "" msgid ""
"## Features\n" "## Features\n"
"- 🔍 Browse and subscribe huge collection of podcasts\n" "- 🔍 Browse and subscribe huge collection of podcasts\n"
@ -58,9 +58,9 @@ msgstr ""
"## Funktionen\n" "## Funktionen\n"
"- 🔍 Durchsuchen und abonnieren einer großen Sammlung von Podcasts\n" "- 🔍 Durchsuchen und abonnieren einer großen Sammlung von Podcasts\n"
"- 🔊 Episoden direkt in Nextcloud anhören\n" "- 🔊 Episoden direkt in Nextcloud anhören\n"
"- 🌐 Synchronisiere deine Aktivität mit [AntennaPod](https://antennapod." "- 🌐 Synchronisiere deine Aktivität mit [AntennaPod](https://antennapod.org/)"
"org/)\n" "\n"
"- 📱 Mobile-freundliche Schnittstelle\n" "- 📱 Handy-freundliche Schnittstelle\n"
"- 📡 Importieren und Exportieren Ihrer Abonnements\n" "- 📡 Importieren und Exportieren Ihrer Abonnements\n"
"- ➡️ Vollständiger Funktionsvergleich [hier](https://git.crystalyx.net/Xefir/" "- ➡️ Vollständiger Funktionsvergleich [hier](https://git.crystalyx.net/Xefir/"
"repod#comparaison-with-similar-apps-for-nextcloud)\n" "repod#comparaison-with-similar-apps-for-nextcloud)\n"
@ -76,9 +76,8 @@ msgid "Download"
msgstr "Herunterladen" msgstr "Herunterladen"
#: /app/specialVueFakeDummyForL10nScript.js:2 #: /app/specialVueFakeDummyForL10nScript.js:2
#, fuzzy
msgid "Skip to {match}" msgid "Skip to {match}"
msgstr "Springen zu {match}" msgstr "Springe zu {match}"
#: /app/specialVueFakeDummyForL10nScript.js:3 #: /app/specialVueFakeDummyForL10nScript.js:3
msgid "Add a RSS link" msgid "Add a RSS link"
@ -117,9 +116,8 @@ msgid "Copy feed"
msgstr "Feed kopieren" msgstr "Feed kopieren"
#: /app/specialVueFakeDummyForL10nScript.js:15 #: /app/specialVueFakeDummyForL10nScript.js:15
#, fuzzy
msgid "Link copied to the clipboard" msgid "Link copied to the clipboard"
msgstr "Der Link des Feeds wurde in die Zwischenablage kopiert" msgstr "Link in die Zwischenablage kopiert"
#: /app/specialVueFakeDummyForL10nScript.js:16 #: /app/specialVueFakeDummyForL10nScript.js:16
#: /app/specialVueFakeDummyForL10nScript.js:17 #: /app/specialVueFakeDummyForL10nScript.js:17