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

View File

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

View File

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

View File

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