aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/selectedDoc/SelectedDocView.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/selectedDoc/SelectedDocView.tsx')
-rw-r--r--src/client/views/selectedDoc/SelectedDocView.tsx61
1 files changed, 31 insertions, 30 deletions
diff --git a/src/client/views/selectedDoc/SelectedDocView.tsx b/src/client/views/selectedDoc/SelectedDocView.tsx
index 955a4a174..2139919e0 100644
--- a/src/client/views/selectedDoc/SelectedDocView.tsx
+++ b/src/client/views/selectedDoc/SelectedDocView.tsx
@@ -1,12 +1,14 @@
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 { ListBox } from 'browndash-components';
+import { computed } from 'mobx';
+import { observer } from 'mobx-react';
+import { Doc } from '../../../fields/Doc';
+import { StrCast } from '../../../fields/Types';
import { DocumentManager } from '../../util/DocumentManager';
import { DocFocusOptions } from '../nodes/DocumentView';
+import { emptyFunction } from '../../../Utils';
+import { SettingsManager } from '../../util/SettingsManager';
export interface SelectedDocViewProps {
selectedDocs: Doc[];
@@ -14,34 +16,33 @@ export interface SelectedDocViewProps {
@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>
+ return (
+ <div className="selectedDocView-container">
+ <ListBox
+ items={this.selectedDocs.map(doc => {
+ const options: DocFocusOptions = {
+ playAudio: false,
+ playMedia: false,
+ willPan: true,
+ };
+ return {
+ text: StrCast(doc.title),
+ val: StrCast(doc._id),
+ color: SettingsManager.userColor,
+ background: SettingsManager.userBackgroundColor,
+ icon: <FontAwesomeIcon size={'1x'} icon={Doc.toIcon(doc)} />,
+ onClick: () => DocumentManager.Instance.showDocument(doc, options, emptyFunction),
+ };
+ })}
+ color={SettingsManager.userColor}
+ background={SettingsManager.userBackgroundColor}
+ />
+ </div>
+ );
}
-} \ No newline at end of file
+}