mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): rename tab identifiers
- "txt2img" -> "generation" - "unifiedCanvas" -> "canvas" - "modelManager" -> "models" - "nodes" -> "workflows" - Add UI slice migration setting the active tab to "generation"
This commit is contained in:
committed by
Kent Keirsey
parent
7c1f1076b4
commit
0f7fdabe9b
@ -17,7 +17,7 @@ const accept: Accept = {
|
||||
const selectPostUploadAction = createMemoizedSelector(activeTabNameSelector, (activeTabName) => {
|
||||
let postUploadAction: PostUploadAction = { type: 'TOAST' };
|
||||
|
||||
if (activeTabName === 'unifiedCanvas') {
|
||||
if (activeTabName === 'canvas') {
|
||||
postUploadAction = { type: 'SET_CANVAS_INITIAL_IMAGE' };
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ export const useGlobalHotkeys = () => {
|
||||
useHotkeys(
|
||||
'1',
|
||||
() => {
|
||||
dispatch(setActiveTab('txt2img'));
|
||||
dispatch(setActiveTab('generation'));
|
||||
},
|
||||
[dispatch]
|
||||
);
|
||||
@ -75,7 +75,7 @@ export const useGlobalHotkeys = () => {
|
||||
useHotkeys(
|
||||
'2',
|
||||
() => {
|
||||
dispatch(setActiveTab('unifiedCanvas'));
|
||||
dispatch(setActiveTab('canvas'));
|
||||
},
|
||||
[dispatch]
|
||||
);
|
||||
@ -83,7 +83,7 @@ export const useGlobalHotkeys = () => {
|
||||
useHotkeys(
|
||||
'3',
|
||||
() => {
|
||||
dispatch(setActiveTab('nodes'));
|
||||
dispatch(setActiveTab('workflows'));
|
||||
},
|
||||
[dispatch]
|
||||
);
|
||||
@ -92,7 +92,7 @@ export const useGlobalHotkeys = () => {
|
||||
'4',
|
||||
() => {
|
||||
if (isModelManagerEnabled) {
|
||||
dispatch(setActiveTab('modelManager'));
|
||||
dispatch(setActiveTab('models'));
|
||||
}
|
||||
},
|
||||
[dispatch, isModelManagerEnabled]
|
||||
|
@ -40,7 +40,7 @@ const selector = createMemoizedSelector(
|
||||
reasons.push(i18n.t('parameters.invoke.systemDisconnected'));
|
||||
}
|
||||
|
||||
if (activeTabName === 'nodes') {
|
||||
if (activeTabName === 'workflows') {
|
||||
if (nodes.shouldValidateGraph) {
|
||||
if (!nodes.nodes.length) {
|
||||
reasons.push(i18n.t('parameters.invoke.noNodesInGraph'));
|
||||
@ -93,8 +93,8 @@ const selector = createMemoizedSelector(
|
||||
reasons.push(i18n.t('parameters.invoke.noModelSelected'));
|
||||
}
|
||||
|
||||
if (activeTabName === 'txt2img') {
|
||||
// Handling for Control Layers - only exists on txt2img tab now
|
||||
if (activeTabName === 'generation') {
|
||||
// Handling for generation tab
|
||||
controlLayers.present.layers
|
||||
.filter((l) => l.isEnabled)
|
||||
.flatMap((l) => {
|
||||
|
Reference in New Issue
Block a user