mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-20 22:07:15 +00:00
chore: update workspace setting page
This commit is contained in:
parent
09ac3a8afb
commit
bca2448c5c
@ -98,20 +98,41 @@ const WorkspaceSetting: React.FC<Props> = (props: Props) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="w-full flex flex-col justify-start items-start">
|
<div className="w-full flex flex-col justify-start items-start">
|
||||||
<span className="mb-4 text-gray-500">Basic</span>
|
<span className="w-full text-2xl font-medium border-b pb-2 mb-4">General</span>
|
||||||
<p className="text-3xl mb-4">
|
<p className="mb-4">ID: {workspace.name}</p>
|
||||||
{workspace.title}
|
<p className="mb-4">Name: {workspace.title}</p>
|
||||||
<span className="text-lg ml-1 font-mono text-gray-400">({workspace.name})</span>
|
<p className="mb-4">Description: {workspace.description || "No description."}</p>
|
||||||
</p>
|
{workspaceUser.role === "ADMIN" && (
|
||||||
<p className="mb-4">{workspace.description || "No description."}</p>
|
<div className="flex flex-row justify-start items-center">
|
||||||
<div className="border-t pt-4 flex flex-row justify-start items-center">
|
|
||||||
<div className="flex flex-row justify-start items-center space-x-2">
|
<div className="flex flex-row justify-start items-center space-x-2">
|
||||||
{workspaceUser.role === "ADMIN" ? (
|
|
||||||
<>
|
|
||||||
<Button variant="soft" onClick={handleEditWorkspaceButtonClick}>
|
<Button variant="soft" onClick={handleEditWorkspaceButtonClick}>
|
||||||
<Icon.Edit className="w-4 h-auto mr-1" />
|
<Icon.Edit className="w-4 h-auto mr-1" />
|
||||||
Edit
|
Edit
|
||||||
</Button>
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="w-full mt-8 flex flex-col justify-start items-start">
|
||||||
|
<div className="w-full border-b pb-2 mb-4 flex flex-row justify-between items-center">
|
||||||
|
<span className="text-2xl font-medium">Members</span>
|
||||||
|
{workspaceUser.role === "ADMIN" && (
|
||||||
|
<Button variant="soft" onClick={handleUpsertWorkspaceMemberButtonClick}>
|
||||||
|
<Icon.Plus className="w-4 h-auto mr-1" />
|
||||||
|
New member
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<MemberListView workspaceId={workspaceId} />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="w-full mt-8 flex flex-col justify-start items-start">
|
||||||
|
<span className="w-full text-2xl font-medium border-b pb-2 mb-4">Danger Zone</span>
|
||||||
|
<div className="flex flex-row justify-start items-center">
|
||||||
|
<div className="flex flex-row justify-start items-center space-x-2">
|
||||||
|
{workspaceUser.role === "ADMIN" ? (
|
||||||
|
<>
|
||||||
<Button variant="soft" color="danger" onClick={handleDeleteWorkspaceButtonClick}>
|
<Button variant="soft" color="danger" onClick={handleDeleteWorkspaceButtonClick}>
|
||||||
<Icon.Trash className="w-4 h-auto mr-1" />
|
<Icon.Trash className="w-4 h-auto mr-1" />
|
||||||
Delete
|
Delete
|
||||||
@ -128,19 +149,6 @@ const WorkspaceSetting: React.FC<Props> = (props: Props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="w-full flex flex-col justify-start items-start">
|
|
||||||
<div className="w-full flex flex-row justify-between items-center">
|
|
||||||
<span className="mt-8 mb-4 text-gray-500">Member list</span>
|
|
||||||
{workspaceUser.role === "ADMIN" && (
|
|
||||||
<Button variant="soft" onClick={handleUpsertWorkspaceMemberButtonClick}>
|
|
||||||
<Icon.Plus className="w-4 h-auto mr-1" />
|
|
||||||
New member
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
<MemberListView workspaceId={workspaceId} />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{state.showEditWorkspaceDialog && (
|
{state.showEditWorkspaceDialog && (
|
||||||
<CreateWorkspaceDialog
|
<CreateWorkspaceDialog
|
||||||
workspaceId={workspace.id}
|
workspaceId={workspace.id}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user