From 2d4ae38a02113654b85bea3eeb28be6bb4a8f8bb Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 5 Aug 2022 10:32:55 +0100 Subject: [PATCH] Standardise icons across groups and users --- packages/bbui/src/Icon/IconAvatar.svelte | 58 +++++++++++++++++++ packages/bbui/src/List/ListItem.svelte | 14 +---- packages/bbui/src/Popover/Popover.svelte | 3 + packages/bbui/src/index.js | 1 + .../settings/UserGroupPicker.svelte | 13 ++++- .../portal/manage/groups/[groupId].svelte | 5 +- .../groups/_components/GroupIcon.svelte | 18 +----- .../portal/manage/users/[userId].svelte | 7 ++- 8 files changed, 85 insertions(+), 34 deletions(-) create mode 100644 packages/bbui/src/Icon/IconAvatar.svelte diff --git a/packages/bbui/src/Icon/IconAvatar.svelte b/packages/bbui/src/Icon/IconAvatar.svelte new file mode 100644 index 0000000000..8ae2774dbb --- /dev/null +++ b/packages/bbui/src/Icon/IconAvatar.svelte @@ -0,0 +1,58 @@ + + +
+ +
+ + diff --git a/packages/bbui/src/List/ListItem.svelte b/packages/bbui/src/List/ListItem.svelte index c9e4e397e2..40d3c5541c 100644 --- a/packages/bbui/src/List/ListItem.svelte +++ b/packages/bbui/src/List/ListItem.svelte @@ -1,11 +1,12 @@ -
- -
- - + diff --git a/packages/builder/src/pages/builder/portal/manage/users/[userId].svelte b/packages/builder/src/pages/builder/portal/manage/users/[userId].svelte index 19e0321b5b..6c7f27aec8 100644 --- a/packages/builder/src/pages/builder/portal/manage/users/[userId].svelte +++ b/packages/builder/src/pages/builder/portal/manage/users/[userId].svelte @@ -29,6 +29,7 @@ import { RoleUtils } from "@budibase/frontend-core" import UserGroupPicker from "components/settings/UserGroupPicker.svelte" import DeleteUserModal from "./_components/DeleteUserModal.svelte" + import GroupIcon from "../groups/_components/GroupIcon.svelte" export let userId @@ -207,7 +208,7 @@ - {#if userId !== $auth.user._id} + {#if userId !== $auth.user?._id}
@@ -277,6 +278,8 @@ selected={user.userGroups} on:select={e => addGroup(e.detail)} on:deselect={e => removeGroup(e.detail)} + iconComponent={GroupIcon} + extractIconProps={item => ({ group: item, size: "S" })} />
@@ -320,7 +323,7 @@ {#each availableApps as app} $goto(`../../overview/${app.devId}`)}