diff --git a/frontend/web/src/components/CreateCollectionDrawer.tsx b/frontend/web/src/components/CreateCollectionDrawer.tsx index 71ab04b..2722dd2 100644 --- a/frontend/web/src/components/CreateCollectionDrawer.tsx +++ b/frontend/web/src/components/CreateCollectionDrawer.tsx @@ -7,7 +7,7 @@ import { Checkbox } from "@/components/ui/checkbox"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Separator } from "@/components/ui/separator"; -import { Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle } from "@/components/ui/sheet"; +import { Sheet, SheetBody, SheetContent, SheetFooter, SheetHeader, SheetTitle } from "@/components/ui/sheet"; import useLoading from "@/hooks/useLoading"; import { useCollectionStore, useShortcutStore, useWorkspaceStore } from "@/stores"; import { Collection } from "@/types/proto/api/v1/collection_service"; @@ -163,107 +163,108 @@ const CreateCollectionDrawer: React.FC = (props: Props) => { return ( - + {isCreating ? "Create Collection" : "Edit Collection"} - {isCreating ? "Create a new collection of shortcuts" : "Edit your collection details"} -
-
- -
- c/ + +
+
+ +
+ c/ + +
+
+
+
-
-
- - -
-
- - -
-
- - setPartialState({ - collectionCreate: Object.assign(state.collectionCreate, { - visibility: checked ? Visibility.PUBLIC : Visibility.WORKSPACE, - }), - }) - } - /> - -
- -
-
- - ({selectedShortcuts.length}) - {selectedShortcuts.length === 0 && (Select a shortcut first)} +
+ +
-
- {selectedShortcuts.map((shortcut) => { - return ( - { - setSelectedShortcuts([...selectedShortcuts.filter((selectedShortcut) => selectedShortcut.id !== shortcut.id)]); - }} - /> - ); - })} - {unselectedShortcuts.map((shortcut) => { - return ( - { - setSelectedShortcuts([...selectedShortcuts, shortcut]); - }} - /> - ); - })} - {selectedShortcuts.length + unselectedShortcuts.length === 0 && ( -
- -

No shortcuts found.

-
- )} +
+ + setPartialState({ + collectionCreate: Object.assign(state.collectionCreate, { + visibility: checked ? Visibility.PUBLIC : Visibility.WORKSPACE, + }), + }) + } + /> + +
+ +
+
+ + ({selectedShortcuts.length}) + {selectedShortcuts.length === 0 && (Select a shortcut first)} +
+
+ {selectedShortcuts.map((shortcut) => { + return ( + { + setSelectedShortcuts([...selectedShortcuts.filter((selectedShortcut) => selectedShortcut.id !== shortcut.id)]); + }} + /> + ); + })} + {unselectedShortcuts.map((shortcut) => { + return ( + { + setSelectedShortcuts([...selectedShortcuts, shortcut]); + }} + /> + ); + })} + {selectedShortcuts.length + unselectedShortcuts.length === 0 && ( +
+ +

No shortcuts found.

+
+ )} +
-
- + + diff --git a/frontend/web/src/components/CreateIdentityProviderDrawer.tsx b/frontend/web/src/components/CreateIdentityProviderDrawer.tsx index 1df850b..fb8885c 100644 --- a/frontend/web/src/components/CreateIdentityProviderDrawer.tsx +++ b/frontend/web/src/components/CreateIdentityProviderDrawer.tsx @@ -7,7 +7,7 @@ import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Separator } from "@/components/ui/separator"; -import { Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle } from "@/components/ui/sheet"; +import { Sheet, SheetBody, SheetContent, SheetFooter, SheetHeader, SheetTitle } from "@/components/ui/sheet"; import { workspaceServiceClient } from "@/grpcweb"; import { absolutifyLink } from "@/helpers/utils"; import useLoading from "@/hooks/useLoading"; @@ -137,150 +137,136 @@ const CreateIdentityProviderDrawer: React.FC = (props: Props) => { return ( - + {isCreating ? "Create Identity Provider" : "Edit Identity Provider"} - - {isCreating ? "Configure a new OAuth2 identity provider" : "Edit your identity provider settings"} - -
-
- - + +
+
+ + +
+ +
+

Identity provider information

+ {isCreating && ( +
+ Redirect URL +
+ {absolutifyLink("/auth/callback")} +
+ )} +
+
+ + handleOAuth2ConfigChange(e, "clientId")} + /> +
+
+ + handleOAuth2ConfigChange(e, "clientSecret")} + /> +
+
+ + handleOAuth2ConfigChange(e, "authUrl")} + /> +
+
+ + handleOAuth2ConfigChange(e, "tokenUrl")} + /> +
+
+ + handleOAuth2ConfigChange(e, "userInfoUrl")} + /> +
+
+ + handleOAuth2ConfigChange(e, "scopes")} + /> +
+ +
+

