From 88593faa4777b622ed5a3208f6462cf7b307b83a Mon Sep 17 00:00:00 2001 From: Lionel Han <47760119+IGoByJoe@users.noreply.github.com> Date: Tue, 26 May 2020 23:09:56 -0700 Subject: pulled from master --- src/client/util/CurrentUserUtils.ts | 4 ++++ src/client/views/nodes/FieldView.tsx | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src/client') diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index 496099557..377f908e9 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -444,6 +444,10 @@ export class CurrentUserUtils { }); } + static setupMobileMenu(userDoc: Doc) { + return CurrentUserUtils.setupWorkspaces(userDoc); + } + static setupMobileInkingDoc(userDoc: Doc) { return Docs.Create.FreeformDocument([], { title: "Mobile Inking", backgroundColor: "white" }); } diff --git a/src/client/views/nodes/FieldView.tsx b/src/client/views/nodes/FieldView.tsx index e9dc43bd8..0bb1401aa 100644 --- a/src/client/views/nodes/FieldView.tsx +++ b/src/client/views/nodes/FieldView.tsx @@ -91,9 +91,9 @@ export class FieldView extends React.Component { else if (field instanceof VideoField) { return ; } - else if (field instanceof AudioField) { - return ; - } else if (field instanceof DateField) { + // else if (field instanceof AudioField) { + // return ; + else if (field instanceof DateField) { return

{field.date.toLocaleString()}

