diff options
| author | bobzel <zzzman@gmail.com> | 2023-09-05 01:26:54 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-09-05 01:26:54 -0400 |
| commit | a63ab5802551887f62265d420b7c5e925b5cd7d6 (patch) | |
| tree | c5dad538bac4581ea2247141ea0ae0d05e83abab /src/client/views/UndoStack.tsx | |
| parent | 33335801ee469d12a3c3a749c2452740faab4590 (diff) | |
added ui for specifying wehther to play a/v when following links, and cleaned up ui/etc for pres trails. fixed a bunch of colors in pres properties. fixed a/v anchors to be configs when not adding them to the doc, otherwise labels.
Diffstat (limited to 'src/client/views/UndoStack.tsx')
| -rw-r--r-- | src/client/views/UndoStack.tsx | 69 |
1 files changed, 37 insertions, 32 deletions
diff --git a/src/client/views/UndoStack.tsx b/src/client/views/UndoStack.tsx index 47853b5e4..1afd5ad22 100644 --- a/src/client/views/UndoStack.tsx +++ b/src/client/views/UndoStack.tsx @@ -8,6 +8,7 @@ import { Doc } from '../../fields/Doc'; import { Popup, Type, isDark } from 'browndash-components'; import { Colors } from './global/globalEnums'; import { SettingsManager } from '../util/SettingsManager'; +import { Tooltip } from '@mui/material'; interface UndoStackProps { width?: number; @@ -22,39 +23,43 @@ export class UndoStack extends React.Component<UndoStackProps> { const background = UndoManager.batchCounter.get() ? 'yellow' : SettingsManager.userVariantColor; const color = UndoManager.batchCounter.get() ? 'black' : SettingsManager.userColor; return this.props.inline && UndoStack.HideInline ? null : ( - <div className="undoStack-outerContainer"> - <Popup - text="stack" - color={color} - background={background} - placement={`top-start`} - type={Type.TERT} - popup={ - <div - className="undoStack-commandsContainer" - ref={r => r?.scroll({ behavior: 'auto', top: r?.scrollHeight + 20 })} - style={{ - background, - color, - }}> - {UndoManager.undoStackNames.map((name, i) => ( - <div className="undoStack-resultContainer" key={i}> - <div className="undoStack-commandString">{StrCast(name).replace(/[^\.]*\./, '')}</div> - </div> - ))} - {Array.from(UndoManager.redoStackNames) - .reverse() - .map((name, i) => ( - <div className="undoStack-resultContainer" key={i}> - <div className="undoStack-commandString" style={{ fontWeight: 'bold', color: SettingsManager.userBackgroundColor }}> - {StrCast(name).replace(/[^\.]*\./, '')} + <Tooltip title={'undo stack (if it stays yellow, undo is broken - you should reload Dash)'}> + <div> + <div className="undoStack-outerContainer"> + <Popup + text="stack" + color={color} + background={background} + placement={`top-start`} + type={Type.TERT} + popup={ + <div + className="undoStack-commandsContainer" + ref={r => r?.scroll({ behavior: 'auto', top: r?.scrollHeight + 20 })} + style={{ + background, + color, + }}> + {UndoManager.undoStackNames.map((name, i) => ( + <div className="undoStack-resultContainer" key={i}> + <div className="undoStack-commandString">{StrCast(name).replace(/[^\.]*\./, '')}</div> </div> - </div> - ))} - </div> - } - /> - </div> + ))} + {Array.from(UndoManager.redoStackNames) + .reverse() + .map((name, i) => ( + <div className="undoStack-resultContainer" key={i}> + <div className="undoStack-commandString" style={{ fontWeight: 'bold', color: SettingsManager.userBackgroundColor }}> + {StrCast(name).replace(/[^\.]*\./, '')} + </div> + </div> + ))} + </div> + } + /> + </div> + </div> + </Tooltip> ); } } |
