Force to waiting room, but admin can lift to queue
This commit is contained in:
parent
a9c9b2deac
commit
5e5c7d94a0
9 changed files with 36 additions and 19 deletions
|
@ -77,6 +77,10 @@ function search() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function waitingRoomToQueue(uuid) {
|
||||||
|
state.socket.emit("waiting-room-to-queue", {"uuid": uuid})
|
||||||
|
}
|
||||||
|
|
||||||
function append(entry) {
|
function append(entry) {
|
||||||
checked_append_with_name(entry, state.value.name)
|
checked_append_with_name(entry, state.value.name)
|
||||||
}
|
}
|
||||||
|
@ -265,6 +269,7 @@ function joinRoom() {
|
||||||
@skip="skip"
|
@skip="skip"
|
||||||
@skipCurrent="skipCurrent"
|
@skipCurrent="skipCurrent"
|
||||||
@moveUp="moveUp"
|
@moveUp="moveUp"
|
||||||
|
@waitingRoomToQueue="waitingRoomToQueue"
|
||||||
/>
|
/>
|
||||||
<DesktopLayout
|
<DesktopLayout
|
||||||
v-show="!state.is_small"
|
v-show="!state.is_small"
|
||||||
|
@ -275,6 +280,7 @@ function joinRoom() {
|
||||||
@skip="skip"
|
@skip="skip"
|
||||||
@skipCurrent="skipCurrent"
|
@skipCurrent="skipCurrent"
|
||||||
@moveUp="moveUp"
|
@moveUp="moveUp"
|
||||||
|
@waitingRoomToQueue="waitingRoomToQueue"
|
||||||
/>
|
/>
|
||||||
<WelcomeReveal
|
<WelcomeReveal
|
||||||
v-if="!state.joined"
|
v-if="!state.joined"
|
||||||
|
@ -312,6 +318,7 @@ function joinRoom() {
|
||||||
<Footer
|
<Footer
|
||||||
:name="state.name"
|
:name="state.name"
|
||||||
@update:name="setName"
|
@update:name="setName"
|
||||||
|
@admin="state.admin"
|
||||||
@logout="emptyLocalStorageAndLogout"
|
@logout="emptyLocalStorageAndLogout"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -8,21 +8,19 @@ const props = defineProps(["double_entry"]);
|
||||||
<p>
|
<p>
|
||||||
<b>{{double_entry.artist}} - {{double_entry.title}}</b> <i>({{double_entry.performer}})</i>
|
<b>{{double_entry.artist}} - {{double_entry.title}}</b> <i>({{double_entry.performer}})</i>
|
||||||
</p>
|
</p>
|
||||||
<p>You can
|
<p>To give everyone a chance to sing, you are limited to one song in the active queue, but you can add yourself to the <b>waiting room</b>.
|
||||||
|
Songs in the waiting room will be added to the queue, once your old song leaves the queue.</p>
|
||||||
|
<p>If you think this is an error, you can
|
||||||
<ul>
|
<ul>
|
||||||
<li>append the song anyway, or</li>
|
<li>choose another name, or</li>
|
||||||
<li>add it to the <i>waiting room</i>.</li>
|
<li>add it to the waiting room and talk to the organizers for manual insertion into the queue.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
<p>Songs in the waiting room will be added to the queue, once the last song of the performer leaves the queue.</p>
|
|
||||||
<div class="grid-x">
|
<div class="grid-x">
|
||||||
<div class="cell medium-6 small-12 btn">
|
<div class="cell medium-6 small-12 btn">
|
||||||
<button class="button expanded" @click="$emit('wait', double_entry.reason == 'uid' ? double_entry.uid : null)">Waiting room</button>
|
<button class="button expanded" @click="$emit('wait', double_entry.reason == 'uid' ? double_entry.uid : null)">Add to waiting room</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="cell medium-6 small-12 btn">
|
<div class="cell medium-6 small-12 btn">
|
||||||
<button class="button expanded" @click="$emit('append')">Append anyway</button>
|
|
||||||
</div>
|
|
||||||
<div class="cell medium-12 small-12 btn">
|
|
||||||
<button class="button expanded alert" @click="$emit('cancel')">Cancel</button>
|
<button class="button expanded alert" @click="$emit('cancel')">Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,7 +4,7 @@ import QueueDesktop from './QueueDesktop.vue'
|
||||||
import RecentDesktop from './RecentDesktop.vue'
|
import RecentDesktop from './RecentDesktop.vue'
|
||||||
|
|
||||||
const props = defineProps(['state']);
|
const props = defineProps(['state']);
|
||||||
const emit = defineEmits(['update:searchTerm', 'search', 'append', 'skip', 'skipCurrent', 'moveUp'])
|
const emit = defineEmits(['update:searchTerm', 'search', 'append', 'skip', 'skipCurrent', 'moveUp', 'waitingRoomToQueue'])
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ const emit = defineEmits(['update:searchTerm', 'search', 'append', 'skip', 'skip
|
||||||
@skip="(uuid) => $emit('skip', uuid)"
|
@skip="(uuid) => $emit('skip', uuid)"
|
||||||
@moveUp="(uuid) => $emit('moveUp', uuid)"
|
@moveUp="(uuid) => $emit('moveUp', uuid)"
|
||||||
@skipCurrent="$emit('skipCurrent')"
|
@skipCurrent="$emit('skipCurrent')"
|
||||||
|
@waitingRoomToQueue="(uuid) => $emit('waitingRoomToQueue', uuid)"
|
||||||
/>
|
/>
|
||||||
<RecentDesktop :recent="state.recent" :admin="state.admin" />
|
<RecentDesktop :recent="state.recent" :admin="state.admin" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
const props = defineProps(['admin', 'entry', 'current', 'firstStartedAt', 'offset', 'currentTime', 'waitingRoom'])
|
const props = defineProps(['admin', 'entry', 'current', 'firstStartedAt', 'offset', 'currentTime', 'waitingRoom'])
|
||||||
const emits = defineEmits(['skip', 'skipCurrent', 'moveUp'])
|
const emits = defineEmits(['skip', 'skipCurrent', 'moveUp', 'waitingRoomToQueue'])
|
||||||
|
|
||||||
function skip() {
|
function skip() {
|
||||||
if(props.current) {
|
if(props.current) {
|
||||||
|
@ -36,11 +36,17 @@ const eta = computed(() =>{
|
||||||
<span v-if="!current && !waitingRoom" class="eta">{{ eta }}</span>
|
<span v-if="!current && !waitingRoom" class="eta">{{ eta }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="admin" class="cell small-3">
|
<div v-if="admin" class="cell small-3">
|
||||||
<button class="button alert fright" @click="skip">
|
<button v-if="!waitingRoom" class="button alert fright" @click="skip">
|
||||||
<font-awesome-icon icon="fa-solid fa-times" />
|
<font-awesome-icon icon="fa-solid fa-times" />
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="button alert fright"
|
class="button success fright"
|
||||||
|
v-if="waitingRoom"
|
||||||
|
@click="$emit('waitingRoomToQueue', entry.uuid)" >
|
||||||
|
<font-awesome-icon icon="fa-solid fa-arrows-up-to-line" />
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="button warning fright"
|
||||||
v-if="!current && !waitingRoom"
|
v-if="!current && !waitingRoom"
|
||||||
@click="$emit('moveUp', entry.uuid)" >
|
@click="$emit('moveUp', entry.uuid)" >
|
||||||
<font-awesome-icon icon="fa-solid fa-arrow-up" />
|
<font-awesome-icon icon="fa-solid fa-arrow-up" />
|
||||||
|
|
|
@ -5,7 +5,7 @@ import RecentTab from './RecentTab.vue'
|
||||||
import TabHeader from './TabHeader.vue'
|
import TabHeader from './TabHeader.vue'
|
||||||
|
|
||||||
const props = defineProps(['state']);
|
const props = defineProps(['state']);
|
||||||
const emit = defineEmits(['update:searchTerm', 'search', 'append', 'skip', 'skipCurrent', 'moveUp'])
|
const emit = defineEmits(['update:searchTerm', 'search', 'append', 'skip', 'skipCurrent', 'moveUp', 'waitingRoomToQueue'])
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ const emit = defineEmits(['update:searchTerm', 'search', 'append', 'skip', 'skip
|
||||||
@skip="(uuid) => $emit('skip', uuid)"
|
@skip="(uuid) => $emit('skip', uuid)"
|
||||||
@moveUp="(uuid) => $emit('moveUp', uuid)"
|
@moveUp="(uuid) => $emit('moveUp', uuid)"
|
||||||
@skipCurrent="$emit('skipCurrent')"
|
@skipCurrent="$emit('skipCurrent')"
|
||||||
|
@waitingRoomToQueue="(uuid) => $emit('waitingRoomToQueue', uuid)"
|
||||||
/>
|
/>
|
||||||
<RecentTab :recent="state.recent" :admin="state.admin" />
|
<RecentTab :recent="state.recent" :admin="state.admin" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import QueueInner from './QueueInner.vue'
|
import QueueInner from './QueueInner.vue'
|
||||||
|
|
||||||
const props = defineProps(['queue', 'waiting_room', 'admin']);
|
const props = defineProps(['queue', 'waiting_room', 'admin']);
|
||||||
const emits = defineEmits(['skip', 'skipCurrent', 'moveUp'])
|
const emits = defineEmits(['skip', 'skipCurrent', 'moveUp', 'waitingRoomToQueue'])
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -15,6 +15,7 @@ const emits = defineEmits(['skip', 'skipCurrent', 'moveUp'])
|
||||||
@skip="(uuid) => $emit('skip', uuid)"
|
@skip="(uuid) => $emit('skip', uuid)"
|
||||||
@moveUp="(uuid) => $emit('moveUp', uuid)"
|
@moveUp="(uuid) => $emit('moveUp', uuid)"
|
||||||
@skipCurrent="$emit('skipCurrent')"
|
@skipCurrent="$emit('skipCurrent')"
|
||||||
|
@waitingRoomToQueue="(uuid) => $emit('waitingRoomToQueue', uuid)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { onMounted, reactive } from 'vue'
|
||||||
import Entry from './Entry.vue'
|
import Entry from './Entry.vue'
|
||||||
|
|
||||||
const props = defineProps(['queue', 'waiting_room', 'admin']);
|
const props = defineProps(['queue', 'waiting_room', 'admin']);
|
||||||
const emits = defineEmits(['skip', 'skipCurrent', 'moveUp'])
|
const emits = defineEmits(['skip', 'skipCurrent', 'moveUp', 'waitingRoomToQueue'])
|
||||||
|
|
||||||
let currentTime = reactive({time: Date.now()})
|
let currentTime = reactive({time: Date.now()})
|
||||||
|
|
||||||
|
@ -52,6 +52,7 @@ function offset(index) {
|
||||||
@skip="(uuid) => $emit('skip', uuid)"
|
@skip="(uuid) => $emit('skip', uuid)"
|
||||||
@skipCurrent="$emit('skipCurrent')"
|
@skipCurrent="$emit('skipCurrent')"
|
||||||
@moveUp="(uuid) => $emit('moveUp', uuid)"
|
@moveUp="(uuid) => $emit('moveUp', uuid)"
|
||||||
|
@waitingRoomToQueue="(uuid) => $emit('waitingRoomToQueue', uuid)"
|
||||||
/>
|
/>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import QueueInner from './QueueInner.vue'
|
import QueueInner from './QueueInner.vue'
|
||||||
|
|
||||||
const props = defineProps(['queue', 'waiting_room', 'admin']);
|
const props = defineProps(['queue', 'waiting_room', 'admin']);
|
||||||
const emits = defineEmits(['skip', 'skipCurrent', 'moveUp'])
|
const emits = defineEmits(['skip', 'skipCurrent', 'moveUp', 'waitingRoomToQueue'])
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -14,6 +14,7 @@ const emits = defineEmits(['skip', 'skipCurrent', 'moveUp'])
|
||||||
@skip="(uuid) => $emit('skip', uuid)"
|
@skip="(uuid) => $emit('skip', uuid)"
|
||||||
@moveUp="(uuid) => $emit('moveUp', uuid)"
|
@moveUp="(uuid) => $emit('moveUp', uuid)"
|
||||||
@skipCurrent="$emit('skipCurrent')"
|
@skipCurrent="$emit('skipCurrent')"
|
||||||
/>
|
@waitingRoomToQueue="(uuid) => $emit('waitingRoomToQueue', uuid)"
|
||||||
</div>
|
/>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -6,7 +6,7 @@ import App from './App.vue'
|
||||||
import Main from './Main.vue'
|
import Main from './Main.vue'
|
||||||
import { library } from '@fortawesome/fontawesome-svg-core'
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
||||||
import { faMagnifyingGlass, faList, faChair, faArrowUp, faHistory, faPlus, faStepForward, faTimes } from '@fortawesome/free-solid-svg-icons'
|
import { faMagnifyingGlass, faList, faChair, faArrowUp, faHistory, faPlus, faStepForward, faTimes, faArrowsUpToLine } from '@fortawesome/free-solid-svg-icons'
|
||||||
import { faYoutube } from '@fortawesome/free-brands-svg-icons'
|
import { faYoutube } from '@fortawesome/free-brands-svg-icons'
|
||||||
|
|
||||||
import 'foundation-sites/dist/css/foundation.min.css'
|
import 'foundation-sites/dist/css/foundation.min.css'
|
||||||
|
@ -20,6 +20,7 @@ library.add(faYoutube)
|
||||||
library.add(faTimes)
|
library.add(faTimes)
|
||||||
library.add(faArrowUp)
|
library.add(faArrowUp)
|
||||||
library.add(faChair)
|
library.add(faChair)
|
||||||
|
library.add(faArrowsUpToLine)
|
||||||
|
|
||||||
window.jQuery = jquery;
|
window.jQuery = jquery;
|
||||||
window.$ = jquery;
|
window.$ = jquery;
|
||||||
|
|
Loading…
Add table
Reference in a new issue