mirror of
https://github.com/getpaseo/paseo.git
synced 2026-08-14 12:23:16 +00:00
Adds client-side i18n support, language settings, translated UI copy, and locale parity coverage.
52 lines
1.3 KiB
TypeScript
52 lines
1.3 KiB
TypeScript
import { useMemo } from "react";
|
|
import { Text, View } from "react-native";
|
|
import { useTranslation } from "react-i18next";
|
|
import { StyleSheet, useUnistyles } from "react-native-unistyles";
|
|
|
|
interface BrowserPaneProps {
|
|
browserId: string;
|
|
serverId: string;
|
|
workspaceId: string;
|
|
cwd: string | null;
|
|
isInteractive?: boolean;
|
|
onFocusPane?: () => void;
|
|
}
|
|
|
|
export function BrowserPane({ browserId }: BrowserPaneProps) {
|
|
const { t } = useTranslation();
|
|
const { theme } = useUnistyles();
|
|
const titleStyle = useMemo(
|
|
() => [styles.title, { color: theme.colors.foreground }],
|
|
[theme.colors.foreground],
|
|
);
|
|
const subtitleStyle = useMemo(
|
|
() => [styles.subtitle, { color: theme.colors.foregroundMuted }],
|
|
[theme.colors.foregroundMuted],
|
|
);
|
|
|
|
return (
|
|
<View style={styles.container}>
|
|
<Text style={titleStyle}>{t("workspace.browser.unavailable.title")}</Text>
|
|
<Text style={subtitleStyle}>{t("workspace.browser.unavailable.subtitle")}</Text>
|
|
<Text style={subtitleStyle}>{t("workspace.browser.session", { browserId })}</Text>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create(() => ({
|
|
container: {
|
|
flex: 1,
|
|
alignItems: "center",
|
|
justifyContent: "center",
|
|
gap: 8,
|
|
padding: 16,
|
|
},
|
|
title: {
|
|
fontSize: 16,
|
|
fontWeight: "600",
|
|
},
|
|
subtitle: {
|
|
fontSize: 12,
|
|
},
|
|
}));
|