style: adjust typography and standardize ui text
This commit is contained in:
@@ -143,10 +143,10 @@ const styles = StyleSheet.create((theme) => ({
|
|||||||
fontWeight: theme.fontWeight.normal,
|
fontWeight: theme.fontWeight.normal,
|
||||||
},
|
},
|
||||||
labelSm: {
|
labelSm: {
|
||||||
fontSize: theme.fontSize.xs,
|
fontSize: theme.fontSize.sm,
|
||||||
},
|
},
|
||||||
labelMd: {
|
labelMd: {
|
||||||
fontSize: theme.fontSize.sm,
|
fontSize: theme.fontSize.base,
|
||||||
},
|
},
|
||||||
labelSelected: {
|
labelSelected: {
|
||||||
color: theme.colors.foreground,
|
color: theme.colors.foreground,
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import type { ListTerminalsResponse } from "@server/shared/messages";
|
|||||||
import { TerminalPane } from "@/components/terminal-pane";
|
import { TerminalPane } from "@/components/terminal-pane";
|
||||||
import { usePaneContext, usePaneFocus } from "@/panels/pane-context";
|
import { usePaneContext, usePaneFocus } from "@/panels/pane-context";
|
||||||
import type { PanelDescriptor, PanelRegistration } from "@/panels/panel-registry";
|
import type { PanelDescriptor, PanelRegistration } from "@/panels/panel-registry";
|
||||||
|
import { queryClient } from "@/query/query-client";
|
||||||
import { usePanelStore } from "@/stores/panel-store";
|
import { usePanelStore } from "@/stores/panel-store";
|
||||||
import { useSessionStore } from "@/stores/session-store";
|
import { useSessionStore } from "@/stores/session-store";
|
||||||
import { useWorkspaceExecutionAuthority } from "@/stores/session-store-hooks";
|
import { useWorkspaceExecutionAuthority } from "@/stores/session-store-hooks";
|
||||||
@@ -30,21 +31,24 @@ function useTerminalPanelDescriptor(
|
|||||||
const workspaceDirectory = workspaceAuthority.ok
|
const workspaceDirectory = workspaceAuthority.ok
|
||||||
? workspaceAuthority.authority.workspaceDirectory
|
? workspaceAuthority.authority.workspaceDirectory
|
||||||
: null;
|
: null;
|
||||||
const terminalsQuery = useQuery({
|
const terminalsQuery = useQuery(
|
||||||
queryKey: ["terminals", context.serverId, workspaceDirectory] as const,
|
{
|
||||||
enabled: Boolean(client && workspaceDirectory),
|
queryKey: ["terminals", context.serverId, workspaceDirectory] as const,
|
||||||
queryFn: async (): Promise<ListTerminalsPayload> => {
|
enabled: Boolean(client && workspaceDirectory),
|
||||||
if (!client || !workspaceDirectory) {
|
queryFn: async (): Promise<ListTerminalsPayload> => {
|
||||||
throw new Error(
|
if (!client || !workspaceDirectory) {
|
||||||
workspaceAuthority.ok
|
throw new Error(
|
||||||
? "Workspace execution directory not found"
|
workspaceAuthority.ok
|
||||||
: workspaceAuthority.message,
|
? "Workspace execution directory not found"
|
||||||
);
|
: workspaceAuthority.message,
|
||||||
}
|
);
|
||||||
return client.listTerminals(workspaceDirectory);
|
}
|
||||||
|
return client.listTerminals(workspaceDirectory);
|
||||||
|
},
|
||||||
|
staleTime: 5_000,
|
||||||
},
|
},
|
||||||
staleTime: 5_000,
|
queryClient,
|
||||||
});
|
);
|
||||||
const terminal =
|
const terminal =
|
||||||
terminalsQuery.data?.terminals.find((entry) => entry.id === target.terminalId) ?? null;
|
terminalsQuery.data?.terminals.find((entry) => entry.id === target.terminalId) ?? null;
|
||||||
|
|
||||||
|
|||||||
@@ -324,7 +324,7 @@ function DesktopAppUpdateRow() {
|
|||||||
|
|
||||||
void confirmDialog({
|
void confirmDialog({
|
||||||
title: "Install desktop update",
|
title: "Install desktop update",
|
||||||
message: "This updates Paseo on this computer.",
|
message: "This updates Paseo on this computer",
|
||||||
confirmLabel: "Install update",
|
confirmLabel: "Install update",
|
||||||
cancelLabel: "Cancel",
|
cancelLabel: "Cancel",
|
||||||
})
|
})
|
||||||
@@ -350,7 +350,7 @@ function DesktopAppUpdateRow() {
|
|||||||
<View style={settingsStyles.rowContent}>
|
<View style={settingsStyles.rowContent}>
|
||||||
<Text style={settingsStyles.rowTitle}>Release channel</Text>
|
<Text style={settingsStyles.rowTitle}>Release channel</Text>
|
||||||
<Text style={settingsStyles.rowHint}>
|
<Text style={settingsStyles.rowHint}>
|
||||||
Switch to Beta to get updates sooner and help shape them.
|
Switch to Beta to get updates sooner and help shape them
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
<SegmentedControl
|
<SegmentedControl
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ export function HostPage({ serverId, onHostRemoved }: HostPageProps) {
|
|||||||
return (
|
return (
|
||||||
<View testID={`settings-host-page-${serverId}`}>
|
<View testID={`settings-host-page-${serverId}`}>
|
||||||
<View style={[settingsStyles.card, styles.emptyCard]}>
|
<View style={[settingsStyles.card, styles.emptyCard]}>
|
||||||
<Text style={styles.emptyText}>Host not found.</Text>
|
<Text style={styles.emptyText}>Host not found</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
@@ -591,7 +591,7 @@ function PairDeviceRow() {
|
|||||||
<View style={settingsStyles.rowContent}>
|
<View style={settingsStyles.rowContent}>
|
||||||
<Text style={settingsStyles.rowTitle}>Pair a device</Text>
|
<Text style={settingsStyles.rowTitle}>Pair a device</Text>
|
||||||
<Text style={settingsStyles.rowHint}>
|
<Text style={settingsStyles.rowHint}>
|
||||||
Scan a QR code or copy a link to connect your phone to this host.
|
Scan a QR code or copy a link to connect your phone to this host
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
<ChevronRight size={theme.iconSize.sm} color={theme.colors.foregroundMuted} />
|
<ChevronRight size={theme.iconSize.sm} color={theme.colors.foregroundMuted} />
|
||||||
@@ -619,7 +619,7 @@ function RemoveHostSection({ host, onRemoved }: { host: HostProfile; onRemoved?:
|
|||||||
<View style={settingsStyles.rowContent}>
|
<View style={settingsStyles.rowContent}>
|
||||||
<Text style={settingsStyles.rowTitle}>Remove host</Text>
|
<Text style={settingsStyles.rowTitle}>Remove host</Text>
|
||||||
<Text style={settingsStyles.rowHint}>
|
<Text style={settingsStyles.rowHint}>
|
||||||
Removes this host and its saved connections from this device.
|
Removes this host and its saved connections from this device
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ export function KeyboardShortcutsSection() {
|
|||||||
return (
|
return (
|
||||||
<SettingsSection title="Shortcuts">
|
<SettingsSection title="Shortcuts">
|
||||||
<View style={[settingsStyles.card, styles.mobileCard]}>
|
<View style={[settingsStyles.card, styles.mobileCard]}>
|
||||||
<Text style={styles.mobileText}>Keyboard shortcuts are only available on desktop.</Text>
|
<Text style={styles.mobileText}>Keyboard shortcuts are only available on desktop</Text>
|
||||||
</View>
|
</View>
|
||||||
</SettingsSection>
|
</SettingsSection>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user