Skip to content

Commit 904b25a

Browse files
authored
chore: add missing delete action (#1317)
The disk image details page didn't have any actions, which is different from every other details page. This adds actions, but only Delete since the other actions are essentially just links to tabs here. Fixes #1299. Signed-off-by: Tim deBoer <[email protected]>
1 parent 9d2b9db commit 904b25a

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

packages/frontend/src/lib/disk-image/DiskImageActions.svelte

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ onMount(async () => {
3333
});
3434
</script>
3535

36-
<!-- Only show the Terminal button if object.arch actually exists or else we will not be able to pass in the architecture information to the build correctly.
37-
Only show if on macOS as well as that is the only option we support at the moment -->
38-
{#if object.arch && !isWindows}
39-
<ListItemButtonIcon title="Launch VM" onClick={gotoVM} detailed={detailed} icon={faTerminal} />
36+
{#if !detailed}
37+
<!-- Only show the Terminal button if object.arch actually exists or else we will not be able to pass in the architecture information to the build correctly.
38+
Only show if on macOS as well as that is the only option we support at the moment -->
39+
{#if object.arch && !isWindows}
40+
<ListItemButtonIcon title="Launch VM" onClick={gotoVM} detailed={detailed} icon={faTerminal} />
41+
{/if}
42+
<ListItemButtonIcon title="Build Logs" onClick={gotoLogs} detailed={detailed} icon={faFileAlt} />
4043
{/if}
41-
<ListItemButtonIcon title="Build Logs" onClick={gotoLogs} detailed={detailed} icon={faFileAlt} />
4244
<ListItemButtonIcon title="Delete Build" onClick={deleteBuild} detailed={detailed} icon={faTrash} />

packages/frontend/src/lib/disk-image/DiskImageDetails.svelte

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { goToDiskImages } from '../navigation';
1313
import DiskImageDetailsVirtualMachine from './DiskImageDetailsVirtualMachine.svelte';
1414
import type { Unsubscriber } from 'svelte/store';
1515
import { bootcClient } from '/@/api/client';
16+
import DiskImageActions from './DiskImageActions.svelte';
1617
1718
interface Props {
1819
id: string;
@@ -61,6 +62,11 @@ onDestroy(() => {
6162
onclose={goToDiskImages}
6263
onbreadcrumbClick={goToDiskImages}>
6364
<DiskImageIcon slot="icon" size="30px" />
65+
<svelte:fragment slot="actions">
66+
{#if diskImage}
67+
<DiskImageActions object={diskImage} detailed={true} />
68+
{/if}
69+
</svelte:fragment>
6470
<svelte:fragment slot="tabs">
6571
<Tab title="Summary" selected={isTabSelected($router.path, 'summary')} url={getTabUrl($router.path, 'summary')} />
6672
<Tab title="Build Log" selected={isTabSelected($router.path, 'build')} url={getTabUrl($router.path, 'build')} />

0 commit comments

Comments
 (0)