diff options
Diffstat (limited to 'packages/shared/src/stores/Service.ts')
-rw-r--r-- | packages/shared/src/stores/Service.ts | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/packages/shared/src/stores/Service.ts b/packages/shared/src/stores/Service.ts index ed2cd9a..36acd3d 100644 --- a/packages/shared/src/stores/Service.ts +++ b/packages/shared/src/stores/Service.ts | |||
@@ -18,20 +18,23 @@ | |||
18 | * SPDX-License-Identifier: AGPL-3.0-only | 18 | * SPDX-License-Identifier: AGPL-3.0-only |
19 | */ | 19 | */ |
20 | 20 | ||
21 | import { Instance, types, SnapshotIn, SnapshotOut } from 'mobx-state-tree'; | 21 | import { Instance, types } from 'mobx-state-tree'; |
22 | 22 | ||
23 | import { profile } from './Profile'; | 23 | import { serviceSettings } from './ServiceSettings'; |
24 | 24 | ||
25 | export const service = types.model('Service', { | 25 | export const service = types.model('Service', { |
26 | id: types.identifier, | 26 | id: types.identifier, |
27 | name: types.string, | 27 | settings: serviceSettings, |
28 | profile: types.reference(profile), | 28 | currentUrl: types.maybe(types.string), |
29 | // TODO: Remove this once recipes are added. | 29 | canGoBack: false, |
30 | url: types.string, | 30 | canGoForward: false, |
31 | title: types.maybe(types.string), | ||
32 | state: types.optional( | ||
33 | types.enumeration('ServiceState', ['loading', 'loaded', 'crashed']), | ||
34 | 'loading', | ||
35 | ), | ||
36 | directMessageCount: 0, | ||
37 | indirectMessageCount: 0, | ||
31 | }); | 38 | }); |
32 | 39 | ||
33 | export interface Service extends Instance<typeof service> {} | 40 | export interface Service extends Instance<typeof service> {} |
34 | |||
35 | export interface ServiceSnapshotIn extends SnapshotIn<typeof service> {} | ||
36 | |||
37 | export interface ServiceSnapshotOut extends SnapshotOut<typeof service> {} | ||