mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-07 13:42:34 +00:00
feat: refactor code structure
This commit is contained in:
@ -84,7 +84,7 @@ const Header: React.FC = () => {
|
||||
<Dropdown
|
||||
trigger={
|
||||
<button className="flex flex-row justify-end items-center cursor-pointer">
|
||||
<span>{user?.name}</span>
|
||||
<span>{user?.displayName}</span>
|
||||
<Icon.ChevronDown className="ml-1 w-5 h-auto text-gray-600" />
|
||||
</button>
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ const MemberListView: React.FC<Props> = (props: Props) => {
|
||||
const handleDeleteWorkspaceUserButtonClick = (workspaceUser: WorkspaceUser) => {
|
||||
showCommonDialog({
|
||||
title: "Delete Workspace Member",
|
||||
content: `Are you sure to delete member \`${workspaceUser.name}\` in this workspace?`,
|
||||
content: `Are you sure to delete member \`${workspaceUser.displayName}\` in this workspace?`,
|
||||
style: "danger",
|
||||
onConfirm: async () => {
|
||||
await deleteWorkspaceUser({
|
||||
@ -71,7 +71,7 @@ const MemberListView: React.FC<Props> = (props: Props) => {
|
||||
return (
|
||||
<div key={workspaceUser.userId} className="w-full flex flex-row justify-between items-start border px-6 py-4 mb-3 rounded-lg">
|
||||
<div className="flex flex-row justify-start items-center mr-4">
|
||||
<span>{workspaceUser.name}</span>
|
||||
<span>{workspaceUser.displayName}</span>
|
||||
{currentUser.userId === workspaceUser.userId && <span className="ml-2 text-gray-400">(yourself)</span>}
|
||||
</div>
|
||||
<div className="flex flex-row justify-end items-center">
|
||||
|
@ -59,7 +59,7 @@ const ShortcutListView: React.FC<Props> = (props: Props) => {
|
||||
<span className="text-gray-400 text-sm ml-2">({shortcut.description})</span>
|
||||
</div>
|
||||
<div className="flex flex-row justify-end items-center">
|
||||
<span className="w-16 truncate mr-2 text-gray-600">{shortcut.creator.name}</span>
|
||||
<span className="w-16 truncate mr-2 text-gray-600">{shortcut.creator.displayName}</span>
|
||||
<Tooltip title="Copy link" variant="solid" placement="top">
|
||||
<button
|
||||
className="cursor-pointer mr-4 hover:opacity-80"
|
||||
|
@ -64,7 +64,7 @@ const UserDetail: React.FC = () => {
|
||||
<div className="w-full h-full flex flex-col justify-start items-start">
|
||||
<Header />
|
||||
<div className="mx-auto max-w-4xl w-full px-3 py-6 flex flex-col justify-start items-start space-y-4">
|
||||
<p className="text-3xl mt-2 mb-4">{user?.name}</p>
|
||||
<p className="text-3xl mt-2 mb-4">{user?.displayName}</p>
|
||||
<p className="leading-8 flex flex-row justify-start items-center">
|
||||
<span className="mr-3 text-gray-500 font-mono">Email: </span>
|
||||
{user?.email}
|
||||
|
2
web/src/types/modules/WorkspaceUser.d.ts
vendored
2
web/src/types/modules/WorkspaceUser.d.ts
vendored
@ -7,7 +7,7 @@ interface WorkspaceUser {
|
||||
createdTs: TimeStamp;
|
||||
updatedTs: TimeStamp;
|
||||
email: string;
|
||||
name: string;
|
||||
displayName: string;
|
||||
}
|
||||
|
||||
interface WorkspaceUserUpsert {
|
||||
|
6
web/src/types/modules/user.d.ts
vendored
6
web/src/types/modules/user.d.ts
vendored
@ -8,14 +8,14 @@ interface User {
|
||||
rowStatus: RowStatus;
|
||||
|
||||
email: string;
|
||||
name: string;
|
||||
displayName: string;
|
||||
openId: string;
|
||||
}
|
||||
|
||||
interface UserCreate {
|
||||
email: string;
|
||||
password: string;
|
||||
name: string;
|
||||
displayName: string;
|
||||
}
|
||||
|
||||
interface UserPatch {
|
||||
@ -23,7 +23,7 @@ interface UserPatch {
|
||||
|
||||
rowStatus?: RowStatus;
|
||||
|
||||
name?: string;
|
||||
displayName?: string;
|
||||
password?: string;
|
||||
resetOpenId?: boolean;
|
||||
}
|
||||
|
Reference in New Issue
Block a user