diff options
author | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2023-07-21 20:43:13 -0400 |
---|---|---|
committer | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2023-07-21 20:43:13 -0400 |
commit | 9bd34e05c1a55adc1dbc32635442a184a49ee444 (patch) | |
tree | 6ea45834d45e36d590ac7f34fffdd86ec5479b93 /src/client/views/UndoStack.tsx | |
parent | d9d3668693084ce0f8f098df5cc4adf4897d11dc (diff) |
fixed additional colour issues
and
- updated redo shortcut
- fixed some things with the tree view (particularly the sorting)
Diffstat (limited to 'src/client/views/UndoStack.tsx')
-rw-r--r-- | src/client/views/UndoStack.tsx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/client/views/UndoStack.tsx b/src/client/views/UndoStack.tsx index aaca7110e..caf04cc1b 100644 --- a/src/client/views/UndoStack.tsx +++ b/src/client/views/UndoStack.tsx @@ -5,7 +5,8 @@ import { UndoManager } from '../util/UndoManager'; import './UndoStack.scss'; import { StrCast } from '../../fields/Types'; import { Doc } from '../../fields/Doc'; -import { Popup, Type } from 'browndash-components'; +import { Popup, Type, isDark } from 'browndash-components'; +import { Colors } from './global/globalEnums'; interface UndoStackProps { width?: number; @@ -17,18 +18,19 @@ export class UndoStack extends React.Component<UndoStackProps> { @observable static HideInline: boolean; @observable static Expand: boolean; render() { + const background = UndoManager.batchCounter.get() ? 'yellow' : StrCast(Doc.UserDoc().userBackgroundColor) return this.props.inline && UndoStack.HideInline ? null : ( <div className="undoStack-outerContainer"> <Popup text={'Undo/Redo Stack'} - color={StrCast(Doc.UserDoc().userVariantColor)} + color={UndoManager.batchCounter.get() ? 'yellow' : StrCast(Doc.UserDoc().userVariantColor)} placement={`top-start`} type={Type.TERT} popup={ <div className="undoStack-commandsContainer" ref={r => r?.scroll({ behavior: 'auto', top: r?.scrollHeight + 20 })} style={{ - background: UndoManager.batchCounter.get() ? 'yellow' : StrCast(Doc.UserDoc().userBackgroundColor), - color: StrCast(Doc.UserDoc().userColor) + background: background, + color: isDark(background) ? Colors.LIGHT_GRAY : Colors.DARK_GRAY }}> {UndoManager.undoStackNames.map((name, i) => ( <div className="undoStack-resultContainer" key={i}> |