chore: update workspace user pages

This commit is contained in:
Steven
2022-09-25 20:30:40 +08:00
parent c0699f159e
commit a642465f86
14 changed files with 511 additions and 39 deletions

View File

@@ -1,9 +1,10 @@
import copy from "copy-to-clipboard";
import { shortcutService, workspaceService } from "../services";
import { useAppSelector } from "../store";
import { showCommonDialog } from "./Dialog/CommonDialog";
import Dropdown from "./common/Dropdown";
import showCreateShortcutDialog from "./CreateShortcutDialog";
import Icon from "./Icon";
import showCreateShortcutDialog from "./CreateShortcutDialog";
interface Props {
workspaceId: WorkspaceId;
@@ -20,7 +21,14 @@ const ShortcutListView: React.FC<Props> = (props: Props) => {
};
const handleDeleteShortcutButtonClick = (shortcut: Shortcut) => {
shortcutService.deleteShortcutById(shortcut.id);
showCommonDialog({
title: "Delete Shortcut",
content: `Are you sure to delete shortcut \`${shortcut.name}\` in this workspace?`,
style: "warning",
onConfirm: async () => {
await shortcutService.deleteShortcutById(shortcut.id);
},
});
};
return (