-
Notifications
You must be signed in to change notification settings - Fork 804
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cloud-storage): add cloud-storage modal to room (#487)
- Loading branch information
Showing
10 changed files
with
180 additions
and
122 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
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.cloud-storage-button-modal { | ||
.ant-modal-body, | ||
.ant-modal-footer { | ||
padding: 0; | ||
} | ||
.ant-modal-content { | ||
overflow: hidden; | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
desktop/renderer-app/src/components/CloudStorageButton.tsx
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// TODO: remove this component when multi sub window is Done | ||
|
||
import { Modal } from "antd"; | ||
import { observer } from "mobx-react-lite"; | ||
import React, { useState } from "react"; | ||
import { CloudStoragePage } from "../pages/CloudStoragePage"; | ||
import { WhiteboardStore } from "../stores/WhiteboardStore"; | ||
import { TopBarRightBtn } from "./TopBarRightBtn"; | ||
import "./CloudStorageButton.less"; | ||
|
||
interface CloudStorageButtonProps { | ||
whiteboard: WhiteboardStore; | ||
} | ||
|
||
export const CloudStorageButton = observer<CloudStorageButtonProps>(function CloudStorageButton({ | ||
whiteboard, | ||
}) { | ||
const [visible, setVisible] = useState(false); | ||
|
||
return ( | ||
<> | ||
<TopBarRightBtn | ||
title="Open Cloud Storage" | ||
icon="cloud-storage" | ||
onClick={() => setVisible(true)} | ||
/> | ||
<Modal | ||
onCancel={() => setVisible(false)} | ||
destroyOnClose | ||
footer={[]} | ||
visible={visible} | ||
className="cloud-storage-button-modal" | ||
> | ||
<CloudStoragePage compact whiteboard={whiteboard} /> | ||
</Modal> | ||
</> | ||
); | ||
}); |
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.