Skip to content

Commit 24dcd7d

Browse files
committed
improvement(extension): keep page-access copy concise
1 parent f74d8b3 commit 24dcd7d

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

‎apps/extension/src/capture.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class PageCaptureError extends Error {}
1515
export function captureErrorMessage(error: unknown): string {
1616
return error instanceof PageCaptureError
1717
? error.message
18-
: 'This page could not be read. Check site access and try again.'
18+
: 'This page could not be read. Try again.'
1919
}
2020

2121
/** Only emitted after verifying the selected document is still active. */
@@ -34,7 +34,7 @@ export class SiteAccessRequiredError extends PageCaptureError {
3434
readonly tabId: number,
3535
readonly windowId: number
3636
) {
37-
super('Enable page access once to use pages across websites. ')
37+
super('Page access is required.')
3838
}
3939
}
4040

‎apps/extension/src/sidepanel.tsx‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,13 +400,16 @@ function SidePanel({ origin }: SidePanelProps) {
400400
}
401401
role='status'
402402
>
403-
{typeof status === 'string' ? status : status.message}
404-
{status instanceof SiteAccessRequiredError && (
403+
{status instanceof SiteAccessRequiredError ? (
405404
<PageAccessButton
406405
onAccessGranted={() =>
407406
setStatus((current) => (current instanceof SiteAccessRequiredError ? '' : current))
408407
}
409408
/>
409+
) : typeof status === 'string' ? (
410+
status
411+
) : (
412+
status.message
410413
)}
411414
</div>
412415
<iframe

‎apps/extension/src/site-access.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ export function SiteAccessDialog({ onClose, onAccessGranted }: SiteAccessDialogP
113113
<ChipModalBody>
114114
<p className='text-[var(--text-muted)] text-small'>
115115
{allowed
116-
? 'Page access is enabled across websites.'
117-
: 'Allow Sim to read pages across websites when you attach a page or send with page reference enabled.'}
116+
? 'Allowed across websites.'
117+
: 'Sim reads pages only when you attach them or send with page reference on.'}
118118
</p>
119119
<PageAccessButton allowed={allowed} onAccessGranted={onAccessGranted} />
120120
</ChipModalBody>

0 commit comments

Comments
 (0)