mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-21 01:12:59 +00:00
feat: reject new chords that override another chord
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user