mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix: remaining strings
This commit is contained in:
parent
dc9a9c0160
commit
9d30a063e7
@ -3,8 +3,8 @@ import { useAppSelector } from 'app/store/storeHooks';
|
|||||||
import { IAINoContentFallback } from 'common/components/IAIImageFallback';
|
import { IAINoContentFallback } from 'common/components/IAIImageFallback';
|
||||||
import DataViewer from 'features/gallery/components/ImageMetadataViewer/DataViewer';
|
import DataViewer from 'features/gallery/components/ImageMetadataViewer/DataViewer';
|
||||||
import { selectNodesSlice } from 'features/nodes/store/nodesSlice';
|
import { selectNodesSlice } from 'features/nodes/store/nodesSlice';
|
||||||
import { useTranslation } from 'react-i18next';
|
|
||||||
import { memo } from 'react';
|
import { memo } from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
const selector = createMemoizedSelector(selectNodesSlice, (nodes) => {
|
const selector = createMemoizedSelector(selectNodesSlice, (nodes) => {
|
||||||
const lastSelectedNodeId = nodes.selectedNodes[nodes.selectedNodes.length - 1];
|
const lastSelectedNodeId = nodes.selectedNodes[nodes.selectedNodes.length - 1];
|
||||||
|
|
||||||
|
@ -8,14 +8,14 @@ import { selectOptimalDimension } from 'features/parameters/store/generationSlic
|
|||||||
import { memo, useCallback, useMemo } from 'react';
|
import { memo, useCallback, useMemo } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
|
|
||||||
const ParamScaleBeforeProcessing = () => {
|
const ParamScaleBeforeProcessing = () => {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const boundingBoxScaleMethod = useAppSelector((s) => s.canvas.boundingBoxScaleMethod);
|
const boundingBoxScaleMethod = useAppSelector((s) => s.canvas.boundingBoxScaleMethod);
|
||||||
const optimalDimension = useAppSelector(selectOptimalDimension);
|
const optimalDimension = useAppSelector(selectOptimalDimension);
|
||||||
|
|
||||||
const OPTIONS: ComboboxOption[] = useMemo(() => [
|
const OPTIONS: ComboboxOption[] = useMemo(
|
||||||
|
() => [
|
||||||
{ label: t('modelManager.none'), value: 'none' },
|
{ label: t('modelManager.none'), value: 'none' },
|
||||||
{ label: t('common.auto'), value: 'auto' },
|
{ label: t('common.auto'), value: 'auto' },
|
||||||
{ label: t('modelManager.manual'), value: 'manual' },
|
{ label: t('modelManager.manual'), value: 'manual' },
|
||||||
@ -33,7 +33,10 @@ const ParamScaleBeforeProcessing = () => {
|
|||||||
[dispatch, optimalDimension]
|
[dispatch, optimalDimension]
|
||||||
);
|
);
|
||||||
|
|
||||||
const value = useMemo(() => OPTIONS.find((o) => o.value === boundingBoxScaleMethod), [boundingBoxScaleMethod]);
|
const value = useMemo(
|
||||||
|
() => OPTIONS.find((o) => o.value === boundingBoxScaleMethod),
|
||||||
|
[boundingBoxScaleMethod, OPTIONS]
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FormControl>
|
<FormControl>
|
||||||
|
@ -42,7 +42,6 @@ const zDirection = z.enum(['ASC', 'DESC']);
|
|||||||
type Direction = z.infer<typeof zDirection>;
|
type Direction = z.infer<typeof zDirection>;
|
||||||
const isDirection = (v: unknown): v is Direction => zDirection.safeParse(v).success;
|
const isDirection = (v: unknown): v is Direction => zDirection.safeParse(v).success;
|
||||||
|
|
||||||
|
|
||||||
const WorkflowLibraryList = () => {
|
const WorkflowLibraryList = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const workflowCategories = useStore($workflowCategories);
|
const workflowCategories = useStore($workflowCategories);
|
||||||
@ -51,7 +50,8 @@ const WorkflowLibraryList = () => {
|
|||||||
const [query, setQuery] = useState('');
|
const [query, setQuery] = useState('');
|
||||||
const projectId = useStore($projectId);
|
const projectId = useStore($projectId);
|
||||||
|
|
||||||
const ORDER_BY_OPTIONS: ComboboxOption[] = useMemo(() => [
|
const ORDER_BY_OPTIONS: ComboboxOption[] = useMemo(
|
||||||
|
() => [
|
||||||
{ value: 'opened_at', label: t('workflows.opened') },
|
{ value: 'opened_at', label: t('workflows.opened') },
|
||||||
{ value: 'created_at', label: t('workflows.created') },
|
{ value: 'created_at', label: t('workflows.created') },
|
||||||
{ value: 'updated_at', label: t('workflows.updated') },
|
{ value: 'updated_at', label: t('workflows.updated') },
|
||||||
@ -60,7 +60,8 @@ const WorkflowLibraryList = () => {
|
|||||||
[t]
|
[t]
|
||||||
);
|
);
|
||||||
|
|
||||||
const DIRECTION_OPTIONS: ComboboxOption[] = useMemo(() => [
|
const DIRECTION_OPTIONS: ComboboxOption[] = useMemo(
|
||||||
|
() => [
|
||||||
{ value: 'ASC', label: t('workflows.ascending') },
|
{ value: 'ASC', label: t('workflows.ascending') },
|
||||||
{ value: 'DESC', label: t('workflows.descending') },
|
{ value: 'DESC', label: t('workflows.descending') },
|
||||||
],
|
],
|
||||||
@ -69,7 +70,7 @@ const WorkflowLibraryList = () => {
|
|||||||
|
|
||||||
const orderByOptions = useMemo(() => {
|
const orderByOptions = useMemo(() => {
|
||||||
return projectId ? ORDER_BY_OPTIONS.filter((option) => option.value !== 'opened_at') : ORDER_BY_OPTIONS;
|
return projectId ? ORDER_BY_OPTIONS.filter((option) => option.value !== 'opened_at') : ORDER_BY_OPTIONS;
|
||||||
}, [projectId]);
|
}, [projectId, ORDER_BY_OPTIONS]);
|
||||||
|
|
||||||
const [order_by, setOrderBy] = useState<WorkflowRecordOrderBy>(orderByOptions[0]?.value as WorkflowRecordOrderBy);
|
const [order_by, setOrderBy] = useState<WorkflowRecordOrderBy>(orderByOptions[0]?.value as WorkflowRecordOrderBy);
|
||||||
const [direction, setDirection] = useState<SQLiteDirection>('ASC');
|
const [direction, setDirection] = useState<SQLiteDirection>('ASC');
|
||||||
@ -120,7 +121,10 @@ const WorkflowLibraryList = () => {
|
|||||||
},
|
},
|
||||||
[direction]
|
[direction]
|
||||||
);
|
);
|
||||||
const valueDirection = useMemo(() => DIRECTION_OPTIONS.find((o) => o.value === direction), [direction]);
|
const valueDirection = useMemo(
|
||||||
|
() => DIRECTION_OPTIONS.find((o) => o.value === direction),
|
||||||
|
[direction, DIRECTION_OPTIONS]
|
||||||
|
);
|
||||||
|
|
||||||
const resetFilterText = useCallback(() => {
|
const resetFilterText = useCallback(() => {
|
||||||
setQuery('');
|
setQuery('');
|
||||||
|
Loading…
Reference in New Issue
Block a user