Просмотр исходного кода

Fixed issue where Requested by on songslists sidebar sometimes doesn't show.

KrisVos130 7 лет назад
Родитель
Сommit
6c55835b39

+ 1 - 1
frontend/App.vue

@@ -66,7 +66,7 @@
 					this.currentlyGettingUsernameFrom[userId] = true;
 			        io.getSocket(socket => {
 			            socket.emit('users.getUsernameFromId', userId, (data) => {
-			                if (data.status === 'success') this.$set(`userIdMap.${userId}`, data.data);
+			                if (data.status === 'success') this.$set(`userIdMap.Z${userId}`, data.data);
 							this.currentlyGettingUsernameFrom[userId] = false;
 						});
 					});

+ 1 - 1
frontend/components/Sidebars/SongsList.vue

@@ -31,7 +31,7 @@
 							<strong class="songTitle">{{ song.title }}</strong>
 							<small>{{ song.artists.join(', ') }}</small>
 							<div v-if="this.$parent.$parent.type === 'community' && this.$parent.$parent.station.partyMode === true">
-								<small>Requested by <b>{{this.$parent.$parent.$parent.getUsernameFromId(song.requestedBy)}} {{this.userIdMap[song.requestedBy]}}</b></small>
+								<small>Requested by <b>{{this.$parent.$parent.$parent.getUsernameFromId(song.requestedBy)}} {{this.userIdMap['Z' + song.requestedBy]}}</b></small>
 								<i class="material-icons" style="vertical-align: middle;" @click="removeFromQueue(song.songId)" v-if="isOwnerOnly() || isAdminOnly()">delete_forever</i>
 							</div>
 					</div>

+ 1 - 1
frontend/components/Station/Station.vue

@@ -69,7 +69,7 @@
 								<br>
 								<div v-if="station.partyMode">
 									<br>
-									<small>Requested by <b>{{this.$parent.$parent.getUsernameFromId(song.requestedBy)}} {{this.userIdMap[song.requestedBy]}}</b></small>
+									<small>Requested by <b>{{this.$parent.$parent.getUsernameFromId(song.requestedBy)}} {{this.userIdMap['Z' + song.requestedBy]}}</b></small>
 									<button class="button" @click="removeFromQueue(song.songId)" v-if="isOwnerOnly() || isAdminOnly()">REMOVE</button>
 								</div>
 						</div>