diff --git a/front/components/ConnectorPermissionsModal.tsx b/front/components/ConnectorPermissionsModal.tsx index da9653db04f6..5a1182b94f4c 100644 --- a/front/components/ConnectorPermissionsModal.tsx +++ b/front/components/ConnectorPermissionsModal.tsx @@ -1,11 +1,6 @@ -import { - Button, - Checkbox, - XCircleStrokeIcon as XCircleIcon, -} from "@dust-tt/sparkle"; -import { Dialog, Transition } from "@headlessui/react"; +import { Checkbox, Modal } from "@dust-tt/sparkle"; import { Cog6ToothIcon } from "@heroicons/react/20/solid"; -import { Fragment, useState } from "react"; +import { useState } from "react"; import { mutate } from "swr"; import { @@ -176,126 +171,73 @@ export default function ConnectorPermissionsModal({ } return ( - - - -
- - -
-
- - -
-
- ) : ( -
- -
- )} -
- {!isDefaultNewResourcePermissionLoading && - defaultNewResourcePermission ? ( - <> - {canUpdatePermissions && defaultPermissionTitleText ? ( -
- - {defaultPermissionTitleText} - -
- { - setAutomaticallyIncludeNewResources(checked); - }} - checked={ - automaticallyIncludeNewResources ?? - ["read", "read_write"].includes( - defaultNewResourcePermission - ) - } - /> -
-
- ) : null} -
-
-
- {resourceListTitleText} -
-
-
-
- { - setUpdatedPermissionByInternalId((prev) => ({ - ...prev, - [internalId]: permission, - })); - }} - showExpand={ - CONNECTOR_TYPE_TO_SHOW_EXPAND[connector.type] - } - /> -
- - ) : null} - {isDefaultNewResourcePermissionError && ( -
- An unexpected error occurred -
- )} - - + + {!isDefaultNewResourcePermissionLoading && + defaultNewResourcePermission ? ( + <> + {canUpdatePermissions && defaultPermissionTitleText ? ( +
+ + {defaultPermissionTitleText} + +
+ { + setAutomaticallyIncludeNewResources(checked); + }} + checked={ + automaticallyIncludeNewResources ?? + ["read", "read_write"].includes( + defaultNewResourcePermission + ) + } + /> +
+
+ ) : null} +
+
+
+ {resourceListTitleText} +
+
+
+
+ { + setUpdatedPermissionByInternalId((prev) => ({ + ...prev, + [internalId]: permission, + })); + }} + showExpand={CONNECTOR_TYPE_TO_SHOW_EXPAND[connector.type]} + />
-
-
-
+ + ) : null} + {isDefaultNewResourcePermissionError && ( +
An unexpected error occurred
+ )} + ); } diff --git a/front/package-lock.json b/front/package-lock.json index 910a484cdb91..8d0130aae866 100644 --- a/front/package-lock.json +++ b/front/package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@dust-tt/sparkle": "0.1.47", + "@dust-tt/sparkle": "0.1.48", "@headlessui/react": "^1.7.7", "@heroicons/react": "^2.0.11", "@nangohq/frontend": "^0.16.1", @@ -714,9 +714,9 @@ "license": "Apache-2.0" }, "node_modules/@dust-tt/sparkle": { - "version": "0.1.47", - "resolved": "https://registry.npmjs.org/@dust-tt/sparkle/-/sparkle-0.1.47.tgz", - "integrity": "sha512-Lu/UiVk2K0OUDIf6XNpJqJdv0Fl/bRjy2yuS77bXbmLCrTHNPDLLYUIUS8gEmqf7kmG/P8or3Dj4oKB4KQe7/A==", + "version": "0.1.48", + "resolved": "https://registry.npmjs.org/@dust-tt/sparkle/-/sparkle-0.1.48.tgz", + "integrity": "sha512-kVCTlqIY0ZklOmzMtjGjD8kLi6IEymS8iSUPNQslLp/RKvWG8OnV8Da/3tdcnsjZT2nehPm80UIUbgdMcO1r7Q==", "dependencies": { "@headlessui/react": "^1.7.17" }, diff --git a/front/package.json b/front/package.json index 9b3685651bc8..9728a0921440 100644 --- a/front/package.json +++ b/front/package.json @@ -13,7 +13,7 @@ "initdb": "env $(cat .env.local) npx tsx admin/db.ts" }, "dependencies": { - "@dust-tt/sparkle": "0.1.47", + "@dust-tt/sparkle": "0.1.48", "@headlessui/react": "^1.7.7", "@heroicons/react": "^2.0.11", "@nangohq/frontend": "^0.16.1",