Skip to content

Commit

Permalink
fix(Heaters): no context menu on left click
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Lamas <[email protected]>
  • Loading branch information
pedrolamas committed Dec 28, 2024
1 parent 8fa6dd7 commit 82b8442
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/components/widgets/thermals/TemperatureTargets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
<tr
v-for="item in heaters"
:key="item.key"
@click="handleHeaterRowClick(item, $event)"
@contextmenu.prevent="handleHeaterRowClick(item, $event)"
>
<td>
Expand All @@ -43,7 +42,7 @@
<span
:class="{ 'active': isLegendSelected(item) }"
class="legend-item toggle"
@click.stop="legendClick(item)"
@click="legendClick(item)"
>
{{ item.prettyName }}
</span>
Expand All @@ -52,7 +51,7 @@
<span
:class="{ 'active': isLegendSelected(item, '#power') }"
class="legend-item toggle"
@click.stop="legendClick(item, '#power')"
@click="legendClick(item, '#power')"
>
<span v-if="item.power <= 0 && item.target <= 0">off</span>
<span v-if="item.target > 0">
Expand All @@ -67,7 +66,7 @@
<span
:class="{ 'active': isLegendSelected(item, '#power') }"
class="legend-item toggle"
@click.stop="legendClick(item, '#power')"
@click="legendClick(item, '#power')"
>
<span>{{ getRateOfChange(item) }}<small>&deg;C/s</small></span>
</span>
Expand All @@ -94,6 +93,7 @@
suffix="°C"
x-small
@submit="setHeaterTargetTemp(item.name, +$event)"
@contextmenu.stop
/>
</td>
</tr>
Expand All @@ -114,7 +114,7 @@
<span
:class="{ 'active': isLegendSelected(item) }"
class="legend-item toggle"
@click.stop="legendClick(item)"
@click="legendClick(item)"
>
{{ item.prettyName }}
</span>
Expand All @@ -124,7 +124,7 @@
v-if="item.speed"
:class="{ 'active':isLegendSelected(item, '#speed') }"
class="legend-item toggle"
@click.stop="legendClick(item, '#speed')"
@click="legendClick(item, '#speed')"
>
<span v-if="item.speed > 0 && (item.target > 0 || !item.target)">
{{ (item.speed * 100).toFixed(0) }}<small>%</small>
Expand All @@ -142,7 +142,7 @@
<span
:class="{ 'active': isLegendSelected(item, '#power') }"
class="legend-item toggle"
@click.stop="legendClick(item, '#power')"
@click="legendClick(item, '#power')"
>
<span>{{ getRateOfChange(item) }}<small>&deg;C/s</small></span>
</span>
Expand Down Expand Up @@ -177,6 +177,7 @@
suffix="°C"
x-small
@submit="setFanTargetTemp(item.name, +$event)"
@contextmenu.stop
/>
</td>
</tr>
Expand All @@ -196,7 +197,7 @@
<span
:class="{ 'active': isLegendSelected(item) }"
class="legend-item toggle"
@click.stop="legendClick(item)"
@click="legendClick(item)"
>
{{ item.prettyName }}
</span>
Expand Down

0 comments on commit 82b8442

Please sign in to comment.