Files
ItzLinaton f573796549 Feat: Added startup command copy button (V2) (#7297)
Added a startup command copy button to the server startup page.

---

<img width="807" height="161"
alt="{8878188F-11F7-4EF5-B020-2D5C6AB12B94}"
src="https://github.com/user-attachments/assets/affe9c30-b74d-49a9-b5cb-e4adc121fe98"
/>
2026-10-16 14:12:23 -04:00

26 lines
956 B
TypeScript

import { Copy } from 'lucide-react';
import { Button, CopyOnClick, Icon, TitledGreyBox } from '@/sdk';
import type { ViewProps } from '@/sdk/theme';
export default function StartupCommand({ model, className }: ViewProps<'server.startup.command'>) {
return (
<TitledGreyBox
title='Startup Command'
actions={
model.command && (
<CopyOnClick text={model.command}>
<Button.Text type='button' size='xsmall' isSecondary aria-label='Copy startup command'>
<Icon icon={Copy} className='h-3.5 w-3.5' />
</Button.Text>
</CopyOnClick>
)
}
className={className}
>
<div className='px-1 py-2'>
<p className='rounded-sm bg-terminal px-4 py-2 font-mono'>{model.command}</p>
</div>
</TitledGreyBox>
);
}