spacedrive/interface/util/hardware.ts
Arnab Chakraborty 18235c6f09
[MOB-106] Cloud Sync for Mobile (#2549)
* wip + working backfill

* Finished BackfillWaiting page + initial auth setup

Also, setting up the cloud sync page.

* mobile auth

* Import Cloud Library

Currently, you can import a cloud library, however it seems that the data, such as locations, is not transferring correctly.

* Working Mobile Cloud Sync

Cloud Sync works for Mobile, and the mobile app can sync files from a cloud library, and other clients can access the data from the phone's cloud library.

* Cloud Sync Done

* Formatting

* Fix new library button

* New device type passing to auth

* Improve design of cloud settings and import modal

* ui adjustments and code cleanup

* Update styling if there's only 1 instance

* code cleanup, design tweaks

* empty state & simple indicator animation

* lint

* loading indicator and cleanup

* Fix to Sync Subscription

* Update Cargo.lock

* Async logout for debug

* tweaks

* Update SettingsStack.tsx

* cleanups and cloud desktop design improvements

* more cleanups and ui improvements

* ts

* i18n

* Cloud Sync Docs

* styling

* Delete library-sync.mdx

Moving docs to a separate branch

---------

Co-authored-by: ameer2468 <33054370+ameer2468@users.noreply.github.com>
2024-06-18 08:46:29 +00:00

23 lines
510 B
TypeScript

// import * as Icons from '@sd/assets/icons';
// import { getIcon } from '@sd/assets/util';
import { HardwareModel } from '@sd/client';
export function hardwareModelToIcon(hardwareModel: HardwareModel) {
switch (hardwareModel) {
case 'MacBookPro':
return 'Laptop';
case 'MacStudio':
return 'SilverBox';
case 'IPhone':
return 'Mobile';
case 'Android':
return 'MobileAndroid';
case 'MacMini':
return 'MiniSilverBox';
case 'Other':
return 'PC';
default:
return 'Laptop';
}
}