Console pages as absolute deep links: cli/lib/console-links.ts builds the URL of every App Store Connect / Play Console page from apple.appId, play.developerId and play.appId (app list / developer chooser when unknown); every plain 'App Store Connect > ...' / 'Play Console > ...' direction in cli/ and templates/ now carries it, validate / scan / declarations / release plan JSON carry url, the desktop shows an Open button; tests/console-links.test.ts guards it; AGENTS rule 11, pitfall 71
This commit is contained in:
parent
f898d642d0
commit
e500e88e40
50 changed files with 381 additions and 92 deletions
17
apps/desktop/src/ui/OpenLink.tsx
Normal file
17
apps/desktop/src/ui/OpenLink.tsx
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// The "Open" button for a finding, notice or ask that carries an absolute console deep link (`url` from the CLI's
|
||||
// console-links module, pitfall 71): opens it in the browser through the open-external command.
|
||||
import { api, errorText } from '../api';
|
||||
import { t } from '../i18n';
|
||||
import { useData } from '../store';
|
||||
import { Icon } from './icons';
|
||||
|
||||
export function OpenLink({ url }: { url?: string | null }) {
|
||||
const d = useData();
|
||||
if (!url || !/^https:\/\//.test(url)) return null;
|
||||
return (
|
||||
<button className="btn btn-sm btn-ghost" title={url} data-testid="open-link"
|
||||
onClick={() => api.openExternal(url).catch(e => d.toast({ kind: 'bad', title: t('link.openFailed'), detail: errorText(e) }))}>
|
||||
<Icon name="external" />{t('link.open')}
|
||||
</button>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue