Skip to content

Commit

Permalink
fix(web): remove video URL format verification (#707)
Browse files Browse the repository at this point in the history
Co-authored-by: nina992 <[email protected]>
  • Loading branch information
nina992 and nina992 authored Sep 26, 2023
1 parent fcf04f2 commit a742922
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 18 deletions.
13 changes: 1 addition & 12 deletions web/src/beta/components/fields/URLField/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ import Button from "@reearth/beta/components/Button";
import Property from "@reearth/beta/components/fields";
import TextInput from "@reearth/beta/components/fields/common/TextInput";
import useHooks from "@reearth/beta/features/Assets/AssetsQueriesHook/hooks";
import {
FILE_FORMATS,
IMAGE_FORMATS,
VIDEO_FORMATS,
} from "@reearth/beta/features/Assets/constants";
import { FILE_FORMATS, IMAGE_FORMATS } from "@reearth/beta/features/Assets/constants";
import { Asset } from "@reearth/beta/features/Assets/types";
import { useManageAssets } from "@reearth/beta/features/Assets/useManageAssets/hooks";
import ChooseAssetModal from "@reearth/beta/features/Modals/ChooseAssetModal";
Expand Down Expand Up @@ -47,13 +43,6 @@ const URLField: React.FC<Props> = ({ name, description, value, fileType, assetTy
});
setCurrentValue(undefined);
return;
} else if (fileType === "URL" && !checkIfFileType(inputValue, VIDEO_FORMATS)) {
setNotification({
type: "error",
text: t("wrong Video URL Format"),
});
setCurrentValue(undefined);
return;
}

setCurrentValue(inputValue);
Expand Down
2 changes: 0 additions & 2 deletions web/src/beta/features/Assets/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export const FILE_FORMATS = ".kml,.czml,.topojson,.geojson,.json,.gltf,.glb";

export const IMAGE_FORMATS = ".jpg,.jpeg,.png,.gif,.svg,.tiff,.webp";

export const VIDEO_FORMATS = ".mp4";
2 changes: 0 additions & 2 deletions web/src/services/i18n/translations/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -527,5 +527,3 @@ Size Large to Small: Size Large to Small
Please select an asset before clicking Select.: Please select an asset before clicking Select.
Select Image: Select Image
Wrong file format: Wrong file format
wrong Video URL Format: wrong Video URL Format

3 changes: 1 addition & 2 deletions web/src/services/i18n/translations/ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -487,5 +487,4 @@ Size Small to Large: Size Small to Large
Size Large to Small: Size Large to Small
Please select an asset before clicking Select.: Please select an asset before clicking Select.
Select Image: イメージ選択
Wrong file format: Wrong file format
wrong Video URL Format: wrong Video URL Format
Wrong file format: Wrong file format

0 comments on commit a742922

Please sign in to comment.