diff --git a/web/components/api-token/modal/create-token-modal.tsx b/web/components/api-token/modal/create-token-modal.tsx index 32305ba5b..966da76e8 100644 --- a/web/components/api-token/modal/create-token-modal.tsx +++ b/web/components/api-token/modal/create-token-modal.tsx @@ -111,7 +111,7 @@ export const CreateApiTokenModal: React.FC = (props) => { leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" > - + {generatedToken ? ( ) : ( diff --git a/web/components/api-token/modal/generated-token-details.tsx b/web/components/api-token/modal/generated-token-details.tsx index d2bbfd7a1..81e5963a3 100644 --- a/web/components/api-token/modal/generated-token-details.tsx +++ b/web/components/api-token/modal/generated-token-details.tsx @@ -28,8 +28,8 @@ export const GeneratedTokenDetails: React.FC = (props) => { }; return ( -
-
+
+

Key created

Copy and save this secret key in Plane Pages. You can{"'"}t see this key after you hit Close. A CSV file @@ -39,11 +39,11 @@ export const GeneratedTokenDetails: React.FC = (props) => {

diff --git a/web/components/headers/workspace-settings.tsx b/web/components/headers/workspace-settings.tsx index 673d65ba4..5cae7269b 100644 --- a/web/components/headers/workspace-settings.tsx +++ b/web/components/headers/workspace-settings.tsx @@ -1,13 +1,11 @@ import { FC } from "react"; import { observer } from "mobx-react-lite"; import { useRouter } from "next/router"; -// ui import { Settings } from "lucide-react"; -import { Breadcrumbs, CustomMenu } from "@plane/ui"; -// hooks +// ui +import { Breadcrumbs } from "@plane/ui"; // components import { BreadcrumbLink } from "@/components/common"; -import { WORKSPACE_SETTINGS_LINKS } from "@/constants/workspace"; export interface IWorkspaceSettingHeader { title: string; @@ -20,7 +18,7 @@ export const WorkspaceSettingHeader: FC = observer((pro const { workspaceSlug } = router.query; return ( -
+
@@ -34,28 +32,9 @@ export const WorkspaceSettingHeader: FC = observer((pro /> } /> -
- } /> -
+ } />
- - {title} - - } - placement="bottom-start" - closeOnSelect - > - {WORKSPACE_SETTINGS_LINKS.map((item) => ( - router.push(`/${workspaceSlug}${item.href}`)}> - {item.label} - - ))} -
); diff --git a/web/components/web-hooks/create-webhook-modal.tsx b/web/components/web-hooks/create-webhook-modal.tsx index 48c72a70d..fbe7b8c89 100644 --- a/web/components/web-hooks/create-webhook-modal.tsx +++ b/web/components/web-hooks/create-webhook-modal.tsx @@ -124,7 +124,7 @@ export const CreateWebhookModal: React.FC = (props) => { leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" > - + {!generatedWebhook ? ( ) : ( diff --git a/web/components/web-hooks/form/secret-key.tsx b/web/components/web-hooks/form/secret-key.tsx index a55d296ef..09bdfa214 100644 --- a/web/components/web-hooks/form/secret-key.tsx +++ b/web/components/web-hooks/form/secret-key.tsx @@ -94,15 +94,15 @@ export const WebhookSecretKey: FC = observer((props) => {
{webhookId &&
Secret key
}
Generate a token to sign-in to the webhook payload
-
-
+
+
{shouldShowKey ? (

{webhookSecretKey}

) : ( -
+
{[...Array(30)].map((_, index) => ( -
+
))}
)} diff --git a/web/components/workspace/send-workspace-invitation-modal.tsx b/web/components/workspace/send-workspace-invitation-modal.tsx index 2d1969db2..3006346f2 100644 --- a/web/components/workspace/send-workspace-invitation-modal.tsx +++ b/web/components/workspace/send-workspace-invitation-modal.tsx @@ -104,7 +104,7 @@ export const SendWorkspaceInvitationModal: React.FC = observer((props) => leaveFrom="opacity-100 translate-y-0 sm:scale-100" leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" > - +
{ @@ -121,8 +121,8 @@ export const SendWorkspaceInvitationModal: React.FC = observer((props) =>
{fields.map((field, index) => ( -
-
+
+
= observer((props) => )} />
-
+
= observer((props) => { }} onSubmit={handleRemove} /> -
-
+
+
{memberDetails.member.avatar && memberDetails.member.avatar.trim() !== "" ? ( @@ -123,86 +123,90 @@ export const WorkspaceMembersListItem: FC = observer((props) => { )} -
- - - {memberDetails.member.first_name} {memberDetails.member.last_name} - - -
-

{memberDetails.member.display_name}

- {isAdmin && ( - <> - -

{memberDetails.member.email}

- - )} -
-
-
-
- - - {ROLE[memberDetails.role]} - - {hasRoleChangeAccess && ( - - +
+
+ +
+ + {memberDetails.member.first_name} {memberDetails.member.last_name} +
+ +
+

{memberDetails.member.display_name}

+ {isAdmin && ( + <> + +

{memberDetails.member.email}

+ )}
- } - value={memberDetails.role} - onChange={(value: EUserWorkspaceRoles) => { - if (!workspaceSlug || !value) return; +
+
+ + + {ROLE[memberDetails.role]} + + {hasRoleChangeAccess && ( + + + + )} +
+ } + value={memberDetails.role} + onChange={(value: EUserWorkspaceRoles) => { + if (!workspaceSlug || !value) return; - updateMember(workspaceSlug.toString(), memberDetails.member.id, { - role: value, - }).catch(() => { - setToast({ - type: TOAST_TYPE.ERROR, - title: "Error!", - message: "An error occurred while updating member role. Please try again.", - }); - }); - }} - disabled={!hasRoleChangeAccess} - placement="bottom-end" - > - {Object.keys(ROLE).map((key) => { - if (currentWorkspaceRole && currentWorkspaceRole !== 20 && currentWorkspaceRole < parseInt(key)) - return null; + updateMember(workspaceSlug.toString(), memberDetails.member.id, { + role: value, + }).catch(() => { + setToast({ + type: TOAST_TYPE.ERROR, + title: "Error!", + message: "An error occurred while updating member role. Please try again.", + }); + }); + }} + disabled={!hasRoleChangeAccess} + placement="bottom-end" + > + {Object.keys(ROLE).map((key) => { + if (currentWorkspaceRole && currentWorkspaceRole !== 20 && currentWorkspaceRole < parseInt(key)) + return null; - return ( - - <>{ROLE[parseInt(key) as keyof typeof ROLE]} - - ); - })} - - - - + return ( + + <>{ROLE[parseInt(key) as keyof typeof ROLE]} + + ); + })} + + + + +
+
diff --git a/web/components/workspace/settings/mobile-workspace-settings-tabs.tsx b/web/components/workspace/settings/mobile-workspace-settings-tabs.tsx new file mode 100644 index 000000000..1cea866bd --- /dev/null +++ b/web/components/workspace/settings/mobile-workspace-settings-tabs.tsx @@ -0,0 +1,25 @@ +import router from "next/router"; +import { WORKSPACE_SETTINGS_LINKS } from "@/constants/workspace"; + +const MobileWorkspaceSettingsTabs = () => { + const { workspaceSlug } = router.query; + return ( +
+ {WORKSPACE_SETTINGS_LINKS.map((item, index) => ( +
router.push(`/${workspaceSlug}${item.href}`)} + > + {item.label} +
+ ))} +
+ ); +}; + +export default MobileWorkspaceSettingsTabs; diff --git a/web/components/workspace/settings/workspace-details.tsx b/web/components/workspace/settings/workspace-details.tsx index 64b4a3003..4919fc9e1 100644 --- a/web/components/workspace/settings/workspace-details.tsx +++ b/web/components/workspace/settings/workspace-details.tsx @@ -174,7 +174,7 @@ export const WorkspaceDetails: FC = observer(() => { /> )} /> -
+

{watch("name")}

- {isAdmin && ( diff --git a/web/layouts/settings-layout/workspace/layout.tsx b/web/layouts/settings-layout/workspace/layout.tsx index 3d5d057be..6ed06fecb 100644 --- a/web/layouts/settings-layout/workspace/layout.tsx +++ b/web/layouts/settings-layout/workspace/layout.tsx @@ -1,5 +1,6 @@ import { FC, ReactNode } from "react"; // components +import MobileWorkspaceSettingsTabs from "@/components/workspace/settings/mobile-workspace-settings-tabs"; import { WorkspaceSettingsSidebar } from "./sidebar"; export interface IWorkspaceSettingLayout { @@ -14,8 +15,11 @@ export const WorkspaceSettingLayout: FC = (props) => {
-
- {children} +
+ +
+ {children} +
); diff --git a/web/pages/[workspaceSlug]/settings/api-tokens.tsx b/web/pages/[workspaceSlug]/settings/api-tokens.tsx index 3df25bae0..bc10481aa 100644 --- a/web/pages/[workspaceSlug]/settings/api-tokens.tsx +++ b/web/pages/[workspaceSlug]/settings/api-tokens.tsx @@ -64,7 +64,7 @@ const ApiTokensPage: NextPageWithLayout = observer(() => { <> setIsCreateTokenModalOpen(false)} /> -
+
{tokens.length > 0 ? ( <>
diff --git a/web/pages/[workspaceSlug]/settings/billing.tsx b/web/pages/[workspaceSlug]/settings/billing.tsx index a4bd5b697..25911a15d 100644 --- a/web/pages/[workspaceSlug]/settings/billing.tsx +++ b/web/pages/[workspaceSlug]/settings/billing.tsx @@ -37,7 +37,7 @@ const BillingSettingsPage: NextPageWithLayout = observer(() => { return ( <> -
+

Billing & Plans

diff --git a/web/pages/[workspaceSlug]/settings/exports.tsx b/web/pages/[workspaceSlug]/settings/exports.tsx index 0264016b9..fb64158d0 100644 --- a/web/pages/[workspaceSlug]/settings/exports.tsx +++ b/web/pages/[workspaceSlug]/settings/exports.tsx @@ -38,7 +38,7 @@ const ExportsPage: NextPageWithLayout = observer(() => { return ( <> -
+

Exports

diff --git a/web/pages/[workspaceSlug]/settings/members.tsx b/web/pages/[workspaceSlug]/settings/members.tsx index f644a294b..3ed75e733 100644 --- a/web/pages/[workspaceSlug]/settings/members.tsx +++ b/web/pages/[workspaceSlug]/settings/members.tsx @@ -95,7 +95,7 @@ const WorkspaceMembersSettingsPage: NextPageWithLayout = observer(() => { onClose={() => setInviteModal(false)} onSubmit={handleWorkspaceInvite} /> -
+

Members

diff --git a/web/pages/[workspaceSlug]/settings/webhooks/[webhookId].tsx b/web/pages/[workspaceSlug]/settings/webhooks/[webhookId].tsx index e6ebe3644..c0ec917a9 100644 --- a/web/pages/[workspaceSlug]/settings/webhooks/[webhookId].tsx +++ b/web/pages/[workspaceSlug]/settings/webhooks/[webhookId].tsx @@ -95,7 +95,7 @@ const WebhookDetailsPage: NextPageWithLayout = observer(() => { <> setDeleteWebhookModal(false)} /> -
+
await handleUpdateWebhook(data)} data={currentWebhook} /> {currentWebhook && setDeleteWebhookModal(true)} />}
diff --git a/web/pages/[workspaceSlug]/settings/webhooks/index.tsx b/web/pages/[workspaceSlug]/settings/webhooks/index.tsx index 3c5ae614a..d4dd1138c 100644 --- a/web/pages/[workspaceSlug]/settings/webhooks/index.tsx +++ b/web/pages/[workspaceSlug]/settings/webhooks/index.tsx @@ -62,7 +62,7 @@ const WebhooksListPage: NextPageWithLayout = observer(() => { return ( <> -
+
{ /> {Object.keys(webhooks).length > 0 ? (
-
+
Webhooks