Adds NASA APOD widget

This commit is contained in:
Alicia Sykes
2021-12-18 14:57:24 +00:00
parent 7084ca12d0
commit fad1e5ff50
4 changed files with 163 additions and 3 deletions

View File

@@ -18,8 +18,15 @@
</div>
<!-- Widget -->
<div v-else class="widget-wrap">
<Apod
v-if="widgetType === 'apod'"
:options="widgetOptions"
@loading="setLoaderState"
@error="handleError"
:ref="widgetRef"
/>
<Clock
v-if="widgetType === 'clock'"
v-else-if="widgetType === 'clock'"
:options="widgetOptions"
@loading="setLoaderState"
@error="handleError"
@@ -194,6 +201,7 @@ import OpenIcon from '@/assets/interface-icons/open-new-tab.svg';
import LoadingAnimation from '@/assets/interface-icons/loader.svg';
// Import available widgets (add new widgets alphabetically)
import Apod from '@/components/Widgets/Apod.vue';
import Clock from '@/components/Widgets/Clock.vue';
import CryptoPriceChart from '@/components/Widgets/CryptoPriceChart.vue';
import CryptoWatchList from '@/components/Widgets/CryptoWatchList.vue';
@@ -227,6 +235,7 @@ export default {
OpenIcon,
LoadingAnimation,
// Register widget components
Apod,
Clock,
CodeStats,
CryptoPriceChart,