diff options
Diffstat (limited to 'packages/main/src/stores/Profile.ts')
-rw-r--r-- | packages/main/src/stores/Profile.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/main/src/stores/Profile.ts b/packages/main/src/stores/Profile.ts index 836f4a8..405a5d4 100644 --- a/packages/main/src/stores/Profile.ts +++ b/packages/main/src/stores/Profile.ts | |||
@@ -18,8 +18,8 @@ | |||
18 | * SPDX-License-Identifier: AGPL-3.0-only | 18 | * SPDX-License-Identifier: AGPL-3.0-only |
19 | */ | 19 | */ |
20 | 20 | ||
21 | import { Profile as ProfileBase } from '@sophie/shared'; | 21 | import { Certificate, Profile as ProfileBase } from '@sophie/shared'; |
22 | import { getSnapshot, Instance } from 'mobx-state-tree'; | 22 | import { clone, getSnapshot, Instance } from 'mobx-state-tree'; |
23 | 23 | ||
24 | import type ProfileConfig from './config/ProfileConfig'; | 24 | import type ProfileConfig from './config/ProfileConfig'; |
25 | 25 | ||
@@ -28,6 +28,10 @@ const Profile = ProfileBase.views((self) => ({ | |||
28 | const { id, settings } = self; | 28 | const { id, settings } = self; |
29 | return { ...getSnapshot(settings), id }; | 29 | return { ...getSnapshot(settings), id }; |
30 | }, | 30 | }, |
31 | })).actions((self) => ({ | ||
32 | temporarilyTrustCertificate(certificate: Certificate): void { | ||
33 | self.temporarilyTrustedCertificates.push(clone(certificate)); | ||
34 | }, | ||
31 | })); | 35 | })); |
32 | 36 | ||
33 | /* | 37 | /* |