diff options
| author | srichman333 <sarah_n_richman@brown.edu> | 2023-11-24 17:59:13 -0500 |
|---|---|---|
| committer | srichman333 <sarah_n_richman@brown.edu> | 2023-11-24 17:59:13 -0500 |
| commit | 0b38b0629496973d6c4571208710096deb91b7d7 (patch) | |
| tree | f797da626587c198535c0ea54aee9d467226262a /src/client/views/collections/CollectionMenu.tsx | |
| parent | 1b412d402c77a2aae82cf86b1f6a23f8a4f82caf (diff) | |
merge
Diffstat (limited to 'src/client/views/collections/CollectionMenu.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionMenu.tsx | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/src/client/views/collections/CollectionMenu.tsx b/src/client/views/collections/CollectionMenu.tsx index 52cf40635..cf154be8d 100644 --- a/src/client/views/collections/CollectionMenu.tsx +++ b/src/client/views/collections/CollectionMenu.tsx @@ -40,8 +40,6 @@ import { CollectionDockingView } from './CollectionDockingView'; import { CollectionFreeFormView } from './collectionFreeForm'; import { CollectionLinearView } from './collectionLinear'; import './CollectionMenu.scss'; -import { COLLECTION_BORDER_WIDTH } from './CollectionView'; -import { TabDocView } from './TabDocView'; interface CollectionMenuProps { panelHeight: () => number; @@ -557,25 +555,6 @@ export class CollectionViewBaseChrome extends React.Component<CollectionViewMenu return this.props.type === CollectionViewType.Docking || (typeof layoutField === 'string' && !layoutField?.includes('CollectionView')); } else return false; } - @computed - get pinButton() { - const targetDoc = this.selectedDoc; - const isPinned = targetDoc && Doc.isDocPinned(targetDoc); - return !targetDoc ? null : ( - <Tooltip key="pin" title={<div className="dash-tooltip">{Doc.isDocPinned(targetDoc) ? 'Unpin from presentation' : 'Pin to presentation'}</div>} placement="top"> - <button - className="antimodeMenu-button" - style={{ backgroundColor: isPinned ? '121212' : undefined, borderLeft: '1px solid gray' }} - onClick={e => - TabDocView.PinDoc(targetDoc, { - /* unpin: isPinned*/ - }) - }> - <FontAwesomeIcon className="colMenu-icon" size="lg" icon="map-pin" /> - </button> - </Tooltip> - ); - } @undoBatch @action @@ -653,7 +632,7 @@ export class CollectionViewBaseChrome extends React.Component<CollectionViewMenu className="antimodeMenu-button" onPointerDown={() => { const docs = DocListCast(targetDoc[Doc.LayoutFieldKey(targetDoc)]); - LightboxView.SetLightboxDoc(targetDoc, undefined, docs); + LightboxView.Instance.SetLightboxDoc(targetDoc, undefined, docs); }}> <FontAwesomeIcon className="colMenu-icon" icon="desktop" size="lg" /> </button> @@ -673,7 +652,7 @@ export class CollectionViewBaseChrome extends React.Component<CollectionViewMenu pointerEvents: this.props.docView.props.docViewPath().lastElement()?.rootDoc?._type_collection !== CollectionViewType.Freeform ? 'none' : undefined, color: this.props.docView.props.docViewPath().lastElement()?.rootDoc?._type_collection !== CollectionViewType.Freeform ? 'dimgrey' : undefined, }} - onClick={undoBatch(() => this.props.docView.props.CollectionFreeFormDocumentView?.().float())}> + onClick={undoBatch(() => this.props.docView.CollectionFreeFormDocumentView?.float())}> <FontAwesomeIcon icon={['fab', 'buffer']} size={'lg'} /> </button> </Tooltip> @@ -1261,7 +1240,7 @@ export class CollectionSchemaViewChrome extends React.Component<CollectionViewMe @undoBatch togglePreview = () => { const dividerWidth = 4; - const borderWidth = Number(COLLECTION_BORDER_WIDTH); + const borderWidth = 0; const panelWidth = this.props.docView.props.PanelWidth(); const previewWidth = NumCast(this.document.schema_previewWidth); const tableWidth = panelWidth - 2 * borderWidth - dividerWidth - previewWidth; |
