Signaling server, WS, login, room creation

This commit is contained in:
Thomas
2020-07-27 21:44:36 +02:00
parent 0ef9ba675b
commit c1787cacba
25 changed files with 1114 additions and 123 deletions

View File

@@ -0,0 +1,46 @@
const state = {
admin: false,
roomStatus: {
roomName: '',
roomCode: '',
current: '',
playlist: []
}
}
const getters = {
displayRoomCode: state => state.roomCode,
displayRoomName: state => state.roomName
}
const actions = {
setRoomCode ({ commit }, roomCode) {
commit('SET_ROOMCODE', roomCode)
},
setRoomName ({ commit }, roomName) {
commit('SET_ROOMNAME', roomName)
},
setRoomStatus ({ commit }, roomStatus) {
commit('SET_ROOMSTATUS', roomStatus)
}
}
const mutations = {
SET_ROOMCODE (state, code) {
state.roomStatus.roomCode = code
},
SET_ROOMNAME (state, name) {
state.roomStatus.roomName = name
},
SET_ROOMSTATUS (state, roomStatus) {
state.roomStatus = roomStatus
}
}
export default {
namespaced: true,
state,
getters,
actions,
mutations
}