Skip to content

Commit 0508890

Browse files
committed
Use badge for download selection count to prevent layout shift
1 parent 1b46ca9 commit 0508890

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

align_app/app/ui.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -980,8 +980,14 @@ def __init__(self, **kwargs):
980980
prepend_icon="mdi-download",
981981
classes="mr-4",
982982
):
983-
html.Span(
984-
"{{ runs_table_selected.length > 0 ? 'Download Selected' : 'Download All' }}"
983+
html.Span("Download")
984+
vuetify3.VBadge(
985+
content=("runs_table_selected.length || ' '",),
986+
inline=True,
987+
color="grey",
988+
style=(
989+
"'opacity: ' + (runs_table_selected.length > 0 ? '1' : '0')",
990+
),
985991
)
986992
with vuetify3.VMenu():
987993
with vuetify3.Template(v_slot_activator="{ props }"):
@@ -1284,18 +1290,18 @@ def __init__(
12841290
with vuetify3.Template(v_slot_activator="{ props }"):
12851291
with vuetify3.VBtn(
12861292
v_bind="props",
1287-
prepend_icon="mdi-delete-sweep",
1293+
prepend_icon="mdi-close-circle-outline",
12881294
):
1289-
html.Span("Clear Runs")
1295+
html.Span("Close Runs")
12901296
with vuetify3.VCard(min_width="200"):
12911297
vuetify3.VCardTitle(
1292-
"Clear all runs?", classes="text-subtitle-1"
1298+
"Close all runs?", classes="text-subtitle-1"
12931299
)
12941300
with vuetify3.VCardActions():
12951301
vuetify3.VSpacer()
12961302
vuetify3.VBtn("Cancel", variant="text")
12971303
vuetify3.VBtn(
1298-
"Clear",
1304+
"Close",
12991305
color="error",
13001306
variant="text",
13011307
click=self.server.controller.reset_state,

0 commit comments

Comments
 (0)