HomeBtn.vue 660 B

1234567891011121314151617181920212223242526
  1. <template>
  2. <div>
  3. <v-btn
  4. ref="btn"
  5. icon="fas fa-home"
  6. size="small"
  7. :href="!ability.can('display', 'freemium_dashboard_page') ? homeUrl : undefined"
  8. :to="ability.can('display', 'freemium_dashboard_page') ? homeUrl : undefined"
  9. class="on-primary"
  10. />
  11. <v-tooltip :activator="btn" :text="$t('welcome')" location="bottom" />
  12. </div>
  13. </template>
  14. <script setup lang="ts">
  15. import { ref } from 'vue'
  16. import { useAbility } from '@casl/vue'
  17. import { useHomeUrl } from '~/composables/utils/useHomeUrl'
  18. const { homeUrl } = useHomeUrl()
  19. const ability = useAbility()
  20. const btn = ref(null)
  21. </script>
  22. <style scoped></style>