Field mapping

+
+
+ + handleFieldMappingChange(e, "identifier")} + /> +
+
+ + handleFieldMappingChange(e, "displayName")} + /> +
- - - -
-

Identity provider information

- {isCreating && ( -
- Redirect URL -
- {absolutifyLink("/auth/callback")} -
- )} -
- -
- - handleOAuth2ConfigChange(e, "clientId")} - /> -
- -
- - handleOAuth2ConfigChange(e, "clientSecret")} - /> -
- -
- - handleOAuth2ConfigChange(e, "authUrl")} - /> -
- -
- - handleOAuth2ConfigChange(e, "tokenUrl")} - /> -
- -
- - handleOAuth2ConfigChange(e, "userInfoUrl")} - /> -
- -
- - handleOAuth2ConfigChange(e, "scopes")} - /> -
- - - -
-

Field mapping

-
- -
- - handleFieldMappingChange(e, "identifier")} - /> -
- -
- - handleFieldMappingChange(e, "displayName")} - /> -
-
- - + + diff --git a/frontend/web/src/components/CreateShortcutDrawer.tsx b/frontend/web/src/components/CreateShortcutDrawer.tsx index d3b9480..65546ad 100644 --- a/frontend/web/src/components/CreateShortcutDrawer.tsx +++ b/frontend/web/src/components/CreateShortcutDrawer.tsx @@ -8,7 +8,7 @@ import { Checkbox } from "@/components/ui/checkbox"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Separator } from "@/components/ui/separator"; -import { Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle } from "@/components/ui/sheet"; +import { Sheet, SheetBody, SheetContent, SheetFooter, SheetHeader, SheetTitle } from "@/components/ui/sheet"; import { Textarea } from "@/components/ui/textarea"; import useLoading from "@/hooks/useLoading"; import { useShortcutStore, useWorkspaceStore } from "@/stores"; @@ -211,163 +211,156 @@ const CreateShortcutDrawer: React.FC = (props: Props) => { return ( - + {isCreating ? "Create Shortcut" : "Edit Shortcut"} - {isCreating ? "Create a new shortcut" : "Edit your shortcut details"} -
-
- -
- s/ + +
+
+ +
+ s/ + +
+
+
+
-
- -
- - -
- -
- - -
- -
- - -
- -
- - - {tagSuggestions.length > 0 && ( -
- -
- {tagSuggestions.map((tag) => ( - handleTagSuggestionsClick(tag)} - > - {tag} - - ))} +
+ + +
+
+ + +
+
+ + + {tagSuggestions.length > 0 && ( +
+ +
+ {tagSuggestions.map((tag) => ( + handleTagSuggestionsClick(tag)} + > + {tag} + + ))} +
-
- )} -
- -
- - setPartialState({ - shortcutCreate: Object.assign(state.shortcutCreate, { - visibility: checked ? Visibility.PUBLIC : Visibility.WORKSPACE, - }), - }) - } - /> - -
- - - -
-
setShowOpenGraphMetadata(!showOpenGraphMetadata)} - > - - Social media metadata - - -
- {showOpenGraphMetadata && ( -
-
- - -
-
- - -
-
- -