aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-03-14 12:41:17 -0400
committerbobzel <zzzman@gmail.com>2021-03-14 12:41:17 -0400
commit5fe63360364cd85b33ca797c0152f831cbbb0104 (patch)
treea49e1bb7672f3cd889cd867e18a44089af6d6e37
parentc5ea9a228d97974250194cbe41e0f356c3c3906f (diff)
fixed warnings from missing keys. change file orphans to Unfiled
-rw-r--r--src/client/util/CurrentUserUtils.ts2
-rw-r--r--src/client/views/MainView.tsx14
-rw-r--r--src/client/views/nodes/PDFBox.tsx2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts
index 894f306c9..9dda90353 100644
--- a/src/client/util/CurrentUserUtils.ts
+++ b/src/client/util/CurrentUserUtils.ts
@@ -772,7 +772,7 @@ export class CurrentUserUtils {
static async setupFilesystem(doc: Doc) {
await doc.myFilesystem;
if (doc.myFilesystem === undefined) {
- doc.myFileOrphans = Docs.Create.TreeDocument([], { title: "file orphans", _stayInCollection: true, system: true, isFolder: true });
+ doc.myFileOrphans = Docs.Create.TreeDocument([], { title: "Unfiled", _stayInCollection: true, system: true, isFolder: true });
doc.myFileRoot = Docs.Create.TreeDocument([], { title: "file root", _stayInCollection: true, system: true, isFolder: true });
doc.myFilesystem = new PrefetchProxy(Docs.Create.TreeDocument([doc.myFileRoot as Doc, doc.myFileOrphans as Doc], {
title: "My Documents", _height: 100,
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index 1fbcd8fa4..585d68285 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -243,7 +243,7 @@ export class MainView extends React.Component {
getContentsHeight = () => this._panelHeight;
@computed get mainDocView() {
- return <DocumentView
+ return <DocumentView key="main"
Document={this.mainContainer!}
DataDoc={undefined}
addDocument={undefined}
@@ -271,7 +271,7 @@ export class MainView extends React.Component {
}
@computed get dockingContent() {
- return <div className={`mainContent-div${this._flyoutWidth ? "-flyout" : ""}`} onDrop={e => { e.stopPropagation(); e.preventDefault(); }}
+ return <div key="docking" className={`mainContent-div${this._flyoutWidth ? "-flyout" : ""}`} onDrop={e => { e.stopPropagation(); e.preventDefault(); }}
style={{ minWidth: `calc(100% - ${this._flyoutWidth + this.menuPanelWidth() + this.propertiesWidth()}px)`, width: `calc(100% - ${this._flyoutWidth + this.menuPanelWidth() + this.propertiesWidth()}px)` }}>
{!this.mainContainer ? (null) : this.mainDocView}
</div>;
@@ -329,10 +329,10 @@ export class MainView extends React.Component {
@computed get flyout() {
- return !this._flyoutWidth ? <div className={`mainView-libraryFlyout-out`}>
+ return !this._flyoutWidth ? <div key="flyout" className={`mainView-libraryFlyout-out`}>
{this.docButtons}
</div> :
- <div className="mainView-libraryFlyout" style={{ minWidth: this._flyoutWidth, width: this._flyoutWidth }} >
+ <div key="libFlyout" className="mainView-libraryFlyout" style={{ minWidth: this._flyoutWidth, width: this._flyoutWidth }} >
<div className="mainView-contentArea" >
<DocumentView
Document={this._sidebarContent.proto || this._sidebarContent}
@@ -366,7 +366,7 @@ export class MainView extends React.Component {
}
@computed get menuPanel() {
- return <div className="mainView-menuPanel">
+ return <div key="menu" className="mainView-menuPanel">
<DocumentView
Document={Doc.UserDoc().menuStack as Doc}
DataDoc={undefined}
@@ -422,7 +422,7 @@ export class MainView extends React.Component {
@computed get mainInnerContent() {
return <>
{this.menuPanel}
- <div className={`mainView-innerContent${this.darkScheme ? "-dark" : ""}`}>
+ <div key="inner" className={`mainView-innerContent${this.darkScheme ? "-dark" : ""}`}>
{this.flyout}
<div className="mainView-libraryHandle" style={{ display: !this._flyoutWidth ? "none" : undefined, }} onPointerDown={this.onFlyoutPointerDown} >
<FontAwesomeIcon icon="chevron-left" color={this.darkScheme ? "white" : "black"} style={{ opacity: "50%" }} size="sm" />
@@ -430,7 +430,7 @@ export class MainView extends React.Component {
{this.dockingContent}
- <div className="mainView-propertiesDragger" onPointerDown={this.onPropertiesPointerDown} style={{ right: this.propertiesWidth() - 1 }}>
+ <div className="mainView-propertiesDragger" key="props" onPointerDown={this.onPropertiesPointerDown} style={{ right: this.propertiesWidth() - 1 }}>
<FontAwesomeIcon icon={this.propertiesWidth() < 10 ? "chevron-left" : "chevron-right"} color={this.darkScheme ? "white" : "black"} size="sm" />
</div>
{this.propertiesWidth() < 10 ? (null) : <PropertiesView styleProvider={DefaultStyleProvider} width={this.propertiesWidth()} height={this.getContentsHeight()} />}
diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx
index a474293e6..d4fc0c103 100644
--- a/src/client/views/nodes/PDFBox.tsx
+++ b/src/client/views/nodes/PDFBox.tsx
@@ -143,7 +143,7 @@ export class PDFBox extends ViewBoxAnnotatableComponent<FieldViewProps, PdfDocum
}
renderTag = (tag: string) => {
const active = StrListCast(this.rootDoc[this.sidebarKey() + "-docFilters"]).includes(`${tag}:${tag}:check`);
- return <div className={`pdfbox-filterTag${active ? "-active" : ""}`}
+ return <div key={tag} className={`pdfbox-filterTag${active ? "-active" : ""}`}
onClick={e => Doc.setDocFilter(this.rootDoc, tag, tag, "check", true, this.sidebarKey())}>
{tag}
</div>;