updated protocols
This commit is contained in:
parent
7283e3f6f9
commit
531a32a5a5
37 changed files with 682 additions and 650 deletions
22
src/profile.ts
Normal file
22
src/profile.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { ipcEmit } from "@/composables/useEmitter";
|
||||
|
||||
|
||||
export default class ProfileHandler {
|
||||
|
||||
profile: Profile;
|
||||
|
||||
constructor(profile: Profile) {
|
||||
this.profile = profile;
|
||||
this.emit();
|
||||
}
|
||||
|
||||
emit() {
|
||||
ipcEmit("set-profile", this.profile);
|
||||
}
|
||||
|
||||
update(update: Update) {
|
||||
this.profile = update.data as Profile;
|
||||
this.emit()
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in a new issue