Merge branch 'main' into xivauth
This commit is contained in:
@@ -332,6 +332,11 @@ public class Pair : DisposableMediatorSubscriberBase
|
|||||||
_logger.LogTrace("Nothing to remove");
|
_logger.LogTrace("Nothing to remove");
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
if (IsPaused)
|
||||||
|
{
|
||||||
|
_logger.LogTrace("Skipping data removal for paused user {uid}", UserData.UID);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
var ActiveGroupPairs = GroupPair.Where(p => !p.Value.GroupUserPermissions.IsPaused() && !p.Key.GroupUserPermissions.IsPaused()).ToList();
|
var ActiveGroupPairs = GroupPair.Where(p => !p.Value.GroupUserPermissions.IsPaused() && !p.Key.GroupUserPermissions.IsPaused()).ToList();
|
||||||
|
|
||||||
|
@@ -296,10 +296,22 @@ public class DrawGroupPair : DrawPairBase
|
|||||||
|
|
||||||
if (_uiSharedService.IconButton(pauseIcon))
|
if (_uiSharedService.IconButton(pauseIcon))
|
||||||
{
|
{
|
||||||
var perm = _pair.UserPair!.OwnPermissions;
|
if (_pair.UserPair != null)
|
||||||
perm.SetPaused(!perm.IsPaused());
|
{
|
||||||
_ = _apiController.UserSetPairPermissions(new(_pair.UserData, perm));
|
var perm = _pair.UserPair.OwnPermissions;
|
||||||
|
perm.SetPaused(!perm.IsPaused());
|
||||||
|
_ = _apiController.UserSetPairPermissions(new(_pair.UserData, perm));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var groupPerm = _fullInfoDto.GroupUserPermissions;
|
||||||
|
groupPerm.SetPaused(!groupPerm.IsPaused());
|
||||||
|
_ = _apiController.GroupSetUserPermissions(new GroupPairUserPermissionDto(
|
||||||
|
_group.Group,
|
||||||
|
_pair.UserData,
|
||||||
|
groupPerm
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UiSharedService.AttachToolTip(!_fullInfoDto.GroupUserPermissions.IsPaused()
|
UiSharedService.AttachToolTip(!_fullInfoDto.GroupUserPermissions.IsPaused()
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
using MareSynchronos.API.Data;
|
using MareSynchronos.API.Data;
|
||||||
|
using MareSynchronos.API.Dto.Group;
|
||||||
using MareSynchronos.API.Dto.User;
|
using MareSynchronos.API.Dto.User;
|
||||||
using Microsoft.AspNetCore.SignalR.Client;
|
using Microsoft.AspNetCore.SignalR.Client;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
@@ -90,6 +91,11 @@ public partial class ApiController
|
|||||||
{
|
{
|
||||||
await _mareHub!.SendAsync(nameof(UserSetPairPermissions), userPermissions).ConfigureAwait(false);
|
await _mareHub!.SendAsync(nameof(UserSetPairPermissions), userPermissions).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Task GroupSetUserPermissions(GroupPairUserPermissionDto dto)
|
||||||
|
{
|
||||||
|
return _mareHub!.InvokeAsync(nameof(GroupSetUserPermissions), dto);
|
||||||
|
}
|
||||||
|
|
||||||
public async Task UserSetProfile(UserProfileDto userDescription)
|
public async Task UserSetProfile(UserProfileDto userDescription)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user