; } else if (field instanceof Doc) { -- cgit v1.2.3-70-g09d2 From 662ab0537e6b7b3d15fd44b6e2695052025ed83b Mon Sep 17 00:00:00 2001 From: Lionel Han <47760119+IGoByJoe@users.noreply.github.com> Date: Sun, 31 May 2020 15:34:51 -0700 Subject: removed unecessary imports --- src/client/util/CurrentUserUtils.ts | 12 ++++++------ src/mobile/ImageUpload.tsx | 1 - src/mobile/MobileInterface.tsx | 26 +++++++++++++++++--------- 3 files changed, 23 insertions(+), 16 deletions(-) (limited to 'src/client') diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index 377f908e9..1cce81ce6 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -614,12 +614,12 @@ export class CurrentUserUtils { /// sets up the default list of buttons to be shown in the expanding button menu at the bottom of the Dash window static setupDockedButtons(doc: Doc) { - if (doc["dockedBtn-pen"] === undefined) { - doc["dockedBtn-pen"] = CurrentUserUtils.ficon({ - onClick: ScriptField.MakeScript("activatePen(this.activePen.inkPen = sameDocs(this.activePen.inkPen, this) ? undefined : this, this.inkWidth, this.backgroundColor)"), - author: "systemTemplates", title: "ink mode", icon: "pen-nib", ischecked: ComputedField.MakeFunction(`sameDocs(this.activePen.inkPen, this)`), activePen: doc - }); - } + // if (doc["dockedBtn-pen"] === undefined) { + doc["dockedBtn-pen"] = CurrentUserUtils.ficon({ + onClick: ScriptField.MakeScript("activatePen(this.activePen.inkPen = sameDocs(this.activePen.inkPen, this) ? undefined : this, this.inkWidth, this.backgroundColor)"), + author: "systemTemplates", title: "ink mode", icon: "pen-nib", ischecked: ComputedField.MakeFunction(`sameDocs(this.activePen.inkPen, this)`), activePen: doc + }); + // } if (doc["dockedBtn-undo"] === undefined) { doc["dockedBtn-undo"] = CurrentUserUtils.ficon({ onClick: ScriptField.MakeScript("undo()"), title: "undo button", icon: "undo-alt" }); } diff --git a/src/mobile/ImageUpload.tsx b/src/mobile/ImageUpload.tsx index 2552e2112..fb0e444b5 100644 --- a/src/mobile/ImageUpload.tsx +++ b/src/mobile/ImageUpload.tsx @@ -12,7 +12,6 @@ import { observer } from 'mobx-react'; import { observable } from 'mobx'; import { Utils } from '../Utils'; import { Networking } from '../client/Network'; -import { MobileDocumentUploadContent } from '../server/Message'; export interface ImageUploadProps { Document: Doc; diff --git a/src/mobile/MobileInterface.tsx b/src/mobile/MobileInterface.tsx index 9b28d066c..4c36fdb9b 100644 --- a/src/mobile/MobileInterface.tsx +++ b/src/mobile/MobileInterface.tsx @@ -7,7 +7,7 @@ import { observer } from 'mobx-react'; import * as ReactDOM from "react-dom"; import * as rp from 'request-promise'; import { CurrentUserUtils } from '../client/util/CurrentUserUtils'; -import { FieldValue, Cast, StrCast } from '../fields/Types'; +import { FieldValue, Cast, StrCast, BoolCast } from '../fields/Types'; import { Doc, DocListCast, Opt } from '../fields/Doc'; import { Docs } from '../client/documents/Documents'; import { CollectionView } from '../client/views/collections/CollectionView'; @@ -34,20 +34,21 @@ import RichTextMenu from '../client/views/nodes/formattedText/RichTextMenu'; import { MainView } from '../client/views/MainView'; import SettingsManager from '../client/util/SettingsManager'; import { Uploader } from "./ImageUpload"; -import { Upload } from '../server/SharedMediaTypes'; import { createTypePredicateNodeWithModifier } from 'typescript'; import { AudioBox } from '../client/views/nodes/AudioBox'; import { List } from '../fields/List'; +import { ScriptField, ComputedField } from '../fields/ScriptField'; library.add(faLongArrowAltLeft); library.add(faHome); @observer -export class MobileInterface extends React.Component { +export default class MobileInterface extends React.Component { @observable static Instance: MobileInterface; @computed private get userDoc() { return Doc.UserDoc(); } @computed private get mainContainer() { return this.userDoc ? FieldValue(Cast(this.userDoc.activeMobile, Doc)) : CurrentUserUtils.GuestMobile; } @computed private get activeContainer() { return this.userDoc ? FieldValue(Cast(this.userDoc.activeMobile, Doc)) : CurrentUserUtils.GuestMobile; } + private get darkScheme() { return BoolCast(Cast(this.userDoc?.activeWorkspace, Doc, null)?.darkScheme); } // @observable private currentView: "main" | "ink" | "upload" = "main"; @observable private mainDoc: any = CurrentUserUtils.setupMobileMenu(this.userDoc); @observable private renderView?: () => JSX.Element; @@ -301,6 +302,9 @@ export class MobileInterface extends React.Component {
SettingsManager.Instance.open()}> Settings
+
CurrentUserUtils.setupDockedButtons(this._activeDoc)}> + Ink +
@@ -333,6 +337,9 @@ export class MobileInterface extends React.Component {
{buttons}
+
CurrentUserUtils.setupDockedButtons(this.userDoc)}> + Ink +
Home
@@ -493,6 +500,7 @@ export class MobileInterface extends React.Component { e.stopPropagation(); } + render() { // const content = this.currentView === "main" ? this.mainContent : // this.currentView === "ink" ? this.inkContent : @@ -505,19 +513,19 @@ export class MobileInterface extends React.Component { */} {/* */} - {this.displayWorkspaces()} + + {this.displayWorkspaces()} + {this.renderDefaultContent()} + {/* */} {/* */} {/* */} -
- {this.renderDefaultContent()} -
{/* */} {/* */} - {/* - */} + + {/* */} {/* */} -- cgit v1.2.3-70-g09d2 From e3132b1f9adfe895a0f669993c4fd1f1ec36877e Mon Sep 17 00:00:00 2001 From: Lionel Han <47760119+IGoByJoe@users.noreply.github.com> Date: Mon, 1 Jun 2020 22:35:36 -0700 Subject: kinda functioning ink --- .../collectionFreeForm/CollectionFreeFormView.tsx | 2 +- src/mobile/MobileInterface.tsx | 46 ++++++++++------------ 2 files changed, 22 insertions(+), 26 deletions(-) (limited to 'src/client') diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index c753a703d..b54d0e266 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -599,7 +599,7 @@ export class CollectionFreeFormView extends CollectionSubView { // bcz: theres should be a better way of doing these than referencing these static instances directly MarqueeOptionsMenu.Instance?.fadeOut(true);// I think it makes sense for the marquee menu to go away when panned. -syip2 - PDFMenu.Instance.fadeOut(true); + // PDFMenu.Instance.fadeOut(true); (commented out for mobile) const [dx, dy] = this.getTransform().transformDirection(e.clientX - this._lastX, e.clientY - this._lastY); this.setPan((this.Document._panX || 0) - dx, (this.Document._panY || 0) - dy, undefined, true); diff --git a/src/mobile/MobileInterface.tsx b/src/mobile/MobileInterface.tsx index 4c2d20208..a09854ea2 100644 --- a/src/mobile/MobileInterface.tsx +++ b/src/mobile/MobileInterface.tsx @@ -81,6 +81,8 @@ export default class MobileInterface extends React.Component { } InkingControl.Instance.switchTool(InkTool.None) MobileInterface.Instance.drawingInk = false; + InkingControl.Instance.updateSelectedColor("rgb(0, 0, 0)"); + InkingControl.Instance.switchWidth("2"); } @action @@ -99,21 +101,10 @@ export default class MobileInterface extends React.Component { MobileInterface.Instance.drawingInk = true; this._ink = true; - DocServer.Mobile.dispatchOverlayTrigger({ - enableOverlay: true, - width: window.innerWidth, - height: window.innerHeight - }); } else { InkingControl.Instance.switchTool(InkTool.None) MobileInterface.Instance.drawingInk = false; this._ink = false; - - DocServer.Mobile.dispatchOverlayTrigger({ - enableOverlay: false, - width: window.innerWidth, - height: window.innerHeight - }); } this.toggleSidebar(); @@ -183,6 +174,7 @@ export default class MobileInterface extends React.Component { if (doc) { this._activeDoc = doc; } + this._ink = false; } returnHome = () => { @@ -282,18 +274,7 @@ export default class MobileInterface extends React.Component { renderDefaultContent = () => { const workspaces = Cast(this.userDoc.myWorkspaces, Doc) as Doc; let buttons = DocListCast(workspaces.data).map((doc: Doc, index: any) => { - return ( -
this.handleClick(doc)}>{doc.title} -
{doc.type}
- -
); - }); - - if (this._child) { - buttons = DocListCast(this._child.data).map((doc: Doc, index: any) => { + if (doc.type !== "ink") { return (
{doc.type}
); + } + }); + + if (this._child) { + buttons = DocListCast(this._child.data).map((doc: Doc, index: any) => { + if (doc.type !== "ink") { + return ( +
this.handleClick(doc)}>{doc.title} +
{doc.type}
+ +
); + } }); } @@ -340,7 +336,7 @@ export default class MobileInterface extends React.Component { Settings
this.onSwitchInking()}> - Ink + Ink On
@@ -378,7 +374,7 @@ export default class MobileInterface extends React.Component { {buttons}
this.onSwitchInking()}> - ink + ink on
Home -- cgit v1.2.3-70-g09d2 From feba793526a6cf29c1418ff9e824482f9081ffbf Mon Sep 17 00:00:00 2001 From: Lionel Han <47760119+IGoByJoe@users.noreply.github.com> Date: Wed, 3 Jun 2020 21:12:32 -0700 Subject: upload audio button --- src/client/views/nodes/AudioBox.tsx | 2 + src/client/views/nodes/FieldView.tsx | 1 + src/mobile/MobileInterface.tsx | 167 +++++++++++++++++++++++++++-------- 3 files changed, 132 insertions(+), 38 deletions(-) (limited to 'src/client') diff --git a/src/client/views/nodes/AudioBox.tsx b/src/client/views/nodes/AudioBox.tsx index 1a935d9b0..8909cb8bf 100644 --- a/src/client/views/nodes/AudioBox.tsx +++ b/src/client/views/nodes/AudioBox.tsx @@ -179,6 +179,8 @@ export class AudioBox extends ViewBoxBaseComponent { diff --git a/src/client/views/nodes/FieldView.tsx b/src/client/views/nodes/FieldView.tsx index 0bb1401aa..8b5302a72 100644 --- a/src/client/views/nodes/FieldView.tsx +++ b/src/client/views/nodes/FieldView.tsx @@ -93,6 +93,7 @@ export class FieldView extends React.Component { } // else if (field instanceof AudioField) { // return ; + //} else if (field instanceof DateField) { return

{field.date.toLocaleString()}

; } diff --git a/src/mobile/MobileInterface.tsx b/src/mobile/MobileInterface.tsx index a09854ea2..78bc021c9 100644 --- a/src/mobile/MobileInterface.tsx +++ b/src/mobile/MobileInterface.tsx @@ -52,6 +52,7 @@ export default class MobileInterface extends React.Component { // @observable private currentView: "main" | "ink" | "upload" = "main"; @observable private mainDoc: any = CurrentUserUtils.setupMobileMenu(this.userDoc); @observable private renderView?: () => JSX.Element; + @observable private audioState: any; public _activeDoc: Doc = this.mainDoc; @@ -153,10 +154,12 @@ export default class MobileInterface extends React.Component { // for updating ink button let ink = document.getElementById("ink") as HTMLElement; - if (this._ink) { - ink.textContent = "ink off"; - } else { - ink.textContent = "ink on"; + if (ink) { + if (this._ink) { + ink.textContent = "ink off"; + } else { + ink.textContent = "ink on"; + } } } @@ -187,35 +190,67 @@ export default class MobileInterface extends React.Component { displayWorkspaces = () => { if (this.mainContainer) { const backgroundColor = () => "white"; - return ( -
- window.screen.width} - PanelHeight={() => window.screen.height} - renderDepth={0} - focus={emptyFunction} - backgroundColor={backgroundColor} - parentActive={returnTrue} - whenActiveChanged={emptyFunction} - bringToFront={emptyFunction} - ContainingCollectionView={undefined} - ContainingCollectionDoc={undefined} - /> -
- ); + if (this._activeDoc.title === "mobile audio") { + return ( +
+ window.screen.width} + PanelHeight={() => window.screen.height} + renderDepth={0} + focus={emptyFunction} + backgroundColor={backgroundColor} + parentActive={returnTrue} + whenActiveChanged={emptyFunction} + bringToFront={emptyFunction} + ContainingCollectionView={undefined} + ContainingCollectionDoc={undefined} + /> +
+ ); + } else { + return ( +
+ window.screen.width} + PanelHeight={() => window.screen.height} + renderDepth={0} + focus={emptyFunction} + backgroundColor={backgroundColor} + parentActive={returnTrue} + whenActiveChanged={emptyFunction} + bringToFront={emptyFunction} + ContainingCollectionView={undefined} + ContainingCollectionDoc={undefined} + /> +
+ ); + } } } @@ -301,6 +336,45 @@ export default class MobileInterface extends React.Component { }); } + if (this._activeDoc.title === "mobile audio") { + return ( +
+
+ + + +
+
+
+ {this.createPathname()} +
+
+ + +
); + } + if (!this._child) { return (
@@ -387,9 +461,11 @@ export default class MobileInterface extends React.Component { recordAudio = async () => { // upload to server with known URL - this._parents.push(this._activeDoc); + if (this._activeDoc.title !== "mobile audio") { + this._parents.push(this._activeDoc); + } const audioDoc = Cast(Docs.Create.AudioDocument(nullAudio, { _width: 200, _height: 100, title: "mobile audio" }), Doc) as Doc; - console.log(audioDoc.data); + console.log(audioDoc); if (audioDoc) { console.log("audioClicked: " + audioDoc.title); this._activeDoc = audioDoc; @@ -397,8 +473,9 @@ export default class MobileInterface extends React.Component { this.toggleSidebar(); } const audioRightSidebar = Cast(Doc.UserDoc().rightSidebarCollection, Doc) as Doc; - if (audioDoc.data) { - console.log(audioRightSidebar.title); + this.audioState = await audioDoc.getProto; + if (this.audioState) { + console.log(this.audioState); const data = Cast(audioRightSidebar.data, listSpec(Doc)); if (data) { data.push(audioDoc); @@ -406,8 +483,22 @@ export default class MobileInterface extends React.Component { } } + uploadAudio = () => { + const audioRightSidebar = Cast(Doc.UserDoc().rightSidebarCollection, Doc) as Doc; + const audioDoc = this._activeDoc; + const data = Cast(audioRightSidebar.data, listSpec(Doc)); + console.log(audioDoc.proto); + if (data) { + data.push(audioDoc); + } + this.recordAudio(); + } + openDefaultPresentation = () => { - this._parents.push(this._activeDoc); + if (this._activeDoc.title !== "Presentation") { + this._parents.push(this._activeDoc); + } + const presentation = Cast(Doc.UserDoc().activePresentation, Doc) as Doc; if (presentation) { -- cgit v1.2.3-70-g09d2 From a9161a668c96750d8bb50647c043a979058ef451 Mon Sep 17 00:00:00 2001 From: Lionel Han <47760119+IGoByJoe@users.noreply.github.com> Date: Wed, 12 Aug 2020 15:50:36 -0700 Subject: fix timestamp bug and size bug --- src/client/views/nodes/AudioBox.scss | 1 + src/client/views/nodes/formattedText/FormattedTextBox.tsx | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/client') diff --git a/src/client/views/nodes/AudioBox.scss b/src/client/views/nodes/AudioBox.scss index c80e3af24..13fa4af37 100644 --- a/src/client/views/nodes/AudioBox.scss +++ b/src/client/views/nodes/AudioBox.scss @@ -17,6 +17,7 @@ display: flex; width: 100%; align-items: center; + height: 100%; } .audiobox-handle { diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx index 7d4bd5dd3..20d9a4fe5 100644 --- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx +++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx @@ -304,18 +304,19 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp // for inserting timestamps insertTime = () => { + let audioState; if (this._first) { - this._first = false; DocListCast(this.dataDoc.links).map((l, i) => { let la1 = l.anchor1 as Doc; let la2 = l.anchor2 as Doc; this._linkTime = NumCast(l.anchor2_timecode); + audioState = la2.audioState; if (Doc.AreProtosEqual(la2, this.dataDoc)) { la1 = l.anchor2 as Doc; la2 = l.anchor1 as Doc; this._linkTime = NumCast(l.anchor1_timecode); + audioState = la1.audioState; } - }); } this._currentTime = Date.now(); @@ -336,7 +337,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp } } } - if (time) { + if (time && audioState === "recording") { let value = ""; this._break = false; value = this.layoutDoc._timeStampOnEnter ? "[" + time + "] " : "\n" + "[" + time + "] "; -- cgit v1.2.3-70-g09d2 From 47e17452049569cac4271206bb7851cb697fd5bc Mon Sep 17 00:00:00 2001 From: Lionel Han <47760119+IGoByJoe@users.noreply.github.com> Date: Fri, 14 Aug 2020 15:56:18 -0700 Subject: bug fixes --- src/client/views/nodes/AudioBox.scss | 15 +++ src/client/views/nodes/AudioBox.tsx | 199 +++++++++++++++++------------------ 2 files changed, 114 insertions(+), 100 deletions(-) (limited to 'src/client') diff --git a/src/client/views/nodes/AudioBox.scss b/src/client/views/nodes/AudioBox.scss index 13fa4af37..f16d13a4e 100644 --- a/src/client/views/nodes/AudioBox.scss +++ b/src/client/views/nodes/AudioBox.scss @@ -18,6 +18,21 @@ width: 100%; align-items: center; height: 100%; + + .audiobox-dictation { + position: relative; + width: 30px; + height: 100%; + align-items: center; + display: inherit; + background: dimgray; + left: 0px; + } + + .audiobox-dictation:hover { + color: white; + cursor: pointer; + } } .audiobox-handle { diff --git a/src/client/views/nodes/AudioBox.tsx b/src/client/views/nodes/AudioBox.tsx index 900963eb0..5c8cb5e35 100644 --- a/src/client/views/nodes/AudioBox.tsx +++ b/src/client/views/nodes/AudioBox.tsx @@ -530,113 +530,112 @@ export class AudioBox extends ViewBoxAnnotatableComponent; }; - return
-
- {!this.path ? -
-
- -
- {this.audioState === "recording" ? -
e.stopPropagation()}> -
- -
-
- -
-
{formatTime(Math.round(NumCast(this.layoutDoc.currentTimecode)))}
+ return
+ {!this.path ? +
+
+ +
+ {this.audioState === "recording" || this.audioState === "paused" ? +
e.stopPropagation()}> +
+ +
+
+
- : -
+ : + } -
: -
-
-
-
-
{ e.stopPropagation(); e.preventDefault(); }} - onPointerDown={e => { - if (e.button === 0 && !e.ctrlKey) { - const rect = (e.target as any).getBoundingClientRect(); - - if (e.target !== this._audioRef.current) { - const wasPaused = this.audioState === "paused"; - this._ele!.currentTime = this.layoutDoc.currentTimecode = (e.clientX - rect.x) / rect.width * this.audioDuration; - wasPaused && this.pause(); - } - - this.onPointerDownTimeline(e); - } - }}> -
- {this.waveform} -
- {DocListCast(this.dataDoc[this.annotationKey]).map((m, i) => - (!m.isLabel) ? - (this.layoutDoc.hideMarkers) ? (null) : -
{ this.playFrom(NumCast(m.audioStart), NumCast(m.audioEnd)); e.stopPropagation(); }} > -
this.onPointerDown(e, m, true)}>
- {markerDoc(m, this.rangeScript)} -
this.onPointerDown(e, m, false)}>
-
- : - (this.layoutDoc.hideLabels) ? (null) : -
- {markerDoc(m, this.labelScript)} -
- )} - {DocListCast(this.dataDoc.links).map((l, i) => { - const { la1, la2, linkTime } = this.getLinkData(l); - let startTime = linkTime; - if (la2.audioStart && !la2.audioEnd) { - startTime = NumCast(la2.audioStart); +
: +
+
+
+
+
{ e.stopPropagation(); e.preventDefault(); }} + onPointerDown={e => { + if (e.button === 0 && !e.ctrlKey) { + const rect = (e.target as any).getBoundingClientRect(); + + if (e.target !== this._audioRef.current) { + const wasPaused = this.audioState === "paused"; + this._ele!.currentTime = this.layoutDoc.currentTimecode = (e.clientX - rect.x) / rect.width * this.audioDuration; + wasPaused && this.pause(); } - return !linkTime ? (null) : -
e.stopPropagation()}> - -
Doc.linkFollowHighlight(la1)} - onPointerDown={e => { if (e.button === 0 && !e.ctrlKey) { this.playFrom(startTime); e.stopPropagation(); e.preventDefault(); } }} /> -
; - })} - {this._visible ? this.selectionContainer : null} - -
{ e.stopPropagation(); e.preventDefault(); }} style={{ left: `${NumCast(this.layoutDoc.currentTimecode) / this.audioDuration * 100}%`, pointerEvents: "none" }} /> - {this.audio} -
-
- {formatTime(Math.round(NumCast(this.layoutDoc.currentTimecode)))} -
-
- {formatTime(Math.round(this.audioDuration))} + this.onPointerDownTimeline(e); + } + }}> +
+ {this.waveform}
+ {DocListCast(this.dataDoc[this.annotationKey]).map((m, i) => + (!m.isLabel) ? + (this.layoutDoc.hideMarkers) ? (null) : +
{ this.playFrom(NumCast(m.audioStart), NumCast(m.audioEnd)); e.stopPropagation(); }} > +
this.onPointerDown(e, m, true)}>
+ {markerDoc(m, this.rangeScript)} +
this.onPointerDown(e, m, false)}>
+
+ : + (this.layoutDoc.hideLabels) ? (null) : +
+ {markerDoc(m, this.labelScript)} +
+ )} + {DocListCast(this.dataDoc.links).map((l, i) => { + const { la1, la2, linkTime } = this.getLinkData(l); + let startTime = linkTime; + if (la2.audioStart && !la2.audioEnd) { + startTime = NumCast(la2.audioStart); + } + + return !linkTime ? (null) : +
e.stopPropagation()}> + +
Doc.linkFollowHighlight(la1)} + onPointerDown={e => { if (e.button === 0 && !e.ctrlKey) { this.playFrom(startTime); e.stopPropagation(); e.preventDefault(); } }} /> +
; + })} + {this._visible ? this.selectionContainer : null} + +
{ e.stopPropagation(); e.preventDefault(); }} style={{ left: `${NumCast(this.layoutDoc.currentTimecode) / this.audioDuration * 100}%`, pointerEvents: "none" }} /> + {this.audio} +
+
+ {formatTime(Math.round(NumCast(this.layoutDoc.currentTimecode)))} +
+
+ {formatTime(Math.round(this.audioDuration))}
- }
+
+ }
; } } -- cgit v1.2.3-70-g09d2 From 0ba92fa5742040959a50770a8bc3ec767a44ab66 Mon Sep 17 00:00:00 2001 From: Lionel Han <47760119+IGoByJoe@users.noreply.github.com> Date: Fri, 14 Aug 2020 16:04:09 -0700 Subject: quick fix for mobile --- src/client/util/CurrentUserUtils.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/client') diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index 153118083..02fcac15a 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -684,6 +684,10 @@ export class CurrentUserUtils { }); } + static setupLibrary(userDoc: Doc) { + return CurrentUserUtils.setupWorkspaces(userDoc); + } + // setup the Creator button which will display the creator panel. This panel will include the drag creators and the color picker. // when clicked, this panel will be displayed in the target container (ie, sidebarContainer) static async setupToolsBtnPanel(doc: Doc) { -- cgit v1.2.3-70-g09d2 From 324f65bcfab0f239ba2cc9a8becd50a8a2572e7f Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 14 Aug 2020 20:13:39 -0400 Subject: tagged mobile docs as system --- src/client/util/CurrentUserUtils.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/client') diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index 153118083..3702a2c36 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -668,19 +668,19 @@ export class CurrentUserUtils { } static setupMobileInkingDoc(userDoc: Doc) { - return Docs.Create.FreeformDocument([], { title: "Mobile Inking", backgroundColor: "white" }); + return Docs.Create.FreeformDocument([], { title: "Mobile Inking", backgroundColor: "white", system: true }); } static setupMobileUploadDoc(userDoc: Doc) { // const addButton = Docs.Create.FontIconDocument({ onDragStart: ScriptField.MakeScript('addWebToMobileUpload()'), title: "Add Web Doc to Upload Collection", icon: "plus", backgroundColor: "black" }) const webDoc = Docs.Create.WebDocument("https://www.britannica.com/biography/Miles-Davis", { - title: "Upload Images From the Web", _chromeStatus: "enabled", lockedPosition: true + title: "Upload Images From the Web", _chromeStatus: "enabled", lockedPosition: true, system: true }); const uploadDoc = Docs.Create.StackingDocument([], { - title: "Mobile Upload Collection", backgroundColor: "white", lockedPosition: true + title: "Mobile Upload Collection", backgroundColor: "white", lockedPosition: true, system: true }); return Docs.Create.StackingDocument([webDoc, uploadDoc], { - _width: screen.width, lockedPosition: true, _chromeStatus: "disabled", title: "Upload", _autoHeight: true, _yMargin: 80, backgroundColor: "lightgray" + _width: screen.width, lockedPosition: true, _chromeStatus: "disabled", title: "Upload", _autoHeight: true, _yMargin: 80, backgroundColor: "lightgray", system: true }); } -- cgit v1.2.3-70-g09d2