Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/acp-bridge/src/bridge.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4485,6 +4485,7 @@ describe('createAcpSessionBridge', () => {
hasMore: false,
});

await expect(refresh).rejects.toBeInstanceOf(SessionNotFoundError);
await expect(refresh).rejects.toMatchObject({
code: 'session_closing',
});
Expand Down
11 changes: 4 additions & 7 deletions packages/desktop-shell/bootstrap/local-control.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ const messages = {
on: 'On',
inactiveCopy:
'Turn this on, then scan from a phone on the same trusted Wi-Fi.',
inactiveNotice: 'Uses unencrypted HTTP. Phone access stays closed until enabled.',
inactiveNotice:
'Uses unencrypted HTTP. Phone access stays closed until enabled.',
qrLabel: 'Local Control QR code',
turnOn: 'Turn on Local Control',
disconnect: 'Disconnect phone access',
Expand All @@ -46,9 +47,7 @@ const messages = {
},
};

const language = navigator.language.toLowerCase().startsWith('zh')
? 'zh-CN'
: 'en';
const language = navigator.language.toLowerCase() === 'zh-cn' ? 'zh-CN' : 'en';
Comment thread
yiliang114 marked this conversation as resolved.
Resolved
const t = (key) => messages[language][key];

document.documentElement.lang = language;
Expand All @@ -70,9 +69,7 @@ function render(state) {
toggle.className = enabled ? 'stop' : '';
qr.innerHTML = enabled ? state.qrSvg || '' : '';
url.textContent = enabled ? state.url || '' : '';
sleep.textContent = state.sleepInhibited
? t('awake')
: t('maySleep');
sleep.textContent = state.sleepInhibited ? t('awake') : t('maySleep');
error.hidden = true;
error.textContent = '';
}
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-shell/src-tauri/src/local_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const MAX_CONNECTIONS: usize = 64;
const HEADER_TIMEOUT: Duration = Duration::from_secs(10);
static NEXT_CONNECTION_ID: AtomicU64 = AtomicU64::new(1);

#[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
struct LocalNetwork {
address: Ipv4Addr,
netmask: Ipv4Addr,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2943,6 +2943,7 @@ export function DaemonSessionProvider(props: DaemonSessionProviderProps) {
setConnection((current) => ({
...current,
status: 'disconnected',
error: undefined,
}));
await delay(delayMs, abort.signal);
}
Expand Down
Loading