mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: merge conflicts resolved
This commit is contained in:
commit
7061ef4631
13
.github/workflows/auto-merge.yml
vendored
13
.github/workflows/auto-merge.yml
vendored
@ -8,10 +8,12 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
CURRENT_BRANCH: ${{ github.ref_name }}
|
CURRENT_BRANCH: ${{ github.ref_name }}
|
||||||
SOURCE_BRANCH: ${{ secrets.SYNC_SOURCE_BRANCH_NAME }} # The sync branch such as "sync/ce"
|
SOURCE_BRANCH: ${{ vars.SYNC_SOURCE_BRANCH_NAME }} # The sync branch such as "sync/ce"
|
||||||
TARGET_BRANCH: ${{ secrets.SYNC_TARGET_BRANCH_NAME }} # The target branch that you would like to merge changes like develop
|
TARGET_BRANCH: ${{ vars.SYNC_TARGET_BRANCH_NAME }} # The target branch that you would like to merge changes like develop
|
||||||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} # Personal access token required to modify contents and workflows
|
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} # Personal access token required to modify contents and workflows
|
||||||
REVIEWER: ${{ secrets.SYNC_PR_REVIEWER }}
|
REVIEWER: ${{ vars.SYNC_PR_REVIEWER }}
|
||||||
|
ACCOUNT_USER_NAME: ${{ vars.ACCOUNT_USER_NAME }}
|
||||||
|
ACCOUNT_USER_EMAIL: ${{ vars.ACCOUNT_USER_EMAIL }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Check_Branch:
|
Check_Branch:
|
||||||
@ -27,7 +29,6 @@ jobs:
|
|||||||
else
|
else
|
||||||
echo "MATCH=false" >> $GITHUB_OUTPUT
|
echo "MATCH=false" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
Auto_Merge:
|
Auto_Merge:
|
||||||
if: ${{ needs.Check_Branch.outputs.BRANCH_MATCH == 'true' }}
|
if: ${{ needs.Check_Branch.outputs.BRANCH_MATCH == 'true' }}
|
||||||
needs: [Check_Branch]
|
needs: [Check_Branch]
|
||||||
@ -43,8 +44,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Setup Git
|
- name: Setup Git
|
||||||
run: |
|
run: |
|
||||||
git config user.name "GitHub Actions"
|
git config user.name "$ACCOUNT_USER_NAME"
|
||||||
git config user.email "actions@github.com"
|
git config user.email "$ACCOUNT_USER_EMAIL"
|
||||||
|
|
||||||
- name: Setup GH CLI and Git Config
|
- name: Setup GH CLI and Git Config
|
||||||
run: |
|
run: |
|
||||||
|
@ -111,7 +111,7 @@ export const CreateApiTokenModal: React.FC<Props> = (props) => {
|
|||||||
leaveFrom="opacity-100 translate-y-0 sm:scale-100"
|
leaveFrom="opacity-100 translate-y-0 sm:scale-100"
|
||||||
leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
||||||
>
|
>
|
||||||
<Dialog.Panel className="relative transform rounded-lg bg-custom-background-100 p-5 px-4 text-left shadow-custom-shadow-md transition-all sm:w-full sm:max-w-2xl">
|
<Dialog.Panel className="relative transform rounded-lg bg-custom-background-100 p-5 px-4 text-left shadow-custom-shadow-md transition-all w-full sm:max-w-2xl">
|
||||||
{generatedToken ? (
|
{generatedToken ? (
|
||||||
<GeneratedTokenDetails handleClose={handleClose} tokenDetails={generatedToken} />
|
<GeneratedTokenDetails handleClose={handleClose} tokenDetails={generatedToken} />
|
||||||
) : (
|
) : (
|
||||||
|
@ -28,8 +28,8 @@ export const GeneratedTokenDetails: React.FC<Props> = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="w-full">
|
||||||
<div className="space-y-3">
|
<div className="w-full space-y-3 text-wrap">
|
||||||
<h3 className="text-lg font-medium leading-6 text-custom-text-100">Key created</h3>
|
<h3 className="text-lg font-medium leading-6 text-custom-text-100">Key created</h3>
|
||||||
<p className="text-sm text-custom-text-400">
|
<p className="text-sm text-custom-text-400">
|
||||||
Copy and save this secret key in Plane Pages. You can{"'"}t see this key after you hit Close. A CSV file
|
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> = (props) => {
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => copyApiToken(tokenDetails.token ?? "")}
|
onClick={() => copyApiToken(tokenDetails.token ?? "")}
|
||||||
className="mt-4 flex w-full items-center justify-between rounded-md border-[0.5px] border-custom-border-200 px-3 py-2 text-sm font-medium outline-none"
|
className="mt-4 flex truncate w-full items-center justify-between rounded-md border-[0.5px] border-custom-border-200 px-3 py-2 text-sm font-medium outline-none"
|
||||||
>
|
>
|
||||||
{tokenDetails.token}
|
<span className="truncate pr-2">{tokenDetails.token}</span>
|
||||||
<Tooltip tooltipContent="Copy secret key" isMobile={isMobile}>
|
<Tooltip tooltipContent="Copy secret key" isMobile={isMobile}>
|
||||||
<Copy className="h-4 w-4 text-custom-text-400" />
|
<Copy className="h-4 w-4 text-custom-text-400 flex-shrink-0" />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</button>
|
</button>
|
||||||
<div className="mt-6 flex items-center justify-between">
|
<div className="mt-6 flex items-center justify-between">
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
// ui
|
|
||||||
import { Settings } from "lucide-react";
|
import { Settings } from "lucide-react";
|
||||||
import { Breadcrumbs, CustomMenu } from "@plane/ui";
|
// ui
|
||||||
// hooks
|
import { Breadcrumbs } from "@plane/ui";
|
||||||
// components
|
// components
|
||||||
import { BreadcrumbLink } from "@/components/common";
|
import { BreadcrumbLink } from "@/components/common";
|
||||||
import { WORKSPACE_SETTINGS_LINKS } from "@/constants/workspace";
|
|
||||||
|
|
||||||
export interface IWorkspaceSettingHeader {
|
export interface IWorkspaceSettingHeader {
|
||||||
title: string;
|
title: string;
|
||||||
@ -20,7 +18,7 @@ export const WorkspaceSettingHeader: FC<IWorkspaceSettingHeader> = observer((pro
|
|||||||
const { workspaceSlug } = router.query;
|
const { workspaceSlug } = router.query;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative z-10 flex h-[3.75rem] w-full flex-shrink-0 flex-row items-center justify-between gap-x-2 gap-y-4 border-b border-custom-border-200 bg-custom-sidebar-background-100 p-4">
|
<div className="relative z-10 flex h-[3.75rem] w-full flex-shrink-0 flex-row items-center justify-between gap-x-2 gap-y-4 bg-custom-sidebar-background-100 p-4">
|
||||||
<div className="flex w-full flex-grow items-center gap-2 overflow-ellipsis whitespace-nowrap">
|
<div className="flex w-full flex-grow items-center gap-2 overflow-ellipsis whitespace-nowrap">
|
||||||
<div>
|
<div>
|
||||||
<Breadcrumbs>
|
<Breadcrumbs>
|
||||||
@ -34,28 +32,9 @@ export const WorkspaceSettingHeader: FC<IWorkspaceSettingHeader> = observer((pro
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<div className="hidden sm:hidden md:block lg:block">
|
|
||||||
<Breadcrumbs.BreadcrumbItem type="text" link={<BreadcrumbLink label={title} />} />
|
<Breadcrumbs.BreadcrumbItem type="text" link={<BreadcrumbLink label={title} />} />
|
||||||
</div>
|
|
||||||
</Breadcrumbs>
|
</Breadcrumbs>
|
||||||
</div>
|
</div>
|
||||||
<CustomMenu
|
|
||||||
className="flex-shrink-0 block sm:block md:hidden lg:hidden"
|
|
||||||
maxHeight="lg"
|
|
||||||
customButton={
|
|
||||||
<span className="text-xs px-1.5 py-1 border rounded-md text-custom-text-200 border-custom-border-300">
|
|
||||||
{title}
|
|
||||||
</span>
|
|
||||||
}
|
|
||||||
placement="bottom-start"
|
|
||||||
closeOnSelect
|
|
||||||
>
|
|
||||||
{WORKSPACE_SETTINGS_LINKS.map((item) => (
|
|
||||||
<CustomMenu.MenuItem key={item.key} onClick={() => router.push(`/${workspaceSlug}${item.href}`)}>
|
|
||||||
{item.label}
|
|
||||||
</CustomMenu.MenuItem>
|
|
||||||
))}
|
|
||||||
</CustomMenu>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -0,0 +1,38 @@
|
|||||||
|
import Link from "next/link";
|
||||||
|
import router from "next/router";
|
||||||
|
// helpers
|
||||||
|
import { cn } from "@/helpers/common.helper";
|
||||||
|
|
||||||
|
export const PreferencesMobileHeader = () => {
|
||||||
|
const profilePreferenceLinks: Array<{
|
||||||
|
label: string;
|
||||||
|
href: string;
|
||||||
|
}> = [
|
||||||
|
{
|
||||||
|
label: "Theme",
|
||||||
|
href: `/profile/preferences/theme`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Email",
|
||||||
|
href: `/profile/preferences/email`,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={cn("sticky top-0 flex md:hidden w-full border-b border-custom-border-200")}>
|
||||||
|
{profilePreferenceLinks.map((link, index) => (
|
||||||
|
<Link
|
||||||
|
key={index}
|
||||||
|
href={link.href}
|
||||||
|
onClick={() => console.log(router.asPath)}
|
||||||
|
className={cn(
|
||||||
|
"flex justify-around py-2 w-full",
|
||||||
|
router.asPath.includes(link.label.toLowerCase()) ? "border-b-2 border-custom-primary-100" : ""
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<div className="text-sm text-custom-text-200">{link.label}</div>
|
||||||
|
</Link>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
177
web/components/profile/profile-issues-mobile-header.tsx
Normal file
177
web/components/profile/profile-issues-mobile-header.tsx
Normal file
@ -0,0 +1,177 @@
|
|||||||
|
import { useCallback } from "react";
|
||||||
|
import { observer } from "mobx-react";
|
||||||
|
import { useRouter } from "next/router";
|
||||||
|
// icons
|
||||||
|
import { ChevronDown } from "lucide-react";
|
||||||
|
// types
|
||||||
|
import { IIssueDisplayFilterOptions, IIssueDisplayProperties, IIssueFilterOptions, TIssueLayouts } from "@plane/types";
|
||||||
|
// ui
|
||||||
|
import { CustomMenu } from "@plane/ui";
|
||||||
|
// components
|
||||||
|
import { DisplayFiltersSelection, FilterSelection, FiltersDropdown } from "@/components/issues";
|
||||||
|
// constants
|
||||||
|
import { EIssueFilterType, EIssuesStoreType, ISSUE_DISPLAY_FILTERS_BY_LAYOUT, ISSUE_LAYOUTS } from "@/constants/issue";
|
||||||
|
// hooks
|
||||||
|
import { useIssues, useLabel } from "@/hooks/store";
|
||||||
|
|
||||||
|
|
||||||
|
const ProfileIssuesMobileHeader = observer(() => {
|
||||||
|
// router
|
||||||
|
const router = useRouter();
|
||||||
|
const { workspaceSlug, userId } = router.query;
|
||||||
|
// store hook
|
||||||
|
const {
|
||||||
|
issuesFilter: { issueFilters, updateFilters },
|
||||||
|
} = useIssues(EIssuesStoreType.PROFILE);
|
||||||
|
|
||||||
|
const { workspaceLabels } = useLabel();
|
||||||
|
// derived values
|
||||||
|
const states = undefined;
|
||||||
|
// const members = undefined;
|
||||||
|
// const activeLayout = issueFilters?.displayFilters?.layout;
|
||||||
|
// const states = undefined;
|
||||||
|
const members = undefined;
|
||||||
|
const activeLayout = issueFilters?.displayFilters?.layout;
|
||||||
|
|
||||||
|
const handleLayoutChange = useCallback(
|
||||||
|
(layout: TIssueLayouts) => {
|
||||||
|
if (!workspaceSlug || !userId) return;
|
||||||
|
updateFilters(
|
||||||
|
workspaceSlug.toString(),
|
||||||
|
undefined,
|
||||||
|
EIssueFilterType.DISPLAY_FILTERS,
|
||||||
|
{ layout: layout },
|
||||||
|
userId.toString()
|
||||||
|
);
|
||||||
|
},
|
||||||
|
[workspaceSlug, updateFilters, userId]
|
||||||
|
);
|
||||||
|
|
||||||
|
const handleFiltersUpdate = useCallback(
|
||||||
|
(key: keyof IIssueFilterOptions, value: string | string[]) => {
|
||||||
|
if (!workspaceSlug || !userId) return;
|
||||||
|
const newValues = issueFilters?.filters?.[key] ?? [];
|
||||||
|
|
||||||
|
if (Array.isArray(value)) {
|
||||||
|
value.forEach((val) => {
|
||||||
|
if (!newValues.includes(val)) newValues.push(val);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
if (issueFilters?.filters?.[key]?.includes(value)) newValues.splice(newValues.indexOf(value), 1);
|
||||||
|
else newValues.push(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
updateFilters(
|
||||||
|
workspaceSlug.toString(),
|
||||||
|
undefined,
|
||||||
|
EIssueFilterType.FILTERS,
|
||||||
|
{ [key]: newValues },
|
||||||
|
userId.toString()
|
||||||
|
);
|
||||||
|
},
|
||||||
|
[workspaceSlug, issueFilters, updateFilters, userId]
|
||||||
|
);
|
||||||
|
|
||||||
|
const handleDisplayFilters = useCallback(
|
||||||
|
(updatedDisplayFilter: Partial<IIssueDisplayFilterOptions>) => {
|
||||||
|
if (!workspaceSlug || !userId) return;
|
||||||
|
updateFilters(
|
||||||
|
workspaceSlug.toString(),
|
||||||
|
undefined,
|
||||||
|
EIssueFilterType.DISPLAY_FILTERS,
|
||||||
|
updatedDisplayFilter,
|
||||||
|
userId.toString()
|
||||||
|
);
|
||||||
|
},
|
||||||
|
[workspaceSlug, updateFilters, userId]
|
||||||
|
);
|
||||||
|
|
||||||
|
const handleDisplayProperties = useCallback(
|
||||||
|
(property: Partial<IIssueDisplayProperties>) => {
|
||||||
|
if (!workspaceSlug || !userId) return;
|
||||||
|
updateFilters(
|
||||||
|
workspaceSlug.toString(),
|
||||||
|
undefined,
|
||||||
|
EIssueFilterType.DISPLAY_PROPERTIES,
|
||||||
|
property,
|
||||||
|
userId.toString()
|
||||||
|
);
|
||||||
|
},
|
||||||
|
[workspaceSlug, updateFilters, userId]
|
||||||
|
);
|
||||||
|
return (
|
||||||
|
<div className="flex justify-evenly border-b border-custom-border-200 py-2 md:hidden">
|
||||||
|
<CustomMenu
|
||||||
|
maxHeight={"md"}
|
||||||
|
className="flex flex-grow justify-center text-sm text-custom-text-200"
|
||||||
|
placement="bottom-start"
|
||||||
|
customButton={<span className="flex flex-grow justify-center text-sm text-custom-text-200">Layout</span>}
|
||||||
|
customButtonClassName="flex flex-grow justify-center text-custom-text-200 text-sm"
|
||||||
|
closeOnSelect
|
||||||
|
>
|
||||||
|
{ISSUE_LAYOUTS.map((layout, index) => {
|
||||||
|
if (layout.key === "spreadsheet" || layout.key === "gantt_chart" || layout.key === "calendar") return;
|
||||||
|
return (
|
||||||
|
<CustomMenu.MenuItem
|
||||||
|
key={index}
|
||||||
|
onClick={() => {
|
||||||
|
handleLayoutChange(ISSUE_LAYOUTS[index].key);
|
||||||
|
}}
|
||||||
|
className="flex items-center gap-2"
|
||||||
|
>
|
||||||
|
<layout.icon className="h-3 w-3" />
|
||||||
|
<div className="text-custom-text-300">{layout.title}</div>
|
||||||
|
</CustomMenu.MenuItem>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</CustomMenu>
|
||||||
|
<div className="flex flex-grow items-center justify-center border-l border-custom-border-200 text-sm text-custom-text-200">
|
||||||
|
<FiltersDropdown
|
||||||
|
title="Filters"
|
||||||
|
placement="bottom-end"
|
||||||
|
menuButton={
|
||||||
|
<span className="flex items-center text-sm text-custom-text-200">
|
||||||
|
Filters
|
||||||
|
<ChevronDown className="ml-2 h-4 w-4 text-custom-text-200" />
|
||||||
|
</span>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<FilterSelection
|
||||||
|
layoutDisplayFiltersOptions={
|
||||||
|
activeLayout ? ISSUE_DISPLAY_FILTERS_BY_LAYOUT.profile_issues[activeLayout] : undefined
|
||||||
|
}
|
||||||
|
filters={issueFilters?.filters ?? {}}
|
||||||
|
handleFiltersUpdate={handleFiltersUpdate}
|
||||||
|
states={states}
|
||||||
|
labels={workspaceLabels}
|
||||||
|
memberIds={members}
|
||||||
|
/>
|
||||||
|
</FiltersDropdown>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-grow items-center justify-center border-l border-custom-border-200 text-sm text-custom-text-200">
|
||||||
|
<FiltersDropdown
|
||||||
|
title="Display"
|
||||||
|
placement="bottom-end"
|
||||||
|
menuButton={
|
||||||
|
<span className="flex items-center text-sm text-custom-text-200">
|
||||||
|
Display
|
||||||
|
<ChevronDown className="ml-2 h-4 w-4 text-custom-text-200" />
|
||||||
|
</span>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<DisplayFiltersSelection
|
||||||
|
layoutDisplayFiltersOptions={
|
||||||
|
activeLayout ? ISSUE_DISPLAY_FILTERS_BY_LAYOUT.profile_issues[activeLayout] : undefined
|
||||||
|
}
|
||||||
|
displayFilters={issueFilters?.displayFilters ?? {}}
|
||||||
|
handleDisplayFiltersUpdate={handleDisplayFilters}
|
||||||
|
displayProperties={issueFilters?.displayProperties ?? {}}
|
||||||
|
handleDisplayPropertiesUpdate={handleDisplayProperties}
|
||||||
|
/>
|
||||||
|
</FiltersDropdown>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
export default ProfileIssuesMobileHeader;
|
@ -124,7 +124,7 @@ export const CreateWebhookModal: React.FC<ICreateWebhookModal> = (props) => {
|
|||||||
leaveFrom="opacity-100 translate-y-0 sm:scale-100"
|
leaveFrom="opacity-100 translate-y-0 sm:scale-100"
|
||||||
leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
||||||
>
|
>
|
||||||
<Dialog.Panel className="relative transform overflow-hidden rounded-lg border border-custom-border-200 bg-custom-background-100 p-6 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-2xl">
|
<Dialog.Panel className="relative transform overflow-hidden rounded-lg border border-custom-border-200 bg-custom-background-100 p-6 text-left shadow-xl transition-all sm:my-8 w-full sm:max-w-2xl">
|
||||||
{!generatedWebhook ? (
|
{!generatedWebhook ? (
|
||||||
<WebhookForm onSubmit={handleCreateWebhook} handleClose={handleClose} />
|
<WebhookForm onSubmit={handleCreateWebhook} handleClose={handleClose} />
|
||||||
) : (
|
) : (
|
||||||
|
@ -94,15 +94,15 @@ export const WebhookSecretKey: FC<Props> = observer((props) => {
|
|||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
{webhookId && <div className="text-sm font-medium">Secret key</div>}
|
{webhookId && <div className="text-sm font-medium">Secret key</div>}
|
||||||
<div className="text-xs text-custom-text-400">Generate a token to sign-in to the webhook payload</div>
|
<div className="text-xs text-custom-text-400">Generate a token to sign-in to the webhook payload</div>
|
||||||
<div className="flex items-center gap-4">
|
<div className="flex flex-col md:flex-row md:items-center gap-4">
|
||||||
<div className="flex flex-grow max-w-lg items-center justify-between self-stretch rounded border border-custom-border-200 px-2 py-1.5">
|
<div className="flex flex-grow max-w-lg items-center justify-between self-stretch rounded border border-custom-border-200 px-2 h-8">
|
||||||
<div className="select-none overflow-hidden font-medium">
|
<div className="select-none overflow-hidden font-medium">
|
||||||
{shouldShowKey ? (
|
{shouldShowKey ? (
|
||||||
<p className="text-xs">{webhookSecretKey}</p>
|
<p className="text-xs">{webhookSecretKey}</p>
|
||||||
) : (
|
) : (
|
||||||
<div className="flex items-center gap-1.5">
|
<div className="flex items-center gap-1.5 overflow-hidden mr-2">
|
||||||
{[...Array(30)].map((_, index) => (
|
{[...Array(30)].map((_, index) => (
|
||||||
<div key={index} className="h-1 w-1 rounded-full bg-custom-text-400" />
|
<div key={index} className="h-1 w-1 rounded-full bg-custom-text-400 flex-shrink-0" />
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
@ -104,7 +104,7 @@ export const SendWorkspaceInvitationModal: React.FC<Props> = observer((props) =>
|
|||||||
leaveFrom="opacity-100 translate-y-0 sm:scale-100"
|
leaveFrom="opacity-100 translate-y-0 sm:scale-100"
|
||||||
leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
||||||
>
|
>
|
||||||
<Dialog.Panel className="relative translate-y-0 transform rounded-lg bg-custom-background-100 p-5 text-left opacity-100 shadow-custom-shadow-md transition-all sm:w-full sm:max-w-2xl sm:scale-100">
|
<Dialog.Panel className="relative translate-y-0 transform rounded-lg bg-custom-background-100 p-5 text-left opacity-100 shadow-custom-shadow-md transition-all w-full sm:max-w-2xl sm:scale-100">
|
||||||
<form
|
<form
|
||||||
onSubmit={handleSubmit(onSubmitForm)}
|
onSubmit={handleSubmit(onSubmitForm)}
|
||||||
onKeyDown={(e) => {
|
onKeyDown={(e) => {
|
||||||
@ -121,8 +121,8 @@ export const SendWorkspaceInvitationModal: React.FC<Props> = observer((props) =>
|
|||||||
|
|
||||||
<div className="mb-3 space-y-4">
|
<div className="mb-3 space-y-4">
|
||||||
{fields.map((field, index) => (
|
{fields.map((field, index) => (
|
||||||
<div key={field.id} className="group relative grid grid-cols-12 items-start gap-4">
|
<div key={field.id} className="group relative flex items-start gap-4">
|
||||||
<div className="col-span-9">
|
<div className="w-full">
|
||||||
<Controller
|
<Controller
|
||||||
control={control}
|
control={control}
|
||||||
name={`emails.${index}.email`}
|
name={`emails.${index}.email`}
|
||||||
@ -155,7 +155,7 @@ export const SendWorkspaceInvitationModal: React.FC<Props> = observer((props) =>
|
|||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="col-span-3 flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Controller
|
<Controller
|
||||||
control={control}
|
control={control}
|
||||||
name={`emails.${index}.role`}
|
name={`emails.${index}.role`}
|
||||||
|
@ -105,8 +105,8 @@ export const WorkspaceMembersListItem: FC<Props> = observer((props) => {
|
|||||||
}}
|
}}
|
||||||
onSubmit={handleRemove}
|
onSubmit={handleRemove}
|
||||||
/>
|
/>
|
||||||
<div className="group flex items-center justify-between px-3 py-4 hover:bg-custom-background-90">
|
<div className="group w-full flex items-center justify-between px-3 py-4 hover:bg-custom-background-90">
|
||||||
<div className="flex items-center gap-x-4 gap-y-2">
|
<div className="flex w-full items-center gap-x-4 gap-y-2">
|
||||||
{memberDetails.member.avatar && memberDetails.member.avatar.trim() !== "" ? (
|
{memberDetails.member.avatar && memberDetails.member.avatar.trim() !== "" ? (
|
||||||
<Link href={`/${workspaceSlug}/profile/${memberDetails.member.id}`}>
|
<Link href={`/${workspaceSlug}/profile/${memberDetails.member.id}`}>
|
||||||
<span className="relative flex h-10 w-10 items-center justify-center rounded p-4 capitalize text-white">
|
<span className="relative flex h-10 w-10 items-center justify-center rounded p-4 capitalize text-white">
|
||||||
@ -124,24 +124,26 @@ export const WorkspaceMembersListItem: FC<Props> = observer((props) => {
|
|||||||
</span>
|
</span>
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
<div>
|
<div className="w-full truncate flex items-center justify-between">
|
||||||
<Link href={`/${workspaceSlug}/profile/${memberDetails.member.id}`}>
|
<div className="truncate">
|
||||||
<span className="text-sm font-medium">
|
<Link href={`/${workspaceSlug}/profile/${memberDetails.member.id}`} className="truncate">
|
||||||
|
<div className="w-full truncate">
|
||||||
|
<span className="text-sm font-medium truncate">
|
||||||
{memberDetails.member.first_name} {memberDetails.member.last_name}
|
{memberDetails.member.first_name} {memberDetails.member.last_name}
|
||||||
</span>
|
</span>
|
||||||
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
<div className="flex items-center">
|
<div className="flex flex-col sm:flex-row items-start sm:items-center truncate">
|
||||||
<p className="text-xs text-custom-text-300">{memberDetails.member.display_name}</p>
|
<p className="text-xs text-custom-text-300">{memberDetails.member.display_name}</p>
|
||||||
{isAdmin && (
|
{isAdmin && (
|
||||||
<>
|
<>
|
||||||
<Dot height={16} width={16} className="text-custom-text-300" />
|
<Dot height={16} width={16} className="text-custom-text-300 hidden sm:block" />
|
||||||
<p className="text-xs text-custom-text-300">{memberDetails.member.email}</p>
|
<p className="text-xs text-custom-text-300 line-clamp-1 truncate">{memberDetails.member.email}</p>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div className="flex flex-shrink-0 items-center gap-2 text-xs">
|
||||||
<div className="flex items-center gap-2 text-xs">
|
|
||||||
<CustomSelect
|
<CustomSelect
|
||||||
customButton={
|
customButton={
|
||||||
<div className="item-center flex gap-1 rounded px-2 py-0.5">
|
<div className="item-center flex gap-1 rounded px-2 py-0.5">
|
||||||
@ -197,8 +199,8 @@ export const WorkspaceMembersListItem: FC<Props> = observer((props) => {
|
|||||||
onClick={() => setRemoveMemberModal(true)}
|
onClick={() => setRemoveMemberModal(true)}
|
||||||
className={
|
className={
|
||||||
isAdmin || isCurrentUser
|
isAdmin || isCurrentUser
|
||||||
? "pointer-events-none opacity-0 group-hover:pointer-events-auto group-hover:opacity-100"
|
? "pointer-events-none md:opacity-0 group-hover:pointer-events-auto md:group-hover:opacity-100"
|
||||||
: "pointer-events-none opacity-0"
|
: "pointer-events-none hidden md:opacity-0 md:block"
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<XCircle className="h-3.5 w-3.5 text-red-500" strokeWidth={2} />
|
<XCircle className="h-3.5 w-3.5 text-red-500" strokeWidth={2} />
|
||||||
@ -206,6 +208,8 @@ export const WorkspaceMembersListItem: FC<Props> = observer((props) => {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -0,0 +1,25 @@
|
|||||||
|
import router from "next/router";
|
||||||
|
import { WORKSPACE_SETTINGS_LINKS } from "@/constants/workspace";
|
||||||
|
|
||||||
|
const MobileWorkspaceSettingsTabs = () => {
|
||||||
|
const { workspaceSlug } = router.query;
|
||||||
|
return (
|
||||||
|
<div className="flex-shrink-0 md:hidden sticky inset-0 flex overflow-x-auto bg-custom-background-100 z-10">
|
||||||
|
{WORKSPACE_SETTINGS_LINKS.map((item, index) => (
|
||||||
|
<div
|
||||||
|
className={`${
|
||||||
|
item.highlight(router.asPath, `/${workspaceSlug}`)
|
||||||
|
? "text-custom-primary-100 text-sm py-2 px-3 whitespace-nowrap flex flex-grow cursor-pointer justify-around border-b border-custom-primary-200"
|
||||||
|
: "text-custom-text-200 flex flex-grow cursor-pointer justify-around border-b border-custom-border-200 text-sm py-2 px-3 whitespace-nowrap"
|
||||||
|
}`}
|
||||||
|
key={index}
|
||||||
|
onClick={() => router.push(`/${workspaceSlug}${item.href}`)}
|
||||||
|
>
|
||||||
|
{item.label}
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default MobileWorkspaceSettingsTabs;
|
@ -174,7 +174,7 @@ export const WorkspaceDetails: FC = observer(() => {
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<div className={`w-full overflow-y-auto py-8 pr-9 ${isAdmin ? "" : "opacity-60"}`}>
|
<div className={`w-full overflow-y-auto md:py-8 py-4 md:pr-9 pr-4 ${isAdmin ? "" : "opacity-60"}`}>
|
||||||
<div className="flex items-center gap-5 border-b border-custom-border-100 pb-7">
|
<div className="flex items-center gap-5 border-b border-custom-border-100 pb-7">
|
||||||
<div className="flex flex-col gap-1">
|
<div className="flex flex-col gap-1">
|
||||||
<button type="button" onClick={() => setIsImageUploadModalOpen(true)} disabled={!isAdmin}>
|
<button type="button" onClick={() => setIsImageUploadModalOpen(true)} disabled={!isAdmin}>
|
||||||
@ -195,7 +195,7 @@ export const WorkspaceDetails: FC = observer(() => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col gap-1">
|
<div className="flex flex-col gap-1">
|
||||||
<h3 className="text-lg font-semibold leading-6">{watch("name")}</h3>
|
<h3 className="text-lg font-semibold leading-6">{watch("name")}</h3>
|
||||||
<button type="button" onClick={handleCopyUrl} className="text-sm tracking-tight">{`${
|
<button type="button" onClick={handleCopyUrl} className="text-sm tracking-tight text-left">{`${
|
||||||
typeof window !== "undefined" && window.location.origin.replace("http://", "").replace("https://", "")
|
typeof window !== "undefined" && window.location.origin.replace("http://", "").replace("https://", "")
|
||||||
}/${currentWorkspace.slug}`}</button>
|
}/${currentWorkspace.slug}`}</button>
|
||||||
{isAdmin && (
|
{isAdmin && (
|
||||||
|
@ -1,15 +1,8 @@
|
|||||||
import { FC, ReactNode } from "react";
|
import { FC, ReactNode } from "react";
|
||||||
// layout
|
// layout
|
||||||
import Link from "next/link";
|
import { SidebarHamburgerToggle } from "@/components/core/sidebar/sidebar-menu-hamburger-toggle";
|
||||||
import { useRouter } from "next/router";
|
import { PreferencesMobileHeader } from "@/components/profile/preferences/preferences-mobile-header";
|
||||||
import { ChevronDown } from "lucide-react";
|
import { useApplication } from "@/hooks/store";
|
||||||
// ui
|
|
||||||
import { CustomMenu } from "@plane/ui";
|
|
||||||
// components
|
|
||||||
import { SidebarHamburgerToggle } from "@/components/core/sidebar";
|
|
||||||
// hooks
|
|
||||||
import { useAppTheme } from "@/hooks/store";
|
|
||||||
// layouts
|
|
||||||
import { ProfileSettingsLayout } from "@/layouts/settings-layout";
|
import { ProfileSettingsLayout } from "@/layouts/settings-layout";
|
||||||
// local components
|
// local components
|
||||||
import { ProfilePreferenceSettingsSidebar } from "./sidebar";
|
import { ProfilePreferenceSettingsSidebar } from "./sidebar";
|
||||||
@ -21,67 +14,26 @@ interface IProfilePreferenceSettingsLayout {
|
|||||||
|
|
||||||
export const ProfilePreferenceSettingsLayout: FC<IProfilePreferenceSettingsLayout> = (props) => {
|
export const ProfilePreferenceSettingsLayout: FC<IProfilePreferenceSettingsLayout> = (props) => {
|
||||||
const { children, header } = props;
|
const { children, header } = props;
|
||||||
// router
|
const { theme: themeStore } = useApplication();
|
||||||
const router = useRouter();
|
|
||||||
// store hooks
|
|
||||||
const { toggleSidebar } = useAppTheme();
|
|
||||||
|
|
||||||
const showMenuItem = () => {
|
|
||||||
const item = router.asPath.split("/");
|
|
||||||
let splittedItem = item[item.length - 1];
|
|
||||||
splittedItem = splittedItem.replace(splittedItem[0], splittedItem[0].toUpperCase());
|
|
||||||
return splittedItem;
|
|
||||||
};
|
|
||||||
|
|
||||||
const PROFILE_PREFERENCES_LINKS: Array<{
|
|
||||||
label: string;
|
|
||||||
href: string;
|
|
||||||
}> = [
|
|
||||||
{
|
|
||||||
label: "Theme",
|
|
||||||
href: `/profile/preferences/theme`,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Email",
|
|
||||||
href: `/profile/preferences/email`,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ProfileSettingsLayout
|
<ProfileSettingsLayout
|
||||||
header={
|
header={
|
||||||
<div className="flex flex-shrink-0 items-center justify-start gap-4 border-b border-custom-border-200 p-4 md:hidden">
|
<div className="md:hidden flex flex-shrink-0 gap-4 items-center justify-start border-b border-custom-border-200 p-4">
|
||||||
<SidebarHamburgerToggle onClick={() => toggleSidebar()} />
|
<SidebarHamburgerToggle onClick={() => themeStore.toggleSidebar()} />
|
||||||
<CustomMenu
|
|
||||||
maxHeight={"md"}
|
|
||||||
className="flex flex-grow justify-center text-sm text-custom-text-200"
|
|
||||||
placement="bottom-start"
|
|
||||||
customButton={
|
|
||||||
<div className="flex items-center gap-2 rounded-md border border-custom-border-400 px-2 py-1.5">
|
|
||||||
<span className="flex flex-grow justify-center text-sm text-custom-text-200">{showMenuItem()}</span>
|
|
||||||
<ChevronDown className="h-4 w-4 text-custom-text-400" />
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
customButtonClassName="flex flex-grow justify-start text-custom-text-200 text-sm"
|
|
||||||
>
|
|
||||||
{PROFILE_PREFERENCES_LINKS.map((link) => (
|
|
||||||
<CustomMenu.MenuItem className="flex items-center gap-2" key={link.href}>
|
|
||||||
<Link key={link.href} href={link.href} className="w-full text-custom-text-300">
|
|
||||||
{link.label}
|
|
||||||
</Link>
|
|
||||||
</CustomMenu.MenuItem>
|
|
||||||
))}
|
|
||||||
</CustomMenu>
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<div className="relative flex h-screen w-full overflow-hidden">
|
<div className="h-full">
|
||||||
|
<PreferencesMobileHeader />
|
||||||
|
<div className="relative flex h-full w-full overflow-hidden">
|
||||||
<ProfilePreferenceSettingsSidebar />
|
<ProfilePreferenceSettingsSidebar />
|
||||||
<main className="relative flex h-full w-full flex-col overflow-hidden bg-custom-background-100">
|
<main className="relative flex h-full w-full flex-col overflow-hidden bg-custom-background-100">
|
||||||
{header}
|
{header}
|
||||||
<div className="h-full w-full overflow-hidden">{children}</div>
|
<div className="h-full w-full">{children}</div>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</ProfileSettingsLayout>
|
</ProfileSettingsLayout>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { FC, ReactNode } from "react";
|
import { FC, ReactNode } from "react";
|
||||||
// components
|
// components
|
||||||
|
import MobileWorkspaceSettingsTabs from "@/components/workspace/settings/mobile-workspace-settings-tabs";
|
||||||
import { WorkspaceSettingsSidebar } from "./sidebar";
|
import { WorkspaceSettingsSidebar } from "./sidebar";
|
||||||
|
|
||||||
export interface IWorkspaceSettingLayout {
|
export interface IWorkspaceSettingLayout {
|
||||||
@ -14,9 +15,12 @@ export const WorkspaceSettingLayout: FC<IWorkspaceSettingLayout> = (props) => {
|
|||||||
<div className="w-80 flex-shrink-0 overflow-y-hidden pt-8 sm:hidden hidden md:block lg:block">
|
<div className="w-80 flex-shrink-0 overflow-y-hidden pt-8 sm:hidden hidden md:block lg:block">
|
||||||
<WorkspaceSettingsSidebar />
|
<WorkspaceSettingsSidebar />
|
||||||
</div>
|
</div>
|
||||||
<div className="w-full pl-10 sm:pl-10 md:pl-0 lg:pl-0 overflow-x-hidden overflow-y-scroll vertical-scrollbar scrollbar-md">
|
<div className="flex flex-col relative w-full overflow-hidden">
|
||||||
|
<MobileWorkspaceSettingsTabs />
|
||||||
|
<div className="w-full pl-4 md:pl-0 md:py-8 py-2 overflow-x-hidden overflow-y-scroll vertical-scrollbar scrollbar-md">
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -2,10 +2,10 @@ import { observer } from "mobx-react";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
// components
|
// components
|
||||||
import { ProfileNavbar, ProfileSidebar } from "@/components/profile";
|
import { ProfileNavbar, ProfileSidebar } from "@/components/profile";
|
||||||
// hooks
|
|
||||||
import { useUser } from "@/hooks/store";
|
|
||||||
// constants
|
// constants
|
||||||
import { EUserWorkspaceRoles } from "@/constants/workspace";
|
import { EUserWorkspaceRoles } from "@/constants/workspace";
|
||||||
|
// hooks
|
||||||
|
import { useUser } from "@/hooks/store";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
@ -28,8 +28,7 @@ export const ProfileAuthWrapper: React.FC<Props> = observer((props) => {
|
|||||||
const isAuthorizedPath = router.pathname.includes("assigned" || "created" || "subscribed");
|
const isAuthorizedPath = router.pathname.includes("assigned" || "created" || "subscribed");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="h-full w-full md:flex md:flex-row-reverse md:overflow-hidden">
|
<div className="h-full w-full flex md:overflow-hidden">
|
||||||
<ProfileSidebar />
|
|
||||||
<div className="flex w-full flex-col md:h-full md:overflow-hidden">
|
<div className="flex w-full flex-col md:h-full md:overflow-hidden">
|
||||||
<ProfileNavbar isAuthorized={!!isAuthorized} showProfileIssuesFilter={showProfileIssuesFilter} />
|
<ProfileNavbar isAuthorized={!!isAuthorized} showProfileIssuesFilter={showProfileIssuesFilter} />
|
||||||
{isAuthorized || !isAuthorizedPath ? (
|
{isAuthorized || !isAuthorizedPath ? (
|
||||||
@ -40,6 +39,7 @@ export const ProfileAuthWrapper: React.FC<Props> = observer((props) => {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
<ProfileSidebar />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import React, { ReactElement } from "react";
|
import React, { ReactElement } from "react";
|
||||||
// layouts
|
// components
|
||||||
import { PageHead } from "@/components/core";
|
import { PageHead } from "@/components/core";
|
||||||
import { UserProfileHeader } from "@/components/headers";
|
import { UserProfileHeader } from "@/components/headers";
|
||||||
import { ProfileIssuesPage } from "@/components/profile/profile-issues";
|
import { ProfileIssuesPage } from "@/components/profile/profile-issues";
|
||||||
|
import ProfileIssuesMobileHeader from "@/components/profile/profile-issues-mobile-header";
|
||||||
|
// layouts
|
||||||
import { AppLayout } from "@/layouts/app-layout";
|
import { AppLayout } from "@/layouts/app-layout";
|
||||||
import { ProfileAuthWrapper } from "@/layouts/user-profile-layout";
|
import { ProfileAuthWrapper } from "@/layouts/user-profile-layout";
|
||||||
// components
|
|
||||||
// types
|
// types
|
||||||
import { NextPageWithLayout } from "@/lib/types";
|
import { NextPageWithLayout } from "@/lib/types";
|
||||||
|
|
||||||
@ -18,7 +19,7 @@ const ProfileAssignedIssuesPage: NextPageWithLayout = () => (
|
|||||||
|
|
||||||
ProfileAssignedIssuesPage.getLayout = function getLayout(page: ReactElement) {
|
ProfileAssignedIssuesPage.getLayout = function getLayout(page: ReactElement) {
|
||||||
return (
|
return (
|
||||||
<AppLayout header={<UserProfileHeader type="Assigned" />}>
|
<AppLayout header={<UserProfileHeader type="Assigned" />} mobileHeader={<ProfileIssuesMobileHeader />}>
|
||||||
<ProfileAuthWrapper showProfileIssuesFilter>{page}</ProfileAuthWrapper>
|
<ProfileAuthWrapper showProfileIssuesFilter>{page}</ProfileAuthWrapper>
|
||||||
</AppLayout>
|
</AppLayout>
|
||||||
);
|
);
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
import { ReactElement } from "react";
|
import { ReactElement } from "react";
|
||||||
// store
|
// store
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react-lite";
|
||||||
// layouts
|
// components
|
||||||
import { PageHead } from "@/components/core";
|
import { PageHead } from "@/components/core";
|
||||||
import { UserProfileHeader } from "@/components/headers";
|
import { UserProfileHeader } from "@/components/headers";
|
||||||
import { ProfileIssuesPage } from "@/components/profile/profile-issues";
|
import { ProfileIssuesPage } from "@/components/profile/profile-issues";
|
||||||
|
import ProfileIssuesMobileHeader from "@/components/profile/profile-issues-mobile-header";
|
||||||
|
// layouts
|
||||||
import { AppLayout } from "@/layouts/app-layout";
|
import { AppLayout } from "@/layouts/app-layout";
|
||||||
import { ProfileAuthWrapper } from "@/layouts/user-profile-layout";
|
import { ProfileAuthWrapper } from "@/layouts/user-profile-layout";
|
||||||
// components
|
|
||||||
// types
|
// types
|
||||||
import { NextPageWithLayout } from "@/lib/types";
|
import { NextPageWithLayout } from "@/lib/types";
|
||||||
|
|
||||||
@ -20,7 +21,7 @@ const ProfileCreatedIssuesPage: NextPageWithLayout = () => (
|
|||||||
|
|
||||||
ProfileCreatedIssuesPage.getLayout = function getLayout(page: ReactElement) {
|
ProfileCreatedIssuesPage.getLayout = function getLayout(page: ReactElement) {
|
||||||
return (
|
return (
|
||||||
<AppLayout header={<UserProfileHeader type="Created" />}>
|
<AppLayout header={<UserProfileHeader type="Created" />} mobileHeader={<ProfileIssuesMobileHeader />}>
|
||||||
<ProfileAuthWrapper showProfileIssuesFilter>{page}</ProfileAuthWrapper>
|
<ProfileAuthWrapper showProfileIssuesFilter>{page}</ProfileAuthWrapper>
|
||||||
</AppLayout>
|
</AppLayout>
|
||||||
);
|
);
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
import { ReactElement } from "react";
|
import { ReactElement } from "react";
|
||||||
// store
|
// store
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react-lite";
|
||||||
// layouts
|
// components
|
||||||
import { PageHead } from "@/components/core";
|
import { PageHead } from "@/components/core";
|
||||||
import { UserProfileHeader } from "@/components/headers";
|
import { UserProfileHeader } from "@/components/headers";
|
||||||
import { ProfileIssuesPage } from "@/components/profile/profile-issues";
|
import { ProfileIssuesPage } from "@/components/profile/profile-issues";
|
||||||
|
import ProfileIssuesMobileHeader from "@/components/profile/profile-issues-mobile-header";
|
||||||
|
// layouts
|
||||||
import { AppLayout } from "@/layouts/app-layout";
|
import { AppLayout } from "@/layouts/app-layout";
|
||||||
import { ProfileAuthWrapper } from "@/layouts/user-profile-layout";
|
import { ProfileAuthWrapper } from "@/layouts/user-profile-layout";
|
||||||
// components
|
|
||||||
// types
|
// types
|
||||||
import { NextPageWithLayout } from "@/lib/types";
|
import { NextPageWithLayout } from "@/lib/types";
|
||||||
|
|
||||||
@ -20,7 +21,7 @@ const ProfileSubscribedIssuesPage: NextPageWithLayout = () => (
|
|||||||
|
|
||||||
ProfileSubscribedIssuesPage.getLayout = function getLayout(page: ReactElement) {
|
ProfileSubscribedIssuesPage.getLayout = function getLayout(page: ReactElement) {
|
||||||
return (
|
return (
|
||||||
<AppLayout header={<UserProfileHeader type="Subscribed" />}>
|
<AppLayout header={<UserProfileHeader type="Subscribed" />} mobileHeader={<ProfileIssuesMobileHeader />}>
|
||||||
<ProfileAuthWrapper showProfileIssuesFilter>{page}</ProfileAuthWrapper>
|
<ProfileAuthWrapper showProfileIssuesFilter>{page}</ProfileAuthWrapper>
|
||||||
</AppLayout>
|
</AppLayout>
|
||||||
);
|
);
|
||||||
|
@ -64,7 +64,7 @@ const ApiTokensPage: NextPageWithLayout = observer(() => {
|
|||||||
<>
|
<>
|
||||||
<PageHead title={pageTitle} />
|
<PageHead title={pageTitle} />
|
||||||
<CreateApiTokenModal isOpen={isCreateTokenModalOpen} onClose={() => setIsCreateTokenModalOpen(false)} />
|
<CreateApiTokenModal isOpen={isCreateTokenModalOpen} onClose={() => setIsCreateTokenModalOpen(false)} />
|
||||||
<section className="w-full overflow-y-auto py-8 pr-9 ">
|
<section className="w-full overflow-y-auto md:pr-9 pr-4">
|
||||||
{tokens.length > 0 ? (
|
{tokens.length > 0 ? (
|
||||||
<>
|
<>
|
||||||
<div className="flex items-center justify-between border-b border-custom-border-200 py-3.5">
|
<div className="flex items-center justify-between border-b border-custom-border-200 py-3.5">
|
||||||
|
@ -37,7 +37,7 @@ const BillingSettingsPage: NextPageWithLayout = observer(() => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageHead title={pageTitle} />
|
<PageHead title={pageTitle} />
|
||||||
<section className="w-full overflow-y-auto py-8 pr-9">
|
<section className="w-full overflow-y-auto md:pr-9 pr-4">
|
||||||
<div>
|
<div>
|
||||||
<div className="flex items-center border-b border-custom-border-100 py-3.5">
|
<div className="flex items-center border-b border-custom-border-100 py-3.5">
|
||||||
<h3 className="text-xl font-medium">Billing & Plans</h3>
|
<h3 className="text-xl font-medium">Billing & Plans</h3>
|
||||||
|
@ -38,7 +38,7 @@ const ExportsPage: NextPageWithLayout = observer(() => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageHead title={pageTitle} />
|
<PageHead title={pageTitle} />
|
||||||
<div className="w-full overflow-y-auto py-8 pr-9">
|
<div className="w-full overflow-y-auto md:pr-9 pr-4">
|
||||||
<div className="flex items-center border-b border-custom-border-100 py-3.5">
|
<div className="flex items-center border-b border-custom-border-100 py-3.5">
|
||||||
<h3 className="text-xl font-medium">Exports</h3>
|
<h3 className="text-xl font-medium">Exports</h3>
|
||||||
</div>
|
</div>
|
||||||
|
@ -95,7 +95,7 @@ const WorkspaceMembersSettingsPage: NextPageWithLayout = observer(() => {
|
|||||||
onClose={() => setInviteModal(false)}
|
onClose={() => setInviteModal(false)}
|
||||||
onSubmit={handleWorkspaceInvite}
|
onSubmit={handleWorkspaceInvite}
|
||||||
/>
|
/>
|
||||||
<section className="w-full overflow-y-auto py-8 pr-9">
|
<section className="w-full overflow-y-auto md:pr-9 pr-4">
|
||||||
<div className="flex items-center justify-between gap-4 border-b border-custom-border-100 py-3.5">
|
<div className="flex items-center justify-between gap-4 border-b border-custom-border-100 py-3.5">
|
||||||
<h4 className="text-xl font-medium">Members</h4>
|
<h4 className="text-xl font-medium">Members</h4>
|
||||||
<div className="ml-auto flex items-center gap-1.5 rounded-md border border-custom-border-200 bg-custom-background-100 px-2.5 py-1.5">
|
<div className="ml-auto flex items-center gap-1.5 rounded-md border border-custom-border-200 bg-custom-background-100 px-2.5 py-1.5">
|
||||||
|
@ -95,7 +95,7 @@ const WebhookDetailsPage: NextPageWithLayout = observer(() => {
|
|||||||
<>
|
<>
|
||||||
<PageHead title={pageTitle} />
|
<PageHead title={pageTitle} />
|
||||||
<DeleteWebhookModal isOpen={deleteWebhookModal} onClose={() => setDeleteWebhookModal(false)} />
|
<DeleteWebhookModal isOpen={deleteWebhookModal} onClose={() => setDeleteWebhookModal(false)} />
|
||||||
<div className="w-full space-y-8 overflow-y-auto py-8 pr-9">
|
<div className="w-full space-y-8 overflow-y-auto md:py-8 py-4 md:pr-9 pr-4">
|
||||||
<WebhookForm onSubmit={async (data) => await handleUpdateWebhook(data)} data={currentWebhook} />
|
<WebhookForm onSubmit={async (data) => await handleUpdateWebhook(data)} data={currentWebhook} />
|
||||||
{currentWebhook && <WebhookDeleteSection openDeleteModal={() => setDeleteWebhookModal(true)} />}
|
{currentWebhook && <WebhookDeleteSection openDeleteModal={() => setDeleteWebhookModal(true)} />}
|
||||||
</div>
|
</div>
|
||||||
|
@ -62,7 +62,7 @@ const WebhooksListPage: NextPageWithLayout = observer(() => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageHead title={pageTitle} />
|
<PageHead title={pageTitle} />
|
||||||
<div className="w-full overflow-y-auto py-8 pr-9">
|
<div className="w-full overflow-y-auto md:pr-9 pr-4">
|
||||||
<CreateWebhookModal
|
<CreateWebhookModal
|
||||||
createWebhook={createWebhook}
|
createWebhook={createWebhook}
|
||||||
clearSecretKey={clearSecretKey}
|
clearSecretKey={clearSecretKey}
|
||||||
@ -74,7 +74,7 @@ const WebhooksListPage: NextPageWithLayout = observer(() => {
|
|||||||
/>
|
/>
|
||||||
{Object.keys(webhooks).length > 0 ? (
|
{Object.keys(webhooks).length > 0 ? (
|
||||||
<div className="flex h-full w-full flex-col">
|
<div className="flex h-full w-full flex-col">
|
||||||
<div className="flex items-center justify-between gap-4 border-b border-custom-border-200 pb-3.5">
|
<div className="flex items-center justify-between gap-4 border-b border-custom-border-200 py-3.5">
|
||||||
<div className="text-xl font-medium">Webhooks</div>
|
<div className="text-xl font-medium">Webhooks</div>
|
||||||
<Button variant="primary" size="sm" onClick={() => setShowCreateWebhookModal(true)}>
|
<Button variant="primary" size="sm" onClick={() => setShowCreateWebhookModal(true)}>
|
||||||
Add webhook
|
Add webhook
|
||||||
|
@ -91,7 +91,7 @@ const ChangePasswordPage: NextPageWithLayout = observer(() => {
|
|||||||
</div>
|
</div>
|
||||||
<form
|
<form
|
||||||
onSubmit={handleSubmit(handleChangePassword)}
|
onSubmit={handleSubmit(handleChangePassword)}
|
||||||
className="mx-auto mt-16 flex h-full w-full flex-col gap-8 px-8 pb-8 lg:w-3/5"
|
className="mx-auto md:mt-16 mt-10 flex h-full w-full flex-col gap-8 px-4 md:px-8 pb-8 lg:w-3/5"
|
||||||
>
|
>
|
||||||
<h3 className="text-xl font-medium">Change password</h3>
|
<h3 className="text-xl font-medium">Change password</h3>
|
||||||
<div className="grid-col grid w-full grid-cols-1 items-center justify-between gap-10 xl:grid-cols-2 2xl:grid-cols-3">
|
<div className="grid-col grid w-full grid-cols-1 items-center justify-between gap-10 xl:grid-cols-2 2xl:grid-cols-3">
|
||||||
|
@ -172,7 +172,7 @@ const ProfileSettingsPage: NextPageWithLayout = observer(() => {
|
|||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<DeactivateAccountModal isOpen={deactivateAccountModal} onClose={() => setDeactivateAccountModal(false)} />
|
<DeactivateAccountModal isOpen={deactivateAccountModal} onClose={() => setDeactivateAccountModal(false)} />
|
||||||
<div className="vertical-scrollbar scrollbar-md mx-auto flex h-full w-full flex-col space-y-10 overflow-y-auto px-8 pb-8 pt-10 md:pt-16 lg:w-3/5">
|
<div className="vertical-scrollbar scrollbar-md mx-auto flex h-full w-full flex-col space-y-10 overflow-y-auto px-4 md:px-8 pb-8 pt-10 md:pt-16 lg:w-3/5">
|
||||||
<form onSubmit={handleSubmit(onSubmit)}>
|
<form onSubmit={handleSubmit(onSubmit)}>
|
||||||
<div className="flex w-full flex-col gap-8">
|
<div className="flex w-full flex-col gap-8">
|
||||||
<div className="relative h-44 w-full">
|
<div className="relative h-44 w-full">
|
||||||
@ -222,7 +222,7 @@ const ProfileSettingsPage: NextPageWithLayout = observer(() => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="item-center mt-4 flex justify-between px-8">
|
<div className="item-center mt-4 flex justify-between md:px-8">
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<div className="item-center flex text-lg font-semibold text-custom-text-100">
|
<div className="item-center flex text-lg font-semibold text-custom-text-100">
|
||||||
<span>{`${watch("first_name")} ${watch("last_name")}`}</span>
|
<span>{`${watch("first_name")} ${watch("last_name")}`}</span>
|
||||||
@ -238,7 +238,7 @@ const ProfileSettingsPage: NextPageWithLayout = observer(() => {
|
|||||||
</Link> */}
|
</Link> */}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid grid-cols-1 gap-6 px-8 lg:grid-cols-2 2xl:grid-cols-3">
|
<div className="grid grid-cols-1 gap-6 md:px-8 lg:grid-cols-2 2xl:grid-cols-3">
|
||||||
<div className="flex flex-col gap-1">
|
<div className="flex flex-col gap-1">
|
||||||
<h4 className="text-sm">
|
<h4 className="text-sm">
|
||||||
First name<span className="text-red-500">*</span>
|
First name<span className="text-red-500">*</span>
|
||||||
@ -423,7 +423,7 @@ const ProfileSettingsPage: NextPageWithLayout = observer(() => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<Disclosure as="div" className="border-t border-custom-border-100 px-8">
|
<Disclosure as="div" className="border-t border-custom-border-100 md:px-8">
|
||||||
{({ open }) => (
|
{({ open }) => (
|
||||||
<>
|
<>
|
||||||
<Disclosure.Button
|
<Disclosure.Button
|
||||||
|
@ -28,7 +28,7 @@ const ProfilePreferencesThemePage: NextPageWithLayout = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageHead title="Profile - Email Preference" />
|
<PageHead title="Profile - Email Preference" />
|
||||||
<div className="mx-auto mt-8 h-full w-full px-6 lg:px-20 pb-8 vertical-scrollbar scrollbar-md">
|
<div className="mx-auto mt-8 h-full w-full md:px-6 px-4 lg:px-20 pb-8 vertical-scrollbar scrollbar-md">
|
||||||
<EmailNotificationForm data={data} />
|
<EmailNotificationForm data={data} />
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
@ -60,7 +60,7 @@ const ProfilePreferencesThemePage: NextPageWithLayout = observer(() => {
|
|||||||
<>
|
<>
|
||||||
<PageHead title="Profile - Theme Prefrence" />
|
<PageHead title="Profile - Theme Prefrence" />
|
||||||
{currentUser ? (
|
{currentUser ? (
|
||||||
<div className="vertical-scrollbar scrollbar-md mx-auto mt-10 h-full w-full overflow-y-auto px-6 pb-8 md:mt-14 lg:px-20">
|
<div className="mx-auto mt-10 h-full w-full overflow-y-auto md:px-6 px-4 pb-8 md:mt-14 lg:px-20 vertical-scrollbar scrollbar-md">
|
||||||
<div className="flex items-center border-b border-custom-border-100 pb-3.5">
|
<div className="flex items-center border-b border-custom-border-100 pb-3.5">
|
||||||
<h3 className="text-xl font-medium">Preferences</h3>
|
<h3 className="text-xl font-medium">Preferences</h3>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user