feat: reject new chords that override another chord

This commit is contained in:
2023-12-16 15:24:51 +01:00
parent 766bc44a85
commit eb33b64100
3 changed files with 7 additions and 0 deletions

View File

@@ -55,6 +55,11 @@
}
function insertChord(actions: number[]) {
const id = JSON.stringify(actions)
if ($chords.some(it => JSON.stringify(it.actions) === id)) {
alert($LL.configure.chords.DUPLICATE())
return
}
changes.update(changes => {
changes.push({
type: ChangeType.Chord,