mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-15 09:33:03 -04:00
Fix SHC broken patches; Sort PermViewer channel overwrites roles (#1166)
This commit is contained in:
parent
89a6c575c9
commit
ec091a7959
4 changed files with 26 additions and 11 deletions
|
@ -27,7 +27,7 @@ import type { Guild, GuildMember } from "discord-types/general";
|
|||
|
||||
import openRolesAndUsersPermissionsModal, { PermissionType, RoleOrUserPermission } from "./components/RolesAndUsersPermissions";
|
||||
import UserPermissions from "./components/UserPermissions";
|
||||
import { getSortedRoles } from "./utils";
|
||||
import { getSortedRoles, sortPermissionOverwrites } from "./utils";
|
||||
|
||||
export const enum PermissionsSortOrder {
|
||||
HighestRole,
|
||||
|
@ -94,12 +94,12 @@ function MenuItem(guildId: string, id?: string, type?: MenuItemParentType) {
|
|||
case MenuItemParentType.Channel: {
|
||||
const channel = ChannelStore.getChannel(id!);
|
||||
|
||||
permissions = Object.values(channel.permissionOverwrites).map(({ id, allow, deny, type }) => ({
|
||||
permissions = sortPermissionOverwrites(Object.values(channel.permissionOverwrites).map(({ id, allow, deny, type }) => ({
|
||||
type: type as PermissionType,
|
||||
id,
|
||||
overwriteAllow: allow,
|
||||
overwriteDeny: deny
|
||||
}));
|
||||
})), guildId);
|
||||
|
||||
header = channel.name;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue