From 4d9d74224fb0f90d4c08fb4dfe829202985639b1 Mon Sep 17 00:00:00 2001 From: nizune <9-nizune@users.noreply.gitlab.insrt.uk> Date: Fri, 2 Jul 2021 10:38:43 +0200 Subject: [PATCH] Update: Work on new Friends tab + minor fixes --- .../navigation/BottomNavigation.tsx | 4 +- .../navigation/items/ButtonItem.tsx | 9 +- .../navigation/items/Item.module.scss | 4 +- .../navigation/left/ServerListSidebar.tsx | 4 +- src/components/ui/Header.tsx | 9 +- src/components/ui/Modal.tsx | 2 + src/pages/channels/ChannelHeader.tsx | 4 + src/pages/friends/Friend.module.scss | 29 ++++- src/pages/friends/Friend.tsx | 13 ++- src/pages/settings/server/Panes.module.scss | 14 +++ src/pages/settings/server/Roles.tsx | 101 ++++++++++-------- src/styles/_context-menu.scss | 2 +- 12 files changed, 128 insertions(+), 67 deletions(-) diff --git a/src/components/navigation/BottomNavigation.tsx b/src/components/navigation/BottomNavigation.tsx index c88fa2d3..7faa1a00 100644 --- a/src/components/navigation/BottomNavigation.tsx +++ b/src/components/navigation/BottomNavigation.tsx @@ -4,7 +4,7 @@ import styled, { css } from "styled-components"; import { useSelf } from "../../context/revoltjs/hooks"; import { useHistory, useLocation } from "react-router"; import ConditionalLink from "../../lib/ConditionalLink"; -import { MessageRounded, Group } from "@styled-icons/boxicons-regular"; +import { Message, Group } from "@styled-icons/boxicons-regular"; const NavigationBase = styled.div` z-index: 10; @@ -50,7 +50,7 @@ export default function BottomNavigation() { } } }}> - +
- setName(e.currentTarget.value)} /> - -

serverm permmissions

- { Object.keys(ServerPermission) - .map(perm => { - let value = ServerPermission[perm as keyof typeof ServerPermission]; + return ( + selected && setSelected(id)}> + { role.name } + + ) + }) + } +
+ setName(e.currentTarget.value)} /> + + +
+

serverm permmissions

+ { Object.keys(ServerPermission) + .map(perm => { + let value = ServerPermission[perm as keyof typeof ServerPermission]; - return ( - 0} onChange={c => setPerm([ c ? (p[0] | value) : (p[0] ^ value), p[1] ])}> - { perm } - - ) - }) - } -

channel permmissions

- { Object.keys(ChannelPermission) - .map(perm => { - let value = ChannelPermission[perm as keyof typeof ChannelPermission]; + return ( + 0} onChange={c => setPerm([ c ? (p[0] | value) : (p[0] ^ value), p[1] ])}> + { perm } + + ) + }) + } +

channel permmissions

+ { Object.keys(ChannelPermission) + .map(perm => { + let value = ChannelPermission[perm as keyof typeof ChannelPermission]; - return ( - >> 0) & value) > 0} onChange={c => setPerm([ p[0], c ? (p[1] | value) : (p[1] ^ value) ])}> - { perm } - - ) - }) - } - + return ( + >> 0) & value) > 0} onChange={c => setPerm([ p[0], c ? (p[1] | value) : (p[1] ^ value) ])}> + { perm } + + ) + }) + } + +
+ + ); } diff --git a/src/styles/_context-menu.scss b/src/styles/_context-menu.scss index a90e99e4..66df1348 100644 --- a/src/styles/_context-menu.scss +++ b/src/styles/_context-menu.scss @@ -1,6 +1,6 @@ .preact-context-menu .context-menu { z-index: 100; - min-width: 180px; + min-width: 190px; padding: 6px 8px; user-select: none; border-radius: 4px;