From 24bbe1f574ee6b0d6d0ebc8c29cbf014fc450584 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Fri, 28 Jan 2022 01:07:56 +0100 Subject: feat: Save selected service to file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sophie start off from the service that was selected when it was last open. Signed-off-by: Kristóf Marussy --- packages/shared/src/stores/GlobalSettings.ts | 3 +++ packages/shared/src/stores/SharedStore.ts | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'packages/shared') diff --git a/packages/shared/src/stores/GlobalSettings.ts b/packages/shared/src/stores/GlobalSettings.ts index 1c6d7f3..7a2c334 100644 --- a/packages/shared/src/stores/GlobalSettings.ts +++ b/packages/shared/src/stores/GlobalSettings.ts @@ -22,12 +22,15 @@ import { Instance, types, SnapshotIn, SnapshotOut } from 'mobx-state-tree'; import { ThemeSource } from '../schemas'; +import Service from './Service'; + const GlobalSettings = /* @__PURE__ */ (() => types.model('GlobalSettings', { themeSource: types.optional( types.enumeration(ThemeSource.options), 'system', ), + selectedService: types.safeReference(Service), }))(); /* diff --git a/packages/shared/src/stores/SharedStore.ts b/packages/shared/src/stores/SharedStore.ts index 4e064c6..d81a3d3 100644 --- a/packages/shared/src/stores/SharedStore.ts +++ b/packages/shared/src/stores/SharedStore.ts @@ -37,7 +37,6 @@ const SharedStore = /* @__PURE__ */ (() => profiles: types.array(types.reference(Profile)), servicesById: types.map(Service), services: types.array(types.reference(Service)), - selectedService: types.safeReference(Service), shouldUseDarkColors: false, }))(); -- cgit v1.2.3-70-g09d2