mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
feat(ui): open the install dialog on the URL tab
Installing from a known repo URL is the common path, so it now leads the tab list and is where the dialog lands by default. The ?install=search link still opens the search tab.
This commit is contained in:
@@ -362,7 +362,7 @@ export default function InstallDialog({ kind, initialTab, initialSource, onClose
|
||||
|
||||
const tabs = !isAgent && (
|
||||
<div className="ss-tabs" role="tablist">
|
||||
{(['search', 'url'] as const).map((k) => (
|
||||
{(['url', 'search'] as const).map((k) => (
|
||||
<button key={k} type="button" role="tab" aria-selected={tab === k} className={tab === k ? 'on' : ''} onClick={() => setTab(k)}>
|
||||
{t(k === 'search' ? 'install.tab.search' : 'install.tab.url')}
|
||||
</button>
|
||||
|
||||
@@ -678,7 +678,7 @@ export default function ResourcesPage({ kind }: { kind: Kind }) {
|
||||
icon={isAgent ? Bot : Puzzle}
|
||||
title={t(isAgent ? 'resources.agents.empty.title' : 'resources.skills.empty.title')}
|
||||
description={t(isAgent ? 'resources.agents.empty.description' : 'resources.skills.empty.description')}
|
||||
action={<Button variant="primary" onClick={() => setInstall('search')}><Download size={15} />{t('resources.install')}</Button>}
|
||||
action={<Button variant="primary" onClick={() => setInstall('url')}><Download size={15} />{t('resources.install')}</Button>}
|
||||
/>
|
||||
) : (
|
||||
<EmptyState
|
||||
@@ -756,7 +756,7 @@ export default function ResourcesPage({ kind }: { kind: Kind }) {
|
||||
{t('resources.newSkill')}
|
||||
</Link>
|
||||
)}
|
||||
<Button variant="primary" data-tour="install-button" onClick={() => setInstall('search')}>
|
||||
<Button variant="primary" data-tour="install-button" onClick={() => setInstall('url')}>
|
||||
<Download size={15} />
|
||||
{t('resources.install')}
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user