aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/selectedDoc/SelectedDocView.tsx
diff options
context:
space:
mode:
authormonoguitari <113245090+monoguitari@users.noreply.github.com>2023-08-22 14:15:04 -0400
committermonoguitari <113245090+monoguitari@users.noreply.github.com>2023-08-22 14:15:04 -0400
commit9293fd8c4128b41b31f9b2214d6799fdff0f2aaa (patch)
tree45809c42545b10515f6f88065318b454549dacd1 /src/client/views/selectedDoc/SelectedDocView.tsx
parent347e8e2bd32854b36828b7bcc645c9c361204251 (diff)
parent1c52bd054385d2584bbeae41eecdf9ba6999c25f (diff)
Merge branch 'master' into advanced-trails
Diffstat (limited to 'src/client/views/selectedDoc/SelectedDocView.tsx')
-rw-r--r--src/client/views/selectedDoc/SelectedDocView.tsx47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/client/views/selectedDoc/SelectedDocView.tsx b/src/client/views/selectedDoc/SelectedDocView.tsx
new file mode 100644
index 000000000..955a4a174
--- /dev/null
+++ b/src/client/views/selectedDoc/SelectedDocView.tsx
@@ -0,0 +1,47 @@
+import React = require('react');
+import { Doc } from "../../../fields/Doc";
+import { observer } from "mobx-react";
+import { computed } from "mobx";
+import { StrCast } from "../../../fields/Types";
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import { Colors, ListBox } from 'browndash-components';
+import { DocumentManager } from '../../util/DocumentManager';
+import { DocFocusOptions } from '../nodes/DocumentView';
+
+export interface SelectedDocViewProps {
+ selectedDocs: Doc[];
+}
+
+@observer
+export class SelectedDocView extends React.Component<SelectedDocViewProps> {
+
+ @computed get selectedDocs() {
+ return this.props.selectedDocs;
+ }
+
+
+ render() {
+ return <div className={`selectedDocView-container`}>
+ <ListBox
+ items={this.selectedDocs.map((doc) => {
+ const icon = Doc.toIcon(doc);
+ const iconEle = <FontAwesomeIcon size={'1x'} icon={icon} />;
+ const text = StrCast(doc.title)
+ const finished = () => {
+
+ };
+ const options: DocFocusOptions = {
+ playAudio: false,
+ };
+ return {
+ text: text,
+ val: StrCast(doc._id),
+ icon: iconEle,
+ onClick: () => {DocumentManager.Instance.showDocument(doc, options, finished);}
+ }
+ })}
+ color={StrCast(Doc.UserDoc().userColor)}
+ />
+ </div>
+ }
+} \ No newline at end of file