All files / src/components/navigation/annotation AnnotationDeleteSnackbar.vue

100% Statements 8/8
100% Branches 4/4
100% Functions 5/5
100% Lines 8/8

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43    3x             14x 6x               14x           1x                 29x   29x       1x      
<template>
  <v-snackbar
    v-model="modelValue"
    timeout="300000"
    variant="flat"
  >
    <v-icon
      class="pr-3 shark-400"
      icon="error"
    />
    <span class="shark-950">{{ t('texts.annotationDeleted') }}</span>
    <template #actions>
      <v-btn
        class="ml-auto mr-3 pr-4 pl-5"
        color="minsk_900"
        variant="flat"
        @click="undo"
      >
        <span>{{ t('labels.undo') }}</span>
      </v-btn>
      <v-icon
        class="ml-auto pr-3 shark-400"
        icon="close"
        size="small"
        @click="modelValue = false"
      />
    </template>
  </v-snackbar>
</template>
 
<script setup lang="ts">
import { useI18n } from 'vue-i18n';
 
const { t } = useI18n();
 
const modelValue = defineModel<boolean>({ default: false });
 
function undo(): void {
  // TODO: implement
  modelValue.value = false;
}
</script>