feat(ui): add image viewer overlay

- Works on txt2img, canvas and workflows tabs, img2img has its own side-by-side view
- In workflow editor, the is closeable only if you are in edit mode, else it's always there
- Press `i` to open
- Press `esc` to close
- Selecting an image or changing image selection opens the viewer
- When generating, if auto-switch to new image is enabled, the viewer opens when an image comes in

To support this change, I organized and restructured some tab stuff.
This commit is contained in:
psychedelicious
2024-05-02 22:29:00 +10:00
committed by Kent Keirsey
parent 209ddc2037
commit c9886796f6
18 changed files with 164 additions and 63 deletions

View File

@ -140,6 +140,16 @@ export const useHotkeyData = (): HotkeyGroup[] => {
desc: t('hotkeys.nextImage.desc'),
hotkeys: [['Arrow Right']],
},
{
title: t('hotkeys.openImageViewer.title'),
desc: t('hotkeys.openImageViewer.desc'),
hotkeys: [['I']],
},
{
title: t('hotkeys.backToEditor.title'),
desc: t('hotkeys.backToEditor.desc'),
hotkeys: [['Esc']],
},
],
}),
[t]