mirror of
https://github.com/mudita/mudita-center.git
synced 2026-06-13 19:05:21 -04:00
Co-authored-by: Daniel Karski <daniel.karski5q@gmail.com> Co-authored-by: Oskar Michalkiewicz <32848134+OskarMichalkiewicz@users.noreply.github.com> Co-authored-by: Łukasz Kowalczyk <freelancer.lukasz.kowalczyk@gmail.com> Co-authored-by: Michał Kurczewski <michalkurczewski94@gmail.com> Co-authored-by: mkurczewski <michal@kurczewski.dev>
30 lines
922 B
TypeScript
30 lines
922 B
TypeScript
/**
|
|
* Copyright (c) Mudita sp. z o.o. All rights reserved.
|
|
* For licensing, see https://github.com/mudita/mudita-center/blob/master/LICENSE.md
|
|
*/
|
|
|
|
import { IpcEvent } from "Core/core/decorators"
|
|
import { IpcSettingsEvent } from "Core/settings/constants"
|
|
import { Settings, SettingsUpdateOption } from "Core/settings/dto"
|
|
import { SettingsService } from "Core/settings/services"
|
|
import { SettingsValue } from "Core/settings/types"
|
|
|
|
export class SettingsController {
|
|
constructor(private settingsService: SettingsService) {}
|
|
|
|
@IpcEvent(IpcSettingsEvent.Get)
|
|
getSettings(): Settings {
|
|
return this.settingsService.getSettings()
|
|
}
|
|
|
|
@IpcEvent(IpcSettingsEvent.Reset)
|
|
resetSettings(): Settings {
|
|
return this.settingsService.resetSettings()
|
|
}
|
|
|
|
@IpcEvent(IpcSettingsEvent.Update)
|
|
updateSettings(option: SettingsUpdateOption): SettingsValue {
|
|
return this.settingsService.updateSettings(option)
|
|
}
|
|
}
|