22 lines
No EOL
382 B
TypeScript
22 lines
No EOL
382 B
TypeScript
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()
|
|
}
|
|
|
|
} |