revert: Synth button conditional on section items - track can have both
815a6fahid Synth when track has sections. But a track can contain both section items AND midi items. Synth applies to MIDI items regardless of sections. Section instrument isolation is handled by section clone nullifying all soundfont fields (9befc20).
This commit is contained in:
@@ -16492,7 +16492,7 @@ const App = () => {
|
|||||||
className: "w-3 h-3"
|
className: "w-3 h-3"
|
||||||
})), " FX: ", /*#__PURE__*/React.createElement("span", {
|
})), " FX: ", /*#__PURE__*/React.createElement("span", {
|
||||||
className: "text-zinc-500 font-normal"
|
className: "text-zinc-500 font-normal"
|
||||||
}, track.fxType || "None")), (track.midiItems && track.midiItems.length > 0 && (!track.sections || track.sections.length === 0)) && /*#__PURE__*/React.createElement("button", {
|
}, track.fxType || "None")), /*#__PURE__*/React.createElement("button", {
|
||||||
onClick: (e) => { e.stopPropagation(); openInstrumentSelector(track.id); },
|
onClick: (e) => { e.stopPropagation(); openInstrumentSelector(track.id); },
|
||||||
className: "px-2.5 py-1 bg-zinc-800 hover:bg-zinc-700 text-amber-400 border border-amber-800 rounded text-xs font-bold flex items-center gap-1 max-w-[120px]"
|
className: "px-2.5 py-1 bg-zinc-800 hover:bg-zinc-700 text-amber-400 border border-amber-800 rounded text-xs font-bold flex items-center gap-1 max-w-[120px]"
|
||||||
}, /*#__PURE__*/React.createElement("span", {
|
}, /*#__PURE__*/React.createElement("span", {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -539,6 +539,12 @@
|
|||||||
- **Ghi chú/Test (nếu có):** `npm run build` pass. Ctrl+Click+Drag section/MIDI item → copy đến vị trí mới, item không bị selected.
|
- **Ghi chú/Test (nếu có):** `npm run build` pass. Ctrl+Click+Drag section/MIDI item → copy đến vị trí mới, item không bị selected.
|
||||||
---
|
---
|
||||||
|
|
||||||
|
### [2026-07-28 08:49] Task: Revert Synth button ẩn — track có thể chứa cả section + MIDI
|
||||||
|
- **Tóm tắt thay đổi:** Revert conditional Synth button (815a6fa). Track có section item con VÀ midi item con → Synth vẫn hiển thị. Instrument chỉ áp dụng cho MIDI item, không ảnh hưởng section item (được xử lý bởi data isolation fix trước đó: section clone null hết soundfont fields).
|
||||||
|
- **Các file ảnh hưởng:** `app/static/js/app.jsx`, `app/static/js/app.precompiled.js`
|
||||||
|
- **Ghi chú/Test (nếu có):** `npm run build` pass. Track sections + midiItems → Synth hiển thị, instrument chỉ tác động midiItems.
|
||||||
|
---
|
||||||
|
|
||||||
### [2026-07-28 08:36] Task: Synth chỉ hiển thị cho MIDI track, không cho section/audio track
|
### [2026-07-28 08:36] Task: Synth chỉ hiển thị cho MIDI track, không cho section/audio track
|
||||||
- **Tóm tắt thay đổi:** Synth button trong TCP giờ conditional: chỉ hiển thị khi track có midiItems (>0) và KHÔNG có sections. FX button giữ nguyên cho mọi track type. Logic đúng: Synth áp dụng cho MIDI item, FX áp dụng cho section/MIDI/audio clip item.
|
- **Tóm tắt thay đổi:** Synth button trong TCP giờ conditional: chỉ hiển thị khi track có midiItems (>0) và KHÔNG có sections. FX button giữ nguyên cho mọi track type. Logic đúng: Synth áp dụng cho MIDI item, FX áp dụng cho section/MIDI/audio clip item.
|
||||||
- **Các file ảnh hưởng:** `app/static/js/app.jsx`, `app/static/js/app.precompiled.js`
|
- **Các file ảnh hưởng:** `app/static/js/app.jsx`, `app/static/js/app.precompiled.js`
|
||||||
|
|||||||
Reference in New Issue
Block a user