Pull drillable props into separate files.
This commit is contained in:
parent
452c23bdb7
commit
76cffe9736
|
@ -39,30 +39,37 @@ export default {
|
|||
|
||||
<script setup>
|
||||
import ProfileStreams from './Profile/StreamsPanel';
|
||||
import ProfileHeader, {profileHeaderProps} from './Profile/HeaderPanel';
|
||||
import ProfileNowPlaying, {profileNowPlayingProps} from './Profile/NowPlayingPanel';
|
||||
import ProfileHeader from './Profile/HeaderPanel';
|
||||
import ProfileNowPlaying from './Profile/NowPlayingPanel';
|
||||
import ProfileSchedule from './Profile/SchedulePanel';
|
||||
import ProfileRequests, {profileRequestsProps} from './Profile/RequestsPanel';
|
||||
import ProfileStreamers, {profileStreamersProps} from './Profile/StreamersPanel';
|
||||
import ProfilePublicPages, {profilePublicProps} from './Profile/PublicPagesPanel';
|
||||
import ProfileFrontend, {profileFrontendProps} from './Profile/FrontendPanel';
|
||||
import ProfileRequests from './Profile/RequestsPanel';
|
||||
import ProfileStreamers from './Profile/StreamersPanel';
|
||||
import ProfilePublicPages from './Profile/PublicPagesPanel';
|
||||
import ProfileFrontend from './Profile/FrontendPanel';
|
||||
import ProfileBackendNone from './Profile/BackendNonePanel';
|
||||
import ProfileBackend, {profileBackendProps} from './Profile/BackendPanel';
|
||||
import {profileEmbedModalProps} from './Profile/EmbedModal';
|
||||
import ProfileBackend from './Profile/BackendPanel';
|
||||
import {BACKEND_NONE, FRONTEND_REMOTE} from '~/components/Entity/RadioAdapters';
|
||||
import NowPlaying from '~/components/Entity/NowPlaying';
|
||||
import {computed, onMounted, shallowRef} from "vue";
|
||||
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({
|
||||
...profileHeaderProps,
|
||||
...profileNowPlayingProps,
|
||||
...profileRequestsProps,
|
||||
...profileStreamersProps,
|
||||
...profilePublicProps,
|
||||
...profileFrontendProps,
|
||||
...profileBackendProps,
|
||||
...profileEmbedModalProps,
|
||||
...backendPanelProps,
|
||||
...embedModalProps,
|
||||
...frontendPanelProps,
|
||||
...headerPanelProps,
|
||||
...nowPlayingPanelProps,
|
||||
...publicPagesPanelProps,
|
||||
...requestsPanelProps,
|
||||
...streamersPanelProps,
|
||||
profileApiUri: String,
|
||||
stationTimeZone: String,
|
||||
stationSupportsRequests: Boolean,
|
||||
|
|
|
@ -38,20 +38,6 @@
|
|||
</template>
|
||||
|
||||
<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 {
|
||||
inheritAttrs: false,
|
||||
}
|
||||
|
@ -63,9 +49,10 @@ import Icon from '~/components/Common/Icon';
|
|||
import RunningBadge from "~/components/Common/Badges/RunningBadge.vue";
|
||||
import {useTranslate} from "~/vendor/gettext";
|
||||
import {computed} from "vue";
|
||||
import backendPanelProps from "~/components/Stations/Profile/backendPanelProps";
|
||||
|
||||
const props = defineProps({
|
||||
...profileBackendProps,
|
||||
...backendPanelProps,
|
||||
np: Object
|
||||
});
|
||||
|
||||
|
|
|
@ -61,20 +61,6 @@
|
|||
</template>
|
||||
|
||||
<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 {
|
||||
inheritAttrs: false
|
||||
}
|
||||
|
@ -84,9 +70,10 @@ export default {
|
|||
import CopyToClipboardButton from '~/components/Common/CopyToClipboardButton';
|
||||
import {computed, ref} from "vue";
|
||||
import {useTranslate} from "~/vendor/gettext";
|
||||
import embedModalProps from "./embedModalProps";
|
||||
|
||||
const props = defineProps({
|
||||
...profileEmbedModalProps
|
||||
...embedModalProps
|
||||
});
|
||||
|
||||
const selectedType = ref('player');
|
||||
|
|
|
@ -93,19 +93,6 @@
|
|||
</template>
|
||||
|
||||
<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 {
|
||||
inheritAttrs: false
|
||||
};
|
||||
|
@ -117,9 +104,10 @@ import CopyToClipboardButton from '~/components/Common/CopyToClipboardButton';
|
|||
import Icon from '~/components/Common/Icon';
|
||||
import RunningBadge from "~/components/Common/Badges/RunningBadge.vue";
|
||||
import {computed} from "vue";
|
||||
import frontendPanelProps from "~/components/Stations/Profile/frontendPanelProps";
|
||||
|
||||
const props = defineProps({
|
||||
...profileFrontendProps,
|
||||
...frontendPanelProps,
|
||||
np: Object
|
||||
});
|
||||
|
||||
|
|
|
@ -17,13 +17,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
export const profileHeaderProps = {
|
||||
stationName: String,
|
||||
stationDescription: String,
|
||||
userCanManageProfile: Boolean,
|
||||
manageProfileUri: String
|
||||
};
|
||||
|
||||
export default {
|
||||
inheritAttrs: false
|
||||
};
|
||||
|
@ -32,9 +25,10 @@ export default {
|
|||
<script setup>
|
||||
import Icon from '~/components/Common/Icon';
|
||||
import PlayButton from "~/components/Common/PlayButton.vue";
|
||||
import headerPanelProps from "~/components/Stations/Profile/headerPanelProps";
|
||||
|
||||
const props = defineProps({
|
||||
...profileHeaderProps,
|
||||
...headerPanelProps,
|
||||
np: Object
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -124,13 +124,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
export const profileNowPlayingProps = {
|
||||
backendType: String,
|
||||
userCanManageBroadcasting: Boolean,
|
||||
backendSkipSongUri: String,
|
||||
backendDisconnectStreamerUri: String
|
||||
};
|
||||
|
||||
export default {
|
||||
inheritAttrs: false
|
||||
};
|
||||
|
@ -143,9 +136,10 @@ import {computed, onMounted, ref} from "vue";
|
|||
import {useIntervalFn} from "@vueuse/core";
|
||||
import {useTranslate} from "~/vendor/gettext";
|
||||
import formatTime from "~/functions/formatTime";
|
||||
import nowPlayingPanelProps from "~/components/Stations/Profile/nowPlayingPanelProps";
|
||||
|
||||
const props = defineProps({
|
||||
...profileNowPlayingProps,
|
||||
...nowPlayingPanelProps,
|
||||
np: Object
|
||||
});
|
||||
|
||||
|
|
|
@ -77,24 +77,6 @@
|
|||
</template>
|
||||
|
||||
<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 {
|
||||
inheritAttrs: false
|
||||
};
|
||||
|
@ -105,10 +87,12 @@ import Icon from '~/components/Common/Icon';
|
|||
import EnabledBadge from "~/components/Common/Badges/EnabledBadge.vue";
|
||||
import {ref} from "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({
|
||||
...profilePublicProps,
|
||||
...profileEmbedModalProps
|
||||
...publicPagesPanelProps,
|
||||
...embedModalProps
|
||||
});
|
||||
|
||||
const embed_modal = ref(); // Template Ref
|
||||
|
|
|
@ -38,14 +38,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
export const profileRequestsProps = {
|
||||
enableRequests: Boolean,
|
||||
userCanManageReports: Boolean,
|
||||
userCanManageProfile: Boolean,
|
||||
requestsViewUri: String,
|
||||
requestsToggleUri: String
|
||||
};
|
||||
|
||||
export default {
|
||||
inheritAttrs: false
|
||||
};
|
||||
|
@ -53,8 +45,9 @@ export default {
|
|||
|
||||
<script setup>
|
||||
import Icon from '~/components/Common/Icon';
|
||||
import requestsPanelProps from "~/components/Stations/Profile/requestsPanelProps";
|
||||
|
||||
const props = defineProps({
|
||||
...profileRequestsProps
|
||||
...requestsPanelProps
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -38,14 +38,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
export const profileStreamersProps = {
|
||||
enableStreamers: Boolean,
|
||||
userCanManageProfile: Boolean,
|
||||
userCanManageStreamers: Boolean,
|
||||
streamersViewUri: String,
|
||||
streamersToggleUri: String
|
||||
};
|
||||
|
||||
export default {
|
||||
inheritAttrs: false
|
||||
};
|
||||
|
@ -54,8 +46,9 @@ export default {
|
|||
<script setup>
|
||||
import Icon from "~/components/Common/Icon.vue";
|
||||
import EnabledBadge from "~/components/Common/Badges/EnabledBadge.vue";
|
||||
import streamersPanelProps from "~/components/Stations/Profile/streamersPanelProps";
|
||||
|
||||
const props = defineProps({
|
||||
...profileStreamersProps
|
||||
...streamersPanelProps
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -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
|
||||
};
|
|
@ -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
|
||||
}
|
|
@ -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
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
export default {
|
||||
stationName: String,
|
||||
stationDescription: String,
|
||||
userCanManageProfile: Boolean,
|
||||
manageProfileUri: String
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
export default {
|
||||
backendType: String,
|
||||
userCanManageBroadcasting: Boolean,
|
||||
backendSkipSongUri: String,
|
||||
backendDisconnectStreamerUri: String
|
||||
}
|
|
@ -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
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
export default {
|
||||
enableRequests: Boolean,
|
||||
userCanManageReports: Boolean,
|
||||
userCanManageProfile: Boolean,
|
||||
requestsViewUri: String,
|
||||
requestsToggleUri: String
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
export default {
|
||||
enableStreamers: Boolean,
|
||||
userCanManageProfile: Boolean,
|
||||
userCanManageStreamers: Boolean,
|
||||
streamersViewUri: String,
|
||||
streamersToggleUri: String
|
||||
}
|
Loading…
Reference in New Issue