Pull drillable player props out to separate file.

This commit is contained in:
Buster Neece 2022-12-26 02:31:52 -06:00
parent 4e5d7a1d5a
commit 3625f28934
No known key found for this signature in database
GPG Key ID: F1D2E64A0005E80E
3 changed files with 26 additions and 27 deletions

View File

@ -35,11 +35,12 @@
import SongHistoryModal from './FullPlayer/SongHistoryModal';
import RequestModal from './FullPlayer/RequestModal';
import Icon from '~/components/Common/Icon';
import RadioPlayer, {radioPlayerProps} from './Player.vue';
import RadioPlayer from './Player.vue';
import {ref} from "vue";
import playerProps from "~/components/Public/playerProps";
const props = defineProps({
...radioPlayerProps,
...playerProps,
stationName: {
type: String,
required: true

View File

@ -207,30 +207,6 @@
}
</style>
<script>
import {nowPlayingProps} from "~/functions/useNowPlaying";
export const radioPlayerProps = {
...nowPlayingProps,
showHls: {
type: Boolean,
default: true
},
hlsIsDefault: {
type: Boolean,
default: true
},
showAlbumArt: {
type: Boolean,
default: true
},
autoplay: {
type: Boolean,
default: false
}
};
</script>
<script setup>
import AudioPlayer from '~/components/Common/AudioPlayer';
import Icon from '~/components/Common/Icon';
@ -240,9 +216,10 @@ import {useIntervalFn, useMounted, useStorage} from "@vueuse/core";
import formatTime from "~/functions/formatTime";
import {useTranslate} from "~/vendor/gettext";
import useNowPlaying from "~/functions/useNowPlaying";
import playerProps from "~/components/Public/playerProps";
const props = defineProps({
...radioPlayerProps
...playerProps
});
const emit = defineEmits(['np_updated']);

View File

@ -0,0 +1,21 @@
import {nowPlayingProps} from "~/functions/useNowPlaying";
export default {
...nowPlayingProps,
showHls: {
type: Boolean,
default: true
},
hlsIsDefault: {
type: Boolean,
default: true
},
showAlbumArt: {
type: Boolean,
default: true
},
autoplay: {
type: Boolean,
default: false
}
}