@voplus/morpho-workspace 6.1.74 → 6.1.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/modules/board/components/BoardPropertiesView/index.js +3 -0
- package/es/modules/board/components/BoardPropertiesView/index.js.map +1 -1
- package/es/modules/meeting/components/MeetingPropertiesView/index.js +3 -2
- package/es/modules/meeting/components/MeetingPropertiesView/index.js.map +1 -1
- package/es/modules/meeting/components/MeetingQuickViewDialog/index.js +11 -3
- package/es/modules/meeting/components/MeetingQuickViewDialog/index.js.map +1 -1
- package/es/modules/meeting/components/MeetingsFolderProperitesView/index.js +3 -2
- package/es/modules/meeting/components/MeetingsFolderProperitesView/index.js.map +1 -1
- package/es/modules/meeting/components/MeetingsFolderQuickViewDialog/index.js +7 -3
- package/es/modules/meeting/components/MeetingsFolderQuickViewDialog/index.js.map +1 -1
- package/es/modules/notification/components/NotificationList/index.js +3 -0
- package/es/modules/notification/components/NotificationList/index.js.map +1 -1
- package/es/modules/tasks/components/TaskPropertiesView/index.js +7 -3
- package/es/modules/tasks/components/TaskPropertiesView/index.js.map +1 -1
- package/es/modules/tasks/components/TaskQuickViewDialog/index.js +7 -3
- package/es/modules/tasks/components/TaskQuickViewDialog/index.js.map +1 -1
- package/es/modules/work/components/WorkPropertiesView/index.js +4 -0
- package/es/modules/work/components/WorkPropertiesView/index.js.map +1 -1
- package/es/modules/work/components/WorkQuickViewDialog/index.js +7 -3
- package/es/modules/work/components/WorkQuickViewDialog/index.js.map +1 -1
- package/es/modules/work/work-type/components/WorkTypeIcon/index.d.ts +2 -3
- package/es/modules/work/work-type/components/WorkTypeIcon/index.js +19 -11
- package/es/modules/work/work-type/components/WorkTypeIcon/index.js.map +1 -1
- package/es/modules/work/work-type/components/WorkTypeIconList/index.d.ts +0 -3
- package/es/modules/work/work-type/components/WorkTypeIconList/index.js +5 -18
- package/es/modules/work/work-type/components/WorkTypeIconList/index.js.map +1 -1
- package/es/modules/workspace/components/{WorkspaceIconList → CreatedOrDisabledWorkspacesList}/index.d.ts +2 -7
- package/es/modules/workspace/components/{WorkspaceIconList → CreatedOrDisabledWorkspacesList}/index.js +17 -26
- package/es/modules/workspace/components/CreatedOrDisabledWorkspacesList/index.js.map +1 -0
- package/es/modules/workspace/components/MyWorkspaces/index.js +34 -18
- package/es/modules/workspace/components/MyWorkspaces/index.js.map +1 -1
- package/es/modules/workspace/components/MyWorkspaces/index.less +4 -28
- package/es/modules/workspace/components/NewWorkspaceDialog/index.d.ts +1 -4
- package/es/modules/workspace/components/NewWorkspaceDialog/index.js +21 -31
- package/es/modules/workspace/components/NewWorkspaceDialog/index.js.map +1 -1
- package/es/modules/workspace/components/{WorkspaceIconList2 → SharedWorkspacesList}/index.js +2 -6
- package/es/modules/workspace/components/SharedWorkspacesList/index.js.map +1 -0
- package/es/modules/workspace/components/SharedWorkspacesList/state.js.map +1 -0
- package/es/modules/workspace/components/WorkspaceIcon/index.d.ts +0 -2
- package/es/modules/workspace/components/WorkspaceIcon/index.js +8 -18
- package/es/modules/workspace/components/WorkspaceIcon/index.js.map +1 -1
- package/es/modules/workspace/components/WorkspaceIcon/index.less +120 -125
- package/es/modules/workspace/pages/WorkspaceDefaultView/index.d.ts +1 -0
- package/es/modules/workspace/pages/WorkspaceDefaultView/index.js +18 -21
- package/es/modules/workspace/pages/WorkspaceDefaultView/index.js.map +1 -1
- package/es/modules/workspace/pages/WorkspaceDefaultView/index.less +6 -37
- package/package.json +1 -1
- package/es/modules/work/work-type/components/WorkTypeIconList/index.less +0 -15
- package/es/modules/workspace/components/MyWorkspaces/index copy.d.ts +0 -11
- package/es/modules/workspace/components/MyWorkspaces/index copy.js +0 -40
- package/es/modules/workspace/components/MyWorkspaces/index copy.js.map +0 -1
- package/es/modules/workspace/components/NewWorkspaceDialog/index.less +0 -30
- package/es/modules/workspace/components/WorkspaceIconList/index.js.map +0 -1
- package/es/modules/workspace/components/WorkspaceIconList/index.less +0 -23
- package/es/modules/workspace/components/WorkspaceIconList2/index.js.map +0 -1
- package/es/modules/workspace/components/WorkspaceIconList2/state.js.map +0 -1
- /package/es/modules/workspace/components/{WorkspaceIconList2 → SharedWorkspacesList}/index.d.ts +0 -0
- /package/es/modules/workspace/components/{WorkspaceIconList2 → SharedWorkspacesList}/state.d.ts +0 -0
- /package/es/modules/workspace/components/{WorkspaceIconList2 → SharedWorkspacesList}/state.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/components/CreatedOrDisabledWorkspacesList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAc,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,uBAAuB,MAAM,4BAA4B,CAAC;AACjE,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,qFAAqF;AAErF,2DAA2D;AAC3D,MAAM,iBAAiB,GAAG,CAAC,KAM1B,EAAE,EAAE;IACJ,MAAM,YAAY,GAAG,sBAAsB,EAAE,CAAC;IAC9C,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAE1D,mFAAmF;IACnF,MAAM,IAAI,GAAG,sBAAsB,CAClC;QACC,cAAc,EAAE;YACf,OAAO,EAAE,OAAO,EAAE;YAClB,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE;SAChC;KACD,EACD,CAAC,KAA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E,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE;iBACxD,CAAC;gBACF,MAAM;YACP,KAAK,UAAU;gBACd,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;gBACxE,MAAM;YACP;gBACC,MAAM;QACR,CAAC;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAED,wBAAwB;IACxB,2BAA2B;IAC3B,IAAI;IAEJ,SAAS,WAAW,CAAC,IAAgB;;QACpC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACnB,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,SAAS,CAAC,oBAAC,uBAAuB,IAAC,EAAE,EAAE,IAAI,CAAC,EAAE,GAAI,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QAChF,MAAA,KAAK,CAAC,WAAW,sDAAG,IAAI,CAAC,CAAC;IAC3B,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,31 +1,47 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import
|
|
2
|
+
import { observe } from "@voplus/morpho-ui";
|
|
3
3
|
import { Scrollbars } from "react-custom-scrollbars-2";
|
|
4
|
-
import
|
|
5
|
-
import WorkspaceCardList2 from "../WorkspaceIconList2";
|
|
6
|
-
import { faBriefcase } from "@fortawesome/pro-solid-svg-icons";
|
|
4
|
+
import { faUser, faUsers, faPlus, faBan, faThLarge, } from "@fortawesome/pro-solid-svg-icons";
|
|
7
5
|
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
8
|
-
import
|
|
6
|
+
import CreatedOrDisabledWorkspacesList from "../CreatedOrDisabledWorkspacesList";
|
|
7
|
+
import ResponsiveGridContainer from "@voplus/morpho-ui/es/controls/ResponsiveGrid/ResponsiveGridContainer";
|
|
8
|
+
import AllNewHeaderLayout from "@voplus/morpho-ui/es/controls/ResponsiveGrid/AllNewHeaderLayout";
|
|
9
9
|
import DefaultViewLayout from "@voplus/morpho-ui/es/components/layout/DefaultViewLayout";
|
|
10
|
-
import
|
|
10
|
+
import SharedWorkspacesList from "../SharedWorkspacesList";
|
|
11
|
+
import NewWorkspaceDialog from "../NewWorkspaceDialog";
|
|
11
12
|
import "./index.less";
|
|
12
13
|
const MyWorkspaces = (props) => {
|
|
13
14
|
/** 加class name 为了方便做integration tests */
|
|
14
15
|
const classId = "workspaces-list";
|
|
15
16
|
const [visible, setVisible] = useState(false);
|
|
16
|
-
return observe(() => (React.createElement(DefaultViewLayout, { className: "my-workSpaces", header: React.createElement(
|
|
17
|
+
return observe(() => (React.createElement(DefaultViewLayout, { className: "my-workSpaces", header: React.createElement(AllNewHeaderLayout, { icon: faThLarge, title: "My Workspaces", subtitle: "Easy access on convenient shortcuts to your go-to folders" }) },
|
|
17
18
|
React.createElement(Scrollbars, { autoHide: true },
|
|
18
|
-
React.createElement("div", { className: "
|
|
19
|
-
React.createElement("div", { className: "
|
|
20
|
-
React.createElement("
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
React.createElement(
|
|
28
|
-
|
|
19
|
+
React.createElement(ResponsiveGridContainer, null, ({ cols }) => (React.createElement("div", { className: "space-y-8 w-full" },
|
|
20
|
+
React.createElement("div", { className: "animate-fade-in" },
|
|
21
|
+
React.createElement("div", { className: "flex items-center justify-between mb-6" },
|
|
22
|
+
React.createElement("h2", { className: "text-xl font-semibold text-slate-900 flex items-center gap-3" },
|
|
23
|
+
React.createElement(FAIcon, { icon: faUser, className: "text-green-600" }),
|
|
24
|
+
"Personal Created Workspaces"),
|
|
25
|
+
React.createElement("button", { className: "text-green-600 hover:text-green-700 text-sm font-medium flex items-center gap-2 hover:bg-green-50 px-3 py-1.5 rounded-lg transition-colors", onClick: () => setVisible(true) },
|
|
26
|
+
React.createElement(FAIcon, { icon: faPlus, className: "text-xs" }),
|
|
27
|
+
"Create Workspace")),
|
|
28
|
+
React.createElement("div", { className: "grid gap-6", style: { gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))` } },
|
|
29
|
+
React.createElement(CreatedOrDisabledWorkspacesList, { className: classId + "-my", workspaceType: "Personal", onItemClick: props.onClickItem }))),
|
|
30
|
+
React.createElement("div", { className: "animate-fade-in" },
|
|
31
|
+
React.createElement("div", { className: "flex items-center justify-between mb-6" },
|
|
32
|
+
React.createElement("h2", { className: "text-xl font-semibold text-slate-900 flex items-center gap-3" },
|
|
33
|
+
React.createElement(FAIcon, { icon: faUsers, className: "text-blue-600" }),
|
|
34
|
+
"Shared Workspaces")),
|
|
35
|
+
React.createElement("div", { className: "grid gap-6", style: { gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))` } },
|
|
36
|
+
React.createElement(SharedWorkspacesList, { onItemClick: props.onClickItem, className: classId + "-access" }))),
|
|
37
|
+
React.createElement("div", { className: "animate-fade-in" },
|
|
38
|
+
React.createElement("div", { className: "flex items-center justify-between mb-6" },
|
|
39
|
+
React.createElement("h2", { className: "text-xl font-semibold text-slate-900 flex items-center gap-3" },
|
|
40
|
+
React.createElement(FAIcon, { icon: faBan, className: "text-gray-400" }),
|
|
41
|
+
"Disabled Workspaces")),
|
|
42
|
+
React.createElement("div", { className: "grid gap-6", style: { gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))` } },
|
|
43
|
+
React.createElement(CreatedOrDisabledWorkspacesList, { className: classId + "-disabled", workspaceType: "Disabled", onItemClick: props.onClickItem })))))),
|
|
44
|
+
visible && (React.createElement(NewWorkspaceDialog, { onCancel: () => setVisible(false), onSubmit: () => setVisible(false) }))))));
|
|
29
45
|
};
|
|
30
46
|
export default MyWorkspaces;
|
|
31
47
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/components/MyWorkspaces/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/components/MyWorkspaces/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAEN,MAAM,EACN,OAAO,EACP,MAAM,EACN,KAAK,EAEL,SAAS,GACT,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,+BAA+B,MAAM,oCAAoC,CAAC;AACjF,OAAO,uBAAuB,MAAM,sEAAsE,CAAC;AAC3G,OAAO,kBAAkB,MAAM,iEAAiE,CAAC;AACjG,OAAO,iBAAiB,MAAM,0DAA0D,CAAC;AACzF,OAAO,oBAAoB,MAAM,yBAAyB,CAAC;AAC3D,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,OAAO,cAAc,CAAC;AAEtB,MAAM,YAAY,GAAG,CAAC,KAMrB,EAAE,EAAE;IACJ,yCAAyC;IACzC,MAAM,OAAO,GAAG,iBAAiB,CAAC;IAClC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9C,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,iBAAiB,IACjB,SAAS,EAAC,eAAe,EACzB,MAAM,EACL,oBAAC,kBAAkB,IAClB,IAAI,EAAE,SAAS,EACf,KAAK,EAAC,eAAe,EACrB,QAAQ,EAAC,2DAA2D,GAi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ACtD,4BAAI,SAAS,EAAC,8DAA8D;4BAC3E,oBAAC,MAAM,IAAC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAC,eAAe,GAAG;kDAE7C,CACA;oBACN,6BACC,SAAS,EAAC,YAAY,EACtB,KAAK,EAAE,EAAE,mBAAmB,EAAE,UAAU,IAAI,mBAAmB,EAAE;wBAEjE,oBAAC,+BAA+B,IAC/B,SAAS,EAAE,OAAO,GAAG,WAAW,EAChC,aAAa,EAAC,UAAU,EACxB,WAAW,EAAE,KAAK,CAAC,WAAW,GAC7B,CACG,CACD,CACD,CACN,CACwB;YAEzB,OAAO,IAAI,CACX,oBAAC,kBAAkB,IAClB,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,EACjC,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GAChC,CACF,CACW,CACM,CACpB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,33 +1,9 @@
|
|
|
1
1
|
:global {
|
|
2
2
|
.my-workSpaces {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
// display: flex;
|
|
10
|
-
// flex-direction: column;
|
|
11
|
-
.workspace-list {
|
|
12
|
-
flex: 1;
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
|
|
16
|
-
.workspace-list-title {
|
|
17
|
-
// margin: 40px 0 16px 40px;
|
|
18
|
-
height: 26px;
|
|
19
|
-
font-size: 20px;
|
|
20
|
-
font-family: Microsoft YaHei;
|
|
21
|
-
font-weight: bold;
|
|
22
|
-
line-height: 26px;
|
|
23
|
-
color: #252525;
|
|
24
|
-
opacity: 1;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
h3 {
|
|
29
|
-
padding: 10px 20px;
|
|
30
|
-
margin: 0;
|
|
3
|
+
.default-aside-content {
|
|
4
|
+
border: none;
|
|
5
|
+
box-shadow: none;
|
|
6
|
+
background: #f7f9fc;
|
|
31
7
|
}
|
|
32
8
|
}
|
|
33
9
|
}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
declare const NewWorkspaceDialog: (props: {
|
|
3
|
-
parentId?: string;
|
|
4
|
-
className?: string;
|
|
5
|
-
showView?: boolean;
|
|
6
|
-
onSubmitSave?: (params?: any) => void;
|
|
7
3
|
onCancel?: () => void;
|
|
4
|
+
onSubmit?: () => void;
|
|
8
5
|
}) => React.JSX.Element;
|
|
9
6
|
export default NewWorkspaceDialog;
|
|
@@ -1,59 +1,49 @@
|
|
|
1
|
-
import { Button, Form, Input, Row, Space, message } from "antd";
|
|
2
1
|
import React, { useState } from "react";
|
|
3
|
-
import AvatarList from "@voplus/morpho-org/es/components/AvatarList";
|
|
4
|
-
import Modal from "@voplus/morpho-ui/es/components/Modal";
|
|
5
2
|
import { State } from "./state";
|
|
6
|
-
import WorkspacePropertiesView from "../WorkspacePropertiesView";
|
|
7
|
-
import classnames from "classnames";
|
|
8
|
-
import { observe } from "@voplus/morpho-ui";
|
|
9
3
|
import { runInAction } from "mobx";
|
|
10
|
-
import
|
|
4
|
+
import { observe } from "@voplus/morpho-ui";
|
|
5
|
+
import { Form, Input, message } from "antd";
|
|
11
6
|
import { useApplicationContext } from "@voplus/morpho-data";
|
|
12
|
-
import { useAsideContentContext } from "@voplus/morpho-ui/es/components/layout/AsideContent";
|
|
13
7
|
import { useWorkspaceStore } from "../../../../data/workspace";
|
|
8
|
+
import { useAsideContentContext } from "@voplus/morpho-ui/es/components/layout/AsideContent";
|
|
9
|
+
import AvatarList from "@voplus/morpho-org/es/components/AvatarList";
|
|
10
|
+
import WorkspacePropertiesView from "../WorkspacePropertiesView";
|
|
11
|
+
import Modal from "@voplus/morpho-ui/es/components/Modal";
|
|
14
12
|
const NewWorkspaceDialog = (props) => {
|
|
15
13
|
const workspaces = useWorkspaceStore();
|
|
16
14
|
const [state] = useState(new State());
|
|
17
15
|
const { user } = useApplicationContext();
|
|
18
16
|
const asideContext = useAsideContentContext();
|
|
19
|
-
return observe(() => (React.createElement(Modal, { title: "New WorkSpace", open: true, destroyOnClose: true,
|
|
20
|
-
// closable={false}
|
|
21
|
-
footer: null, className: classnames(styles["new-workspace-form"], props.className), onCancel: props.onCancel },
|
|
17
|
+
return observe(() => (React.createElement(Modal, { title: "New WorkSpace", open: true, destroyOnClose: true, okText: "Submit", loading: !!state.loading, onCancel: onCancel, onOk: onSubmit },
|
|
22
18
|
React.createElement("div", null,
|
|
23
19
|
React.createElement(Form, { layout: "vertical" },
|
|
24
|
-
React.createElement(
|
|
25
|
-
React.createElement(
|
|
26
|
-
|
|
27
|
-
React.createElement(
|
|
28
|
-
React.createElement(AvatarList, { organizationId: user.info.organizationId, multiple: true, buttonText: "Ok", onChange: (ids) => (state.params.MemberIds = ids) })),
|
|
29
|
-
React.createElement(Row, { justify: "end" },
|
|
30
|
-
React.createElement(Space, null,
|
|
31
|
-
React.createElement(Button, { size: "large", className: "btn-cancel", onClick: onCancel }, "Cancel"),
|
|
32
|
-
React.createElement(Button, { size: "large", type: "primary", loading: !!state.loading, onClick: onSubmit }, "Submit")))))))));
|
|
20
|
+
React.createElement(Form.Item, { label: "Title for your workspaces" },
|
|
21
|
+
React.createElement(Input, { autoFocus: true, value: state.params.Name, onChange: (e) => runInAction(() => (state.params.Name = e.target.value)) })),
|
|
22
|
+
React.createElement(Form.Item, { label: "Members" },
|
|
23
|
+
React.createElement(AvatarList, { organizationId: user.info.organizationId, multiple: true, buttonText: "Ok", onChange: (ids) => (state.params.MemberIds = ids) })))))));
|
|
33
24
|
async function onSubmit() {
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
var _a;
|
|
26
|
+
if (!state.params.Name) {
|
|
27
|
+
message.warning("Title is required");
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
36
30
|
runInAction(() => (state.loading = true));
|
|
37
31
|
const res = await workspaces.create({
|
|
38
|
-
data:
|
|
32
|
+
data: state.params,
|
|
39
33
|
error: "message",
|
|
40
34
|
});
|
|
41
35
|
runInAction(() => {
|
|
42
36
|
state.loading = false;
|
|
43
37
|
state.params = state.Params;
|
|
44
38
|
});
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if (props.showView)
|
|
48
|
-
return asideContext.openAside(React.createElement(WorkspacePropertiesView, { id: res.id }), { span: 12 });
|
|
39
|
+
asideContext.openAside(React.createElement(WorkspacePropertiesView, { id: res.id }), { span: 12 });
|
|
40
|
+
(_a = props.onSubmit) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
49
41
|
}
|
|
50
42
|
// cancel add workspaces
|
|
51
43
|
function onCancel() {
|
|
44
|
+
var _a;
|
|
52
45
|
state.params = state.Params;
|
|
53
|
-
|
|
54
|
-
return asideContext.closeAside();
|
|
55
|
-
if (props.onCancel)
|
|
56
|
-
props.onCancel();
|
|
46
|
+
(_a = props.onCancel) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
57
47
|
}
|
|
58
48
|
};
|
|
59
49
|
export default NewWorkspaceDialog;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/components/NewWorkspaceDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/components/NewWorkspaceDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC5C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|
|
|
6
6
|
import WorkspacePropertiesView from "../WorkspacePropertiesView";
|
|
7
7
|
import { observe, useAsideContentContext } from "@voplus/morpho-ui";
|
|
8
8
|
import WorkspaceIcon from "../WorkspaceIcon";
|
|
9
|
-
import classnames from "classnames";
|
|
10
|
-
import styles from "../WorkspaceIconList/index.less";
|
|
11
9
|
/** A workspace list view shows workspace in card style.
|
|
12
10
|
* Worksapce I have access 显示的list,以后会删掉,以后还是用回WorkspaceCardList组件
|
|
13
11
|
* 因后台的filter还没好,先用笨方法filter,先做好一个能用的测试版
|
|
@@ -41,10 +39,8 @@ const WorkspaceIconList = (props) => {
|
|
|
41
39
|
});
|
|
42
40
|
return observe(() => {
|
|
43
41
|
var _a, _b;
|
|
44
|
-
return (React.createElement(ListDataContext.Provider, { value: list },
|
|
45
|
-
React.createElement("
|
|
46
|
-
React.createElement("div", { className: classnames("workspace-card-list grid", { "col-2": asideContext === null || asideContext === void 0 ? void 0 : asideContext.asideContent }, props.className) }, ((_a = state.list) === null || _a === void 0 ? void 0 : _a.length) ? ((_b = state.list) === null || _b === void 0 ? void 0 : _b.map((i, index) => (React.createElement(React.Fragment, { key: i.id },
|
|
47
|
-
React.createElement(WorkspaceIcon, { id: i.id === "0" ? "" : i.id, active: active === i.id, index: index, onClick: () => onItemClick(i) }))))) : (React.createElement(Empty, { className: "empty-style" }))))));
|
|
42
|
+
return (React.createElement(ListDataContext.Provider, { value: list }, ((_a = state.list) === null || _a === void 0 ? void 0 : _a.length) ? ((_b = state.list) === null || _b === void 0 ? void 0 : _b.map((i, index) => (React.createElement(React.Fragment, { key: i.id },
|
|
43
|
+
React.createElement(WorkspaceIcon, { id: i.id === "0" ? "" : i.id, active: active === i.id, index: index, onClick: () => onItemClick(i) }))))) : (React.createElement(Empty, { className: "empty-style" }))));
|
|
48
44
|
});
|
|
49
45
|
function onItemClick(item) {
|
|
50
46
|
var _a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"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G,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,GAC5B,CACc,CACjB,CAAC,CACF,CAAC,CAAC,CAAC,CACH,oBAAC,KAAK,IAAC,SAAS,EAAC,aAAa,GAAG,CACjC,CACyB,CAC3B,CAAA;KAAA,CAAC,CAAC;IAEH,SAAS,WAAW,CAAC,IAAgB;;QACpC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACnB,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,SAAS,CAAC,oBAAC,uBAAuB,IAAC,EAAE,EAAE,IAAI,CAAC,EAAE,GAAI,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QAChF,MAAA,KAAK,CAAC,WAAW,sDAAG,IAAI,CAAC,CAAC;IAC3B,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/components/SharedWorkspacesList/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAIpE,MAAM,OAAO,KAAK;IAIjB;QAHmB;;;;;WAAsB;QACtB;;;;;WAAwB;QAG1C,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAGD,IAAW,IAAI;QACd,IAAI,KAAK,GAAiB,EAAE,CAAC;QAC7B,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YAChE,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QACvD,CAAC;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IAED,WAAW;IACI,UAAU,CAAC,CAAe,EAAE,CAAe;QACzD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACnC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBACnC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;oBACxB,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;oBACf,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;gBACX,CAAC;YACF,CAAC;QACF,CAAC;QACD,OAAO,CAAC,CAAC;IACV,CAAC;CACD;AA5BmB;IAAlB,UAAU;sCAA8B;AACtB;IAAlB,UAAU;wCAAgC;AAO3C;IADC,QAAQ;iCAOR;AAGc;IAAd,MAAM;uCAUN"}
|
|
@@ -1,29 +1,19 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Badge } from "antd";
|
|
3
|
-
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
4
|
-
import { faCalendar, faFile } from "@fortawesome/pro-regular-svg-icons";
|
|
5
|
-
import UTCShortDate from "@voplus/morpho-ui/es/controls/UTCShortDate";
|
|
6
2
|
import { observe } from "@voplus/morpho-ui";
|
|
3
|
+
import { faFile } from "@fortawesome/pro-regular-svg-icons";
|
|
7
4
|
import { useWorkspace } from "../../../../data/workspace";
|
|
5
|
+
import CommonCard, { colorList } from "@voplus/morpho-ui/es/controls/ResponsiveGrid/GridCard";
|
|
6
|
+
import UTCShortDate from "@voplus/morpho-ui/es/controls/UTCShortDate";
|
|
8
7
|
import classnames from "classnames";
|
|
9
8
|
import "./index.less";
|
|
10
9
|
const WorkspaceIcon = (props) => {
|
|
11
|
-
const { id, active } = props;
|
|
10
|
+
const { id, active, index = 0 } = props;
|
|
12
11
|
const workspace = useWorkspace(id);
|
|
13
12
|
return observe(() => {
|
|
14
|
-
var _a;
|
|
15
|
-
return (React.createElement("
|
|
16
|
-
|
|
17
|
-
React.createElement(
|
|
18
|
-
React.createElement(FAIcon, { icon: faFile })),
|
|
19
|
-
React.createElement("div", { className: "flex-1 workspace-info" },
|
|
20
|
-
React.createElement("div", { className: "workspace-name truncate" }, (workspace === null || workspace === void 0 ? void 0 : workspace.name) || "New WorkSpace"),
|
|
21
|
-
React.createElement("div", { className: "flex items-center workspace-date" },
|
|
22
|
-
React.createElement(FAIcon, { icon: faCalendar }),
|
|
23
|
-
"Created on ",
|
|
24
|
-
React.createElement(UTCShortDate, { value: workspace === null || workspace === void 0 ? void 0 : workspace.createDate, format: "DD MMM YYYY" })),
|
|
25
|
-
React.createElement("div", { className: "detail" }, "Visit 15 mins before")),
|
|
26
|
-
React.createElement(Badge, { count: (_a = workspace === null || workspace === void 0 ? void 0 : workspace.stats) === null || _a === void 0 ? void 0 : _a.activeWorks, className: "site-badge-count" }))));
|
|
13
|
+
var _a, _b;
|
|
14
|
+
return (React.createElement(CommonCard, { icon: faFile, iconColor: colorList[index % colorList.length].text, iconBg: colorList[index % colorList.length].bg, title: workspace === null || workspace === void 0 ? void 0 : workspace.name, rightText: ((_a = workspace === null || workspace === void 0 ? void 0 : workspace.stats) === null || _a === void 0 ? void 0 : _a.activeWorks) ? (React.createElement("span", { className: classnames("inline-flex items-center px-2.5 py-1 rounded-full text-xs font-medium", colorList[index % colorList.length].text, colorList[index % colorList.length].bg) }, (_b = workspace === null || workspace === void 0 ? void 0 : workspace.stats) === null || _b === void 0 ? void 0 : _b.activeWorks)) : null, tag: React.createElement("span", { className: "text-xs text-slate-500" },
|
|
15
|
+
"Created on ",
|
|
16
|
+
React.createElement(UTCShortDate, { value: workspace === null || workspace === void 0 ? void 0 : workspace.createDate, format: "DD MMM YYYY" })), active: active, onClick: props.onClick }));
|
|
27
17
|
});
|
|
28
18
|
};
|
|
29
19
|
export default WorkspaceIcon;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/components/WorkspaceIcon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/components/WorkspaceIcon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,UAAU,EAAE,EAAE,SAAS,EAAE,MAAM,uDAAuD,CAAC;AAC9F,OAAO,YAAY,MAAM,4CAA4C,CAAC;AACtE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,cAAc,CAAC;AAEtB,MAAM,aAAa,GAAG,CAAC,KAKtB,EAAE,EAAE;IACJ,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,GAAG,CAAC,EAAE,GAAG,KAAK,CAAC;IACxC,MAAM,SAAS,GAAG,YAAY,CAAC,EAAG,CAAC,CAAC;IAEpC,OAAO,OAAO,CAAC,GAAG,EAAE;;QAAC,OAAA,CACpB,oBAAC,UAAU,IACV,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,SAAS,CAAC,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,EACnD,MAAM,EAAE,SAAS,CAAC,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,EAC9C,KAAK,EAAE,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,IAAI,EACtB,SAAS,EACR,CAAA,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,0CAAE,WAAW,EAAC,CAAC,CAAC,CAC/B,8BACC,SAAS,EAAE,UAAU,CACpB,uEAAuE,EACvE,SAAS,CAAC,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,EACxC,SAAS,CAAC,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CACtC,IAEA,MAAA,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,0CAAE,WAAW,CACxB,CACP,CAAC,CAAC,CAAC,IAAI,EAET,GAAG,EACF,8BAAM,SAAS,EAAC,wBAAwB;;gBAC5B,oBAAC,YAAY,IAAC,KAAK,EAAE,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,UAAU,EAAE,MAAM,EAAC,aAAa,GAAG,CACxE,EAER,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,KAAK,CAAC,OAAO,GACrB,CACF,CAAA;KAAA,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,139 +1,134 @@
|
|
|
1
|
-
|
|
1
|
+
:global {
|
|
2
|
+
/* Color variant classes for workspace cards */
|
|
3
|
+
.icon-blue {
|
|
4
|
+
background-color: #dbeafe;
|
|
5
|
+
}
|
|
6
|
+
.icon-blue i {
|
|
7
|
+
color: #2563eb;
|
|
8
|
+
}
|
|
9
|
+
.badge-blue {
|
|
10
|
+
background-color: #dbeafe;
|
|
11
|
+
color: #1e40af;
|
|
12
|
+
}
|
|
2
13
|
|
|
3
|
-
.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
position: relative;
|
|
14
|
+
.icon-green {
|
|
15
|
+
background-color: #dcfce7;
|
|
16
|
+
}
|
|
17
|
+
.icon-green i {
|
|
18
|
+
color: #16a34a;
|
|
19
|
+
}
|
|
20
|
+
.badge-green {
|
|
21
|
+
background-color: #dcfce7;
|
|
22
|
+
color: #166534;
|
|
23
|
+
}
|
|
14
24
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
25
|
+
.icon-purple {
|
|
26
|
+
background-color: #f3e8ff;
|
|
27
|
+
}
|
|
28
|
+
.icon-purple i {
|
|
29
|
+
color: #9333ea;
|
|
30
|
+
}
|
|
31
|
+
.badge-purple {
|
|
32
|
+
background-color: #f3e8ff;
|
|
33
|
+
color: #7c3aed;
|
|
34
|
+
}
|
|
18
35
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
36
|
+
.icon-indigo {
|
|
37
|
+
background-color: #e0e7ff;
|
|
38
|
+
}
|
|
39
|
+
.icon-indigo i {
|
|
40
|
+
color: #4f46e5;
|
|
41
|
+
}
|
|
42
|
+
.badge-indigo {
|
|
43
|
+
background-color: #e0e7ff;
|
|
44
|
+
color: #3730a3;
|
|
45
|
+
}
|
|
22
46
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
47
|
+
.icon-teal {
|
|
48
|
+
background-color: #ccfbf1;
|
|
49
|
+
}
|
|
50
|
+
.icon-teal i {
|
|
51
|
+
color: #0d9488;
|
|
52
|
+
}
|
|
53
|
+
.badge-teal {
|
|
54
|
+
background-color: #ccfbf1;
|
|
55
|
+
color: #134e4a;
|
|
56
|
+
}
|
|
28
57
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
58
|
+
.icon-rose {
|
|
59
|
+
background-color: #ffe4e6;
|
|
60
|
+
}
|
|
61
|
+
.icon-rose i {
|
|
62
|
+
color: #e11d48;
|
|
63
|
+
}
|
|
64
|
+
.badge-rose {
|
|
65
|
+
background-color: #ffe4e6;
|
|
66
|
+
color: #9f1239;
|
|
67
|
+
}
|
|
40
68
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
align-items: center;
|
|
69
|
+
.icon-emerald {
|
|
70
|
+
background-color: #d1fae5;
|
|
71
|
+
}
|
|
72
|
+
.icon-emerald i {
|
|
73
|
+
color: #059669;
|
|
74
|
+
}
|
|
75
|
+
.badge-emerald {
|
|
76
|
+
background-color: #d1fae5;
|
|
77
|
+
color: #064e3b;
|
|
78
|
+
}
|
|
52
79
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
80
|
+
.icon-amber {
|
|
81
|
+
background-color: #fef3c7;
|
|
82
|
+
}
|
|
83
|
+
.icon-amber i {
|
|
84
|
+
color: #d97706;
|
|
85
|
+
}
|
|
86
|
+
.badge-amber {
|
|
87
|
+
background-color: #fef3c7;
|
|
88
|
+
color: #92400e;
|
|
89
|
+
}
|
|
59
90
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
91
|
+
.icon-cyan {
|
|
92
|
+
background-color: #cffafe;
|
|
93
|
+
}
|
|
94
|
+
.icon-cyan i {
|
|
95
|
+
color: #0891b2;
|
|
96
|
+
}
|
|
97
|
+
.badge-cyan {
|
|
98
|
+
background-color: #cffafe;
|
|
99
|
+
color: #164e63;
|
|
100
|
+
}
|
|
65
101
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
height: 38px;
|
|
76
|
-
font-size: @font-size-base;
|
|
77
|
-
font-family: Microsoft YaHei;
|
|
78
|
-
font-weight: bold;
|
|
79
|
-
line-height: 19px;
|
|
80
|
-
margin-top: 16px;
|
|
81
|
-
color: #67696d;
|
|
82
|
-
opacity: 1;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
102
|
+
.icon-violet {
|
|
103
|
+
background-color: #ede9fe;
|
|
104
|
+
}
|
|
105
|
+
.icon-violet i {
|
|
106
|
+
color: #7c3aed;
|
|
107
|
+
}
|
|
108
|
+
.badge-violet {
|
|
109
|
+
background-color: #ede9fe;
|
|
110
|
+
color: #5b21b6;
|
|
85
111
|
}
|
|
86
|
-
}
|
|
87
112
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
113
|
+
.icon-orange {
|
|
114
|
+
background-color: #fed7aa;
|
|
115
|
+
}
|
|
116
|
+
.icon-orange i {
|
|
117
|
+
color: #ea580c;
|
|
118
|
+
}
|
|
119
|
+
.badge-orange {
|
|
120
|
+
background-color: #fed7aa;
|
|
121
|
+
color: #9a3412;
|
|
122
|
+
}
|
|
99
123
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
font-size: 27px;
|
|
110
|
-
color: @purple-primary-color;
|
|
111
|
-
}
|
|
112
|
-
.workspace-name {
|
|
113
|
-
color: #5d5d5d;
|
|
114
|
-
line-height: 19px;
|
|
115
|
-
font-weight: bold;
|
|
116
|
-
margin-bottom: 5px;
|
|
117
|
-
}
|
|
118
|
-
.workspace-date {
|
|
119
|
-
color: #868686;
|
|
120
|
-
line-height: 19px;
|
|
121
|
-
margin-bottom: 3px;
|
|
122
|
-
svg {
|
|
123
|
-
margin-right: 5px;
|
|
124
|
-
}
|
|
125
|
-
span {
|
|
126
|
-
margin-left: 5px;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
.detail {
|
|
130
|
-
color: #cbcbcb;
|
|
131
|
-
}
|
|
132
|
-
.ant-badge .ant-badge-count {
|
|
133
|
-
height: 18px;
|
|
134
|
-
line-height: 18px;
|
|
135
|
-
border-radius: 6px;
|
|
136
|
-
background: @purple-primary-color;
|
|
137
|
-
}
|
|
124
|
+
.icon-pink {
|
|
125
|
+
background-color: #fce7f3;
|
|
126
|
+
}
|
|
127
|
+
.icon-pink i {
|
|
128
|
+
color: #db2777;
|
|
129
|
+
}
|
|
130
|
+
.badge-pink {
|
|
131
|
+
background-color: #fce7f3;
|
|
132
|
+
color: #831843;
|
|
138
133
|
}
|
|
139
134
|
}
|