Skip to content

Commit

Permalink
Update App.vue
Browse files Browse the repository at this point in the history
Persist `intervalMatrixIndex` in local storage
  • Loading branch information
inthar-raven authored Nov 29, 2023
1 parent a2b4b0f commit d107470
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ const centsFractionDigits = ref(3);
const decimalFractionDigits = ref(5);
const showVirtualQwerty = ref(false);
const midiOctaveOffset = ref(-1);
const intervalMatrixIndexing = ref<"zero" | "one">("zero");
// Special keyboard codes also from local storage.
const deactivationCode = ref("Backquote");
Expand Down Expand Up @@ -288,6 +289,7 @@ watch(
pingPongFeedback,
pingPongSeparation,
pingPongGain,
intervalMatrixIndexing

Check warning on line 292 in src/App.vue

View workflow job for this annotation

GitHub Actions / build (17.x)

Insert `,`
],
encodeState
);
Expand Down Expand Up @@ -783,7 +785,9 @@ onMounted(() => {
if ("midiOctaveOffset" in storage) {
midiOctaveOffset.value = parseInt(storage.getItem("midiOctaveOffset")!);
}
if ("intervalMatrixIndexing" in storage) {
intervalMatrixIndexing.value = storage.getItem("intervalMatrixIndexing")!;
}
// Fetch special key map
if ("deactivationCode" in storage) {
deactivationCode.value = storage.getItem("deactivationCode")!;
Expand Down Expand Up @@ -968,6 +972,9 @@ watch(showVirtualQwerty, (newValue) =>
watch(midiOctaveOffset, (newValue) =>
window.localStorage.setItem("midiOctaveOffset", newValue.toString())
);
watch(intervalMatrixIndexing, (newValue) =>
window.localStorage.setItem("intervalMatrixIndexing", newValue)
);
// Store keymaps
watch(deactivationCode, (newValue) =>
window.localStorage.setItem("deactivationCode", newValue)
Expand Down Expand Up @@ -1069,6 +1076,7 @@ watch(degreeDownCode, (newValue) =>
:keyboardMapping="keyboardMapping"
:showVirtualQwerty="showVirtualQwerty"
:midiOctaveOffset="midiOctaveOffset"
:intervalMatrixIndexing="intervalMatrixIndexing"
@update:audioDelay="audioDelay = $event"
@update:mainVolume="mainVolume = $event"
@update:scaleName="scaleName = $event"
Expand All @@ -1095,6 +1103,7 @@ watch(degreeDownCode, (newValue) =>
@update:decimalFractionDigits="decimalFractionDigits = $event"
@update:showVirtualQwerty="showVirtualQwerty = $event"
@update:midiOctaveOffset="midiOctaveOffset = $event"
@update:intervalMatrixIndexing="intervalMatrixIndexing = $event"
@update:deactivationCode="deactivationCode = $event"
@update:equaveUpCode="equaveUpCode = $event"
@update:equaveDownCode="equaveDownCode = $event"
Expand Down

0 comments on commit d107470

Please sign in to comment.