mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-09-29 15:15:27 -07:00
- Replaced direct Tauri API calls with a unified platform context across multiple components, enhancing code maintainability and readability. - Removed the deprecated tauri.ts file, consolidating platform-related logic into the new PlatformContext. - Updated components such as App, AudioPlayer, and ServerSettings to utilize the new platform context for lifecycle management and server interactions. - Improved platform detection and handling for audio playback and system audio capture functionalities. - Ensured consistent error handling and user feedback across the application when interacting with platform-specific features.
29 lines
927 B
TypeScript
29 lines
927 B
TypeScript
import { ConnectionForm } from '@/components/ServerSettings/ConnectionForm';
|
|
import { ServerStatus } from '@/components/ServerSettings/ServerStatus';
|
|
import { UpdateStatus } from '@/components/ServerSettings/UpdateStatus';
|
|
import { usePlatform } from '@/platform/PlatformContext';
|
|
|
|
export function ServerTab() {
|
|
const platform = usePlatform();
|
|
return (
|
|
<div className="space-y-4 overflow-y-auto flex flex-col">
|
|
<div className="grid gap-4 md:grid-cols-2">
|
|
<ConnectionForm />
|
|
<ServerStatus />
|
|
</div>
|
|
{platform.metadata.isTauri && <UpdateStatus />}
|
|
<div className="py-8 text-center text-sm text-muted-foreground">
|
|
Created by{' '}
|
|
<a
|
|
href="https://github.com/jamiepine"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
className="text-accent hover:underline"
|
|
>
|
|
Jamie Pine
|
|
</a>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|