mirror of
https://github.com/zadam/trilium.git
synced 2026-05-07 10:15:33 +02:00
fix(markdown): align button order between layouts to avoid shifts
This commit is contained in:
@@ -48,8 +48,8 @@ export type FloatingButtonsList = ((context: FloatingButtonContext) => false | V
|
||||
|
||||
export const DESKTOP_FLOATING_BUTTONS: FloatingButtonsList = [
|
||||
RefreshBackendLogButton,
|
||||
SwitchSplitOrientationButton,
|
||||
ToggleReadOnlyButton,
|
||||
SwitchSplitOrientationButton,
|
||||
DisplayModeSwitcher,
|
||||
EditButton,
|
||||
ShowTocWidgetButton,
|
||||
|
||||
@@ -72,8 +72,8 @@ export default function NoteActionsCustom(props: NoteActionsCustomProps) {
|
||||
>
|
||||
<AddChildButton {...innerProps} />
|
||||
<RunActiveNoteButton {...innerProps } />
|
||||
<DisplayModeSwitcher {...innerProps} />
|
||||
<SwitchSplitOrientationButton {...innerProps} />
|
||||
<DisplayModeSwitcher {...innerProps} />
|
||||
<SaveToNoteButton {...innerProps} />
|
||||
<RefreshButton {...innerProps} />
|
||||
<CopyReferenceToClipboardButton {...innerProps} />
|
||||
@@ -232,17 +232,21 @@ function DisplayModeSwitcher({ note, isDefaultViewMode }: NoteActionsCustomInner
|
||||
}
|
||||
|
||||
return (
|
||||
<ButtonGroup size="sm">
|
||||
{buttons.map(({ value, icon, text }) => (
|
||||
<NoteAction
|
||||
key={value}
|
||||
icon={icon}
|
||||
text={text}
|
||||
active={mode === value}
|
||||
onClick={() => setDisplayMode(value)}
|
||||
/>
|
||||
))}
|
||||
</ButtonGroup>
|
||||
<>
|
||||
<div className="note-actions-custom-spacer" />
|
||||
<ButtonGroup size="sm">
|
||||
{buttons.map(({ value, icon, text }) => (
|
||||
<NoteAction
|
||||
key={value}
|
||||
icon={icon}
|
||||
text={text}
|
||||
active={mode === value}
|
||||
onClick={() => setDisplayMode(value)}
|
||||
/>
|
||||
))}
|
||||
</ButtonGroup>
|
||||
<div className="note-actions-custom-spacer" />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user