diff options
author | srichman333 <sarah_n_richman@brown.edu> | 2023-08-24 14:59:36 -0400 |
---|---|---|
committer | srichman333 <sarah_n_richman@brown.edu> | 2023-08-24 14:59:36 -0400 |
commit | 87f2cb52f59f3441ad3d46adc135492ae9924b89 (patch) | |
tree | 66a56e06bd48685d04ce2842a906d9c7aea78752 /src/fields/Doc.ts | |
parent | bd69df995a69a72858c7a0aae6a728f54f9a5bb8 (diff) |
context menu updates
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r-- | src/fields/Doc.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index ceacb8a08..92d1aef83 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -1577,12 +1577,13 @@ export namespace Doc { // prettier-ignore export function toIcon(doc?: Doc, isOpen?: boolean) { + console.log(doc!.title, doc!.type) switch (isOpen !== undefined ? DocumentType.COL: StrCast(doc?.type)) { case DocumentType.IMG: return 'image'; case DocumentType.COMPARISON: return 'columns'; case DocumentType.RTF: return 'sticky-note'; case DocumentType.COL: - const folder: IconProp = isOpen === true ? 'folder-open' : isOpen === false ? 'folder' : 'question'; + const folder: IconProp = isOpen === true ? 'folder-open' : isOpen === false ? 'folder' : doc!.title=='Untitled Collection'? 'object-group': 'chalkboard'; const chevron: IconProp = isOpen === true ? 'chevron-down' : isOpen === false ? 'chevron-right' : 'question'; return !doc?.isFolder ? folder : chevron; case DocumentType.WEB: return 'globe-asia'; @@ -1598,6 +1599,10 @@ export namespace Doc { case DocumentType.PDF: return 'file-pdf'; case DocumentType.LINK: return 'link'; case DocumentType.MAP: return 'map-marker-alt'; + case DocumentType.DATAVIZ: return 'chart-bar'; + case DocumentType.EQUATION: return 'calculator'; + case DocumentType.SIMULATION: return 'rocket'; + case DocumentType.CONFIG: return 'question-circle'; default: return 'question'; } } |