|
@@ -10,7 +10,7 @@ import {
|
|
actionChangeExportEmbedScene,
|
|
actionChangeExportEmbedScene,
|
|
actionChangeExportScale,
|
|
actionChangeExportScale,
|
|
actionChangeProjectName,
|
|
actionChangeProjectName,
|
|
- actionChangeExportBackgroundImage,
|
|
|
|
|
|
+ actionChangeFancyBackgroundImageUrl,
|
|
} from "../actions/actionExport";
|
|
} from "../actions/actionExport";
|
|
import { probablySupportsClipboardBlob } from "../clipboard";
|
|
import { probablySupportsClipboardBlob } from "../clipboard";
|
|
import {
|
|
import {
|
|
@@ -18,8 +18,8 @@ import {
|
|
EXPORT_IMAGE_TYPES,
|
|
EXPORT_IMAGE_TYPES,
|
|
isFirefox,
|
|
isFirefox,
|
|
EXPORT_SCALES,
|
|
EXPORT_SCALES,
|
|
- EXPORT_BACKGROUND_IMAGES,
|
|
|
|
- DEFAULT_EXPORT_BACKGROUND_IMAGE,
|
|
|
|
|
|
+ FANCY_BACKGROUND_IMAGES,
|
|
|
|
+ DEFAULT_FANCY_BACKGROUND_IMAGE,
|
|
} from "../constants";
|
|
} from "../constants";
|
|
|
|
|
|
import { canvasToBlob } from "../data/blob";
|
|
import { canvasToBlob } from "../data/blob";
|
|
@@ -65,8 +65,8 @@ type ImageExportModalProps = {
|
|
|
|
|
|
function isBackgroundImageKey(
|
|
function isBackgroundImageKey(
|
|
key: string,
|
|
key: string,
|
|
-): key is keyof typeof EXPORT_BACKGROUND_IMAGES {
|
|
|
|
- return key in EXPORT_BACKGROUND_IMAGES;
|
|
|
|
|
|
+): key is keyof typeof FANCY_BACKGROUND_IMAGES {
|
|
|
|
+ return key in FANCY_BACKGROUND_IMAGES;
|
|
}
|
|
}
|
|
|
|
|
|
const ImageExportModal = ({
|
|
const ImageExportModal = ({
|
|
@@ -86,8 +86,8 @@ const ImageExportModal = ({
|
|
appState.exportBackground,
|
|
appState.exportBackground,
|
|
);
|
|
);
|
|
const [exportBackgroundImage, setExportBackgroundImage] = useState<
|
|
const [exportBackgroundImage, setExportBackgroundImage] = useState<
|
|
- keyof typeof EXPORT_BACKGROUND_IMAGES
|
|
|
|
- >(DEFAULT_EXPORT_BACKGROUND_IMAGE);
|
|
|
|
|
|
+ keyof typeof FANCY_BACKGROUND_IMAGES
|
|
|
|
+ >(DEFAULT_FANCY_BACKGROUND_IMAGE);
|
|
|
|
|
|
const [exportDarkMode, setExportDarkMode] = useState(
|
|
const [exportDarkMode, setExportDarkMode] = useState(
|
|
appState.exportWithDarkMode,
|
|
appState.exportWithDarkMode,
|
|
@@ -199,7 +199,7 @@ const ImageExportModal = ({
|
|
>
|
|
>
|
|
{exportWithBackground && (
|
|
{exportWithBackground && (
|
|
<Select
|
|
<Select
|
|
- items={EXPORT_BACKGROUND_IMAGES}
|
|
|
|
|
|
+ items={FANCY_BACKGROUND_IMAGES}
|
|
ariaLabel={t("imageExportDialog.label.backgroundImage")}
|
|
ariaLabel={t("imageExportDialog.label.backgroundImage")}
|
|
placeholder={t("imageExportDialog.label.backgroundImage")}
|
|
placeholder={t("imageExportDialog.label.backgroundImage")}
|
|
value={exportBackgroundImage}
|
|
value={exportBackgroundImage}
|
|
@@ -207,9 +207,9 @@ const ImageExportModal = ({
|
|
if (isBackgroundImageKey(value)) {
|
|
if (isBackgroundImageKey(value)) {
|
|
setExportBackgroundImage(value);
|
|
setExportBackgroundImage(value);
|
|
actionManager.executeAction(
|
|
actionManager.executeAction(
|
|
- actionChangeExportBackgroundImage,
|
|
|
|
|
|
+ actionChangeFancyBackgroundImageUrl,
|
|
"ui",
|
|
"ui",
|
|
- EXPORT_BACKGROUND_IMAGES[value].path,
|
|
|
|
|
|
+ FANCY_BACKGROUND_IMAGES[value].path,
|
|
);
|
|
);
|
|
}
|
|
}
|
|
}}
|
|
}}
|