style: 💄 improve style and detection of gpodder sync
This commit is contained in:
parent
062da25264
commit
b0132287f0
@ -32,6 +32,10 @@ class Application extends App implements IBootstrap
|
||||
/** @var IInitialState $initialState */
|
||||
$initialState = $appContainer->get(IInitialState::class);
|
||||
|
||||
if (null === $appManager->getAppInfo(self::GPODDERSYNC_ID)) {
|
||||
$appManager->disableApp(self::GPODDERSYNC_ID);
|
||||
}
|
||||
|
||||
$gpoddersync = $appManager->isEnabledForUser(self::GPODDERSYNC_ID);
|
||||
if (!$gpoddersync) {
|
||||
try {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<NcAppContent :class="{ padding: episode }">
|
||||
<NcAppContent :class="{ episode, padding }">
|
||||
<slot />
|
||||
</NcAppContent>
|
||||
</template>
|
||||
@ -14,6 +14,12 @@ export default {
|
||||
components: {
|
||||
NcAppContent,
|
||||
},
|
||||
props: {
|
||||
padding: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapState(usePlayer, ['episode']),
|
||||
},
|
||||
@ -21,7 +27,11 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.padding {
|
||||
.episode {
|
||||
padding-bottom: 6rem;
|
||||
}
|
||||
|
||||
.padding {
|
||||
padding: 15px 51px;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,7 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="">
|
||||
<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>
|
||||
</template>
|
||||
|
||||
@ -12,7 +17,7 @@ import { mapState } from 'pinia'
|
||||
import { useSubscriptions } from '../../store/subscriptions.js'
|
||||
|
||||
export default {
|
||||
name: 'Item',
|
||||
name: 'Favorites',
|
||||
components: {
|
||||
Loading,
|
||||
NcAvatar,
|
||||
@ -26,7 +31,7 @@ export default {
|
||||
computed: {
|
||||
...mapState(useSubscriptions, ['favs']),
|
||||
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>
|
||||
<AppContent class="main">
|
||||
<AppContent>
|
||||
<NcTextField v-model="search" :label="t('repod', 'Find a podcast')">
|
||||
<template #icon>
|
||||
<Magnify :size="20" />
|
||||
@ -35,9 +35,3 @@ export default {
|
||||
}),
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.main {
|
||||
padding: 15px 51px;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<AppContent>
|
||||
<AppContent :padding="false">
|
||||
<Loading v-if="loading" />
|
||||
<NcEmptyContent
|
||||
v-if="failed"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<NcAppContent class="content">
|
||||
<NcEmptyContent :name="t('repod', 'Missing required app')">
|
||||
<AppContent>
|
||||
<NcEmptyContent class="empty" :name="t('repod', 'Missing required app')">
|
||||
<template #action>
|
||||
<NcButton :href="gPodderSyncUrl">
|
||||
{{ t('repod', 'Install GPodder Sync') }}
|
||||
@ -10,19 +10,20 @@
|
||||
<Alert />
|
||||
</template>
|
||||
</NcEmptyContent>
|
||||
</NcAppContent>
|
||||
</AppContent>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { NcAppContent, NcButton, NcEmptyContent } from '@nextcloud/vue'
|
||||
import { NcButton, NcEmptyContent } from '@nextcloud/vue'
|
||||
import Alert from 'vue-material-design-icons/Alert.vue'
|
||||
import AppContent from '../components/Atoms/AppContent.vue'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
|
||||
export default {
|
||||
name: 'GPodder',
|
||||
components: {
|
||||
Alert,
|
||||
NcAppContent,
|
||||
AppContent,
|
||||
NcButton,
|
||||
NcEmptyContent,
|
||||
},
|
||||
@ -33,3 +34,9 @@ export default {
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.empty {
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
@ -15,7 +15,7 @@
|
||||
<li
|
||||
v-for="url in favs.sort((fav) => fav.lastPub).map((fav) => fav.url)"
|
||||
:key="url">
|
||||
<Item :url="url" />
|
||||
<Favorites :url="url" />
|
||||
</li>
|
||||
</ul>
|
||||
</AppContent>
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
<script>
|
||||
import AppContent from '../components/Atoms/AppContent.vue'
|
||||
import Item from '../components/Home/Item.vue'
|
||||
import Favorites from '../components/Home/Favorites.vue'
|
||||
import { NcEmptyContent } from '@nextcloud/vue'
|
||||
import StarOffIcon from 'vue-material-design-icons/StarOff.vue'
|
||||
import { mapState } from 'pinia'
|
||||
@ -33,7 +33,7 @@ export default {
|
||||
name: 'Home',
|
||||
components: {
|
||||
AppContent,
|
||||
Item,
|
||||
Favorites,
|
||||
NcEmptyContent,
|
||||
StarOffIcon,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user