From 372a37033358d9b9e5a2daf19ad590ca06107901 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Thu, 9 Jul 2020 14:01:43 -0500 Subject: added types display --- src/client/views/linking/LinkMenuItem.scss | 28 +++++++++++++++++++++------- src/client/views/linking/LinkMenuItem.tsx | 26 +++++++++++++++++++++++--- 2 files changed, 44 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/client/views/linking/LinkMenuItem.scss b/src/client/views/linking/LinkMenuItem.scss index 6a6ea7fa0..e444b832b 100644 --- a/src/client/views/linking/LinkMenuItem.scss +++ b/src/client/views/linking/LinkMenuItem.scss @@ -29,13 +29,27 @@ } - .linkMenu-destination-title { - text-decoration: none; - color: rgb(85, 120, 196); - font-size: 14px; - padding-bottom: 2px; - padding-right: 4px; - margin-right: 4px; + .linkMenu-title-wrapper { + + display: flex; + + .destination-icon { + float: left; + width: 12px; + height: 12px; + padding-right: 3px; + margin-right: 3px; + } + + .linkMenu-destination-title { + text-decoration: none; + color: rgb(85, 120, 196); + font-size: 14px; + padding-bottom: 2px; + padding-right: 4px; + margin-right: 4px; + float: right; + } } .linkMenu-description { diff --git a/src/client/views/linking/LinkMenuItem.tsx b/src/client/views/linking/LinkMenuItem.tsx index b7cd50b7e..d2363c7d3 100644 --- a/src/client/views/linking/LinkMenuItem.tsx +++ b/src/client/views/linking/LinkMenuItem.tsx @@ -181,9 +181,26 @@ export class LinkMenuItem extends React.Component { const eyeIcon = this.props.linkDoc.shown ? "eye-slash" : "eye"; + const destinationIcon = this.props.destinationDoc.type === "image" ? "image" : + this.props.destinationDoc.type === "comparison" ? "columns" : + this.props.destinationDoc.type === "rtf" ? "font" : + this.props.destinationDoc.type === "collection" ? "folder" : + this.props.destinationDoc.type === "web" ? "globe-asia" : + this.props.destinationDoc.type === "screenshot" ? "photo-video" : + this.props.destinationDoc.type === "webcam" ? "video" : + this.props.destinationDoc.type === "audio" ? "microphone" : + this.props.destinationDoc.type === "button" ? "lightning" : + this.props.destinationDoc.type === "presentation" ? "tv" : + this.props.destinationDoc.type === "query" ? "search" : + this.props.destinationDoc.type === "script" ? "terminal" : + this.props.destinationDoc.type === "import" ? "cloud-upload-alt" : + this.props.destinationDoc.type === "docholder" ? "expand" : "question"; + + return (
+
LinkDocPreview.LinkInfo = undefined)} onPointerEnter={action(e => this.props.linkDoc && (LinkDocPreview.LinkInfo = { @@ -197,9 +214,12 @@ export class LinkMenuItem extends React.Component {
{this.props.linkDoc.linkedText ?

Source: {StrCast(this.props.linkDoc.linkedText)}

: null} -

- {StrCast(this.props.destinationDoc.title)}

+
+ +

+ {StrCast(this.props.destinationDoc.title)}

+
{this.props.linkDoc.description !== "" ?

{StrCast(this.props.linkDoc.description)}

: null}
-- cgit v1.2.3-70-g09d2