@apptegy/nuxt-navigation 0.1.57 → 0.1.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@apptegy/nuxt-navigation",
3
3
  "configKey": "@apptegy/nuxt-navigation",
4
- "version": "0.1.57",
4
+ "version": "0.1.58",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "unknown"
@@ -14,7 +14,11 @@
14
14
  <button
15
15
  v-if="showHelpArticles"
16
16
  :id="!isDropdown && 'help-btn'"
17
- :class="['help-articles-btn', !isDropdown && 'help-btn']"
17
+ :class="[
18
+ 'help-articles-btn',
19
+ !isDropdown && 'help-btn',
20
+ isRoomsUser && `help-btn-${userRoomsRole}`
21
+ ]"
18
22
  :aria-label="isDropdown ? $t('navigation.helpCenter') : $t('navigation.helpArticles')"
19
23
  @click="expandDropdown"
20
24
  >
@@ -38,7 +42,7 @@
38
42
  </template>
39
43
 
40
44
  <script setup lang="ts">
41
- import { useSidebar, navigateTo } from "#imports";
45
+ import { useSidebar, navigateTo, useAuth } from "#imports";
42
46
  import { ref, computed, onMounted } from 'vue'
43
47
 
44
48
  interface IHelpArticlesProps {
@@ -48,6 +52,7 @@ interface IHelpArticlesProps {
48
52
  showHelpArticles: boolean;
49
53
  };
50
54
 
55
+ const { userProfile } = useAuth();
51
56
  const props = withDefaults(defineProps<IHelpArticlesProps>(), {
52
57
  helpArticleOptions: () => [],
53
58
  settingsRoute: '',
@@ -62,6 +67,14 @@ const helpBtnActions = ref();
62
67
  const dropdownScrollHeight = ref(0);
63
68
  const isDropdown = ref(false);
64
69
 
70
+ const isRoomsUser = computed(() => {
71
+ return !!userProfile.value?.roles?.rooms
72
+ });
73
+
74
+ const userRoomsRole = computed(() => {
75
+ return userProfile.value?.roles?.rooms
76
+ });
77
+
65
78
  const hasArticles = computed(() => !!props.helpArticleOptions?.values?.length)
66
79
 
67
80
  onMounted(() => {
@@ -77,10 +77,12 @@
77
77
  </template>
78
78
 
79
79
  <script setup lang="ts">
80
- import { useSidebar, useBranding, ref, watch } from '#imports';
80
+ import { useSidebar, useBranding, useNuxtApp, ref, watch } from '#imports';
81
81
  import type { IApplication, IUser } from "../../types";
82
82
  import ApptegyLogo from './Icons/ApptegyLogo.vue';
83
83
 
84
+ const { $t } = useNuxtApp();
85
+
84
86
  interface ILogo {
85
87
  alt: string;
86
88
  src: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apptegy/nuxt-navigation",
3
- "version": "0.1.57",
3
+ "version": "0.1.58",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {