FIX: Đã fix preview Media Explorer (v202608062345)

This commit is contained in:
2026-08-06 20:45:56 +07:00
parent 71b9231b57
commit 23675dab83
4 changed files with 22 additions and 6 deletions
+9 -2
View File
@@ -11513,7 +11513,7 @@ const MEDIA_LIBRARY_SAMPLES = [
{ name: "MIDI_Loop_06.mid", events: 88, lengthQn: 16, time: "0:08.000", tpqn: 480, bpm: 130, kind: "midi" }
];
const MediaExplorerPanel = ({ height, clipboardRef }) => {
const MediaExplorerPanel = ({ height, clipboardRef, active }) => {
const [userFiles, setUserFiles] = React.useState([]);
const [folder, setFolder] = React.useState('library');
const [selected, setSelected] = React.useState(null);
@@ -12651,6 +12651,12 @@ const MediaExplorerPanel = ({ height, clipboardRef }) => {
setIsPaused(false);
}, []);
// F6 close / panel b n (display:none KHÔNG unmount) tt preview âm
// thanh (trưc đây preview tiếp tc phát sau khi đóng Media Explorer).
React.useEffect(function() {
if (active === false) stopMediaPlayback();
}, [active, stopMediaPlayback]);
const playSelected = async (f, token) => {
if (!f) return;
stopMediaPlayback();
@@ -27496,7 +27502,8 @@ STRICT CONSTRAINTS:
className: "flex-1 min-h-0 overflow-hidden bg-[#262626]"
}, /*#__PURE__*/React.createElement(MediaExplorerPanel, {
height: mediaExplorerPanelHeight,
clipboardRef: clipboardRef
clipboardRef: clipboardRef,
active: showMediaExplorer
}))));
})(), /*#__PURE__*/React.createElement("div", {
className: "h-6 bg-[#141414] border-t border-zinc-900 px-4 flex items-center justify-between text-xs text-zinc-500 select-none shrink-0"
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -24,7 +24,7 @@
<script src="/static/js/services/midiExtractor.js?v=202607281052"></script>
<script src="/static/js/services/promptTemplateManager.js?v=202607281039"></script>
<script src="/static/js/services/undoRedoEngine.js?v=202607290941"></script>
<script src="/static/js/app.precompiled.js?v=202608062330" defer></script>
<script src="/static/js/app.precompiled.js?v=202608062345" defer></script>
<link rel="stylesheet" href="/static/css/styles.css?v=202607271016">
<style>
:root {