mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-07 02:22:52 +00:00
fix: can't change profiles B/C
fix: only add profiles starting beta.4
This commit is contained in:
@@ -125,9 +125,9 @@
|
|||||||
if (!keyInfo) return;
|
if (!keyInfo) return;
|
||||||
const clickedGroup = groupParent.children.item(index) as SVGGElement;
|
const clickedGroup = groupParent.children.item(index) as SVGGElement;
|
||||||
const nextAction =
|
const nextAction =
|
||||||
get(layout)[get(activeProfile)][get(activeLayer)]?.[keyInfo.id];
|
get(layout)[get(activeProfile)]![get(activeLayer)]?.[keyInfo.id];
|
||||||
const currentAction =
|
const currentAction =
|
||||||
get(deviceLayout)[get(activeProfile)][get(activeLayer)]?.[keyInfo.id];
|
get(deviceLayout)[get(activeProfile)]![get(activeLayer)]?.[keyInfo.id];
|
||||||
const component = mount(ActionSelector, {
|
const component = mount(ActionSelector, {
|
||||||
target: document.body,
|
target: document.body,
|
||||||
props: {
|
props: {
|
||||||
@@ -143,6 +143,7 @@
|
|||||||
type: ChangeType.Layout,
|
type: ChangeType.Layout,
|
||||||
id: keyInfo.id,
|
id: keyInfo.id,
|
||||||
layer: get(activeLayer),
|
layer: get(activeLayer),
|
||||||
|
profile: get(activeProfile),
|
||||||
action,
|
action,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -140,8 +140,7 @@ export class CharaDevice {
|
|||||||
this.version = await this.send(1, ["VERSION"]).then(
|
this.version = await this.send(1, ["VERSION"]).then(
|
||||||
([version]) => version,
|
([version]) => version,
|
||||||
);
|
);
|
||||||
// TODO: beta.3
|
if (semverGte(this.version, "2.2.0-beta.4")) {
|
||||||
if (semverGte(this.version, "2.2.0-beta.3")) {
|
|
||||||
this.profileCount = 3;
|
this.profileCount = 3;
|
||||||
}
|
}
|
||||||
const [company, device, chipset] = await this.send(3, ["ID"]);
|
const [company, device, chipset] = await this.send(3, ["ID"]);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { changes, ChangeType, settings } from "$lib/undo-redo";
|
|||||||
import { activeProfile } from "./serial/connection";
|
import { activeProfile } from "./serial/connection";
|
||||||
import { combineLatest, map } from "rxjs";
|
import { combineLatest, map } from "rxjs";
|
||||||
import { fromReadable } from "./util/from-readable";
|
import { fromReadable } from "./util/from-readable";
|
||||||
|
import { get } from "svelte/store";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* https://gist.github.com/mjackson/5311256
|
* https://gist.github.com/mjackson/5311256
|
||||||
@@ -168,6 +169,7 @@ export const setting: Action<
|
|||||||
type: ChangeType.Setting,
|
type: ChangeType.Setting,
|
||||||
id: id + i,
|
id: id + i,
|
||||||
setting: value,
|
setting: value,
|
||||||
|
profile: get(activeProfile),
|
||||||
})),
|
})),
|
||||||
);
|
);
|
||||||
return changes;
|
return changes;
|
||||||
@@ -183,6 +185,7 @@ export const setting: Action<
|
|||||||
type: ChangeType.Setting,
|
type: ChangeType.Setting,
|
||||||
id: id,
|
id: id,
|
||||||
setting: value,
|
setting: value,
|
||||||
|
profile: get(activeProfile),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
return changes;
|
return changes;
|
||||||
|
|||||||
Reference in New Issue
Block a user