Skip to content

Commit 490a342

Browse files
luizhf42gustavosbarreto
authored andcommitted
feat(ui): add loading state to Play Session button
1 parent ec06817 commit 490a342

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ui/src/components/Sessions/SessionPlay.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
color="primary"
88
prepend-icon="mdi-play"
99
variant="outlined"
10+
:loading
1011
density="comfortable"
1112
data-test="connect-btn"
1213
@click="openDialog"
@@ -62,6 +63,7 @@ const showDialog = ref(false);
6263
const store = useStore();
6364
const snackbar = useSnackbar();
6465
const disabled = computed(() => !props.recorded || !props.authenticated);
66+
const loading = ref(false);
6567
const logs = ref<string | null>(null);
6668
const isCommunity = computed(() => envVariables.isCommunity);
6769
const tooltipMessage = computed(() => props.recorded
@@ -84,12 +86,15 @@ const getSessionLogs = async () => {
8486
8587
const displayDialog = async () => {
8688
try {
89+
loading.value = true;
8790
await getSessionLogs();
8891
showDialog.value = true;
8992
} catch (error: unknown) {
9093
snackbar.showError("Failed to play the session.");
9194
handleError(error);
9295
}
96+
97+
loading.value = false;
9398
};
9499
95100
const openDialog = () => {

0 commit comments

Comments
 (0)