-
+
-
+
-
+
-
+
- {t("Keywords to include in the text", { defaultValue: "Keywords To Include In The Text" })}
+ {t("Keywords to include in the text", {
+ defaultValue: "Keywords To Include In The Text",
+ })}
+
+
+ {t("title-key", { defaultValue: "Title Key" })}
-
{t("title-key", { defaultValue: "Title Key" })}
-
+
-
+
-
+
-
+
>
)}
-
-
- {/*
*/}
-
-
-
-
-
-
- {/* Drop files here or click to upload. */}
- {t("drag-file", { defaultValue: "Drag File" })}
-
-
- {t("upload-file-video-max", { defaultValue: "Upload File Video Max" })}
+
(
+
+
+
+
+
+
+
+ {t("drag-file", { defaultValue: "Drag File" })}
+
+
+ {t("upload-file-video-max", {
+ defaultValue: "Upload File Video Max",
+ })}
+
-
- {files.length ? (
-
- {fileList}
-
- {/*
-
-
-
-
-
*/}
-
-
-
- ) : null}
-
-
-
- {/* Submit Button */}
+ {files.length > 0 && (
+
+ {files.map((file, idx) => (
+
+ {file.name}
+
+ {(file.size / (1024 * 1024)).toFixed(2)} MB
+
+
+ ))}
+
+
+
+
+ )}
+
+ {errors.files && (
+
+ {errors.files.message}
+
+ )}
+
+ )}
+ />
+
+
-
+
@@ -1283,36 +1365,67 @@ export default function FormVideo() {
)}
-
+
-
(
+ <>
+
{
+ if (e.key === "Enter" && e.currentTarget.value.trim()) {
+ e.preventDefault();
+ field.onChange([
+ ...field.value,
+ e.currentTarget.value.trim(),
+ ]);
+ e.currentTarget.value = "";
+ }
+ }}
+ />
+
+
+ {field.value.map((tag: string, index: number) => (
+
+ {tag}{" "}
+
+
+ ))}
+
+ >
+ )}
/>
-
- {tags.map((tag, index) => (
-
- {tag}{" "}
-
-
- ))}
-
+
+ {/* Tampilkan error */}
+ {errors.tags?.message && (
+
{errors.tags.message}
+ )}
-
+
{options.map((option) => (
diff --git a/components/wavesurfer.tsx b/components/wavesurfer.tsx
new file mode 100644
index 00000000..57593093
--- /dev/null
+++ b/components/wavesurfer.tsx
@@ -0,0 +1,45 @@
+// components/WavesurferPlayer.tsx
+import React, { forwardRef, useEffect, useImperativeHandle, useRef } from "react";
+import WaveSurfer from "wavesurfer.js";
+
+type Props = {
+ url: string;
+ height?: number;
+ waveColor?: string;
+};
+
+export type WavesurferPlayerHandle = {
+ play: () => void;
+ pause: () => void;
+ isPlaying: () => boolean;
+};
+
+const WavesurferPlayer = forwardRef
(({ url, height = 100, waveColor = "red" }, ref) => {
+ const containerRef = useRef(null);
+ const waveSurferRef = useRef(null);
+
+ useEffect(() => {
+ if (containerRef.current) {
+ waveSurferRef.current = WaveSurfer.create({
+ container: containerRef.current,
+ waveColor,
+ height,
+ });
+ waveSurferRef.current.load(url);
+ }
+
+ return () => {
+ waveSurferRef.current?.destroy();
+ };
+ }, [url, waveColor, height]);
+
+ useImperativeHandle(ref, () => ({
+ play: () => { waveSurferRef.current?.play(); },
+ pause: () => { waveSurferRef.current?.pause(); },
+ isPlaying: () => !!waveSurferRef.current?.isPlaying(),
+ }));
+
+ return ;
+});
+
+export default WavesurferPlayer;
diff --git a/messages/en.json b/messages/en.json
index aaeb6f0d..89386689 100644
--- a/messages/en.json
+++ b/messages/en.json
@@ -747,6 +747,9 @@
"action": "Actions"
},
"Form": {
+ "titleRequired": "Title required",
+ "creatorRequired": "Creator required",
+ "enterTitle": "Enter Title",
"no": "No",
"title": "Title",
"category-name": "Category Name",
@@ -813,7 +816,7 @@
"view-file": "View File",
"update": "Update",
"upload-file-video-max": " Upload files with mp4 or mov Maximum size 100mb.",
- "upload-file-text-max": " Upload files in .doc, .docx, .pdf, .ppt, or .pptx format. Maximum size 100mb.",
+ "upload-file-text-max": " Upload files in .doc, .docx, .pdf, .ppt, or .pptx format. Maximum size 20mb.",
"upload-file-audio-max": " Upload file in mp3 atau wav Maximum size 100mb",
"file-rewrite": "File Rewrite",
"file-placement": "File Placement",
@@ -849,6 +852,10 @@
"data-media": "please complete the data! ",
"title-media-online": "Online Media Name",
"url": "Url",
- "coverage-area": "Coverage Area"
+ "coverage-area": "Coverage Area",
+ "only": "Only .jpg, .jpeg, .png files are allowed",
+ "size": "File too large. Max 100MB",
+ "onlyVd": "Upload files with mp4 or mov Maximum size 100mb."
+
}
}
diff --git a/messages/in.json b/messages/in.json
index fcd934d8..abacab6b 100644
--- a/messages/in.json
+++ b/messages/in.json
@@ -748,6 +748,10 @@
"action": "Aksi"
},
"Form": {
+ "titleRequired": "Judul diperlukan",
+ "creatorRequired": "Kreator diperlukan",
+ "enterTitle": "Masukkan Judul",
+
"no": "Nomor",
"title": "Judul",
"category-name": "Nama Kategori",
@@ -789,7 +793,7 @@
"main-keyword": "Main Keyword",
"seo": "Seo",
"Keywords to include in the text": "Kata kunci untuk di sertakan dalam teks",
- "title-key": "JIka Anda tidak Memberikan kata kunci, kami akan secara otomatis membuat kata kunci yang relevan dari kata kunciutama untuk setiap bagian dan menggunakannya untuk membuat artikel. Untuk menambahkan kata kunci baru, ketik kata kunci",
+ "title-key": "JIka Anda tidak Memberikan kata kunci, kami akan secara otomatis membuat kata kunci yang relevan dari kata kunci utama untuk setiap bagian dan menggunakannya untuk membuat artikel. Untuk menambahkan kata kunci baru, ketik kata kunci",
"special-instructions": "Instruksi Khusus",
"description": "Deskripsi",
"select-file": "Pilih File",
@@ -814,7 +818,7 @@
"view-file": "Lihat file",
"update": "Edit",
"upload-file-video-max": " Upload file dengan mp4 atau mov Ukuran maksimal 100mb.",
- "upload-file-text-max": "Upload file dengan format .doc, .docx, .pdf, .ppt, atau .pptx Ukuran maksimal 100mb. ",
+ "upload-file-text-max": "Upload file dengan format .doc, .docx, .pdf, .ppt, atau .pptx Ukuran maksimal 20mb. ",
"upload-file-audio-max": " Upload file dengan mp3 atau wav maksimal ukuran 100mb",
"file-rewrite": "File hasil Rewrite",
"file-placement": "Penempatan file",
@@ -849,6 +853,9 @@
"data-media": "Silahkan Lengkapi Data!",
"title-media-online": "Nama Media Online",
"url": "Url",
- "coverage-area": "Cakupan Wilayah"
+ "coverage-area": "Cakupan Wilayah",
+ "only": "Hanya file .jpg, .jpeg, .png yang diizinkan",
+ "size": "File terlalu besar. Maksimal 100MB",
+ "onlyVd": "Upload file dengan mp4 atau mov Ukuran maksimal 100mb."
}
}