4
0
mirror of https://github.com/AzuraCast/AzuraCast.git synced 2024-06-14 13:16:37 +00:00

Pull drillable props into separate files.

This commit is contained in:
Buster Neece 2022-12-26 02:26:24 -06:00
parent 452c23bdb7
commit 76cffe9736
No known key found for this signature in database
GPG Key ID: F1D2E64A0005E80E
17 changed files with 120 additions and 114 deletions

View File

@ -39,30 +39,37 @@ export default {
<script setup> <script setup>
import ProfileStreams from './Profile/StreamsPanel'; import ProfileStreams from './Profile/StreamsPanel';
import ProfileHeader, {profileHeaderProps} from './Profile/HeaderPanel'; import ProfileHeader from './Profile/HeaderPanel';
import ProfileNowPlaying, {profileNowPlayingProps} from './Profile/NowPlayingPanel'; import ProfileNowPlaying from './Profile/NowPlayingPanel';
import ProfileSchedule from './Profile/SchedulePanel'; import ProfileSchedule from './Profile/SchedulePanel';
import ProfileRequests, {profileRequestsProps} from './Profile/RequestsPanel'; import ProfileRequests from './Profile/RequestsPanel';
import ProfileStreamers, {profileStreamersProps} from './Profile/StreamersPanel'; import ProfileStreamers from './Profile/StreamersPanel';
import ProfilePublicPages, {profilePublicProps} from './Profile/PublicPagesPanel'; import ProfilePublicPages from './Profile/PublicPagesPanel';
import ProfileFrontend, {profileFrontendProps} from './Profile/FrontendPanel'; import ProfileFrontend from './Profile/FrontendPanel';
import ProfileBackendNone from './Profile/BackendNonePanel'; import ProfileBackendNone from './Profile/BackendNonePanel';
import ProfileBackend, {profileBackendProps} from './Profile/BackendPanel'; import ProfileBackend from './Profile/BackendPanel';
import {profileEmbedModalProps} from './Profile/EmbedModal';
import {BACKEND_NONE, FRONTEND_REMOTE} from '~/components/Entity/RadioAdapters'; import {BACKEND_NONE, FRONTEND_REMOTE} from '~/components/Entity/RadioAdapters';
import NowPlaying from '~/components/Entity/NowPlaying'; import NowPlaying from '~/components/Entity/NowPlaying';
import {computed, onMounted, shallowRef} from "vue"; import {computed, onMounted, shallowRef} from "vue";
import {useAxios} from "~/vendor/axios"; import {useAxios} from "~/vendor/axios";
import backendPanelProps from "./Profile/backendPanelProps";
import embedModalProps from "./Profile/embedModalProps";
import frontendPanelProps from "./Profile/frontendPanelProps";
import headerPanelProps from "./Profile/headerPanelProps";
import nowPlayingPanelProps from "./Profile/nowPlayingPanelProps";
import publicPagesPanelProps from "./Profile/publicPagesPanelProps";
import requestsPanelProps from "./Profile/requestsPanelProps";
import streamersPanelProps from "./Profile/streamersPanelProps";
const props = defineProps({ const props = defineProps({
...profileHeaderProps, ...backendPanelProps,
...profileNowPlayingProps, ...embedModalProps,
...profileRequestsProps, ...frontendPanelProps,
...profileStreamersProps, ...headerPanelProps,
...profilePublicProps, ...nowPlayingPanelProps,
...profileFrontendProps, ...publicPagesPanelProps,
...profileBackendProps, ...requestsPanelProps,
...profileEmbedModalProps, ...streamersPanelProps,
profileApiUri: String, profileApiUri: String,
stationTimeZone: String, stationTimeZone: String,
stationSupportsRequests: Boolean, stationSupportsRequests: Boolean,

View File

@ -38,20 +38,6 @@
</template> </template>
<script> <script>
export const profileBackendProps = {
numSongs: Number,
numPlaylists: Number,
backendType: String,
hasStarted: Boolean,
userCanManageBroadcasting: Boolean,
userCanManageMedia: Boolean,
manageMediaUri: String,
managePlaylistsUri: String,
backendRestartUri: String,
backendStartUri: String,
backendStopUri: String
};
export default { export default {
inheritAttrs: false, inheritAttrs: false,
} }
@ -63,9 +49,10 @@ import Icon from '~/components/Common/Icon';
import RunningBadge from "~/components/Common/Badges/RunningBadge.vue"; import RunningBadge from "~/components/Common/Badges/RunningBadge.vue";
import {useTranslate} from "~/vendor/gettext"; import {useTranslate} from "~/vendor/gettext";
import {computed} from "vue"; import {computed} from "vue";
import backendPanelProps from "~/components/Stations/Profile/backendPanelProps";
const props = defineProps({ const props = defineProps({
...profileBackendProps, ...backendPanelProps,
np: Object np: Object
}); });

View File

@ -61,20 +61,6 @@
</template> </template>
<script> <script>
export const profileEmbedModalProps = {
stationSupportsStreamers: Boolean,
stationSupportsRequests: Boolean,
enablePublicPage: Boolean,
enableStreamers: Boolean,
enableOnDemand: Boolean,
enableRequests: Boolean,
publicPageEmbedUri: String,
publicOnDemandEmbedUri: String,
publicRequestEmbedUri: String,
publicHistoryEmbedUri: String,
publicScheduleEmbedUri: String
};
export default { export default {
inheritAttrs: false inheritAttrs: false
} }
@ -84,9 +70,10 @@ export default {
import CopyToClipboardButton from '~/components/Common/CopyToClipboardButton'; import CopyToClipboardButton from '~/components/Common/CopyToClipboardButton';
import {computed, ref} from "vue"; import {computed, ref} from "vue";
import {useTranslate} from "~/vendor/gettext"; import {useTranslate} from "~/vendor/gettext";
import embedModalProps from "./embedModalProps";
const props = defineProps({ const props = defineProps({
...profileEmbedModalProps ...embedModalProps
}); });
const selectedType = ref('player'); const selectedType = ref('player');

View File

@ -93,19 +93,6 @@
</template> </template>
<script> <script>
export const profileFrontendProps = {
frontendType: String,
frontendAdminUri: String,
frontendAdminPassword: String,
frontendSourcePassword: String,
frontendRelayPassword: String,
frontendRestartUri: String,
frontendStartUri: String,
frontendStopUri: String,
hasStarted: Boolean,
userCanManageBroadcasting: Boolean
};
export default { export default {
inheritAttrs: false inheritAttrs: false
}; };
@ -117,9 +104,10 @@ import CopyToClipboardButton from '~/components/Common/CopyToClipboardButton';
import Icon from '~/components/Common/Icon'; import Icon from '~/components/Common/Icon';
import RunningBadge from "~/components/Common/Badges/RunningBadge.vue"; import RunningBadge from "~/components/Common/Badges/RunningBadge.vue";
import {computed} from "vue"; import {computed} from "vue";
import frontendPanelProps from "~/components/Stations/Profile/frontendPanelProps";
const props = defineProps({ const props = defineProps({
...profileFrontendProps, ...frontendPanelProps,
np: Object np: Object
}); });

View File

@ -17,13 +17,6 @@
</template> </template>
<script> <script>
export const profileHeaderProps = {
stationName: String,
stationDescription: String,
userCanManageProfile: Boolean,
manageProfileUri: String
};
export default { export default {
inheritAttrs: false inheritAttrs: false
}; };
@ -32,9 +25,10 @@ export default {
<script setup> <script setup>
import Icon from '~/components/Common/Icon'; import Icon from '~/components/Common/Icon';
import PlayButton from "~/components/Common/PlayButton.vue"; import PlayButton from "~/components/Common/PlayButton.vue";
import headerPanelProps from "~/components/Stations/Profile/headerPanelProps";
const props = defineProps({ const props = defineProps({
...profileHeaderProps, ...headerPanelProps,
np: Object np: Object
}); });
</script> </script>

View File

@ -124,13 +124,6 @@
</template> </template>
<script> <script>
export const profileNowPlayingProps = {
backendType: String,
userCanManageBroadcasting: Boolean,
backendSkipSongUri: String,
backendDisconnectStreamerUri: String
};
export default { export default {
inheritAttrs: false inheritAttrs: false
}; };
@ -143,9 +136,10 @@ import {computed, onMounted, ref} from "vue";
import {useIntervalFn} from "@vueuse/core"; import {useIntervalFn} from "@vueuse/core";
import {useTranslate} from "~/vendor/gettext"; import {useTranslate} from "~/vendor/gettext";
import formatTime from "~/functions/formatTime"; import formatTime from "~/functions/formatTime";
import nowPlayingPanelProps from "~/components/Stations/Profile/nowPlayingPanelProps";
const props = defineProps({ const props = defineProps({
...profileNowPlayingProps, ...nowPlayingPanelProps,
np: Object np: Object
}); });

View File

@ -77,24 +77,6 @@
</template> </template>
<script> <script>
import {profileEmbedModalProps} from './EmbedModal';
export const profilePublicProps = {
stationSupportsStreamers: Boolean,
stationSupportsRequests: Boolean,
enablePublicPage: Boolean,
enableStreamers: Boolean,
enableOnDemand: Boolean,
enableRequests: Boolean,
userCanManageProfile: Boolean,
publicPageUri: String,
publicWebDjUri: String,
publicOnDemandUri: String,
publicPodcastsUri: String,
publicScheduleUri: String,
togglePublicPageUri: String
};
export default { export default {
inheritAttrs: false inheritAttrs: false
}; };
@ -105,10 +87,12 @@ import Icon from '~/components/Common/Icon';
import EnabledBadge from "~/components/Common/Badges/EnabledBadge.vue"; import EnabledBadge from "~/components/Common/Badges/EnabledBadge.vue";
import {ref} from "vue"; import {ref} from "vue";
import EmbedModal from "~/components/Stations/Profile/EmbedModal.vue"; import EmbedModal from "~/components/Stations/Profile/EmbedModal.vue";
import publicPagesPanelProps from "~/components/Stations/Profile/publicPagesPanelProps";
import embedModalProps from "~/components/Stations/Profile/embedModalProps";
const props = defineProps({ const props = defineProps({
...profilePublicProps, ...publicPagesPanelProps,
...profileEmbedModalProps ...embedModalProps
}); });
const embed_modal = ref(); // Template Ref const embed_modal = ref(); // Template Ref

View File

@ -38,14 +38,6 @@
</template> </template>
<script> <script>
export const profileRequestsProps = {
enableRequests: Boolean,
userCanManageReports: Boolean,
userCanManageProfile: Boolean,
requestsViewUri: String,
requestsToggleUri: String
};
export default { export default {
inheritAttrs: false inheritAttrs: false
}; };
@ -53,8 +45,9 @@ export default {
<script setup> <script setup>
import Icon from '~/components/Common/Icon'; import Icon from '~/components/Common/Icon';
import requestsPanelProps from "~/components/Stations/Profile/requestsPanelProps";
const props = defineProps({ const props = defineProps({
...profileRequestsProps ...requestsPanelProps
}); });
</script> </script>

View File

@ -38,14 +38,6 @@
</template> </template>
<script> <script>
export const profileStreamersProps = {
enableStreamers: Boolean,
userCanManageProfile: Boolean,
userCanManageStreamers: Boolean,
streamersViewUri: String,
streamersToggleUri: String
};
export default { export default {
inheritAttrs: false inheritAttrs: false
}; };
@ -54,8 +46,9 @@ export default {
<script setup> <script setup>
import Icon from "~/components/Common/Icon.vue"; import Icon from "~/components/Common/Icon.vue";
import EnabledBadge from "~/components/Common/Badges/EnabledBadge.vue"; import EnabledBadge from "~/components/Common/Badges/EnabledBadge.vue";
import streamersPanelProps from "~/components/Stations/Profile/streamersPanelProps";
const props = defineProps({ const props = defineProps({
...profileStreamersProps ...streamersPanelProps
}); });
</script> </script>

View File

@ -0,0 +1,13 @@
export default {
numSongs: Number,
numPlaylists: Number,
backendType: String,
hasStarted: Boolean,
userCanManageBroadcasting: Boolean,
userCanManageMedia: Boolean,
manageMediaUri: String,
managePlaylistsUri: String,
backendRestartUri: String,
backendStartUri: String,
backendStopUri: String
};

View File

@ -0,0 +1,13 @@
export default {
stationSupportsStreamers: Boolean,
stationSupportsRequests: Boolean,
enablePublicPage: Boolean,
enableStreamers: Boolean,
enableOnDemand: Boolean,
enableRequests: Boolean,
publicPageEmbedUri: String,
publicOnDemandEmbedUri: String,
publicRequestEmbedUri: String,
publicHistoryEmbedUri: String,
publicScheduleEmbedUri: String
}

View File

@ -0,0 +1,12 @@
export default {
frontendType: String,
frontendAdminUri: String,
frontendAdminPassword: String,
frontendSourcePassword: String,
frontendRelayPassword: String,
frontendRestartUri: String,
frontendStartUri: String,
frontendStopUri: String,
hasStarted: Boolean,
userCanManageBroadcasting: Boolean
}

View File

@ -0,0 +1,6 @@
export default {
stationName: String,
stationDescription: String,
userCanManageProfile: Boolean,
manageProfileUri: String
}

View File

@ -0,0 +1,6 @@
export default {
backendType: String,
userCanManageBroadcasting: Boolean,
backendSkipSongUri: String,
backendDisconnectStreamerUri: String
}

View File

@ -0,0 +1,15 @@
export default {
stationSupportsStreamers: Boolean,
stationSupportsRequests: Boolean,
enablePublicPage: Boolean,
enableStreamers: Boolean,
enableOnDemand: Boolean,
enableRequests: Boolean,
userCanManageProfile: Boolean,
publicPageUri: String,
publicWebDjUri: String,
publicOnDemandUri: String,
publicPodcastsUri: String,
publicScheduleUri: String,
togglePublicPageUri: String
}

View File

@ -0,0 +1,7 @@
export default {
enableRequests: Boolean,
userCanManageReports: Boolean,
userCanManageProfile: Boolean,
requestsViewUri: String,
requestsToggleUri: String
}

View File

@ -0,0 +1,7 @@
export default {
enableStreamers: Boolean,
userCanManageProfile: Boolean,
userCanManageStreamers: Boolean,
streamersViewUri: String,
streamersToggleUri: String
}