From 66fb0e4bbf88a5e9bcb5869dd7c8b8a7714de024 Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 18 Jan 2022 12:10:47 -0500 Subject: fixed warnings. display last user to edit db. fixed /activity to show only users with a connected socket. fixed toggle "Overlay" button to toggle its background based on overlay state. --- src/client/views/nodes/MapBox/MapBox.tsx | 34 +++++++++++----------- .../views/nodes/formattedText/FormattedTextBox.tsx | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) (limited to 'src/client/views/nodes') diff --git a/src/client/views/nodes/MapBox/MapBox.tsx b/src/client/views/nodes/MapBox/MapBox.tsx index e80ad8acd..50444c73a 100644 --- a/src/client/views/nodes/MapBox/MapBox.tsx +++ b/src/client/views/nodes/MapBox/MapBox.tsx @@ -57,9 +57,9 @@ const defaultCenter = { const mapOptions = { fullscreenControl: false, -} +}; -dotenv.config({ path: __dirname + '/.env' }) +dotenv.config({ path: __dirname + '/.env' }); const apiKey = process.env.GOOGLE_MAPS; const script = document.createElement('script'); @@ -115,8 +115,8 @@ export class MapBox extends ViewBoxAnnotatableComponent(); - @computed get allSidebarDocs() { return DocListCast(this.dataDoc[this.SidebarKey]); }; - @computed get allMapMarkers() { return DocListCast(this.dataDoc[this.annotationKey]); }; + @computed get allSidebarDocs() { return DocListCast(this.dataDoc[this.SidebarKey]); } + @computed get allMapMarkers() { return DocListCast(this.dataDoc[this.annotationKey]); } @observable private toggleAddMarker = false; private _mainCont: React.RefObject = React.createRef(); @@ -155,7 +155,7 @@ export class MapBox extends ViewBoxAnnotatableComponent { const controlDiv = document.createElement("div"); - controlDiv.className = "mapBox-addMarker" + controlDiv.className = "mapBox-addMarker"; // Set CSS for the control border. const controlUI = document.createElement("div"); controlUI.style.backgroundColor = "#fff"; @@ -201,7 +201,7 @@ export class MapBox extends ViewBoxAnnotatableComponent { - if (this.toggleAddMarker == true) { + if (this.toggleAddMarker === true) { this.toggleAddMarker = false; console.log("add marker button status:" + this.toggleAddMarker); controlUI.style.backgroundColor = "#fff"; @@ -211,7 +211,7 @@ export class MapBox extends ViewBoxAnnotatableComponent { - if (this.toggleAddMarker == true) { + if (this.toggleAddMarker === true) { this.placeMarker((e as any).latLng, map); } - }) + }); } @action @@ -328,10 +328,10 @@ export class MapBox extends ViewBoxAnnotatableComponent { if (doc.lat !== undefined && doc.lng !== undefined) { - const existingMarker = this.allMapMarkers.find(marker => marker.lat === doc.lat && marker.lng == doc.lng); + const existingMarker = this.allMapMarkers.find(marker => marker.lat === doc.lat && marker.lng === doc.lng); doc.onClickBehavior = "enterPortal"; if (existingMarker) { Doc.AddDocToList(existingMarker, "data", doc); @@ -340,7 +340,7 @@ export class MapBox extends ViewBoxAnnotatableComponent { console.log(this.allMapMarkers); console.log(this.allSidebarDocs); - }) + }); return this.removeDocument(doc, sidebarKey); } @@ -432,7 +432,7 @@ export class MapBox extends ViewBoxAnnotatableComponent {this.inlineTextAnnotations.sort((a, b) => NumCast(a.y) - NumCast(b.y)).map(anno => { const anchor = AnchorMenu.Instance?.GetAnchor(this._savedAnnotations) ?? - this.rootDoc + this.rootDoc; return anchor; } @@ -525,7 +525,7 @@ export class MapBox extends ViewBoxAnnotatableComponent this.markerLoadHandler(marker, place)} onClick={(e: google.maps.MapMouseEvent) => this.markerClickHandler(e, place)} /> - )) + )); } // TODO: auto center on select a document in the sidebar diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index 4a6af86c1..311d52afa 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -120,7 +120,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp public ProseRef?: HTMLDivElement; public get EditorView() { return this._editorView; } public get SidebarKey() { return this.fieldKey + "-sidebar"; } - @computed get allSidebarDocs() { return DocListCast(this.dataDoc[this.SidebarKey]); }; + @computed get allSidebarDocs() { return DocListCast(this.dataDoc[this.SidebarKey]); } @computed get sidebarWidthPercent() { return this._showSidebar ? "20%" : StrCast(this.layoutDoc._sidebarWidthPercent, "0%"); } @computed get sidebarColor() { return StrCast(this.layoutDoc.sidebarColor, StrCast(this.layoutDoc[this.props.fieldKey + "-backgroundColor"], "#e4e4e4")); } -- cgit v1.2.3-70-g09d2 From 7d5974c871fd50ed521ff8edd624c2c252553444 Mon Sep 17 00:00:00 2001 From: Geireann <60007097+geireann@users.noreply.github.com> Date: Tue, 15 Feb 2022 13:41:48 -0500 Subject: fixed broken import --- src/client/documents/Documents.ts | 3 +-- src/client/views/collections/CollectionStackingView.tsx | 2 ++ src/client/views/nodes/trails/PresElementBox.tsx | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/client/views/nodes') diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index f026d0005..df573a377 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -14,8 +14,7 @@ import { Cast, NumCast, StrCast } from "../../fields/Types"; import { AudioField, ImageField, MapField, PdfField, VideoField, WebField, YoutubeField } from "../../fields/URLField"; import { SharingPermissions } from "../../fields/util"; import { Upload } from "../../server/SharedMediaTypes"; -import { OmitKeys, Utils } fr -om "../../Utils"; +import { OmitKeys, Utils } from "../../Utils"; import { YoutubeBox } from "../apis/youtube/YoutubeBox"; import { DocServer } from "../DocServer"; import { Networking } from "../Network"; diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx index cdc680a08..46cea5f78 100644 --- a/src/client/views/collections/CollectionStackingView.tsx +++ b/src/client/views/collections/CollectionStackingView.tsx @@ -82,12 +82,14 @@ export class CollectionStackingView extends CollectionSubView { TraceMobx(); this._docXfs.length = 0; + // Go through each of the documents that are contained return docs.map((d, i) => { const height = () => this.getDocHeight(d); const width = () => this.getDocWidth(d); const rowSpan = Math.ceil((height() + this.gridGap) / this.gridGap); const style = this.isStackingView ? { width: width(), marginTop: i ? this.gridGap : 0, height: height() } : { gridRowEnd: `span ${rowSpan}` }; return
+
OOPS
{this.getDisplayDoc(d, width)}
; }); diff --git a/src/client/views/nodes/trails/PresElementBox.tsx b/src/client/views/nodes/trails/PresElementBox.tsx index 238d025dc..04162dd91 100644 --- a/src/client/views/nodes/trails/PresElementBox.tsx +++ b/src/client/views/nodes/trails/PresElementBox.tsx @@ -167,6 +167,7 @@ export class PresElementBox extends ViewBoxBaseComponent { -- cgit v1.2.3-70-g09d2 From 4bfb29f72fe3a78e7a2781035f3c23b04ddaaa25 Mon Sep 17 00:00:00 2001 From: geireann Date: Tue, 15 Feb 2022 22:08:11 +0000 Subject: Revert "fixed broken import" This reverts commit 7d5974c871fd50ed521ff8edd624c2c252553444. --- src/client/documents/Documents.ts | 3 ++- src/client/views/collections/CollectionStackingView.tsx | 2 -- src/client/views/nodes/trails/PresElementBox.tsx | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src/client/views/nodes') diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index df573a377..f026d0005 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -14,7 +14,8 @@ import { Cast, NumCast, StrCast } from "../../fields/Types"; import { AudioField, ImageField, MapField, PdfField, VideoField, WebField, YoutubeField } from "../../fields/URLField"; import { SharingPermissions } from "../../fields/util"; import { Upload } from "../../server/SharedMediaTypes"; -import { OmitKeys, Utils } from "../../Utils"; +import { OmitKeys, Utils } fr +om "../../Utils"; import { YoutubeBox } from "../apis/youtube/YoutubeBox"; import { DocServer } from "../DocServer"; import { Networking } from "../Network"; diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx index 46cea5f78..cdc680a08 100644 --- a/src/client/views/collections/CollectionStackingView.tsx +++ b/src/client/views/collections/CollectionStackingView.tsx @@ -82,14 +82,12 @@ export class CollectionStackingView extends CollectionSubView { TraceMobx(); this._docXfs.length = 0; - // Go through each of the documents that are contained return docs.map((d, i) => { const height = () => this.getDocHeight(d); const width = () => this.getDocWidth(d); const rowSpan = Math.ceil((height() + this.gridGap) / this.gridGap); const style = this.isStackingView ? { width: width(), marginTop: i ? this.gridGap : 0, height: height() } : { gridRowEnd: `span ${rowSpan}` }; return
-
OOPS
{this.getDisplayDoc(d, width)}
; }); diff --git a/src/client/views/nodes/trails/PresElementBox.tsx b/src/client/views/nodes/trails/PresElementBox.tsx index 04162dd91..238d025dc 100644 --- a/src/client/views/nodes/trails/PresElementBox.tsx +++ b/src/client/views/nodes/trails/PresElementBox.tsx @@ -167,7 +167,6 @@ export class PresElementBox extends ViewBoxBaseComponent { -- cgit v1.2.3-70-g09d2 From 5d50e0673fde8aabb2d87a75624b40d3b9c65df3 Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 8 Mar 2022 22:11:24 -0500 Subject: fixed following a link to a video segment that triggers a navigation back to the source of the link --- src/client/views/collections/CollectionStackedTimeline.tsx | 2 +- src/client/views/nodes/VideoBox.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/client/views/nodes') diff --git a/src/client/views/collections/CollectionStackedTimeline.tsx b/src/client/views/collections/CollectionStackedTimeline.tsx index 89da6692a..74bfc3a88 100644 --- a/src/client/views/collections/CollectionStackedTimeline.tsx +++ b/src/client/views/collections/CollectionStackedTimeline.tsx @@ -721,7 +721,7 @@ class StackedTimelineAnchor extends React.Component DocListCast(this.props.mark.links).length && time > NumCast(this.props.mark[this.props.startTag]) && time < NumCast(this.props.mark[this.props.endTag]) && - this._lastTimecode < NumCast(this.props.mark[this.props.startTag]) + this._lastTimecode < NumCast(this.props.mark[this.props.startTag]) - 1e-5 ) { LinkManager.FollowLink( undefined, diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx index 615d595c0..ba7ecfec6 100644 --- a/src/client/views/nodes/VideoBox.tsx +++ b/src/client/views/nodes/VideoBox.tsx @@ -126,7 +126,7 @@ export class VideoBox extends ViewBoxAnnotatableComponent { @@ -542,8 +542,8 @@ export class VideoBox extends ViewBoxAnnotatableComponent { }} - setEndTrim={() => { }} + setStartTrim={emptyFunction} + setEndTrim={emptyFunction} /> ; } -- cgit v1.2.3-70-g09d2