mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): fix badges for image settings canvas
This commit is contained in:
parent
cecee33bc0
commit
271456b745
@ -24,13 +24,34 @@ import { ImageSizeLinear } from './ImageSizeLinear';
|
|||||||
|
|
||||||
const selector = createMemoizedSelector(
|
const selector = createMemoizedSelector(
|
||||||
[stateSelector, activeTabNameSelector],
|
[stateSelector, activeTabNameSelector],
|
||||||
({ generation, hrf }, activeTabName) => {
|
({ generation, canvas, hrf }, activeTabName) => {
|
||||||
const { aspectRatio, width, height, shouldRandomizeSeed } = generation;
|
const { shouldRandomizeSeed } = generation;
|
||||||
const { hrfEnabled } = hrf;
|
const { hrfEnabled } = hrf;
|
||||||
const badges = [`${width}×${height}`, aspectRatio.id];
|
const badges: string[] = [];
|
||||||
|
|
||||||
|
if (activeTabName === 'unifiedCanvas') {
|
||||||
|
const {
|
||||||
|
aspectRatio,
|
||||||
|
boundingBoxDimensions: { width, height },
|
||||||
|
} = canvas;
|
||||||
|
badges.push(`${width}×${height}`);
|
||||||
|
badges.push(aspectRatio.id);
|
||||||
|
if (aspectRatio.isLocked) {
|
||||||
|
badges.push('locked');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const { aspectRatio, width, height } = generation;
|
||||||
|
badges.push(`${width}×${height}`);
|
||||||
|
badges.push(aspectRatio.id);
|
||||||
|
if (aspectRatio.isLocked) {
|
||||||
|
badges.push('locked');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!shouldRandomizeSeed) {
|
if (!shouldRandomizeSeed) {
|
||||||
badges.push('Manual Seed');
|
badges.push('Manual Seed');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hrfEnabled) {
|
if (hrfEnabled) {
|
||||||
badges.push('HiRes Fix');
|
badges.push('HiRes Fix');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user