@apptegy/nuxt-navigation 0.1.62 → 0.1.65

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
@@ -4,7 +4,7 @@
4
4
  "nuxt": ">=3.0.0"
5
5
  },
6
6
  "configKey": "@apptegy/nuxt-navigation",
7
- "version": "0.1.62",
7
+ "version": "0.1.65",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.1",
10
10
  "unbuild": "unknown"
@@ -15,17 +15,32 @@
15
15
  :user-dropdown-options="userDropdownOptions"
16
16
  @select-option="(index) => $emit('selected-option', index)"
17
17
  />
18
- <NuxtLink
19
- v-if="impersonatedUser?.show"
20
- class="logout-impersonate-user"
21
- :to="'/logout'"
22
- >
23
- <a-icon
24
- class="icon"
25
- :icon="'16:logout'"
26
- font-size="20px"
27
- />
28
- </NuxtLink>
18
+ <template v-if="impersonatedUser?.show">
19
+ <button
20
+ v-if="useLogoutEmit"
21
+ class="logout-impersonate-user"
22
+ :aria-label="$t('accountSettings.signOut')"
23
+ @click="$emit('user-logout')">
24
+ <a-icon
25
+ class="icon"
26
+ :icon="'16:logout'"
27
+ font-size="20px"
28
+ color="#662E80"
29
+ />
30
+ </button>
31
+ <NuxtLink
32
+ v-else
33
+ class="logout-impersonate-user"
34
+ :to="'/logout'"
35
+ >
36
+ <a-icon
37
+ class="icon"
38
+ :icon="'16:logout'"
39
+ font-size="20px"
40
+ color="#662E80"
41
+ />
42
+ </NuxtLink>
43
+ </template>
29
44
  </div>
30
45
  </header>
31
46
  </template>
@@ -35,9 +50,10 @@ defineProps({
35
50
  sticky: { type: Boolean, required: false },
36
51
  user: { type: Object, required: true },
37
52
  impersonatedUser: { type: Object, required: false },
53
+ useLogoutEmit: { type: Boolean, required: false },
38
54
  userDropdownOptions: { type: Array, required: true }
39
55
  });
40
- defineEmits(["selected-option"]);
56
+ defineEmits(["selected-option", "user-logout"]);
41
57
  </script>
42
58
 
43
59
  <style scoped>
@@ -66,6 +82,8 @@ header.header .logout-impersonate-user {
66
82
  display: flex;
67
83
  align-items: center;
68
84
  justify-content: center;
85
+ border: none;
86
+ cursor: pointer;
69
87
  }
70
88
  header.header .logout-impersonate-user:hover {
71
89
  background: var(--purple-30);
@@ -9,6 +9,7 @@ interface IUserDropdown {
9
9
  avatar?: string;
10
10
  };
11
11
  impersonatedUser?: IUser;
12
+ useLogoutEmit?: boolean;
12
13
  userDropdownOptions: Array<unknown>;
13
14
  }
14
15
  type __VLS_Props = IHeaderProps & IUserDropdown;
@@ -22,8 +23,10 @@ type __VLS_Slots = {} & {
22
23
  };
23
24
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, void, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
25
  "selected-option": (...args: any[]) => void;
26
+ "user-logout": (...args: any[]) => void;
25
27
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
26
28
  "onSelected-option"?: ((...args: any[]) => any) | undefined;
29
+ "onUser-logout"?: ((...args: any[]) => any) | undefined;
27
30
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
31
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
29
32
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apptegy/nuxt-navigation",
3
- "version": "0.1.62",
3
+ "version": "0.1.65",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -26,7 +26,7 @@
26
26
  "test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
27
27
  },
28
28
  "dependencies": {
29
- "@apptegy/nuxt-intl": "^2.2.0",
29
+ "@apptegy/nuxt-intl": "^2.3.0",
30
30
  "@nuxt/kit": "^3.17.0",
31
31
  "@vueuse/components": "^12.0.0",
32
32
  "@vueuse/core": "^12.0.0"
@@ -46,5 +46,5 @@
46
46
  "vue": "^3.5.13",
47
47
  "vue-tsc": "^3.0.3"
48
48
  },
49
- "gitHead": "c921c9ad5a3fad0db88eee75364b7e45435e6170"
49
+ "gitHead": "3449a89003bc4d69f49b8b19ae42f2e5cbb6addd"
50
50
  }