Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 8 additions & 56 deletions core/frontend/src/components/health/HealthTrayMenu.vue
Original file line number Diff line number Diff line change
@@ -1,54 +1,14 @@
<template>
<v-row style="display: contents;">
<v-menu
:close-on-content-click="false"
nudge-left="150"
nudge-bottom="25"
<v-icon
v-if="disk_usage_high"
v-tooltip="`High disk usage! (${disk_usage_percent.toFixed(1)}%) please clean up the disk`"
class="px-1 blinking white-shadow"
color="red"
@click="$router.push('/tools/disk')"
>
<template
#activator="{ on, attrs }"
>
<v-card
elevation="0"
color="transparent"
v-bind="attrs"
v-on="on"
>
<v-icon
v-if="disk_usage_high"
class="px-1 blinking white-shadow"
color="red"
:title="`High disk usage high! (${disk_usage_percent.toFixed(1)}%) please clean up the disk`"
>
mdi-content-save-alert
</v-icon>
</v-card>
</template>

<v-card
elevation="1"
width="350"
>
<v-container>
<div>
<table style="width: 100%">
<tr>
<td>Percentage (Full):</td>
<td>{{ disk_usage_percent.toFixed(1) }} %</td>
</tr>
<tr>
<td>Free:</td>
<td> {{ disk_free_friendly }}</td>
</tr>
<tr>
<td>Total:</td>
<td> {{ disk_size_friendly }}</td>
</tr>
</table>
</div>
</v-container>
</v-card>
</v-menu>
mdi-content-save-alert
</v-icon>
<v-icon
Comment on lines +3 to 12
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): Clickable icon should be keyboard-accessible and have an explicit accessible label.

As this icon is now the sole way to reach the disk tools page, it needs to be fully accessible. A plain <v-icon> with only a click handler likely isn’t keyboard-focusable and won’t have a clear name for screen readers. Consider using a v-btn with an icon, or adding tabindex="0", an @keydown handler for Enter/Space, and an explicit accessible label via aria-label or :title (e.g. "High disk usage – open disk tools").

v-if="cpu_temperature_limit_reached"
class="px-1 blinking white-shadow"
Expand Down Expand Up @@ -215,14 +175,6 @@ export default Vue.extend({
disk_usage_percent(): number {
return this.main_disk ? 100 - this.main_disk.available_space_B / this.main_disk.total_space_B / 0.01 : 0
},
disk_size_friendly(): string {
const total_GB = (this.main_disk?.total_space_B ?? 0) / 2 ** 30
return `${total_GB.toFixed(3)} GB`
},
disk_free_friendly(): string {
const free_GB = (this.main_disk?.available_space_B ?? 0) / 2 ** 30
return `${free_GB.toFixed(3)} GB`
},
disk_usage_high(): boolean {
return this.disk_usage_percent > 85
},
Expand Down
Loading