Plugins menu item and link to run button

This commit is contained in:
Gregory Schier
2025-07-21 14:38:29 -07:00
parent c609d0ff0c
commit 44ee020383
4 changed files with 32 additions and 19 deletions

View File

@@ -10,6 +10,7 @@ import { invokeCmd } from '../lib/tauri';
import { Button } from './core/Button'; import { Button } from './core/Button';
import { Checkbox } from './core/Checkbox'; import { Checkbox } from './core/Checkbox';
import { DetailsBanner } from './core/DetailsBanner'; import { DetailsBanner } from './core/DetailsBanner';
import { Link } from './core/Link';
import { HStack, VStack } from './core/Stacks'; import { HStack, VStack } from './core/Stacks';
interface Props { interface Props {
@@ -131,21 +132,26 @@ function ExportDataDialogContent({
help='Environments marked as "sharable" will be exported by default' help='Environments marked as "sharable" will be exported by default'
/> />
</DetailsBanner> </DetailsBanner>
<HStack space={2} justifyContent="end"> <div className="grid grid-cols-[1fr_auto] items-center mt-6 pb-1.5">
<Button className="focus" variant="border" onClick={onHide}> <div>
Cancel <Link href="https://yaak.app/button/new" noUnderline className="text-text-subtle">Create Run Button</Link>
</Button> </div>
<Button <HStack space={2} justifyContent="end">
type="submit" <Button className="focus" variant="border" onClick={onHide}>
className="focus" Cancel
color="primary" </Button>
disabled={noneSelected} <Button
onClick={() => handleExport()} type="submit"
> className="focus"
Export{' '} color="primary"
{pluralizeCount('Workspace', numSelected, { omitSingle: true, noneWord: 'Nothing' })} disabled={noneSelected}
</Button> onClick={() => handleExport()}
</HStack> >
Export{' '}
{pluralizeCount('Workspace', numSelected, { omitSingle: true, noneWord: 'Nothing' })}
</Button>
</HStack>
</div>
</VStack> </VStack>
); );
} }

View File

@@ -46,7 +46,7 @@ export function SettingsPlugins() {
addBorders addBorders
tabListClassName="!-ml-3" tabListClassName="!-ml-3"
tabs={[ tabs={[
{ label: 'Marketplace', value: 'search' }, { label: 'Discover', value: 'search' },
{ {
label: 'Installed', label: 'Installed',
value: 'installed', value: 'installed',

View File

@@ -43,10 +43,11 @@ export function SettingsDropdown() {
}, },
}, },
{ {
label: 'Create Run Button', label: 'Plugins',
leftSlot: <Icon icon="rocket" />, leftSlot: <Icon icon="puzzle" />,
onSelect: () => openUrl("https://yaak.app/button/new"), onSelect: () => openSettings.mutate('plugins'),
}, },
{ type: 'separator', label: 'Share Workspace(s)' },
{ {
label: 'Import Data', label: 'Import Data',
leftSlot: <Icon icon="folder_input" />, leftSlot: <Icon icon="folder_input" />,
@@ -57,6 +58,11 @@ export function SettingsDropdown() {
leftSlot: <Icon icon="folder_output" />, leftSlot: <Icon icon="folder_output" />,
onSelect: () => exportData.mutate(), onSelect: () => exportData.mutate(),
}, },
{
label: 'Create Run Button',
leftSlot: <Icon icon="rocket" />,
onSelect: () => openUrl('https://yaak.app/button/new'),
},
{ type: 'separator', label: `Yaak v${appInfo.version}` }, { type: 'separator', label: `Yaak v${appInfo.version}` },
{ {
label: 'Purchase License', label: 'Purchase License',

View File

@@ -92,6 +92,7 @@ const icons = {
plug: lucide.Plug, plug: lucide.Plug,
plus: lucide.PlusIcon, plus: lucide.PlusIcon,
plus_circle: lucide.PlusCircleIcon, plus_circle: lucide.PlusCircleIcon,
puzzle: lucide.PuzzleIcon,
refresh: lucide.RefreshCwIcon, refresh: lucide.RefreshCwIcon,
rocket: lucide.RocketIcon, rocket: lucide.RocketIcon,
save: lucide.SaveIcon, save: lucide.SaveIcon,