mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 02:48:19 -07:00
Merge pull request #2516 from tonyfinn/syncplay_current_group_users
Show current group members in syncplay group dialog
This commit is contained in:
commit
f720fd6060
@ -193,10 +193,19 @@ class Manager {
|
|||||||
this.queueCore.updatePlayQueue(apiClient, cmd.Data);
|
this.queueCore.updatePlayQueue(apiClient, cmd.Data);
|
||||||
break;
|
break;
|
||||||
case 'UserJoined':
|
case 'UserJoined':
|
||||||
|
|
||||||
toast(globalize.translate('MessageSyncPlayUserJoined', cmd.Data));
|
toast(globalize.translate('MessageSyncPlayUserJoined', cmd.Data));
|
||||||
|
if (!this.groupInfo.Participants) {
|
||||||
|
this.groupInfo.Participants = [cmd.Data];
|
||||||
|
} else {
|
||||||
|
this.groupInfo.Participants.push(cmd.Data);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'UserLeft':
|
case 'UserLeft':
|
||||||
toast(globalize.translate('MessageSyncPlayUserLeft', cmd.Data));
|
toast(globalize.translate('MessageSyncPlayUserLeft', cmd.Data));
|
||||||
|
if (this.groupInfo.Participants) {
|
||||||
|
this.groupInfo.Participants = this.groupInfo.Participants.filter((user) => user !== cmd.Data);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'GroupJoined':
|
case 'GroupJoined':
|
||||||
cmd.Data.LastUpdatedAt = new Date(cmd.Data.LastUpdatedAt);
|
cmd.Data.LastUpdatedAt = new Date(cmd.Data.LastUpdatedAt);
|
||||||
|
@ -7,6 +7,7 @@ import actionsheet from '../../actionSheet/actionSheet';
|
|||||||
import globalize from '../../../scripts/globalize';
|
import globalize from '../../../scripts/globalize';
|
||||||
import playbackPermissionManager from './playbackPermissionManager';
|
import playbackPermissionManager from './playbackPermissionManager';
|
||||||
import ServerConnections from '../../ServerConnections';
|
import ServerConnections from '../../ServerConnections';
|
||||||
|
import './groupSelectionMenu.scss';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class that manages the SyncPlay group selection menu.
|
* Class that manages the SyncPlay group selection menu.
|
||||||
@ -63,7 +64,8 @@ class GroupSelectionMenu {
|
|||||||
title: globalize.translate('HeaderSyncPlaySelectGroup'),
|
title: globalize.translate('HeaderSyncPlaySelectGroup'),
|
||||||
items: menuItems,
|
items: menuItems,
|
||||||
positionTo: button,
|
positionTo: button,
|
||||||
border: true
|
border: true,
|
||||||
|
dialogClass: 'syncPlayGroupMenu'
|
||||||
};
|
};
|
||||||
|
|
||||||
actionsheet.show(menuOptions).then(function (id) {
|
actionsheet.show(menuOptions).then(function (id) {
|
||||||
@ -139,6 +141,8 @@ class GroupSelectionMenu {
|
|||||||
|
|
||||||
const menuOptions = {
|
const menuOptions = {
|
||||||
title: groupInfo.GroupName,
|
title: groupInfo.GroupName,
|
||||||
|
text: groupInfo.Participants.join(', '),
|
||||||
|
dialogClass: 'syncPlayGroupMenu',
|
||||||
items: menuItems,
|
items: menuItems,
|
||||||
positionTo: button,
|
positionTo: button,
|
||||||
border: true
|
border: true
|
||||||
|
4
src/components/syncPlay/ui/groupSelectionMenu.scss
Normal file
4
src/components/syncPlay/ui/groupSelectionMenu.scss
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
.syncPlayGroupMenu .actionSheetText {
|
||||||
|
margin-left: 0.6em; /* to line up with the title */
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user