fix(app): reopen hosted sites from their launch intent
This commit is contained in:
1 parent
4f8ead638b
commit
ac45c47d9e
8 files changed
+416
-94
No files matched your search
@@ -59,6 +59,8 @@ export function LauncherForm({
|
||||
onModeChange,
|
||||
sites,
|
||||
startupSite,
|
||||
ownedStartup = false,
|
||||
ownedSites = [],
|
||||
onToggleStartupSite,
|
||||
onRemoveSite,
|
||||
onSelectSite,
|
||||
@@ -78,6 +80,8 @@ export function LauncherForm({
|
||||
onModeChange: (mode: AppMode) => void;
|
||||
sites: readonly string[];
|
||||
startupSite: string;
|
||||
ownedStartup?: boolean;
|
||||
ownedSites?: readonly string[];
|
||||
onToggleStartupSite: (site: string) => void;
|
||||
onRemoveSite: (site: string) => void;
|
||||
onSelectSite?: (site: string) => void;
|
||||
@@ -151,7 +155,7 @@ export function LauncherForm({
|
||||
{sites.length > 0 && <div className="lr-client-approved-sites" role="list">{sites.map((site, index) => <div key={site} className="lr-client-approved-site" role="listitem">
|
||||
<a href={entryURL(`${site}/#piik-client=1`)} target="_blank" rel="noopener noreferrer" onClick={onOpen}>{site}<span aria-hidden="true"> ↗</span></a>
|
||||
<div className="lr-client-site-actions">
|
||||
<Btn icon="star" title="client.connect.openOnStart" size="dense" pressed={startupSite === site}
|
||||
<Btn icon="star" title="client.connect.openOnStart" size="dense" pressed={startupSite === site || ownedStartup && ownedSites.includes(site)}
|
||||
hint="hint-client-site" disabled={siteBusy} onClick={() => onToggleStartupSite(site)} />
|
||||
<Btn id={`${accessHintId}-remove-${index}`} icon="x" title="client.connect.remove" size="dense" hint="hint-close" disabled={siteBusy} onClick={() => {
|
||||
const button = standbyRef.current?.ownerDocument.activeElement;
|
||||
@@ -162,6 +166,11 @@ export function LauncherForm({
|
||||
</div>)}</div>}
|
||||
</section>
|
||||
|
||||
{ownedStartup && <label className="lr-client-approval-startup">
|
||||
<input type="checkbox" checked disabled={siteBusy} onChange={() => onToggleStartupSite("")} />
|
||||
<Glyph name="star" size={18} />
|
||||
<span className={vis ? "visually-hidden" : undefined}>{t("client.connect.openOnStart")}</span>
|
||||
</label>}
|
||||
{roomError}
|
||||
{target ? <><a className="lr-btn is-primary" href={entryURL(target)} onClick={onOpen} aria-label={t("client.launch.go")}>
|
||||
<Glyph name="arrowRight" size={19} />{vis ? null : <span className="lr-cap">{t("client.launch.go")}</span>}
|
||||
|
||||
Reference in new issue
Block a user