diff --git a/Cargo.lock b/Cargo.lock index edc615580bca..660af10e749d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4310,7 +4310,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows-core 0.52.0", + "windows-core 0.51.1", ] [[package]] @@ -9644,7 +9644,7 @@ dependencies = [ [[package]] name = "sd-cloud-schema" version = "0.1.0" -source = "git+https://github.com/spacedriveapp/cloud-services-schema?branch=main#8d9b72ef581796bc3a5a879ad910d9ed3a381f48" +source = "git+https://github.com/spacedriveapp/cloud-services-schema?branch=main#4b878e28c2e23d5e37ff827a97f11c5621ef0ded" dependencies = [ "argon2", "async-stream", @@ -13281,7 +13281,7 @@ dependencies = [ "document-features", "js-sys", "log", - "parking_lot 0.12.3", + "parking_lot 0.11.2", "profiling", "raw-window-handle", "smallvec", @@ -13309,7 +13309,7 @@ dependencies = [ "log", "naga", "once_cell", - "parking_lot 0.12.3", + "parking_lot 0.11.2", "profiling", "raw-window-handle", "rustc-hash 1.1.0", @@ -13347,7 +13347,7 @@ dependencies = [ "ndk-sys 0.5.0+25.2.9519653", "objc", "once_cell", - "parking_lot 0.12.3", + "parking_lot 0.11.2", "profiling", "raw-window-handle", "renderdoc-sys", diff --git a/core/src/node/hardware.rs b/core/src/node/hardware.rs index 04873e51cfdc..bf6a93ede419 100644 --- a/core/src/node/hardware.rs +++ b/core/src/node/hardware.rs @@ -1,4 +1,5 @@ use std::io; +use std::io::Error; use serde::{Deserialize, Serialize}; use specta::Type; diff --git a/interface/app/$libraryId/settings/client/account/Profile.tsx b/interface/app/$libraryId/settings/client/account/Profile.tsx index f573bb33bd9c..3903ca7c3234 100644 --- a/interface/app/$libraryId/settings/client/account/Profile.tsx +++ b/interface/app/$libraryId/settings/client/account/Profile.tsx @@ -2,7 +2,9 @@ import { Envelope } from '@phosphor-icons/react'; import { getAccessToken } from 'supertokens-web-js/recipe/session'; import { useBridgeMutation, useBridgeQuery } from '@sd/client'; import { Button, Card } from '@sd/ui'; +import StatCard from '~/app/$libraryId/overview/StatCard'; import { TruncatedText } from '~/components'; +import { hardwareModelToIcon } from '~/util/hardware'; const Profile = ({ email }: { email?: string }) => { const emailName = email?.split('@')[0]; @@ -61,17 +63,24 @@ const Profile = ({ email }: { email?: string }) => { Delete Device {/* List all devices from const devices */} - {/* {devices.data?.map((device: any) => ( - ( + // + + // + -
- -
- {device.pub_id} -
- ))} */} + name={device.name} + // TODO (Optional): Use Brand Type for Different Android Models/iOS Models using DeviceInfo.getBrand() + icon={hardwareModelToIcon(device.hardware_model)} + totalSpace={device.storage_size.toString()} + freeSpace={(device.storage_size - device.used_storage).toString()} + color="#0362FF" + connectionType={'cloud'} + /> + ))} ); }; diff --git a/packages/client/src/core.ts b/packages/client/src/core.ts index 4a3260e199be..cd40e30e324b 100644 --- a/packages/client/src/core.ts +++ b/packages/client/src/core.ts @@ -483,7 +483,7 @@ export type LocationCreateRequest = { access_token: AccessToken; pub_id: Locatio export type LocationDeleteRequest = { access_token: AccessToken; pub_id: LocationPubId } -export type LocationListRequest = { access_token: AccessToken; with_library: boolean; with_device: boolean } +export type LocationListRequest = { access_token: AccessToken; library_pub_id: LibraryPubId; with_library: boolean; with_device: boolean } export type LocationPubId = string @@ -685,17 +685,17 @@ export type Stream = { id: number; name: string | null; codec: Codec | null; asp export type SubtitleProps = { width: number; height: number } -export type SyncGroup = { pub_id: SyncGroupPubId; name: string; latest_key_hash: KeyHash; library: Library | null; devices: Device[] | null; total_sync_messages_bytes: bigint | null; total_space_files_bytes: bigint | null; created_at: string; updated_at: string } +export type SyncGroup = { pub_id: SyncGroupPubId; latest_key_hash: KeyHash; library: Library | null; devices: Device[] | null; total_sync_messages_bytes: bigint | null; total_space_files_bytes: bigint | null; created_at: string; updated_at: string } export type SyncGroupDeleteRequest = { access_token: AccessToken; pub_id: SyncGroupPubId } export type SyncGroupGetRequest = { access_token: AccessToken; pub_id: SyncGroupPubId; with_library: boolean; with_devices: boolean; with_used_storage: boolean } -export type SyncGroupListRequest = { access_token: AccessToken; with_library: boolean; with_devices: boolean } +export type SyncGroupListRequest = { access_token: AccessToken; with_library: boolean } export type SyncGroupPubId = string -export type SyncGroupWithLibraryAndDevices = { pub_id: SyncGroupPubId; name: string; latest_key_hash: KeyHash; library: Library; devices: Device[]; created_at: string; updated_at: string } +export type SyncGroupWithLibraryAndDevices = { pub_id: SyncGroupPubId; latest_key_hash: KeyHash; library: Library; devices: Device[]; created_at: string; updated_at: string } export type SyncGroupsLeaveArgs = { access_token: AccessToken; group_pub_id: SyncGroupPubId }