+
+
+
+
{melody.status === "draft" ? (
@@ -216,36 +238,15 @@ export default function MelodyDetail() {
onClick={() => setShowUnpublish(true)}
disabled={actionLoading}
className="px-4 py-2 text-sm rounded-md transition-colors disabled:opacity-50"
- style={{ backgroundColor: "#ea580c", color: "#fff" }}
+ style={{ backgroundColor: "var(--danger-btn)", color: "var(--text-white)" }}
>
Unpublish
)}
-
-
-
diff --git a/frontend/src/melodies/MelodyForm.jsx b/frontend/src/melodies/MelodyForm.jsx
index e7ae59e..c992407 100644
--- a/frontend/src/melodies/MelodyForm.jsx
+++ b/frontend/src/melodies/MelodyForm.jsx
@@ -5,6 +5,7 @@ import TranslationModal from "./TranslationModal";
import SelectBuiltMelodyModal from "./builder/SelectBuiltMelodyModal";
import BuildOnTheFlyModal from "./builder/BuildOnTheFlyModal";
import SpeedCalculatorModal from "./SpeedCalculatorModal";
+import PlaybackModal from "./PlaybackModal";
import {
getLocalizedValue,
getLanguageName,
@@ -86,6 +87,7 @@ export default function MelodyForm() {
const [showSelectBuilt, setShowSelectBuilt] = useState(false);
const [showBuildOnTheFly, setShowBuildOnTheFly] = useState(false);
const [showSpeedCalc, setShowSpeedCalc] = useState(false);
+ const [showPlayback, setShowPlayback] = useState(false);
const [builtMelody, setBuiltMelody] = useState(null);
const [assignedBinaryName, setAssignedBinaryName] = useState(null);
@@ -270,35 +272,97 @@ export default function MelodyForm() {
{isEdit ? "Edit Melody" : "Add Melody"}
-
- {isEdit && (
-
- )}
-
- {!isEdit ? (
+
+ {isEdit ? (
<>
+
+
+
+ {melodyStatus === "draft" ? (
+ <>
+
+
+ >
+ ) : (
+ <>
+
+
+ >
+ )}
+
+ >
+ ) : (
+ <>
+
+
- >
- ) : melodyStatus === "draft" ? (
- <>
-
-
- >
- ) : (
- <>
-
-
>
)}
@@ -634,6 +656,13 @@ export default function MelodyForm() {
{isEdit && (
<>
+
setShowPlayback(false)}
+ />