|
@@ -5,6 +5,8 @@ import { storeToRefs } from "pinia";
|
|
import { useWebsocketsStore } from "@/stores/websockets";
|
|
import { useWebsocketsStore } from "@/stores/websockets";
|
|
import { useStationStore } from "@/stores/station";
|
|
import { useStationStore } from "@/stores/station";
|
|
import MediaItem from "@/components/MediaItem.vue";
|
|
import MediaItem from "@/components/MediaItem.vue";
|
|
|
|
+import { useConfigStore } from "@/stores/config";
|
|
|
|
+import { useUserAuthStore } from "@/stores/userAuth";
|
|
|
|
|
|
const stationStore = useStationStore();
|
|
const stationStore = useStationStore();
|
|
|
|
|
|
@@ -12,6 +14,12 @@ const { socket } = useWebsocketsStore();
|
|
|
|
|
|
const { history } = storeToRefs(stationStore);
|
|
const { history } = storeToRefs(stationStore);
|
|
|
|
|
|
|
|
+const configStore = useConfigStore();
|
|
|
|
+const { experimental } = storeToRefs(configStore);
|
|
|
|
+
|
|
|
|
+const userAuthStore = useUserAuthStore();
|
|
|
|
+const { loggedIn, userId, role: userRole } = storeToRefs(userAuthStore);
|
|
|
|
+
|
|
const station = computed({
|
|
const station = computed({
|
|
get() {
|
|
get() {
|
|
return stationStore.station;
|
|
return stationStore.station;
|
|
@@ -97,7 +105,23 @@ onMounted(async () => {});
|
|
historyItem.payload.skippedAt
|
|
historyItem.payload.skippedAt
|
|
)}${formatSkipReason(historyItem.payload.skipReason)}`"
|
|
)}${formatSkipReason(historyItem.payload.skipReason)}`"
|
|
>
|
|
>
|
|
- <template #actions>
|
|
|
|
|
|
+ <template
|
|
|
|
+ v-if="
|
|
|
|
+ loggedIn &&
|
|
|
|
+ station &&
|
|
|
|
+ station.requests &&
|
|
|
|
+ station.requests.enabled &&
|
|
|
|
+ (station.requests.access === 'user' ||
|
|
|
|
+ (station.requests.access === 'owner' &&
|
|
|
|
+ (userRole === 'admin' ||
|
|
|
|
+ station.owner === userId))) &&
|
|
|
|
+ (!historyItem.payload.song.mediaSource.startsWith(
|
|
|
|
+ 'soundcloud:'
|
|
|
|
+ ) ||
|
|
|
|
+ experimental.soundcloud)
|
|
|
|
+ "
|
|
|
|
+ #actions
|
|
|
|
+ >
|
|
<transition
|
|
<transition
|
|
name="musare-history-query-actions"
|
|
name="musare-history-query-actions"
|
|
mode="out-in"
|
|
mode="out-in"
|