diff options
| author | bobzel <zzzman@gmail.com> | 2020-08-10 10:45:37 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2020-08-10 10:45:37 -0400 |
| commit | 7173a28dae301a7733bcc9b8111016c737c0f5f4 (patch) | |
| tree | da5765d1d53a0f2f44cf6d1fb8f6db0bb0eadff5 /src/client/views/linking/LinkEditor.tsx | |
| parent | 01ebdb0db657f4c9de7959d2810548993a26e675 (diff) | |
| parent | 03ae3477dac354eff9178dac701ee40e394434c9 (diff) | |
Merge branch 'master' into ink_edits
Diffstat (limited to 'src/client/views/linking/LinkEditor.tsx')
| -rw-r--r-- | src/client/views/linking/LinkEditor.tsx | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/client/views/linking/LinkEditor.tsx b/src/client/views/linking/LinkEditor.tsx index 660afd4b9..1d71fff04 100644 --- a/src/client/views/linking/LinkEditor.tsx +++ b/src/client/views/linking/LinkEditor.tsx @@ -287,7 +287,7 @@ export class LinkEditor extends React.Component<LinkEditorProps> { @observable openDropdown: boolean = false; @observable showInfo: boolean = false; @computed get infoIcon() { if (this.showInfo) { return "chevron-up"; } return "chevron-down"; } - @observable private buttonColor: string = "black"; + @observable private buttonColor: string = ""; //@observable description = this.props.linkDoc.description ? StrCast(this.props.linkDoc.description) : "DESCRIPTION"; @@ -303,7 +303,7 @@ export class LinkEditor extends React.Component<LinkEditorProps> { if (LinkManager.currentLink) { LinkManager.currentLink.description = value; this.buttonColor = "rgb(62, 133, 55)"; - setTimeout(action(() => this.buttonColor = "black"), 750); + setTimeout(action(() => this.buttonColor = ""), 750); return true; } } @@ -345,7 +345,7 @@ export class LinkEditor extends React.Component<LinkEditorProps> { ></input> </div> <div className="linkEditor-description-add-button" - style={{ backgroundColor: this.buttonColor }} + style={{ background: this.buttonColor }} onPointerDown={this.onDown}>Set</div> </div></div>; } @@ -355,11 +355,11 @@ export class LinkEditor extends React.Component<LinkEditorProps> { this.openDropdown = !this.openDropdown; } - @undoBatch @action - changeFollowBehavior = (follow: string) => { + @undoBatch + changeFollowBehavior = action((follow: string) => { this.openDropdown = false; Doc.GetProto(this.props.linkDoc).followLinkLocation = follow; - } + }) @computed get followingDropdown() { @@ -382,12 +382,18 @@ export class LinkEditor extends React.Component<LinkEditorProps> { </div> <div className="linkEditor-followingDropdown-option" onPointerDown={() => this.changeFollowBehavior("onRight")}> - Always open in right tab + Always open in new pane on right </div> <div className="linkEditor-followingDropdown-option" onPointerDown={() => this.changeFollowBehavior("inTab")}> Always open in new tab </div> + {this.props.linkDoc.linksToAnnotation ? + <div className="linkEditor-followingDropdown-option" + onPointerDown={() => this.changeFollowBehavior("openExternal")}> + Always open in external page + </div> + : null} </div> </div> </div>; |
