Skip to content

Commit

Permalink
fix: display spoolman tools dropdown only when one exists.
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Dej <[email protected]>
  • Loading branch information
meteyou committed Dec 1, 2024
1 parent 8649903 commit 74e9cd8
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/components/panels/SpoolmanPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@
<div>
<panel :icon="mdiAdjust" :title="title" card-class="spoolman-panel" :collapsible="true">
<template #buttons>
<spoolman-tools-dropdown :tools="toolsWithSpoolId" />
<v-btn
v-if="toolsWithSpoolId.length === 0"
icon
tile
:title="changeSpoolTooltip"
@click="showChangeSpoolDialog = true">
<spoolman-tools-dropdown v-if="toolsWithSpoolId.length > 0" :tools="toolsWithSpoolId" />
<v-btn v-else icon tile :title="changeSpoolTooltip" @click="showChangeSpoolDialog = true">
<v-icon>{{ mdiSwapVertical }}</v-icon>
</v-btn>
<v-menu :offset-y="true" :close-on-content-click="false" left>
Expand Down

0 comments on commit 74e9cd8

Please sign in to comment.