mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-14 00:33:38 +09:00
small renames
This commit is contained in:
1 parent
0c643bacdc
commit
048c5ddb30
2 files changed
+30
-28
No files matched your search
@@ -16,9 +16,9 @@ export const useAssetsState = (baseAssets: Array<Asset>) => {
|
||||
const [assets, setAssets] = useState<Asset[]>(baseAssets);
|
||||
|
||||
useEffect(() => {
|
||||
if (imageChanges?.uploadAssets?.length) {
|
||||
if (imageChanges?.uploadedAssets?.length) {
|
||||
setAssets((currentAssets) => [
|
||||
...imageChanges.uploadAsset,
|
||||
...imageChanges.uploadedAssets,
|
||||
...currentAssets.filter((asset) => asset.status !== "uploading"),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -83,33 +83,35 @@ export const AssetManagerImage = ({
|
||||
...(isUploading ? { filter: "blur(1px)", opacity: 0.7 } : {}),
|
||||
}}
|
||||
></Box>
|
||||
<Tooltip
|
||||
css={{ maxWidth: "$10" }}
|
||||
open={isToolTipOpen}
|
||||
multiline
|
||||
content={
|
||||
<Flex direction="column" gap={1} align="center" justify="center">
|
||||
Are you sure you want to delete this asset?
|
||||
<Button variant="red" onClick={deleteAsset}>
|
||||
Delete
|
||||
</Button>
|
||||
</Flex>
|
||||
}
|
||||
>
|
||||
<Button
|
||||
variant="raw"
|
||||
onClick={() => setTolltipOpen(true)}
|
||||
css={{
|
||||
position: "absolute",
|
||||
top: "$1",
|
||||
right: "$1",
|
||||
cursor: "pointer",
|
||||
color: "$highContrast",
|
||||
}}
|
||||
{!isUploading && (
|
||||
<Tooltip
|
||||
css={{ maxWidth: "$10" }}
|
||||
open={isToolTipOpen}
|
||||
multiline
|
||||
content={
|
||||
<Flex direction="column" gap={1} align="center" justify="center">
|
||||
Are you sure you want to delete this asset?
|
||||
<Button variant="red" onClick={deleteAsset}>
|
||||
Delete
|
||||
</Button>
|
||||
</Flex>
|
||||
}
|
||||
>
|
||||
<Cross2Icon />
|
||||
</Button>
|
||||
</Tooltip>
|
||||
<Button
|
||||
variant="raw"
|
||||
onClick={() => setTolltipOpen(true)}
|
||||
css={{
|
||||
position: "absolute",
|
||||
top: "$1",
|
||||
right: "$1",
|
||||
cursor: "pointer",
|
||||
color: "$highContrast",
|
||||
}}
|
||||
>
|
||||
<Cross2Icon />
|
||||
</Button>
|
||||
</Tooltip>
|
||||
)}
|
||||
{isUploading && (
|
||||
<ProgressBar
|
||||
value={progressBarPercentage}
|
||||
|
||||
Reference in new issue
Block a user