Skip to content

Commit

Permalink
Video uploading: added minimum duration alert
Browse files Browse the repository at this point in the history
  • Loading branch information
dkildar committed May 9, 2024
1 parent 9a84975 commit f64b4f0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/common/components/video-gallery/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const VideoGallery = ({
<ModalHeader closeButton={true}>
<ModalTitle>{_t("video-gallery.title")}</ModalTitle>
</ModalHeader>
<ModalBody>
<ModalBody className="min-h-[400px]">
<div className="video-status-picker">
{!isEditing ? (
<DropDown
Expand Down
8 changes: 6 additions & 2 deletions src/common/components/video-upload-threespeak/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { Modal, ModalBody, ModalHeader, ModalTitle } from "@ui/modal";
import { recordVideoSvg } from "../../img/svg";
import { VideoUploadRecorder } from "./video-upload-recorder";
import useMountedState from "react-use/lib/useMountedState";
import { Alert } from "@ui/alert";

const DEFAULT_THUMBNAIL = require("./assets/thumbnail-play.jpg");

Expand Down Expand Up @@ -120,7 +121,10 @@ export const VideoUpload = (props: Props & React.HTMLAttributes<HTMLDivElement>)
const uploadVideoModal = (
<div className="dialog-content ">
<div className="three-speak-video-uploading position-relative">
<p className="font-weight-bold">Video source</p>
<Alert appearance="primary" className="mb-4">
{_t("video-upload.min-duration-alert")}
</Alert>
<p className="font-weight-bold mb-2">{_t("video-upload.source")}</p>
{showRecorder ? (
<VideoUploadRecorder
setVideoUrl={setVideoUrl}
Expand Down Expand Up @@ -151,7 +155,7 @@ export const VideoUpload = (props: Props & React.HTMLAttributes<HTMLDivElement>)
/>
</div>
)}
<p className="font-weight-bold mt-5">Thumbnail</p>
<p className="font-weight-bold mt-5">{_t("video-upload.thumbnail")}</p>
<VideoUploadItem
label={_t("video-upload.choose-thumbnail")}
onFileChange={handleThumbnailChange}
Expand Down
5 changes: 4 additions & 1 deletion src/common/i18n/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,10 @@
"confirm-and-upload": "Confirm and upload to 3Speak",
"uploading": "Uploading..{{n}}/{{total}}",
"uploaded": "Uploaded!",
"reset": "Reset"
"reset": "Reset",
"source": "Video source",
"thumbnail": "Thumbnail",
"min-duration-alert": "Video with less than 15 seconds duration will be ignored by 3Speak."
},
"video-gallery": {
"all": "All",
Expand Down

0 comments on commit f64b4f0

Please sign in to comment.