@apptegy/nuxt-navigation 0.1.55 → 0.1.56

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.55",
4
+ "version": "0.1.56",
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
  >
@@ -23,6 +27,7 @@
23
27
  </svg>
24
28
  </button>
25
29
  <button
30
+ v-if="settingsRoute"
26
31
  :id="!isDropdown && 'help-btn'"
27
32
  :class="['help-articles-btn', !isDropdown && 'help-btn']"
28
33
  :aria-label="$t('navigation.accountSettings')"
@@ -37,7 +42,7 @@
37
42
  </template>
38
43
 
39
44
  <script setup lang="ts">
40
- import { useSidebar, navigateTo } from "#imports";
45
+ import { useSidebar, navigateTo, useAuth } from "#imports";
41
46
  import { ref, computed, onMounted } from 'vue'
42
47
 
43
48
  interface IHelpArticlesProps {
@@ -47,6 +52,7 @@ interface IHelpArticlesProps {
47
52
  showHelpArticles: boolean;
48
53
  };
49
54
 
55
+ const { userProfile } = useAuth();
50
56
  const props = withDefaults(defineProps<IHelpArticlesProps>(), {
51
57
  helpArticleOptions: () => [],
52
58
  settingsRoute: '',
@@ -61,6 +67,14 @@ const helpBtnActions = ref();
61
67
  const dropdownScrollHeight = ref(0);
62
68
  const isDropdown = ref(false);
63
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
+
64
78
  const hasArticles = computed(() => !!props.helpArticleOptions?.values?.length)
65
79
 
66
80
  onMounted(() => {
package/package.json CHANGED
@@ -1,50 +1,49 @@
1
1
  {
2
- "name": "@apptegy/nuxt-navigation",
3
- "version": "0.1.55",
4
- "type": "module",
5
- "exports": {
6
- ".": {
7
- "types": "./dist/types.d.ts",
8
- "import": "./dist/module.mjs",
9
- "require": "./dist/module.cjs"
10
- }
11
- },
12
- "main": "./dist/module.cjs",
13
- "types": "./dist/types.d.ts",
14
- "files": [
15
- "dist"
16
- ],
17
- "scripts": {
18
- "prepack": "nuxt-module-build build",
19
- "dev": "nuxi dev playground",
20
- "dev:build": "nuxi build playground",
21
- "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
22
- "release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
23
- "lint": "eslint .",
24
- "test": "vitest run",
25
- "test:watch": "vitest watch",
26
- "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
27
- },
28
- "dependencies": {
29
- "@apptegy/nuxt-intl": "2.1.2",
30
- "@nuxt/kit": "^3.17.0",
31
- "@vueuse/components": "12.8.2",
32
- "@vueuse/core": "^12.8.2"
33
- },
34
- "devDependencies": {
35
- "@nuxt/devtools": "^2.4.0",
36
- "@nuxt/eslint-config": "^1.3.0",
37
- "@nuxt/module-builder": "^0.8.4",
38
- "@nuxt/schema": "^3.17.0",
39
- "@nuxt/test-utils": "^3.17.2",
40
- "@types/node": "^20.17.32",
41
- "changelogen": "^0.5.7",
42
- "eslint": "^9.25.1",
43
- "nuxt": "^3.17.0",
44
- "sass": "^1.87.0",
45
- "typescript": "~5.6",
46
- "vitest": "^3.1.2",
47
- "vue": "^3.5.13",
48
- "vue-tsc": "^2.2.10"
2
+ "name": "@apptegy/nuxt-navigation",
3
+ "version": "0.1.56",
4
+ "type": "module",
5
+ "exports": {
6
+ ".": {
7
+ "types": "./dist/types.d.ts",
8
+ "import": "./dist/module.mjs",
9
+ "require": "./dist/module.cjs"
49
10
  }
50
- }
11
+ },
12
+ "main": "./dist/module.cjs",
13
+ "types": "./dist/types.d.ts",
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "dependencies": {
18
+ "@apptegy/nuxt-intl": "2.1.2",
19
+ "@nuxt/kit": "^3.17.0",
20
+ "@vueuse/components": "12.8.2",
21
+ "@vueuse/core": "^12.8.2"
22
+ },
23
+ "devDependencies": {
24
+ "@nuxt/devtools": "^2.4.0",
25
+ "@nuxt/eslint-config": "^1.3.0",
26
+ "@nuxt/module-builder": "^0.8.4",
27
+ "@nuxt/schema": "^3.17.0",
28
+ "@nuxt/test-utils": "^3.17.2",
29
+ "@types/node": "^20.17.32",
30
+ "changelogen": "^0.5.7",
31
+ "eslint": "^9.25.1",
32
+ "nuxt": "^3.17.0",
33
+ "sass": "^1.87.0",
34
+ "typescript": "~5.6",
35
+ "vitest": "^3.1.2",
36
+ "vue": "^3.5.13",
37
+ "vue-tsc": "^2.2.10"
38
+ },
39
+ "scripts": {
40
+ "dev": "nuxi dev playground",
41
+ "dev:build": "nuxi build playground",
42
+ "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
43
+ "release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
44
+ "lint": "eslint .",
45
+ "test": "vitest run",
46
+ "test:watch": "vitest watch",
47
+ "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
48
+ }
49
+ }