All files / src/components/modal/menus HelpMenu.vue

55.55% Statements 5/9
50% Branches 2/4
33.33% Functions 2/6
55.55% Lines 5/9

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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59                                5x       158x                                       1x                   79x   79x            
<template>
  <v-menu v-bind="$attrs">
    <template #activator="{ props: menu }">
      <v-tooltip
        open-delay="1000"
        location="right"
      >
        <template #activator="{ props: tooltip }">
          <v-list-item
            v-bind="mergeProps(menu, tooltip)"
            class="mx-auto py-0"
            width="42px"
            min-height="30px"
            color="primary"
            prepend-icon="help"
          />
          <div class="text-center text-xs-semibold">
            <span>{{ t('labels.help') }}</span>
          </div>
        </template>
        <span>{{ t('labels.help') }}</span>
      </v-tooltip>
    </template>
    <v-list>
      <v-list-item
        prepend-icon="help"
        @click="knowledgeBase"
      >
        <v-list-item-title>{{ t('labels.helpDesk') }}</v-list-item-title>
      </v-list-item>
      <v-list-item
        prepend-icon="keyboard"
        @click="m_shortcuts = true"
      >
        <v-list-item-title>{{
          t('labels.keyboardShortcuts')
        }}</v-list-item-title>
      </v-list-item>
    </v-list>
  </v-menu>
  <KeyboardShortcuts v-model="m_shortcuts" />
</template>
 
<script setup lang="ts">
import { openUrl } from '@/functions/openUrl';
import { mergeProps, ref } from 'vue';
import { useI18n } from 'vue-i18n';
 
defineOptions({ inheritAttrs: false });
 
const { t } = useI18n();
 
const m_shortcuts = ref<boolean>(false);
 
function knowledgeBase(): void {
  openUrl('https://3dicomviewer.com/knowledgebase', '_blank');
}
</script>