diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 0bc82e5..d19f1a3 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -54,27 +54,4 @@ export class AppComponent { }); }); } - - - async scanForZeroConfServices(): Promise { - try { - await this.zeroconfService.watch(this.SERVICE_SNAPCAST); - console.log(`Started scanning for services of types: ${this.SERVICE_SNAPCAST}`); - } - catch (error) { - console.error('Error starting service scan:', error); - } - - } - - async checkUserPreferencesForAutomaticScan(): Promise { - const result = await Preferences.get({ key: UserPreference.SCAN_FOR_DEVICES_ON_STARTUP }); - this.scanForDevicesOnStartup = result.value === 'true' ? true : false; - if (this.scanForDevicesOnStartup) { - console.log('User preference indicates to scan for devices on startup. Starting scan...'); - await this.scanForZeroConfServices(); - } else { - console.log('User preference indicates NOT to scan for devices on startup.'); - } - } } diff --git a/src/app/components/client-info/client-info.component.html b/src/app/components/client-info/client-info.component.html index 359f0d7..9044bfa 100644 --- a/src/app/components/client-info/client-info.component.html +++ b/src/app/components/client-info/client-info.component.html @@ -21,52 +21,100 @@ - - - -

Snap Client Information

-

Id: {{client.id}}

-

{{client.lastSeen.sec * 1000 | date: 'long'}}

-
-

Host

-

Name: {{client.host.name}}

-

OS: {{client.host.os}}

-

Architecture: {{client.host.arch}}

-

IP Address: {{cleanIpAddress(client.host.ip)}}

-

MAC Address: {{client.host.mac}}

-
-

Configuration

-

Name: {{ client.config.name}}

-

Client ID: {{ client.id }}

-

Volume: {{ client.config.volume.percent || 'N/A' }}%

-

Muted: {{ client.config.volume.muted}}

-

Latency: {{ client.config.latency }} ms

-

Connected: {{ client.connected }}

-

Last Seen: {{ client.lastSeen.sec * 1000 | date : 'long' }}

-

-
-
- - - - -

{{ client.id }}

-

Raw json

-
-
- -
{{ client| json }}
-
-
-
- -
@@ -123,43 +171,17 @@

Status: Inactive

"Inactive" Means this device is configured to be a Beatnik / snapcast client. Clients will automatically try to connect to the server in your local Network.

-

{{ snapcastServerStatus.message}}

+ - System Info + Actions - - - -

Hostname

-

{{ systemInfo.hostname }}

-
-
- - -

IP Addresses

-

{{ ip }}

-
-
- - -

RAM Usage

-

{{ systemInfo.freeRam | number:'1.0-0' }} MB ({{ (systemInfo.freeRam / 1024) | number:'1.1-2' }} GB) Free / - {{ systemInfo.totalRam | number:'1.0-0' }} MB ({{ (systemInfo.totalRam / 1024) | number:'1.1-2' }} GB) Total -

-
-
- - -

Temperature

-

{{ systemInfo.temperature }} °C

-
-
-
+ +
Temperature Refresh Snapcast Server Status - + Disable Snapcast Server - + Enable Snapcast Server diff --git a/src/app/components/client-info/client-info.component.scss b/src/app/components/client-info/client-info.component.scss index de5cebb..8b3f794 100644 --- a/src/app/components/client-info/client-info.component.scss +++ b/src/app/components/client-info/client-info.component.scss @@ -1,3 +1,8 @@ ion-card { box-shadow: none; +} + +.small-note{ + font-size: 0.8em; + color: var(--ion-color-medium); } \ No newline at end of file diff --git a/src/app/services/beatnik-system.service.ts b/src/app/services/beatnik-system.service.ts index a05cddc..6807f26 100644 --- a/src/app/services/beatnik-system.service.ts +++ b/src/app/services/beatnik-system.service.ts @@ -8,6 +8,10 @@ export interface SystemInfo { totalRam: number; freeRam: number; temperature: number | null; + os: string; + macAddress: string | null; + storageType: string | null; + model: string; } export type LedCommand =