aboutsummaryrefslogtreecommitdiffstats
path: root/packages/shared/src/stores/Profile.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/shared/src/stores/Profile.ts')
-rw-r--r--packages/shared/src/stores/Profile.ts23
1 files changed, 5 insertions, 18 deletions
diff --git a/packages/shared/src/stores/Profile.ts b/packages/shared/src/stores/Profile.ts
index 076c639..7d00925 100644
--- a/packages/shared/src/stores/Profile.ts
+++ b/packages/shared/src/stores/Profile.ts
@@ -18,28 +18,15 @@
18 * SPDX-License-Identifier: AGPL-3.0-only 18 * SPDX-License-Identifier: AGPL-3.0-only
19 */ 19 */
20 20
21import { Instance, types } from 'mobx-state-tree'; 21import { type Instance, types } from 'mobx-state-tree';
22 22
23import Certificate, { CertificateSnapshotIn } from './Certificate.js';
24import ProfileSettings from './ProfileSettings.js'; 23import ProfileSettings from './ProfileSettings.js';
25 24
26const Profile = /* @__PURE__ */ (() => 25const Profile = /* @__PURE__ */ (() =>
27 types 26 types.model('Profile', {
28 .model('Profile', { 27 id: types.identifier,
29 id: types.identifier, 28 settings: ProfileSettings,
30 settings: ProfileSettings, 29 }))();
31 temporarilyTrustedCertificates: types.array(Certificate),
32 })
33 .views((self) => ({
34 isCertificateTemporarilyTrusted(
35 certificate: CertificateSnapshotIn,
36 ): boolean {
37 return self.temporarilyTrustedCertificates.some(
38 (trustedCertificate) =>
39 trustedCertificate.fingerprint === certificate.fingerprint,
40 );
41 },
42 })))();
43 30
44/* 31/*
45 eslint-disable-next-line @typescript-eslint/no-redeclare -- 32 eslint-disable-next-line @typescript-eslint/no-redeclare --