diff options
| author | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-12-03 22:39:41 +0530 | 
|---|---|---|
| committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-12-03 22:39:41 +0530 | 
| commit | 49491180cfbc03b72867970043b674dc1362cc81 (patch) | |
| tree | da3e4e4a47bc009159c2ec38bc50b849528e2107 /src/client/views/linking/LinkMenuItem.tsx | |
| parent | b68bfe6a3acc9df6dfdd170173bcca8d7595b12a (diff) | |
| parent | b3d1b60ac867a472ba791f57c8eb2d7afbb95767 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into acls_uv
Diffstat (limited to 'src/client/views/linking/LinkMenuItem.tsx')
| -rw-r--r-- | src/client/views/linking/LinkMenuItem.tsx | 22 | 
1 files changed, 2 insertions, 20 deletions
| diff --git a/src/client/views/linking/LinkMenuItem.tsx b/src/client/views/linking/LinkMenuItem.tsx index b9e240ba2..b31c1fcc1 100644 --- a/src/client/views/linking/LinkMenuItem.tsx +++ b/src/client/views/linking/LinkMenuItem.tsx @@ -18,6 +18,7 @@ import { DocumentView } from '../nodes/DocumentView';  import { LinkDocPreview } from '../nodes/LinkDocPreview';  import './LinkMenuItem.scss';  import React = require("react"); +import { IconProp } from '@fortawesome/fontawesome-svg-core';  interface LinkMenuItemProps { @@ -194,26 +195,7 @@ export class LinkMenuItem extends React.Component<LinkMenuItemProps> {      }      render() { -        let destinationIcon: FontAwesomeIconProps["icon"] = "question"; -        switch (this.props.destinationDoc.type) { -            case DocumentType.IMG: destinationIcon = "image"; break; -            case DocumentType.COMPARISON: destinationIcon = "columns"; break; -            case DocumentType.RTF: destinationIcon = "sticky-note"; break; -            case DocumentType.COL: destinationIcon = "folder"; break; -            case DocumentType.WEB: destinationIcon = "globe-asia"; break; -            case DocumentType.SCREENSHOT: destinationIcon = "photo-video"; break; -            case DocumentType.WEBCAM: destinationIcon = "video"; break; -            case DocumentType.AUDIO: destinationIcon = "microphone"; break; -            case DocumentType.BUTTON: destinationIcon = "bolt"; break; -            case DocumentType.PRES: destinationIcon = "tv"; break; -            case DocumentType.SCRIPTING: destinationIcon = "terminal"; break; -            case DocumentType.IMPORT: destinationIcon = "cloud-upload-alt"; break; -            case DocumentType.DOCHOLDER: destinationIcon = "expand"; break; -            case DocumentType.VID: destinationIcon = "video"; break; -            case DocumentType.INK: destinationIcon = "pen-nib"; break; -            case DocumentType.PDF: destinationIcon = "file"; break; -            default: destinationIcon = "question"; break; -        } +        const destinationIcon = Doc.toIcon(this.props.destinationDoc) as any as IconProp;          const title = StrCast(this.props.destinationDoc.title).length > 18 ?              StrCast(this.props.destinationDoc.title).substr(0, 14) + "..." : this.props.destinationDoc.title; | 
