diff options
author | Nuckyz <61953774+Nuckyz@users.noreply.github.com> | 2023-06-20 17:11:50 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-20 22:11:50 +0200 |
commit | 9820b79dfe39a2ea5105a6160bba7a714fa185fa (patch) | |
tree | 41603a76dc0107f2645223c3b1d48952ce86bd6c /src/plugins/permissionsViewer | |
parent | ab811470fcaa56223712edebeea02a0d1da30990 (diff) | |
download | Vencord-9820b79dfe39a2ea5105a6160bba7a714fa185fa.tar.gz Vencord-9820b79dfe39a2ea5105a6160bba7a714fa185fa.tar.bz2 Vencord-9820b79dfe39a2ea5105a6160bba7a714fa185fa.zip |
SHC: show active now voice members; PermViewer: improve styling (#1314)
Diffstat (limited to 'src/plugins/permissionsViewer')
-rw-r--r-- | src/plugins/permissionsViewer/components/RolesAndUsersPermissions.tsx | 3 | ||||
-rw-r--r-- | src/plugins/permissionsViewer/styles.css | 15 |
2 files changed, 12 insertions, 6 deletions
diff --git a/src/plugins/permissionsViewer/components/RolesAndUsersPermissions.tsx b/src/plugins/permissionsViewer/components/RolesAndUsersPermissions.tsx index 7a65a07..b6d2538 100644 --- a/src/plugins/permissionsViewer/components/RolesAndUsersPermissions.tsx +++ b/src/plugins/permissionsViewer/components/RolesAndUsersPermissions.tsx @@ -23,6 +23,7 @@ import { ModalCloseButton, ModalContent, ModalHeader, ModalProps, ModalRoot, Mod import { ContextMenu, FluxDispatcher, GuildMemberStore, Menu, PermissionsBits, Text, Tooltip, useEffect, UserStore, useState, useStateFromStores } from "@webpack/common"; import type { Guild } from "discord-types/general"; +import { settings } from ".."; import { cl, getPermissionDescription, getPermissionString } from "../utils"; import { PermissionAllowedIcon, PermissionDefaultIcon, PermissionDeniedIcon } from "./icons"; @@ -108,7 +109,7 @@ function RolesAndUsersPermissionsComponent({ permissions, guild, modalProps, hea <div className={cl("perms-list-item", { "perms-list-item-active": selectedItemIndex === index })} onContextMenu={e => { - if (permission.type === PermissionType.Role) + if ((settings.store as any).unsafeViewAsRole && permission.type === PermissionType.Role) ContextMenu.open(e, () => ( <RoleContextMenu guild={guild} diff --git a/src/plugins/permissionsViewer/styles.css b/src/plugins/permissionsViewer/styles.css index 1043491..1c60098 100644 --- a/src/plugins/permissionsViewer/styles.css +++ b/src/plugins/permissionsViewer/styles.css @@ -63,6 +63,7 @@ grid-area: list; display: flex; flex-direction: column; + gap: 2px; border-right: 2px solid var(--background-modifier-active); } @@ -77,17 +78,21 @@ padding: 8px 5px; cursor: pointer; width: 230px; + border-radius: 5px; } -.vc-permviewer-perms-list-item > div { - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; +.vc-permviewer-perms-list-item:hover { + background-color: var(--background-modifier-hover); } .vc-permviewer-perms-list-item-active { background-color: var(--background-modifier-selected); - border-radius: 5px; +} + +.vc-permviewer-perms-list-item > div { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; } .vc-permviewer-perms-role-circle { |