fix(skills): simplify skill source cards
This commit is contained in:
@@ -439,12 +439,6 @@ const SkillListItem: React.FC<SkillListItemProps> = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const isMobile = isMobileDeviceViaCSS();
|
const isMobile = isMobileDeviceViaCSS();
|
||||||
const sourceLabel = skill.source === 'claude'
|
|
||||||
? t('settings.skills.sidebar.badge.claude')
|
|
||||||
: skill.source === 'agents'
|
|
||||||
? t('settings.skills.sidebar.badge.agents')
|
|
||||||
: t('settings.skills.sidebar.badge.opencode');
|
|
||||||
const badgeClassName = 'typography-micro text-muted-foreground bg-[var(--surface-muted)] px-1 rounded flex-shrink-0 leading-none pb-px border border-[var(--interactive-border)]/50';
|
|
||||||
const isBuiltIn = isBuiltInSkill(skill);
|
const isBuiltIn = isBuiltInSkill(skill);
|
||||||
const canRename = isRenamableSkill(skill);
|
const canRename = isRenamableSkill(skill);
|
||||||
const [isContextMenuOpen, setIsContextMenuOpen] = React.useState(false);
|
const [isContextMenuOpen, setIsContextMenuOpen] = React.useState(false);
|
||||||
@@ -479,10 +473,6 @@ const SkillListItem: React.FC<SkillListItemProps> = ({
|
|||||||
<span className="typography-ui-label font-normal truncate text-foreground">
|
<span className="typography-ui-label font-normal truncate text-foreground">
|
||||||
{skill.name}
|
{skill.name}
|
||||||
</span>
|
</span>
|
||||||
<span className={badgeClassName}>
|
|
||||||
{skill.scope}
|
|
||||||
</span>
|
|
||||||
<span className={badgeClassName}>{sourceLabel}</span>
|
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|||||||
@@ -391,7 +391,7 @@ export const SkillsCatalogPage: React.FC<SkillsCatalogPageProps> = ({ mode, onMo
|
|||||||
type="button"
|
type="button"
|
||||||
data-settings-item="skills.catalog.add-catalog"
|
data-settings-item="skills.catalog.add-catalog"
|
||||||
onClick={() => setAddCatalogOpen(true)}
|
onClick={() => setAddCatalogOpen(true)}
|
||||||
className="min-h-24 text-left rounded-lg border border-dashed border-[var(--surface-subtle)] hover:border-[var(--interactive-border-hover)] hover:bg-[var(--surface-muted)] p-3.5 flex gap-3 items-start transition-colors"
|
className="min-h-24 text-left rounded-lg border border-dashed border-[var(--interactive-border)] hover:border-[var(--interactive-border-hover)] hover:bg-[var(--surface-muted)] p-3.5 flex gap-3 items-start transition-colors"
|
||||||
>
|
>
|
||||||
<span className="flex items-center justify-center rounded-md bg-transparent text-muted-foreground w-8 h-8 shrink-0">
|
<span className="flex items-center justify-center rounded-md bg-transparent text-muted-foreground w-8 h-8 shrink-0">
|
||||||
<Icon name="add" className="h-4 w-4" />
|
<Icon name="add" className="h-4 w-4" />
|
||||||
|
|||||||
Reference in New Issue
Block a user