feat: bổ sung phần menu insert

This commit is contained in:
2026-07-22 20:44:07 +07:00
parent f3d48e8837
commit 78b9358539
4 changed files with 41 additions and 2 deletions
+20 -1
View File
@@ -8728,6 +8728,25 @@ const App = () => {
handleDeleteTrack();
}
}]
}, {
label: 'Insert',
items: [{
label: 'Insert Section',
icon: 'folder-plus',
action: () => showToast('Insert section', 'info')
}, {
label: 'Insert MIDI item',
icon: 'music',
action: () => showToast('Insert MIDI item', 'info')
}, {
label: 'Insert sound clip',
icon: 'file-input',
action: () => showToast('Insert sound clip', 'info')
}, {
label: 'Insert track',
icon: 'plus',
action: addNewTrack
}]
}, {
label: 'View',
items: [{
@@ -8780,7 +8799,7 @@ const App = () => {
onClick: () => setMenuOpen(menuOpen === menu.label ? null : menu.label),
className: `px-3 py-1 text-xs font-medium transition rounded ${menuOpen === menu.label ? 'bg-zinc-700 text-zinc-100' : 'text-zinc-400 hover:text-zinc-200 hover:bg-zinc-800'}`
}, menu.label), menuOpen === menu.label && /*#__PURE__*/React.createElement("div", {
className: "absolute top-full left-0 mt-0.5 bg-[#2a2a2a] border border-zinc-700 rounded-lg shadow-2xl py-1 w-64 z-50",
className: `absolute top-full left-0 mt-0.5 bg-[#2a2a2a] border border-zinc-700 rounded-lg shadow-2xl py-1 z-50 ${menu.label === 'Edit' ? 'w-72' : 'w-64'}`,
onClick: () => setMenuOpen(null)
}, menu.items.map((item, i) => item.sep ? /*#__PURE__*/React.createElement("div", {
key: i,
+20 -1
View File
@@ -9219,6 +9219,25 @@ const App = () => {
handleDeleteTrack();
}
}]
}, {
label: 'Insert',
items: [{
label: 'Insert Section',
icon: 'folder-plus',
action: () => showToast('Insert section', 'info')
}, {
label: 'Insert MIDI item',
icon: 'music',
action: () => showToast('Insert MIDI item', 'info')
}, {
label: 'Insert sound clip',
icon: 'file-input',
action: () => showToast('Insert sound clip', 'info')
}, {
label: 'Insert track',
icon: 'plus',
action: addNewTrack
}]
}, {
label: 'View',
items: [{
@@ -9271,7 +9290,7 @@ const App = () => {
onClick: () => setMenuOpen(menuOpen === menu.label ? null : menu.label),
className: `px-3 py-1 text-xs font-medium transition rounded ${menuOpen === menu.label ? 'bg-zinc-700 text-zinc-100' : 'text-zinc-400 hover:text-zinc-200 hover:bg-zinc-800'}`
}, menu.label), menuOpen === menu.label && /*#__PURE__*/React.createElement("div", {
className: "absolute top-full left-0 mt-0.5 bg-[#2a2a2a] border border-zinc-700 rounded-lg shadow-2xl py-1 w-64 z-50",
className: `absolute top-full left-0 mt-0.5 bg-[#2a2a2a] border border-zinc-700 rounded-lg shadow-2xl py-1 z-50 ${menu.label === 'Edit' ? 'w-72' : 'w-64'}`,
onClick: () => setMenuOpen(null)
}, menu.items.map((item, i) => item.sep ? /*#__PURE__*/React.createElement("div", {
key: i,
Binary file not shown.