-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'preview' into fix/image-upload-realtime
- Loading branch information
Showing
15 changed files
with
107 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -176,6 +176,7 @@ class Meta: | |
"is_bot", | ||
"display_name", | ||
"email", | ||
"last_login_medium", | ||
] | ||
read_only_fields = [ | ||
"id", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,51 @@ | ||
"use client"; | ||
|
||
import { ReactNode } from "react"; | ||
import { FC, ReactNode } from "react"; | ||
import { observer } from "mobx-react"; | ||
// components | ||
import { AppHeader } from "@/components/core"; | ||
// local components | ||
import { WorkspaceSettingHeader } from "./header"; | ||
import { MobileWorkspaceSettingsTabs } from "./mobile-header-tabs"; | ||
import { WorkspaceSettingsSidebar } from "./sidebar"; | ||
import { NotAuthorizedView } from "@/components/auth-screens"; | ||
import { useUserPermissions } from "@/hooks/store"; | ||
import { EUserPermissions, EUserPermissionsLevel } from "@/plane-web/constants/user-permissions"; | ||
|
||
export interface IWorkspaceSettingLayout { | ||
children: ReactNode; | ||
} | ||
|
||
export default function WorkspaceSettingLayout(props: IWorkspaceSettingLayout) { | ||
const WorkspaceSettingLayout: FC<IWorkspaceSettingLayout> = observer((props) => { | ||
const { children } = props; | ||
|
||
const { workspaceUserInfo, allowPermissions } = useUserPermissions(); | ||
|
||
// derived values | ||
const isWorkspaceAdmin = allowPermissions([EUserPermissions.ADMIN], EUserPermissionsLevel.WORKSPACE); | ||
|
||
return ( | ||
<> | ||
<AppHeader header={<WorkspaceSettingHeader />} /> | ||
<MobileWorkspaceSettingsTabs /> | ||
<div className="inset-y-0 flex flex-row vertical-scrollbar scrollbar-lg h-full w-full overflow-y-auto"> | ||
<div className="px-page-x !pr-0 py-page-y flex-shrink-0 overflow-y-hidden sm:hidden hidden md:block lg:block"> | ||
<WorkspaceSettingsSidebar /> | ||
</div> | ||
<div className="flex flex-col relative w-full overflow-hidden"> | ||
<div className="w-full h-full overflow-x-hidden overflow-y-scroll vertical-scrollbar scrollbar-md px-page-x md:px-9 py-page-y"> | ||
{children} | ||
</div> | ||
</div> | ||
{workspaceUserInfo && !isWorkspaceAdmin ? ( | ||
<NotAuthorizedView section="settings" /> | ||
) : ( | ||
<> | ||
<div className="px-page-x !pr-0 py-page-y flex-shrink-0 overflow-y-hidden sm:hidden hidden md:block lg:block"> | ||
<WorkspaceSettingsSidebar /> | ||
</div> | ||
<div className="flex flex-col relative w-full overflow-hidden"> | ||
<div className="w-full h-full overflow-x-hidden overflow-y-scroll vertical-scrollbar scrollbar-md px-page-x md:px-9 py-page-y"> | ||
{children} | ||
</div> | ||
</div> | ||
</> | ||
)} | ||
</div> | ||
</> | ||
); | ||
} | ||
}); | ||
|
||
export default WorkspaceSettingLayout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.