repod/src/App.vue

48 lines
997 B
Vue
Raw Normal View History

2023-06-22 18:10:30 +00:00
<template>
2023-06-24 15:18:27 +00:00
<NcContent app-name="repod">
2023-12-23 23:24:46 +00:00
<GPodder v-if="!gpodder" />
<Subscriptions v-if="gpodder" />
<router-view v-if="gpodder" :key="$route.path" />
2023-08-30 17:59:20 +00:00
<Bar />
2023-06-24 15:18:27 +00:00
</NcContent>
2023-06-22 18:10:30 +00:00
</template>
<script>
import 'toastify-js/src/toastify.css'
2024-08-09 20:21:07 +00:00
import { mapActions, mapState } from 'pinia'
2023-08-24 21:59:55 +00:00
import Bar from './components/Player/Bar.vue'
2023-07-04 15:43:58 +00:00
import GPodder from './views/GPodder.vue'
import { NcContent } from '@nextcloud/vue'
2023-08-28 19:18:14 +00:00
import Subscriptions from './components/Sidebar/Subscriptions.vue'
2023-12-23 23:24:46 +00:00
import { loadState } from '@nextcloud/initial-state'
import { usePlayer } from './store/player.js'
2023-06-22 18:10:30 +00:00
export default {
name: 'App',
components: {
2023-08-24 21:59:55 +00:00
Bar,
2023-07-04 15:43:58 +00:00
GPodder,
2023-06-24 22:34:02 +00:00
NcContent,
2023-08-28 19:18:14 +00:00
Subscriptions,
2023-06-22 18:10:30 +00:00
},
2023-12-23 23:24:46 +00:00
computed: {
2024-08-09 20:21:07 +00:00
...mapState(usePlayer, ['paused']),
2023-12-23 23:24:46 +00:00
gpodder() {
return loadState('repod', 'gpodder', false)
},
},
mounted() {
this.init()
2024-08-09 20:21:07 +00:00
setInterval(() => {
if (this.paused === false) {
this.time()
}
}, 40000)
},
methods: {
2024-08-09 20:21:07 +00:00
...mapActions(usePlayer, ['init', 'time']),
},
2023-06-22 18:10:30 +00:00
}
</script>