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/documents/Documents.ts | 2 +- src/client/util/CurrentUserUtils.ts | 2 +- src/client/views/InkStrokeProperties.ts | 2 +- src/client/views/MainView.tsx | 10 +++---- src/client/views/PropertiesView.tsx | 6 ++-- .../CollectionFreeFormLinkView.tsx | 6 ++-- src/client/views/nodes/MapBox/MapBox.tsx | 34 +++++++++++----------- .../views/nodes/formattedText/FormattedTextBox.tsx | 2 +- src/fields/Doc.ts | 2 +- src/server/ApiManagers/UserManager.ts | 10 +++++-- src/server/websocket.ts | 13 ++++++++- 11 files changed, 52 insertions(+), 37 deletions(-) (limited to 'src') diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 80c3f9168..df573a377 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -1426,7 +1426,7 @@ export namespace DocUtils { function ConvertDMSToDD(degrees: number, minutes: number, seconds: number, direction: string) { var dd = degrees + minutes / 60 + seconds / (60 * 60); - if (direction == "S" || direction == "W") { + if (direction === "S" || direction === "W") { dd = dd * -1; } // Don't do anything for N or E return dd; diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index 90b43c415..a8b0da369 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -1164,7 +1164,7 @@ export class CurrentUserUtils { dontUndo: true, title, color: Colors.WHITE, - backgroundColor: "transparent", + backgroundColor: checkResult ? ComputedField.MakeFunction(checkResult) as any : "transparent", _dropAction: "alias", hidden: hidden ? ComputedField.MakeFunction(hidden) as any : undefined, _removeDropProperties: new List(["dropAction", "_stayInCollection"]), diff --git a/src/client/views/InkStrokeProperties.ts b/src/client/views/InkStrokeProperties.ts index cab4e1216..41cace1e3 100644 --- a/src/client/views/InkStrokeProperties.ts +++ b/src/client/views/InkStrokeProperties.ts @@ -251,7 +251,7 @@ export class InkStrokeProperties { samplesLeft.push(new Point(pt.x, pt.y)); } } - var { finalCtrls, error } = FitOneCurve(samplesLeft, { X: startDir.x, Y: startDir.y }, { X: endDir.x, Y: endDir.y }); + var { finalCtrls } = FitOneCurve(samplesLeft, { X: startDir.x, Y: startDir.y }, { X: endDir.x, Y: endDir.y }); for (var i = nearestSeg / 4; i < splicedPoints.length / 4; i++) { const bez = new Bezier(splicedPoints.slice(i * 4, i * 4 + 4).map(p => ({ x: p.X, y: p.Y }))); if (i === nearestSeg / 4) startDir = bez.derivative(nearestT); diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index 0bd6c9166..1478da1f7 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -166,7 +166,7 @@ export class MainView extends React.Component { } library.add(fa.faEdit, fa.faTrash, fa.faTrashAlt, fa.faShare, fa.faDownload, fa.faExpandArrowsAlt, fa.faLayerGroup, fa.faExternalLinkAlt, fa.faCalendar, - fa.faSquare, far.faSquare, fa.faConciergeBell, fa.faWindowRestore, fa.faFolder, fa.faMapPin, fa.faMapMarker, fa.faFingerprint, fa.faCrosshairs, fa.faDesktop, fa.faUnlock, + fa.faSquare, far.faSquare as any, fa.faConciergeBell, fa.faWindowRestore, fa.faFolder, fa.faMapPin, fa.faMapMarker, fa.faFingerprint, fa.faCrosshairs, fa.faDesktop, fa.faUnlock, fa.faLock, fa.faLaptopCode, fa.faMale, fa.faCopy, fa.faHandPointLeft, fa.faHandPointRight, fa.faCompass, fa.faSnowflake, fa.faMicrophone, fa.faKeyboard, fa.faQuestion, fa.faTasks, fa.faPalette, fa.faAngleLeft, fa.faAngleRight, fa.faBell, fa.faCamera, fa.faExpand, fa.faCaretDown, fa.faCaretLeft, fa.faCaretRight, fa.faCaretSquareDown, fa.faCaretSquareRight, fa.faArrowsAltH, fa.faPlus, fa.faMinus, fa.faTerminal, fa.faToggleOn, fa.faFile, fa.faLocationArrow, @@ -178,10 +178,10 @@ export class MainView extends React.Component { fa.faTimesCircle, fa.faThumbtack, fa.faTree, fa.faTv, fa.faUndoAlt, fa.faVideo, fa.faAsterisk, fa.faBrain, fa.faImage, fa.faPaintBrush, fa.faTimes, fa.faEye, fa.faArrowsAlt, fa.faQuoteLeft, fa.faSortAmountDown, fa.faAlignLeft, fa.faAlignCenter, fa.faAlignRight, fa.faHeading, fa.faRulerCombined, fa.faFillDrip, fa.faLink, fa.faUnlink, fa.faBold, fa.faItalic, fa.faClipboard, fa.faUnderline, fa.faStrikethrough, fa.faSuperscript, fa.faSubscript, - fa.faIndent, fa.faEyeDropper, fa.faPaintRoller, fa.faBars, fa.faBrush, fa.faShapes, fa.faEllipsisH, fa.faHandPaper, fa.faMap, fa.faUser, faHireAHelper, - fa.faTrashRestore, fa.faUsers, fa.faWrench, fa.faCog, fa.faMap, fa.faBellSlash, fa.faExpandAlt, fa.faArchive, fa.faBezierCurve, fa.faCircle, far.faCircle, - fa.faLongArrowAltRight, fa.faPenFancy, fa.faAngleDoubleRight, faBuffer, fa.faExpand, fa.faUndo, fa.faSlidersH, fa.faAngleDoubleLeft, fa.faAngleUp, - fa.faAngleDown, fa.faPlayCircle, fa.faClock, fa.faRocket, fa.faExchangeAlt, faBuffer, fa.faHashtag, fa.faAlignJustify, fa.faCheckSquare, fa.faListUl, + fa.faIndent, fa.faEyeDropper, fa.faPaintRoller, fa.faBars, fa.faBrush, fa.faShapes, fa.faEllipsisH, fa.faHandPaper, fa.faMap, fa.faUser, faHireAHelper as any, + fa.faTrashRestore, fa.faUsers, fa.faWrench, fa.faCog, fa.faMap, fa.faBellSlash, fa.faExpandAlt, fa.faArchive, fa.faBezierCurve, fa.faCircle, far.faCircle as any, + fa.faLongArrowAltRight, fa.faPenFancy, fa.faAngleDoubleRight, faBuffer as any, fa.faExpand, fa.faUndo, fa.faSlidersH, fa.faAngleDoubleLeft, fa.faAngleUp, + fa.faAngleDown, fa.faPlayCircle, fa.faClock, fa.faRocket, fa.faExchangeAlt, fa.faHashtag, fa.faAlignJustify, fa.faCheckSquare, fa.faListUl, fa.faWindowMinimize, fa.faWindowRestore, fa.faTextWidth, fa.faTextHeight, fa.faClosedCaptioning, fa.faInfoCircle, fa.faTag, fa.faSyncAlt, fa.faPhotoVideo, fa.faArrowAltCircleDown, fa.faArrowAltCircleUp, fa.faArrowAltCircleLeft, fa.faArrowAltCircleRight, fa.faStopCircle, fa.faCheckCircle, fa.faGripVertical, fa.faSortUp, fa.faSortDown, fa.faTable, fa.faTh, fa.faThList, fa.faProjectDiagram, fa.faSignature, fa.faColumns, fa.faChevronCircleUp, fa.faUpload, fa.faBorderAll, diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index f38341603..3e7b0bd0f 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -1,6 +1,6 @@ import React = require("react"); import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faAnchor, faArrowRight } from '@fortawesome/free-solid-svg-icons' +import { faAnchor, faArrowRight } from '@fortawesome/free-solid-svg-icons'; import { Checkbox, Tooltip } from "@material-ui/core"; import { intersection } from "lodash"; import { action, autorun, computed, Lambda, observable } from "mobx"; @@ -1218,7 +1218,7 @@ export class PropertiesView extends React.Component { onChange={e => this.handleLinkRelationshipChange(e.currentTarget.value)} className="text" type="text" - /> + />; } @computed @@ -1232,7 +1232,7 @@ export class PropertiesView extends React.Component { onChange={e => this.handleDescriptionChange(e.currentTarget.value)} className="text" type="text" - /> + />; } /** diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx index c35bb3581..f5a5492e3 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinkView.tsx @@ -150,8 +150,8 @@ export class CollectionFreeFormLinkView extends React.Component { - SelectionManager.SelectSchemaViewDoc(this.props.LinkDocs[0], true) - this.toggleProperties() + SelectionManager.SelectSchemaViewDoc(this.props.LinkDocs[0], true); + this.toggleProperties(); } // componentToHex = (c: number) => { @@ -249,7 +249,7 @@ export class CollectionFreeFormLinkView extends React.Component(); - @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")); } diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index 328385fda..8a5491b4b 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -1241,7 +1241,7 @@ export namespace Doc { case DocumentType.INK: return "pen-nib"; case DocumentType.PDF: return "file-pdf"; case DocumentType.LINK: return "link"; - case DocumentType.MAP: return "map-marker-alt" + case DocumentType.MAP: return "map-marker-alt"; default: return "question"; } } diff --git a/src/server/ApiManagers/UserManager.ts b/src/server/ApiManagers/UserManager.ts index f36506b14..fe80c6a7c 100644 --- a/src/server/ApiManagers/UserManager.ts +++ b/src/server/ApiManagers/UserManager.ts @@ -4,6 +4,7 @@ import { Database } from "../database"; import { msToTime } from "../ActionUtilities"; import * as bcrypt from "bcrypt-nodejs"; import { Opt } from "../../fields/Doc"; +import { WebSocket } from "../websocket"; export const timeMap: { [id: string]: number } = {}; interface ActivityUnit { @@ -131,9 +132,12 @@ export default class UserManager extends ApiManager { for (const user in timeMap) { const time = timeMap[user]; - const duration = now - time; - const target = (duration / 1000) < (60 * 5) ? activeTimes : inactiveTimes; - target.push({ user, duration }); + const socketPair = Array.from(WebSocket.socketMap).find(pair => pair[1] === user); + if (socketPair && !socketPair[0].disconnected) { + const duration = now - time; + const target = (duration / 1000) < (60 * 5) ? activeTimes : inactiveTimes; + target.push({ user, duration }); + } } const process = (target: { user: string, duration: number }[]) => { diff --git a/src/server/websocket.ts b/src/server/websocket.ts index 13d7237f6..0c79c1bbb 100644 --- a/src/server/websocket.ts +++ b/src/server/websocket.ts @@ -187,7 +187,7 @@ export namespace WebSocket { + currentdate.getMinutes() + ":" + currentdate.getSeconds(); console.log(blue(`user ${userEmail} has connected to the web socket at: ${datetime}`)); - socketMap.set(socket, userEmail); + socketMap.set(socket, userEmail + " at " + datetime); } function getField([id, callback]: [string, (result?: Transferable) => void]) { @@ -338,7 +338,18 @@ export namespace WebSocket { if (!pendingOps.get(id)!.length) pendingOps.delete(id); } + function printActiveUsers() { + socketMap.forEach((user, socket) => { + !socket.disconnected && console.log(user); + }); + } + var CurUser: string | undefined = undefined; + function UpdateField(socket: Socket, diff: Diff) { + if (CurUser !== socketMap.get(socket)) { + CurUser = socketMap.get(socket); + console.log("Switch User: " + CurUser); + } if (pendingOps.has(diff.id)) { pendingOps.get(diff.id)!.push({ diff, socket }); return true; -- cgit v1.2.3-70-g09d2 From d58b6a077930454cd7b1f6b9c24aa3ac58c0683d Mon Sep 17 00:00:00 2001 From: Geireann <60007097+geireann@users.noreply.github.com> Date: Tue, 15 Feb 2022 13:28:13 -0500 Subject: fixed some syntax errors --- src/client/documents/Documents.ts | 3 ++- src/client/views/PropertiesView.tsx | 9 ++++----- src/client/views/collections/CollectionSubView.tsx | 1 + src/client/views/nodes/MapBox/MapBox.tsx | 16 ++++++++-------- src/fields/Doc.ts | 2 +- 5 files changed, 16 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 80c3f9168..ff9ac4c8c 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/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index f38341603..25b1381fe 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -1,6 +1,6 @@ import React = require("react"); +import { faAnchor, faArrowRight } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faAnchor, faArrowRight } from '@fortawesome/free-solid-svg-icons' import { Checkbox, Tooltip } from "@material-ui/core"; import { intersection } from "lodash"; import { action, autorun, computed, Lambda, observable } from "mobx"; @@ -17,6 +17,7 @@ import { emptyFunction, returnEmptyDoclist, returnEmptyFilter, returnFalse, retu import { DocumentType } from "../documents/DocumentTypes"; import { CurrentUserUtils } from "../util/CurrentUserUtils"; import { DocumentManager } from "../util/DocumentManager"; +import { LinkManager } from "../util/LinkManager"; import { SelectionManager } from "../util/SelectionManager"; import { SharingManager } from "../util/SharingManager"; import { Transform } from "../util/Transform"; @@ -27,12 +28,10 @@ import { EditableView } from "./EditableView"; import { InkStrokeProperties } from "./InkStrokeProperties"; import { DocumentView, StyleProviderFunc } from "./nodes/DocumentView"; import { KeyValueBox } from "./nodes/KeyValueBox"; -import { PresBox } from "./nodes/trails/PresBox"; import { PropertiesButtons } from "./PropertiesButtons"; import { PropertiesDocContextSelector } from "./PropertiesDocContextSelector"; import "./PropertiesView.scss"; import { DefaultStyleProvider } from "./StyleProvider"; -import { LinkManager } from "../util/LinkManager"; const higflyout = require("@hig/flyout"); export const { anchorPoints } = higflyout; export const Flyout = higflyout.default; @@ -1218,7 +1217,7 @@ export class PropertiesView extends React.Component { onChange={e => this.handleLinkRelationshipChange(e.currentTarget.value)} className="text" type="text" - /> + />; } @computed @@ -1232,7 +1231,7 @@ export class PropertiesView extends React.Component { onChange={e => this.handleDescriptionChange(e.currentTarget.value)} className="text" type="text" - /> + />; } /** diff --git a/src/client/views/collections/CollectionSubView.tsx b/src/client/views/collections/CollectionSubView.tsx index fc1bcb8b9..34209ebc9 100644 --- a/src/client/views/collections/CollectionSubView.tsx +++ b/src/client/views/collections/CollectionSubView.tsx @@ -446,6 +446,7 @@ export function CollectionSubView(schemaCtor: (doc: Doc) => T, moreProps?: generatedDocuments.push(...await DocUtils.uploadFilesToDocs(files, options)); } if (generatedDocuments.length) { + // Creating a dash document const isFreeformView = this.props.Document._viewType === CollectionViewType.Freeform; const set = !isFreeformView ? generatedDocuments : generatedDocuments.length > 1 ? generatedDocuments.map(d => { DocUtils.iconify(d); return d; }) : []; diff --git a/src/client/views/nodes/MapBox/MapBox.tsx b/src/client/views/nodes/MapBox/MapBox.tsx index e80ad8acd..a506a5fcd 100644 --- a/src/client/views/nodes/MapBox/MapBox.tsx +++ b/src/client/views/nodes/MapBox/MapBox.tsx @@ -271,10 +271,10 @@ export class MapBox extends ViewBoxAnnotatableComponent { - if (this.toggleAddMarker == true) { + if (this.toggleAddMarker === true) { this.placeMarker((e as any).latLng, map); } - }) + }); } @action @@ -328,7 +328,7 @@ 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); @@ -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 { 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/fields/Doc.ts b/src/fields/Doc.ts index 328385fda..8a5491b4b 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -1241,7 +1241,7 @@ export namespace Doc { case DocumentType.INK: return "pen-nib"; case DocumentType.PDF: return "file-pdf"; case DocumentType.LINK: return "link"; - case DocumentType.MAP: return "map-marker-alt" + case DocumentType.MAP: return "map-marker-alt"; default: return "question"; } } -- 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') 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') 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 8dda7826d738bd4a70c493c68d85486f5d28143a Mon Sep 17 00:00:00 2001 From: Geireann <60007097+geireann@users.noreply.github.com> Date: Tue, 15 Feb 2022 19:41:48 -0500 Subject: fixed breaking changes --- src/client/documents/Documents.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') 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"; -- cgit v1.2.3-70-g09d2 From d010c3875b4a6b113f4f2099f201abbf1b8d4eb0 Mon Sep 17 00:00:00 2001 From: Geireann <60007097+geireann@users.noreply.github.com> Date: Tue, 15 Feb 2022 19:51:51 -0500 Subject: added presbox --- src/client/views/PropertiesView.tsx | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index 25b1381fe..f53944805 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -32,6 +32,7 @@ import { PropertiesButtons } from "./PropertiesButtons"; import { PropertiesDocContextSelector } from "./PropertiesDocContextSelector"; import "./PropertiesView.scss"; import { DefaultStyleProvider } from "./StyleProvider"; +import { PresBox } from "./nodes/trails"; const higflyout = require("@hig/flyout"); export const { anchorPoints } = higflyout; export const Flyout = higflyout.default; -- 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') 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