ui: migrate the extension pages and Configs; five components they needed

Phase 2, part 1.  Three files leave Semantic UI (baseline 75 -> 72), and the
components they needed join the library and the gallery:

  Header       Semantic's shape (as/icon/subheader/dividing).  47 files use
               <Header>, and the level now picks the size, so the type scale
               stays a scale instead of each call site choosing a font size.
  Message      gains an icon and a dismiss button.
  ActionInput  input and button sharing one outline, for <Input action={...}/>.
  Loading      centered loader with a caption, replacing the
               <Loader active inline='centered'> + wrapper div in 19 places.
  Modal        becomes compound - Modal.Header/.Content/.Actions, plus
               Semantic's open, closeIcon, and size names - because 34 files
               are written against that shape.

test-utils mounts MantineProvider with ThemeProvider's exact configuration:
migrated components render Mantine internals and every one of their test files
would otherwise need its own provider.

One Semantic bleed found and fixed: semantic.min.css sets
`h1,h2,h3,h4,h5 { font-family: Lato }` and loads after Mantine's element rule,
so headings ignored the theme's body face.  Only visible in amber, where the
body is mono and the headings were not.  A class-level restatement outranks it;
the rule comes out when Semantic does.

Verified: 925 jest tests, clean production build, and a night-mode audit of
every painted pixel in the gallery (red-only, one known false positive).  The
Configs backup and restore flow was exercised against the real API.
This commit is contained in:
Roland 2026-07-29 20:25:34 -06:00
parent 6ffc5b57c8
commit 00c52872fa
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
12 changed files with 621 additions and 202 deletions

View file

