Skip to content

Commit

Permalink
feat(ui): tweak paste buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
psychedelicious committed Feb 6, 2025
1 parent 91ded4b commit e63bd26
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions invokeai/frontend/web/public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1819,11 +1819,11 @@
"newRegionalGuidance": "New $t(controlLayers.regionalGuidance)",
"pasteTo": "Paste To",
"pasteToAssets": "Assets",
"pasteToAssetsDesc": "Assets tab of Gallery",
"pasteToAssetsDesc": "Paste to Assets",
"pasteToBbox": "Bbox",
"pasteToBboxDesc": "New raster layer, aligned to the Bbox",
"pasteToBboxDesc": "New Layer (in Bbox)",
"pasteToCanvas": "Canvas",
"pasteToCanvasDesc": "New raster layer, aligned to the Canvas",
"pasteToCanvasDesc": "New Layer (in Canvas)",
"pastedTo": "Pasted to {{destination}}",
"transparency": "Transparency",
"enableTransparencyEffect": "Enable Transparency Effect",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { toast } from 'features/toast/toast';
import { atom } from 'nanostores';
import { memo, useCallback } from 'react';
import { useTranslation } from 'react-i18next';
import { PiBoundingBoxBold, PiImageBold } from 'react-icons/pi';
import { useUploadImageMutation } from 'services/api/endpoints/images';

const $imageFile = atom<File | null>(null);
Expand Down Expand Up @@ -125,14 +126,14 @@ export const CanvasPasteModal = memo(() => {
<ModalCloseButton />
<ModalBody display="flex" justifyContent="center">
<Flex flexDir="column" gap={4} w="min-content">
<Button size="lg" onClick={pasteToAssets} isDisabled={isLoading}>
{t('controlLayers.pasteToAssetsDesc')}
<Button size="lg" onClick={pasteToCanvas} isDisabled={isLoading} leftIcon={<PiImageBold />}>
{t('controlLayers.pasteToCanvasDesc')}
</Button>
<Button size="lg" onClick={pasteToBbox} isDisabled={isLoading}>
<Button size="lg" onClick={pasteToBbox} isDisabled={isLoading} leftIcon={<PiBoundingBoxBold />}>
{t('controlLayers.pasteToBboxDesc')}
</Button>
<Button size="lg" onClick={pasteToCanvas} isDisabled={isLoading}>
{t('controlLayers.pasteToCanvasDesc')}
<Button size="lg" onClick={pasteToAssets} isDisabled={isLoading} variant="ghost">
{t('controlLayers.pasteToAssetsDesc')}
</Button>
</Flex>
</ModalBody>
Expand Down

0 comments on commit e63bd26

Please sign in to comment.