Compare commits
2 Commits
062da25264
...
9005b519f3
Author | SHA1 | Date | |
---|---|---|---|
9005b519f3 | |||
b0132287f0 |
@ -32,6 +32,10 @@ class Application extends App implements IBootstrap
|
|||||||
/** @var IInitialState $initialState */
|
/** @var IInitialState $initialState */
|
||||||
$initialState = $appContainer->get(IInitialState::class);
|
$initialState = $appContainer->get(IInitialState::class);
|
||||||
|
|
||||||
|
if (null === $appManager->getAppInfo(self::GPODDERSYNC_ID)) {
|
||||||
|
$appManager->disableApp(self::GPODDERSYNC_ID);
|
||||||
|
}
|
||||||
|
|
||||||
$gpoddersync = $appManager->isEnabledForUser(self::GPODDERSYNC_ID);
|
$gpoddersync = $appManager->isEnabledForUser(self::GPODDERSYNC_ID);
|
||||||
if (!$gpoddersync) {
|
if (!$gpoddersync) {
|
||||||
try {
|
try {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<NcAppContent :class="{ padding: episode }">
|
<NcAppContent :class="{ episode, padding }">
|
||||||
<slot />
|
<slot />
|
||||||
</NcAppContent>
|
</NcAppContent>
|
||||||
</template>
|
</template>
|
||||||
@ -14,6 +14,12 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
NcAppContent,
|
NcAppContent,
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
padding: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(usePlayer, ['episode']),
|
...mapState(usePlayer, ['episode']),
|
||||||
},
|
},
|
||||||
@ -21,7 +27,11 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.padding {
|
.episode {
|
||||||
padding-bottom: 6rem;
|
padding-bottom: 6rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.padding {
|
||||||
|
padding: 15px 51px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
22
src/components/Atoms/EmptyContent.vue
Normal file
22
src/components/Atoms/EmptyContent.vue
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<template>
|
||||||
|
<NcEmptyContent class="empty">
|
||||||
|
<slot />
|
||||||
|
</NcEmptyContent>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { NcEmptyContent } from '@nextcloud/vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'EmptyContent',
|
||||||
|
components: {
|
||||||
|
NcEmptyContent,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.empty {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,7 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="">
|
||||||
<Loading v-if="!currentFavoriteData" class="loading" />
|
<Loading v-if="!currentFavoriteData" class="loading" />
|
||||||
<NcAvatar v-if="currentFavoriteData" />
|
<NcAvatar
|
||||||
|
v-if="currentFavoriteData"
|
||||||
|
:display-name="currentFavoriteData.author || currentFavoriteData.title"
|
||||||
|
:is-no-user="true"
|
||||||
|
:size="256"
|
||||||
|
:url="currentFavoriteData.imageUrl" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -12,7 +17,7 @@ import { mapState } from 'pinia'
|
|||||||
import { useSubscriptions } from '../../store/subscriptions.js'
|
import { useSubscriptions } from '../../store/subscriptions.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Item',
|
name: 'Favorites',
|
||||||
components: {
|
components: {
|
||||||
Loading,
|
Loading,
|
||||||
NcAvatar,
|
NcAvatar,
|
||||||
@ -26,7 +31,7 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
...mapState(useSubscriptions, ['favs']),
|
...mapState(useSubscriptions, ['favs']),
|
||||||
currentFavoriteData() {
|
currentFavoriteData() {
|
||||||
return this.favs.find((fav) => fav.url === this.url)?.data
|
return this.favs.find((fav) => fav.url === this.url)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppContent class="main">
|
<AppContent>
|
||||||
<NcTextField v-model="search" :label="t('repod', 'Find a podcast')">
|
<NcTextField v-model="search" :label="t('repod', 'Find a podcast')">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<Magnify :size="20" />
|
<Magnify :size="20" />
|
||||||
@ -35,9 +35,3 @@ export default {
|
|||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.main {
|
|
||||||
padding: 15px 51px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppContent>
|
<AppContent :padding="false">
|
||||||
<Loading v-if="loading" />
|
<Loading v-if="loading" />
|
||||||
<NcEmptyContent
|
<EmptyContent
|
||||||
v-if="failed"
|
v-if="failed"
|
||||||
class="error"
|
class="error"
|
||||||
:name="t('repod', 'Error loading feed')">
|
:name="t('repod', 'Error loading feed')">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<Alert />
|
<Alert />
|
||||||
</template>
|
</template>
|
||||||
</NcEmptyContent>
|
</EmptyContent>
|
||||||
<Banner
|
<Banner
|
||||||
v-if="feed"
|
v-if="feed"
|
||||||
:author="feed.author"
|
:author="feed.author"
|
||||||
@ -24,9 +24,9 @@
|
|||||||
import Alert from 'vue-material-design-icons/Alert.vue'
|
import Alert from 'vue-material-design-icons/Alert.vue'
|
||||||
import AppContent from '../components/Atoms/AppContent.vue'
|
import AppContent from '../components/Atoms/AppContent.vue'
|
||||||
import Banner from '../components/Feed/Banner.vue'
|
import Banner from '../components/Feed/Banner.vue'
|
||||||
|
import EmptyContent from '../components/Atoms/EmptyContent.vue'
|
||||||
import Episodes from '../components/Feed/Episodes.vue'
|
import Episodes from '../components/Feed/Episodes.vue'
|
||||||
import Loading from '../components/Atoms/Loading.vue'
|
import Loading from '../components/Atoms/Loading.vue'
|
||||||
import { NcEmptyContent } from '@nextcloud/vue'
|
|
||||||
import axios from '@nextcloud/axios'
|
import axios from '@nextcloud/axios'
|
||||||
import { decodeUrl } from '../utils/url.js'
|
import { decodeUrl } from '../utils/url.js'
|
||||||
import { generateUrl } from '@nextcloud/router'
|
import { generateUrl } from '@nextcloud/router'
|
||||||
@ -37,9 +37,9 @@ export default {
|
|||||||
Alert,
|
Alert,
|
||||||
AppContent,
|
AppContent,
|
||||||
Banner,
|
Banner,
|
||||||
|
EmptyContent,
|
||||||
Episodes,
|
Episodes,
|
||||||
Loading,
|
Loading,
|
||||||
NcEmptyContent,
|
|
||||||
},
|
},
|
||||||
data: () => ({
|
data: () => ({
|
||||||
failed: false,
|
failed: false,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<NcAppContent class="content">
|
<AppContent>
|
||||||
<NcEmptyContent :name="t('repod', 'Missing required app')">
|
<EmptyContent class="empty" :name="t('repod', 'Missing required app')">
|
||||||
<template #action>
|
<template #action>
|
||||||
<NcButton :href="gPodderSyncUrl">
|
<NcButton :href="gPodderSyncUrl">
|
||||||
{{ t('repod', 'Install GPodder Sync') }}
|
{{ t('repod', 'Install GPodder Sync') }}
|
||||||
@ -9,22 +9,24 @@
|
|||||||
<template #icon>
|
<template #icon>
|
||||||
<Alert />
|
<Alert />
|
||||||
</template>
|
</template>
|
||||||
</NcEmptyContent>
|
</EmptyContent>
|
||||||
</NcAppContent>
|
</AppContent>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { NcAppContent, NcButton, NcEmptyContent } from '@nextcloud/vue'
|
|
||||||
import Alert from 'vue-material-design-icons/Alert.vue'
|
import Alert from 'vue-material-design-icons/Alert.vue'
|
||||||
|
import AppContent from '../components/Atoms/AppContent.vue'
|
||||||
|
import EmptyContent from '../components/Atoms/EmptyContent.vue'
|
||||||
|
import { NcButton } from '@nextcloud/vue'
|
||||||
import { generateUrl } from '@nextcloud/router'
|
import { generateUrl } from '@nextcloud/router'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'GPodder',
|
name: 'GPodder',
|
||||||
components: {
|
components: {
|
||||||
Alert,
|
Alert,
|
||||||
NcAppContent,
|
AppContent,
|
||||||
|
EmptyContent,
|
||||||
NcButton,
|
NcButton,
|
||||||
NcEmptyContent,
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
gPodderSyncUrl() {
|
gPodderSyncUrl() {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppContent>
|
<AppContent>
|
||||||
<NcEmptyContent
|
<EmptyContent
|
||||||
v-if="!favs.length"
|
v-if="!favs.length"
|
||||||
class="empty"
|
class="empty"
|
||||||
:description="
|
:description="
|
||||||
@ -10,12 +10,12 @@
|
|||||||
<template #icon>
|
<template #icon>
|
||||||
<StarOffIcon :size="20" />
|
<StarOffIcon :size="20" />
|
||||||
</template>
|
</template>
|
||||||
</NcEmptyContent>
|
</EmptyContent>
|
||||||
<ul v-if="favs.length">
|
<ul v-if="favs.length">
|
||||||
<li
|
<li
|
||||||
v-for="url in favs.sort((fav) => fav.lastPub).map((fav) => fav.url)"
|
v-for="url in favs.sort((fav) => fav.lastPub).map((fav) => fav.url)"
|
||||||
:key="url">
|
:key="url">
|
||||||
<Item :url="url" />
|
<Favorites :url="url" />
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</AppContent>
|
</AppContent>
|
||||||
@ -23,8 +23,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import AppContent from '../components/Atoms/AppContent.vue'
|
import AppContent from '../components/Atoms/AppContent.vue'
|
||||||
import Item from '../components/Home/Item.vue'
|
import EmptyContent from '../components/Atoms/EmptyContent.vue'
|
||||||
import { NcEmptyContent } from '@nextcloud/vue'
|
import Favorites from '../components/Home/Favorites.vue'
|
||||||
import StarOffIcon from 'vue-material-design-icons/StarOff.vue'
|
import StarOffIcon from 'vue-material-design-icons/StarOff.vue'
|
||||||
import { mapState } from 'pinia'
|
import { mapState } from 'pinia'
|
||||||
import { useSubscriptions } from '../store/subscriptions.js'
|
import { useSubscriptions } from '../store/subscriptions.js'
|
||||||
@ -33,8 +33,8 @@ export default {
|
|||||||
name: 'Home',
|
name: 'Home',
|
||||||
components: {
|
components: {
|
||||||
AppContent,
|
AppContent,
|
||||||
Item,
|
EmptyContent,
|
||||||
NcEmptyContent,
|
Favorites,
|
||||||
StarOffIcon,
|
StarOffIcon,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -42,9 +42,3 @@ export default {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.empty {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
Loading…
Reference in New Issue
Block a user