@ -1,19 +1,16 @@
import {APIButton} from "../Common";
import {Button, Header, Icon, Loader, Modal, Popup, Table} from "../Theme";
import React, {useContext, useEffect, useState} from "react";
import {TableBody, TableCell, TableHeader, TableHeaderCell, TableRow} from "semantic-ui-react";
import {TableRowPlaceholder} from "../Placeholder";
import {Button, Header, Icon, IconButton, Loader, Loading, Modal, Placeholder, Table, Tooltip} from "../ui";
import React, {useEffect, useState} from "react";
import {getConfigText, getConfigBackups, postConfigBackupImport, postConfigBackupPreview} from "../../api";
import {ThemeContext} from "../../contexts/contexts";
function WarningIcon({ok}) {
// null is empty, true is valid, false is invalid.
const trigger = <Icon
color={ok === true ? 'violet' : ok === false ? 'red' : 'grey'}
name={ok === true ? 'check' : ok === false ? 'close' : 'check'}
/>;
const content = ok === true ? 'Valid and can be imported.' : ok === false ? 'Invalid, can be overwritten.' : 'Empty config, can be overwritten.';
return <Popup trigger={trigger} content={content}/>
return <Tooltip label={content}>
<span style={{color: ok === true ? 'var(--violet)' : ok === false ? 'var(--red)' : 'var(--muted)'}}>
<Icon name={ok === false ? 'close' : 'check'} label={content}/>
</span>
</Tooltip>
}
const TYPE_LABELS = {
@ -51,22 +48,23 @@ function groupItemsByType(items) {
}));
}
function PreviewItemTable({items, negative, inverted}) {
function PreviewItemTable({items, negative}) {
if (!items.length) return null;
const columns = TYPE_COLUMNS[items[0].type] || [{key: 'type', header: 'Item'}];
return <Table compact basic='very' size='small' inverted={!!inverted} style={{marginBottom: '0.5em'}}>
<TableHeader>
<TableRow>
{columns.map(col => <TableHeaderCell key={col.key}>{col.header}</TableHeaderCell>)}
</TableRow>
</TableHeader>
<TableBody>
{items.map((item, i) => <TableRow key={i} negative={negative}>
return <Table style={{marginBottom: '0.5em'}}>
<Table.Header>
<Table.Row>
{columns.map(col => <Table.HeaderCell key={col.key}>{col.header}</Table.HeaderCell>)}
</Table.Row>
</Table.Header>
<Table.Body>
{/* Items being removed take the failed treatment: dashed, in every theme. */}
{items.map((item, i) => <Table.Row key={i} failed={negative}>
{columns.map(col =>
<TableCell key={col.key}>{item[col.key] || ''}</TableCell>
<Table.Cell key={col.key}>{item[col.key] || ''}</Table.Cell>
)}
</TableRow>)}
</TableBody>
</Table.Row>)}
</Table.Body>
</Table>;
}
@ -82,41 +80,44 @@ function BackupDateRow({date, previews, previewsLoaded, onSelect}) {
const mergeHasChanges = hasChanges(mergePreview);
const overwriteHasChanges = hasChanges(overwritePreview);
const noChanges = <span style={{color: 'var(--muted)', fontStyle: 'italic'}}>No changes</span>;
const previewFailed = <Tooltip label='Failed to load preview'>
<span style={{color: 'var(--red)'}}><Icon name='warning sign' label='Failed to load preview'/></span>
</Tooltip>;
let mergeCell;
if (!mergeLoaded) {
mergeCell = <Loader size='mini' active inline/>;
mergeCell = <Loader size='xs'/>;
} else if (mergePreview === null) {
mergeCell = <Popup trigger={<Icon name='warning sign' color='red'/>} content='Failed to load preview'/>;
mergeCell = previewFailed;
} else if (mergeHasChanges) {
mergeCell = <Button size='mini' color='green' onClick={() => onSelect(date, 'merge', mergePreview)}>
<Icon name='plus'/> Merge
</Button>;
mergeCell = <Button size='xs' role='save' icon='plus'
onClick={() => onSelect(date, 'merge', mergePreview)}>Merge</Button>;
} else {
mergeCell = <span style={{color: 'grey', fontStyle: 'italic'}}>No changes</span>;
mergeCell = noChanges;
}
let overwriteCell;
if (!overwriteLoaded) {
overwriteCell = <Loader size='mini' active inline/>;
overwriteCell = <Loader size='xs'/>;
} else if (overwritePreview === null) {
overwriteCell = <Popup trigger={<Icon name='warning sign' color='red'/>} content='Failed to load preview'/>;
overwriteCell = previewFailed;
} else if (overwriteHasChanges) {
overwriteCell = <Button size='mini' color='orange' onClick={() => onSelect(date, 'overwrite', overwritePreview)}>
<Icon name='refresh'/> Overwrite
</Button>;
// Overwrite discards whatever is in the database, so it warns rather than saves.
overwriteCell = <Button size='xs' role='retry' icon='refresh'
onClick={() => onSelect(date, 'overwrite', overwritePreview)}>Overwrite</Button>;
} else {
overwriteCell = <span style={{color: 'grey', fontStyle: 'italic'}}>No changes</span>;
overwriteCell = noChanges;
}
return <TableRow>
<TableCell>{formatDate(date)}</TableCell>
<TableCell>{mergeCell}</TableCell>
<TableCell>{overwriteCell}</TableCell>
</TableRow>;
return <Table.Row>
<Table.Cell>{formatDate(date)}</Table.Cell>
<Table.Cell>{mergeCell}</Table.Cell>
<Table.Cell>{overwriteCell}</Table.Cell>
</Table.Row>;
}
function BackupsModal({open, onClose, fileName, fetchConfigs}) {
const {inverted} = useContext(ThemeContext);
const [dates, setDates] = useState([]);
const [datesLoading, setDatesLoading] = useState(true);
const [previews, setPreviews] = useState({});
@ -202,52 +203,45 @@ function BackupsModal({open, onClose, fileName, fetchConfigs}) {
</Modal.Header>
<Modal.Content>
{applying
? <div style={{textAlign: 'center', padding: '2em'}}>
<Loader active inline='centered'>Applying backup...</Loader>
</div>
? <Loading>Applying backup...</Loading>
: <>
{preview.add.length > 0 && <>
<Header as='h4' color='green'>
<Icon name='plus'/> {preview.add.length} item{preview.add.length !== 1 ? 's' : ''} to add
<Header as='h4' icon='plus' style={{color: 'var(--green)'}}>
{preview.add.length} item{preview.add.length !== 1 ? 's' : ''} to add
</Header>
<div style={{maxHeight: '300px', overflowY: 'auto', marginBottom: '1em'}}>
{groupItemsByType(preview.add).map(group =>
<React.Fragment key={group.type}>
<Header as='h5' inverted={!!inverted}
style={{marginBottom: '0.3em'}}>{group.label}</Header>
<PreviewItemTable items={group.items} inverted={inverted}/>
<Header as='h5' style={{marginBottom: '0.3em'}}>{group.label}</Header>
<PreviewItemTable items={group.items}/>
</React.Fragment>
)}
</div>
</>}
{preview.remove.length > 0 && <>
<Header as='h4' color='red'>
<Icon name='minus'/> {preview.remove.length} item{preview.remove.length !== 1 ? 's' : ''} to
remove
<Header as='h4' icon='minus' style={{color: 'var(--red)'}}>
{preview.remove.length} item{preview.remove.length !== 1 ? 's' : ''} to remove
</Header>
<div style={{maxHeight: '300px', overflowY: 'auto', marginBottom: '1em'}}>
{groupItemsByType(preview.remove).map(group =>
<React.Fragment key={group.type}>
<Header as='h5' inverted={!!inverted}
style={{marginBottom: '0.3em'}}>{group.label}</Header>
<PreviewItemTable items={group.items} negative inverted={inverted}/>
<Header as='h5' style={{marginBottom: '0.3em'}}>{group.label}</Header>
<PreviewItemTable items={group.items} negative/>
</React.Fragment>
)}
</div>
</>}
<p style={{color: 'grey'}}>{preview.unchanged} unchanged
<p style={{color: 'var(--muted)'}}>{preview.unchanged} unchanged
item{preview.unchanged !== 1 ? 's' : ''}</p>
</>
}
</Modal.Content>
<Modal.Actions>
{!applying && <>
<Button onClick={handleBack}>Back</Button>
<Button color='green' onClick={handleApply}>
<Icon name='check'/> Apply
</Button>
<Button role='cancel' onClick={handleBack}>Back</Button>
<Button role='save' icon='check' onClick={handleApply}>Apply</Button>
</>}
</Modal.Actions>
</Modal>;
@ -258,21 +252,19 @@ function BackupsModal({open, onClose, fileName, fetchConfigs}) {
<Modal.Header>Restore Backup: {fileName}</Modal.Header>
<Modal.Content>
{datesLoading
? <div style={{textAlign: 'center', padding: '2em'}}>
<Loader active inline='centered'>Loading backups...</Loader>
</div>
? <Loading>Loading backups...</Loading>
: dates.length === 0
? <p>No backups available for this config.</p>
: <div style={{maxHeight: '400px', overflowY: 'auto'}}>
<Table compact unstackable>
<TableHeader>
<TableRow>
<TableHeaderCell>Date</TableHeaderCell>
<TableHeaderCell>Merge</TableHeaderCell>
<TableHeaderCell>Overwrite</TableHeaderCell>
</TableRow>
</TableHeader>
<TableBody>
<Table>
<Table.Header>
<Table.Row>
<Table.HeaderCell>Date</Table.HeaderCell>
<Table.HeaderCell>Merge</Table.HeaderCell>
<Table.HeaderCell>Overwrite</Table.HeaderCell>
</Table.Row>
</Table.Header>
<Table.Body>
{dates.map(date =>
<BackupDateRow
key={date}
@ -282,13 +274,13 @@ function BackupsModal({open, onClose, fileName, fetchConfigs}) {
onSelect={handleSelect}
/>
)}
</TableBody>
</Table.Body>
</Table>
</div>
}
</Modal.Content>
<Modal.Actions>
<Button onClick={handleClose}>Close</Button>
<Button role='cancel' onClick={handleClose}>Close</Button>
</Modal.Actions>
</Modal>;
}
@ -318,14 +310,14 @@ function ConfigContentModal({open, onClose, fileName}) {
<Modal.Header>{fileName}</Modal.Header>
<Modal.Content scrolling>
{loading
? <Loader active inline='centered'/>
? <Loading/>
: content
? <pre style={{whiteSpace: 'pre-wrap', wordBreak: 'break-word'}}>{content}</pre>
: <p>Failed to load config contents.</p>
}
</Modal.Content>
<Modal.Actions>
<Button onClick={onClose}>Close</Button>
<Button role='cancel' onClick={onClose}>Close</Button>
</Modal.Actions>
</Modal>;
}
@ -369,20 +361,21 @@ function ConfigTableRow({config, importConfig, saveConfig, fetchConfigs}) {
/>;
}
return <TableRow>
<TableCell><span style={{cursor: 'pointer'}} onClick={() => setContentModalOpen(true)}>{file_name}</span></TableCell>
<TableCell><WarningIcon ok={successful_import}/></TableCell>
<TableCell><WarningIcon ok={valid}/></TableCell>
<TableCell className="hide-on-mobile">
return <Table.Row>
<Table.Cell>
<span style={{cursor: 'pointer'}} onClick={() => setContentModalOpen(true)}>{file_name}</span>
</Table.Cell>
<Table.Cell><WarningIcon ok={successful_import}/></Table.Cell>
<Table.Cell><WarningIcon ok={valid}/></Table.Cell>
<Table.Cell className="hide-on-mobile">
{has_backup_import
? <Button icon size='mini' onClick={() => setBackupsModalOpen(true)}>
<Icon name='undo'/>
</Button>
? <IconButton icon='undo' label='Restore a backup'
onClick={() => setBackupsModalOpen(true)}/>
: null
}
</TableCell>
<TableCell>{importButton}</TableCell>
<TableCell>{saveButton}</TableCell>
</Table.Cell>
<Table.Cell>{importButton}</Table.Cell>
<Table.Cell>{saveButton}</Table.Cell>
{backupsModalOpen && <BackupsModal
open={backupsModalOpen}
onClose={() => setBackupsModalOpen(false)}
@ -394,24 +387,24 @@ function ConfigTableRow({config, importConfig, saveConfig, fetchConfigs}) {
onClose={() => setContentModalOpen(false)}
fileName={file_name}
/>}
</TableRow>
</Table.Row>
}
export function ConfigsTable({configs, loading, importConfig, saveConfig, fetchConfigs}) {
let body = <TableRow>
<TableCell colSpan={6}><TableRowPlaceholder/></TableCell>
</TableRow>
let body = <Table.Row>
<Table.Cell colSpan={6}><Placeholder lines={2}/></Table.Cell>
</Table.Row>
if (loading) {
// Configs are being fetched again.
} else if (configs === undefined) {
body = <TableRow>
<TableCell colSpan={6}>Failed to fetch configs</TableCell>
</TableRow>;
body = <Table.Row>
<Table.Cell colSpan={6}>Failed to fetch configs</Table.Cell>
</Table.Row>;
} else if (configs && Object.keys(configs).length === 0) {
body = <TableRow>
<TableCell colSpan={6}>No configs exist. Try tagging some files.</TableCell>
</TableRow>;
body = <Table.Row>
<Table.Cell colSpan={6}>No configs exist. Try tagging some files.</Table.Cell>
</Table.Row>;
} else if (configs) {
body = Object.entries(configs).map(([key, value]) =>
<ConfigTableRow
@ -424,20 +417,20 @@ export function ConfigsTable({configs, loading, importConfig, saveConfig, fetchC
);
}
return <Table unstackable striped compact>
<TableHeader>
<TableRow>
<TableHeaderCell width={8}>File Name</TableHeaderCell>
<TableHeaderCell width={1}>Imported</TableHeaderCell>
<TableHeaderCell width={1}>Valid</TableHeaderCell>
<TableHeaderCell width={3} className="hide-on-mobile">Restore</TableHeaderCell>
<TableHeaderCell width={1}>Import</TableHeaderCell>
<TableHeaderCell width={1}>Save</TableHeaderCell>
</TableRow>
</TableHeader>
return <Table>
<Table.Header>
<Table.Row>
<Table.HeaderCell>File Name</Table.HeaderCell>
<Table.HeaderCell>Imported</Table.HeaderCell>
<Table.HeaderCell>Valid</Table.HeaderCell>
<Table.HeaderCell className="hide-on-mobile">Restore</Table.HeaderCell>
<Table.HeaderCell>Import</Table.HeaderCell>
<Table.HeaderCell>Save</Table.HeaderCell>
</Table.Row>
</Table.Header>
<TableBody>
<Table.Body>
{body}
</TableBody>
</Table.Body>
</Table>
}

View file

@ -1,6 +1,6 @@
import React from "react";
import {Link} from "react-router";
import {Button, Icon, Message} from "semantic-ui-react";
import {Button, Message} from "../ui";
import {useLocalStorage} from "../Common";
import {useExtensionInstalled} from "../../hooks/customHooks";
import {isExtensionSupportedBrowser} from "./browserDetect";
@ -25,18 +25,19 @@ export function ExtensionInstallSuggestion() {
// Also skip on browsers that cannot install the extension (e.g. Safari).
if (installed !== false || dismissed || !isExtensionSupportedBrowser()) return null;
return <Message info icon onDismiss={() => setDismissed(true)}>
<Icon name='puzzle piece'/>
<Message.Content>
<Message.Header>Install the WROLPi browser extension</Message.Header>
<p>
Send pages, videos, and feeds to this WROLPi straight from any
tab. Open-source and not distributed via the official browser
stores.
</p>
<Button as={Link} to='/admin/extension' primary size='small'>
Open install page
</Button>
</Message.Content>
return <Message
kind='info'
icon='puzzle piece'
title='Install the WROLPi browser extension'
onDismiss={() => setDismissed(true)}
>
<p>
Send pages, videos, and feeds to this WROLPi straight from any
tab. Open-source and not distributed via the official browser
stores.
</p>
<Button component={Link} to='/admin/extension' role='primary' size='xs'>
Open install page
</Button>
</Message>;
}

View file

@ -1,7 +1,5 @@
import React from "react";
import {Button, Header, Icon, Segment} from "../Theme";
import {Input, Message} from "semantic-ui-react";
import {ThemeContext} from "../../contexts/contexts";
import {ActionInput, Button, Header, Message, Panel, Stack} from "../ui";
import {detectBrowser} from "./browserDetect";
// The WROLPi browser extension is distributed off-store: Chrome users
@ -34,49 +32,46 @@ function DestinationHint() {
// Fall through silently — the user can still copy manually.
}
};
return <Segment style={{marginBottom: '1em'}}>
<Header as='h4'>
<Icon name='globe'/>
This WROLPi's URL
</Header>
<p style={{color: 'grey'}}>
return <Panel style={{marginBottom: '1em'}}>
<Header as='h4' icon='globe'>This WROLPi's URL</Header>
<p style={{color: 'var(--muted)'}}>
After installing the extension, paste this URL into the
destination field on the extension's options page.
</p>
<Input
fluid
<ActionInput
readOnly
value={origin}
action={
<Button
icon={copied ? 'check' : 'copy'}
color={copied ? 'green' : null}
content={copied ? 'Copied' : 'Copy'}
role={copied ? 'save' : 'cancel'}
onClick={onCopy}
/>
>
{copied ? 'Copied' : 'Copy'}
</Button>
}
/>
</Segment>;
</Panel>;
}
function FirefoxCard({metadata, version}) {
const file = (metadata && metadata.files && metadata.files['wrolpi-firefox.xpi']) || {};
const available = !!file.available;
return <Segment>
<Header as='h3'>
<Icon name='firefox'/>
return <Panel>
<Header as='h3' icon='firefox'>
Firefox{version ? ` — v${version}` : ''}
</Header>
<p>One-click install. Mozilla has signed this build.</p>
<Button
primary
as='a'
role='primary'
component='a'
href={FIREFOX_XPI_PATH}
disabled={!available}
icon='download'
content={available ? `Install for Firefox (${formatSize(file.size_bytes)})` : 'Not yet available'}
/>
<p style={{marginTop: '1em', color: 'grey'}}>
>
{available ? `Install for Firefox (${formatSize(file.size_bytes)})` : 'Not yet available'}
</Button>
<p style={{marginTop: '1em', color: 'var(--muted)'}}>
Firefox will ask you to confirm the install. Accept the prompt.
</p>
<Header as='h4' style={{marginTop: '1.5em'}}>After installing</Header>
@ -84,15 +79,14 @@ function FirefoxCard({metadata, version}) {
<li>Open the extension's <strong>Options</strong> page (right-click the toolbar icon &rarr; Manage Extension &rarr; Options) and add this WROLPi as a destination. Click <strong>Test</strong> to grant API access.</li>
<li>Click the extension icon in the toolbar &rarr; the permission dropdown &rarr; <strong>Always Allow on this site</strong>. Firefox requires this second click in addition to the Test grant — without it, the extension can talk to your WROLPi but can't mark its tabs as connected.</li>
</ol>
</Segment>;
</Panel>;
}
function ChromiumCard({metadata, version}) {
const file = (metadata && metadata.files && metadata.files['wrolpi-chrome.zip']) || {};
const available = !!file.available;
return <Segment>
<Header as='h3'>
<Icon name='chrome'/>
return <Panel>
<Header as='h3' icon='chrome'>
Chrome / Brave / Edge{version ? ` — v${version}` : ''}
</Header>
<p>
@ -100,14 +94,15 @@ function ChromiumCard({metadata, version}) {
outside the Web Store, so we sideload via the built-in developer flow.
</p>
<Button
primary
as='a'
role='primary'
component='a'
href={CHROME_ZIP_PATH}
disabled={!available}
icon='download'
content={available ? `Download .zip (${formatSize(file.size_bytes)})` : 'Not yet available'}
download
/>
>
{available ? `Download .zip (${formatSize(file.size_bytes)})` : 'Not yet available'}
</Button>
<Header as='h4' style={{marginTop: '1.5em'}}>Install steps</Header>
<ol style={{lineHeight: 1.7, paddingLeft: '1.2em'}}>
<li>Download the <code>.zip</code> above and extract it to a folder you'll keep around.</li>
@ -115,28 +110,27 @@ function ChromiumCard({metadata, version}) {
<li>Toggle <strong>Developer mode</strong> on (top-right).</li>
<li>Click <strong>Load unpacked</strong> and pick the extracted folder.</li>
</ol>
<p style={{color: 'grey'}}>
<p style={{color: 'var(--muted)'}}>
The extension stays installed across browser restarts. Don't delete the
extracted folder — the browser loads from it directly.
</p>
</Segment>;
</Panel>;
}
function UnknownCard() {
return <Segment>
return <Panel>
<Header as='h3'>Unsupported browser</Header>
<p>
The WROLPi extension supports Chrome, Brave, Edge, and Firefox. Open
this page in one of those browsers to install.
</p>
</Segment>;
</Panel>;
}
export function ExtensionPage() {
const [metadata, setMetadata] = React.useState(null);
const [error, setError] = React.useState(null);
const browser = detectBrowser();
const {s} = React.useContext(ThemeContext);
React.useEffect(() => {
let cancelled = false;
@ -148,47 +142,43 @@ export function ExtensionPage() {
}, []);
if (error) {
return <Segment>
<Message negative>
<Message.Header>Couldn't load extension info</Message.Header>
<p>{error}</p>
</Message>
</Segment>;
return <Message kind='error' title="Couldn't load extension info">{error}</Message>;
}
const versions = (metadata && metadata.versions) || {};
const anyAvailable = metadata && Object.values(metadata.files || {}).some(f => f.available);
return <>
<Header as='h1'>Browser Extension</Header>
<p {...s}>
Install the WROLPi browser extension to send pages, videos, and feeds to
this WROLPi from any tab. The extension is open-source and not distributed
via official browser stores — it ships with each WROLPi release.
</p>
return <Stack gap='md'>
<div>
<Header as='h1'>Browser Extension</Header>
<p>
Install the WROLPi browser extension to send pages, videos, and feeds to
this WROLPi from any tab. The extension is open-source and not distributed
via official browser stores — it ships with each WROLPi release.
</p>
</div>
<DestinationHint/>
{metadata && !anyAvailable && <Message warning>
<Message.Header>Extension binaries not yet installed</Message.Header>
<p>
The extension binaries aren't on this WROLPi yet. They ship with the
next release; pull the latest and they'll appear here.
</p>
{metadata && !anyAvailable && <Message kind='warning' title='Extension binaries not yet installed'>
The extension binaries aren't on this WROLPi yet. They ship with the
next release; pull the latest and they'll appear here.
</Message>}
{browser === 'firefox' && <FirefoxCard metadata={metadata} version={versions.firefox}/>}
{browser === 'chromium' && <ChromiumCard metadata={metadata} version={versions.chrome}/>}
{browser === 'unknown' && <UnknownCard/>}
<Segment basic style={{marginTop: '2em'}}>
<Header as='h4'>Both browsers, just in case</Header>
<p style={{color: 'grey'}}>
You can install for a different browser too — useful if you sync
between machines.
</p>
<Stack gap='sm' style={{marginTop: '1em'}}>
<div>
<Header as='h4' dividing>Both browsers, just in case</Header>
<p style={{color: 'var(--muted)'}}>
You can install for a different browser too — useful if you sync
between machines.
</p>
</div>
{browser !== 'firefox' && <FirefoxCard metadata={metadata} version={versions.firefox}/>}
{browser !== 'chromium' && <ChromiumCard metadata={metadata} version={versions.chrome}/>}
</Segment>
</>;
</Stack>
</Stack>;
}