diff --git a/client/src/components/CurrentQueue.vue b/client/src/components/CurrentQueue.vue index 4d14ce2..153358a 100644 --- a/client/src/components/CurrentQueue.vue +++ b/client/src/components/CurrentQueue.vue @@ -128,7 +128,6 @@ const userHasItemsInQueue = computed(() => { const videosOfUser = queue.value.filter((video) => { return video.user.id === props.userID; }); - console.log(videosOfUser); return videosOfUser.length > 0; }); diff --git a/client/src/components/MasterControls.vue b/client/src/components/MasterControls.vue index 8582fef..bba5daf 100644 --- a/client/src/components/MasterControls.vue +++ b/client/src/components/MasterControls.vue @@ -11,8 +11,8 @@ Switch Theme -
-
+
+
Volume - {{ playerSettings.volume }} @@ -24,69 +24,79 @@ min="0" max="100" :value="playerSettings.volume" /> -
- -
-
- - ProTube - -
- -
- - Radio - -
-
- -
- - + + +
+ + + + +
+
+
+ + + + + + + + + + + + +
@@ -98,6 +108,7 @@ import { ref, onBeforeMount, onBeforeUnmount, defineEmits } from "vue"; import { useRouter } from "vue-router"; import enums from "@/js/Enums"; import ContentField from "../layout/ContentField.vue"; +import ToggleSlider from "./ToggleSlider.vue"; const emit = defineEmits(["display-toast"]); @@ -106,6 +117,10 @@ const playerSettings = ref({ volume: 75, playerMode: enums.MODES.IDLE, playerType: enums.TYPES.VIDEO, + screenSettings: { + showQueue: true, + showPhotos: true, + }, }); const router = useRouter(); @@ -136,6 +151,10 @@ socket.on("update-admin-panel", (newSettings) => { playerSettings.value = newSettings; }); +socket.on("queue-photos-visibility-changed", (newSetting) => { + playerSettings.value.screenSettings = newSetting; +}); + function displayToast(toast) { emit("display-toast", toast); } @@ -187,6 +206,32 @@ async function toggleRadioProtube() { }); } +async function togglePhotosOverlay() { + const data = await new Promise((resolve) => { + socket.emit("toggle-photos-visibility", (callback) => { + resolve(callback); + }); + }); + displayToast({ + status: data.status ?? enums.STATUS.SUCCESS, + message: + data.message ?? `Successfully changed the photos visibility setting!`, + }); +} + +async function toggleQueueOverlay() { + const data = await new Promise((resolve) => { + socket.emit("toggle-queue-visibility", (callback) => { + resolve(callback); + }); + }); + displayToast({ + status: data.status ?? enums.STATUS.SUCCESS, + message: + data.message ?? `Successfully changed the queue visibility setting!`, + }); +} + async function skipVideo() { const data = await new Promise((resolve) => { socket.emit("skip-video", (callback) => { diff --git a/client/src/components/PhotosOverlay.vue b/client/src/components/PhotosOverlay.vue new file mode 100644 index 0000000..9471fa3 --- /dev/null +++ b/client/src/components/PhotosOverlay.vue @@ -0,0 +1,40 @@ + + + diff --git a/client/src/components/RadioScreen.vue b/client/src/components/RadioScreen.vue index 700481a..2804be1 100644 --- a/client/src/components/RadioScreen.vue +++ b/client/src/components/RadioScreen.vue @@ -1,28 +1,30 @@ diff --git a/client/src/components/ScreenQueue.vue b/client/src/components/ScreenQueue.vue new file mode 100644 index 0000000..930c204 --- /dev/null +++ b/client/src/components/ScreenQueue.vue @@ -0,0 +1,49 @@ + + + diff --git a/client/src/components/ToggleSlider.vue b/client/src/components/ToggleSlider.vue new file mode 100644 index 0000000..ef62955 --- /dev/null +++ b/client/src/components/ToggleSlider.vue @@ -0,0 +1,30 @@ + + + diff --git a/client/src/components/VideoCard.vue b/client/src/components/VideoCard.vue index 86f52a5..64673fa 100644 --- a/client/src/components/VideoCard.vue +++ b/client/src/components/VideoCard.vue @@ -11,7 +11,7 @@ `">
+ class="bg-proto_blue absolute bottom-0 h-2 w-0 rounded-sm opacity-60 duration-500 ease-linear">