Skip to content

Commit

Permalink
Correct GUI with purpose field in DeviceInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
touilleMan committed Nov 5, 2024
1 parent d71e47c commit eaed2b7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions client/src/parsec/device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
OwnDeviceInfo,
Result,
UserID,
DevicePurpose,
} from '@/parsec/types';
import { ArchiveDeviceError, AvailableDevice, libparsec } from '@/plugins/libparsec';
import { DateTime } from 'luxon';
Expand Down Expand Up @@ -103,6 +104,7 @@ export async function importRecoveryDevice(
value: {
id: 'fake_id',
deviceLabel: deviceLabel,
purpose: DevicePurpose.Standard,
createdOn: DateTime.now(),
createdBy: null,
},
Expand All @@ -113,6 +115,7 @@ export async function importRecoveryDevice(
value: {
id: 'fake_id',
deviceLabel: deviceLabel,
purpose: DevicePurpose.Standard,
createdOn: DateTime.now(),
createdBy: null,
},
Expand Down Expand Up @@ -182,20 +185,23 @@ export async function listOwnDevices(): Promise<Result<Array<OwnDeviceInfo>, Cli
{
id: 'device1',
deviceLabel: 'Web',
purpose: DevicePurpose.Standard,
createdOn: DateTime.now(),
createdBy: 'some_device',
isCurrent: true,
},
{
id: 'device2',
deviceLabel: 'Web',
purpose: DevicePurpose.Standard,
createdOn: DateTime.now(),
createdBy: 'device1',
isCurrent: false,
},
{
id: `${RECOVERY_DEVICE_PREFIX}_device`,
deviceLabel: 'Recovery Device',
purpose: DevicePurpose.PassphraseRecovery,
createdOn: DateTime.now(),
createdBy: 'device1',
isCurrent: false,
Expand Down Expand Up @@ -224,18 +230,21 @@ export async function listUserDevices(user: UserID): Promise<Result<Array<Device
{
id: 'device1',
deviceLabel: 'My First Device',
purpose: DevicePurpose.Standard,
createdOn: DateTime.now(),
createdBy: 'some_device',
},
{
id: 'device2',
deviceLabel: 'My Second Device',
purpose: DevicePurpose.Standard,
createdOn: DateTime.now(),
createdBy: 'device1',
},
{
id: `${RECOVERY_DEVICE_PREFIX}_device1`,
deviceLabel: 'Recovery First Device',
purpose: DevicePurpose.PassphraseRecovery,
createdOn: DateTime.now(),
createdBy: 'device1',
},
Expand Down
1 change: 1 addition & 0 deletions client/src/parsec/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export {
WorkspaceStatEntryErrorTag,
WorkspaceStatFolderChildrenErrorTag,
WorkspaceStopErrorTag,
DevicePurpose,
} from '@/plugins/libparsec';
export type {
ArchiveDeviceError,
Expand Down

0 comments on commit eaed2b7

Please sign in to comment.