@awes-io/ui 2.106.2 → 2.108.0
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/CHANGELOG.md +29 -0
- package/assets/css/components/_index.css +1 -1
- package/assets/css/components/badge.css +28 -8
- package/assets/css/components/code.css +21 -0
- package/assets/css/components/modal.css +1 -0
- package/assets/css/components/more.css +28 -6
- package/assets/css/components/user-menu.css +1 -2
- package/assets/js/icons/mono.js +3 -1
- package/components/1_atoms/AwAvatar.vue +1 -0
- package/components/1_atoms/AwSwitcher.vue +19 -28
- package/components/2_molecules/AwBadge.vue +15 -8
- package/components/3_organisms/AwCode.vue +45 -26
- package/components/3_organisms/AwMoney.vue +2 -1
- package/components/5_layouts/_AwMobileMenuItem.vue +1 -1
- package/components/5_layouts/_AwMobileMenuNav.vue +17 -7
- package/components/5_layouts/_AwUserMenu.vue +28 -2
- package/components/_config.js +2 -1
- package/nuxt/pages/more.vue +38 -8
- package/package.json +2 -2
- package/store/awesIo.js +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,35 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [2.108.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.107.0...@awes-io/ui@2.108.0) (2024-07-30)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **aw-code:** component style updated ([dbd8ce2](https://github.com/awes-io/client/commit/dbd8ce2b3e8d6a8b6b3755cf2172b89433e810df))
|
|
12
|
+
* update menu layout ([89ee43f](https://github.com/awes-io/client/commit/89ee43ffe8bd9f23118a1f57220665c2c898c823))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# [2.107.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.106.2...@awes-io/ui@2.107.0) (2024-07-12)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* aw-switcher icon fix ([f7e2ecc](https://github.com/awes-io/client/commit/f7e2eccac106a57aede82414fb585924507f913e))
|
|
24
|
+
* fix z-index in modal buttons ([337685a](https://github.com/awes-io/client/commit/337685ad88961d93ed1acc2f0610c9c18be90ea7))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
* aw-money input uses text and inputmode ([6bf5f9a](https://github.com/awes-io/client/commit/6bf5f9aede9bbc8f8b3fae065f2cbc0f6ea07406))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
6
35
|
## [2.106.2](https://github.com/awes-io/client/compare/@awes-io/ui@2.106.1...@awes-io/ui@2.106.2) (2024-07-04)
|
|
7
36
|
|
|
8
37
|
|
|
@@ -1,19 +1,39 @@
|
|
|
1
1
|
.aw-badge {
|
|
2
|
+
vertical-align: middle;
|
|
3
|
+
|
|
4
|
+
&__pulse {
|
|
5
|
+
flex: none;
|
|
6
|
+
background: currentColor;
|
|
7
|
+
width: 0.25rem;
|
|
8
|
+
height: 0.25rem;
|
|
9
|
+
border-radius: 100%;
|
|
10
|
+
animation: pulse 1s infinite alternate;
|
|
11
|
+
}
|
|
12
|
+
|
|
2
13
|
&__text {
|
|
3
14
|
display: inline-flex;
|
|
4
15
|
align-items: center;
|
|
5
16
|
justify-content: center;
|
|
6
17
|
|
|
7
|
-
min-height: 1.
|
|
8
|
-
min-width: 1.
|
|
9
|
-
padding:
|
|
10
|
-
margin: 0
|
|
18
|
+
min-height: 1.5rem;
|
|
19
|
+
min-width: 1.5rem;
|
|
20
|
+
padding: 0 0.5rem;
|
|
21
|
+
margin: 0;
|
|
11
22
|
|
|
12
|
-
border-radius:
|
|
23
|
+
border-radius: 0.25rem;
|
|
13
24
|
whitespace: no-wrap;
|
|
14
25
|
|
|
15
|
-
font-size:
|
|
16
|
-
line-height: 1;
|
|
17
|
-
font-weight:
|
|
26
|
+
font-size: 0.625rem;
|
|
27
|
+
line-height: 1.25rem;
|
|
28
|
+
font-weight: 700;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@keyframes pulse {
|
|
33
|
+
0% {
|
|
34
|
+
transform: scale(1);
|
|
35
|
+
}
|
|
36
|
+
100% {
|
|
37
|
+
transform: scale(1.5);
|
|
18
38
|
}
|
|
19
39
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.aw-code {
|
|
2
|
+
&__wrapper {
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: 0.5rem;
|
|
6
|
+
|
|
7
|
+
&--compact {
|
|
8
|
+
justify-content: center;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&__item {
|
|
13
|
+
&--compact {
|
|
14
|
+
max-width: 3.5rem;
|
|
15
|
+
}
|
|
16
|
+
/* &--filled.aw-text-field,
|
|
17
|
+
&--filled .aw-text-field__element {
|
|
18
|
+
background-color: var(--c-mono-900);
|
|
19
|
+
} */
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -5,16 +5,38 @@
|
|
|
5
5
|
min-height: var(--viewport-height, 100vh);
|
|
6
6
|
padding-bottom: 9.5rem;
|
|
7
7
|
|
|
8
|
+
&__buttons {
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
gap: 1rem;
|
|
12
|
+
padding: 0.5rem 1.5rem 0;
|
|
13
|
+
padding-top: calc(0.5rem + env(safe-area-inset-top, 0px));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&__user-profile {
|
|
17
|
+
position: relative;
|
|
18
|
+
padding-bottom: 2.5rem;
|
|
19
|
+
|
|
20
|
+
&:after {
|
|
21
|
+
@apply bg-mono-800;
|
|
22
|
+
content: '';
|
|
23
|
+
display: block;
|
|
24
|
+
height: 1px;
|
|
25
|
+
|
|
26
|
+
position: absolute;
|
|
27
|
+
bottom: calc(0.75rem - 1px);
|
|
28
|
+
left: 1.5rem;
|
|
29
|
+
right: 1.5rem;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
8
33
|
&__profile {
|
|
9
34
|
display: flex;
|
|
10
35
|
justify-content: center;
|
|
11
36
|
align-items: center;
|
|
12
37
|
flex-direction: column;
|
|
13
38
|
|
|
14
|
-
|
|
15
|
-
border-radius: 0.9375rem;
|
|
16
|
-
padding: 2rem 1.5rem 1.5rem;
|
|
17
|
-
padding-top: calc(2rem + env(safe-area-inset-top, 0px));
|
|
39
|
+
padding: 1rem 1.5rem 1rem;
|
|
18
40
|
}
|
|
19
41
|
|
|
20
42
|
&__theme {
|
|
@@ -24,7 +46,7 @@
|
|
|
24
46
|
align-items: center;
|
|
25
47
|
position: relative;
|
|
26
48
|
|
|
27
|
-
padding: 0.
|
|
49
|
+
padding: 0.75rem 1.5rem;
|
|
28
50
|
|
|
29
51
|
&-icon {
|
|
30
52
|
color: var(--c-mono-300);
|
|
@@ -43,7 +65,7 @@
|
|
|
43
65
|
padding-bottom: 0;
|
|
44
66
|
|
|
45
67
|
.aw-switch-field__switch {
|
|
46
|
-
margin: 0.1875rem;
|
|
68
|
+
margin: 0 0 0 0.1875rem;
|
|
47
69
|
}
|
|
48
70
|
}
|
|
49
71
|
}
|
package/assets/js/icons/mono.js
CHANGED
|
@@ -85,7 +85,9 @@ export const ICONS = {
|
|
|
85
85
|
warning: [
|
|
86
86
|
'M12 14.9c.47 0 .86-.4.86-.87V8.88a.86.86 0 0 0-1.72 0v5.15c0 .48.39.86.86.86ZM12 18.33a.86.86 0 1 0 0-1.72.86.86 0 0 0 0 1.72Z',
|
|
87
87
|
'M9 3.75a3.44 3.44 0 0 1 6 0v.01l7.56 13.75a3.43 3.43 0 0 1-3 5.12H4.44a3.44 3.44 0 0 1-3-5.12L9 3.76Zm1.5.84L2.94 18.34a1.72 1.72 0 0 0 1.5 2.56h15.12a1.72 1.72 0 0 0 1.5-2.55v-.01L13.5 4.59a1.72 1.72 0 0 0-3 0Z'
|
|
88
|
-
]
|
|
88
|
+
],
|
|
89
|
+
profile:
|
|
90
|
+
'M8.965 13.132c-1.907-1.229-3.012-2.93-3.095-5.202-.061-1.706.53-3.197 1.707-4.43a6.134 6.134 0 0 1 8.763-.2c1.445 1.397 2.082 3.134 1.866 5.134-.216 2-1.26 3.51-2.94 4.631.231.087.432.165.632.242a10.198 10.198 0 0 1 3.758 2.518 10.155 10.155 0 0 1 2.811 7.016.71.71 0 0 1-.72.714.713.713 0 0 1-.714-.714 8.77 8.77 0 0 0-.406-2.657 8.665 8.665 0 0 0-2.426-3.814 8.652 8.652 0 0 0-4.323-2.17 8.717 8.717 0 0 0-2.451-.117c-1.712.164-3.26.76-4.61 1.83-1.635 1.29-2.69 2.95-3.162 4.985a9.06 9.06 0 0 0-.221 1.933c-.005.303-.149.53-.421.647-.273.124-.535.077-.766-.113-.185-.159-.247-.37-.247-.606a10.173 10.173 0 0 1 1.167-4.631 10.27 10.27 0 0 1 2.23-2.868 10.417 10.417 0 0 1 3.408-2.04.448.448 0 0 1 .16-.088Zm7.843-5.377a4.734 4.734 0 0 0-4.672-4.76 4.75 4.75 0 0 0-4.842 4.75 4.741 4.741 0 0 0 4.683 4.765 4.73 4.73 0 0 0 4.831-4.755Z'
|
|
89
91
|
}
|
|
90
92
|
|
|
91
93
|
/* export const ICONS = {
|
|
@@ -43,9 +43,8 @@
|
|
|
43
43
|
@mousedown="_onPointerDown"
|
|
44
44
|
@touchstart="_onPointerDown"
|
|
45
45
|
>
|
|
46
|
-
<template v-if="_isIcon && !iconPlaceIn">
|
|
47
|
-
<
|
|
48
|
-
:is="onSystemIcon ? 'AwIconSystemMono' : 'AwIcon'"
|
|
46
|
+
<template v-if="_isIcon && !iconPlaceIn && _onIcon">
|
|
47
|
+
<AwIcon
|
|
49
48
|
:name="_onIcon"
|
|
50
49
|
:size="iconSize"
|
|
51
50
|
class="aw-switch-field__switch-icon aw-switch-field__switch-icon--on"
|
|
@@ -60,23 +59,19 @@
|
|
|
60
59
|
aria-hidden="true"
|
|
61
60
|
>
|
|
62
61
|
<slot name="toggler-icon">
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
:name="isChecked ? _onIcon : _offIcon"
|
|
72
|
-
/>
|
|
73
|
-
</template>
|
|
62
|
+
<AwIcon
|
|
63
|
+
v-if="
|
|
64
|
+
_isIcon &&
|
|
65
|
+
iconPlaceIn &&
|
|
66
|
+
(_onIcon || (!isChecked && _offIcon))
|
|
67
|
+
"
|
|
68
|
+
:name="isChecked ? _onIcon : _offIcon"
|
|
69
|
+
/>
|
|
74
70
|
</slot>
|
|
75
71
|
</span>
|
|
76
72
|
|
|
77
|
-
<template v-if="_isIcon && !iconPlaceIn">
|
|
78
|
-
<
|
|
79
|
-
:is="offSystemIcon ? 'AwIconSystemMono' : 'AwIcon'"
|
|
73
|
+
<template v-if="_isIcon && !iconPlaceIn && _offIcon">
|
|
74
|
+
<AwIcon
|
|
80
75
|
:name="_offIcon"
|
|
81
76
|
:size="iconSize"
|
|
82
77
|
class="aw-switch-field__switch-icon aw-switch-field__switch-icon--off"
|
|
@@ -89,7 +84,6 @@
|
|
|
89
84
|
|
|
90
85
|
<script>
|
|
91
86
|
import AwCheckbox from '@AwAtoms/AwCheckbox.vue'
|
|
92
|
-
import ICONS from '@AwUtils/icons/mono'
|
|
93
87
|
|
|
94
88
|
const THRESHOLD = 5 // pixels
|
|
95
89
|
|
|
@@ -119,7 +113,12 @@ export default {
|
|
|
119
113
|
|
|
120
114
|
icon: {
|
|
121
115
|
type: String,
|
|
122
|
-
default:
|
|
116
|
+
default: ''
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
offIcon: {
|
|
120
|
+
type: String,
|
|
121
|
+
default: ''
|
|
123
122
|
},
|
|
124
123
|
|
|
125
124
|
iconColor: {
|
|
@@ -151,15 +150,7 @@ export default {
|
|
|
151
150
|
},
|
|
152
151
|
|
|
153
152
|
_offIcon() {
|
|
154
|
-
return this.icon
|
|
155
|
-
},
|
|
156
|
-
|
|
157
|
-
onSystemIcon() {
|
|
158
|
-
return !!ICONS[this._onIcon]
|
|
159
|
-
},
|
|
160
|
-
|
|
161
|
-
offSystemIcon() {
|
|
162
|
-
return !!ICONS[this._offIcon]
|
|
153
|
+
return this.offIcon || this.icon
|
|
163
154
|
},
|
|
164
155
|
|
|
165
156
|
iconSize() {
|
|
@@ -17,13 +17,18 @@
|
|
|
17
17
|
:class="{ 'px-2': props.text }"
|
|
18
18
|
class="aw-badge__text"
|
|
19
19
|
>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
<span v-if="props.pulse" class="aw-badge__pulse" />
|
|
21
|
+
|
|
22
|
+
<template v-else>
|
|
23
|
+
{{ props.text }}
|
|
24
|
+
|
|
25
|
+
<Component
|
|
26
|
+
:is="$options.components.AwIcon"
|
|
27
|
+
v-if="props.icon"
|
|
28
|
+
:name="props.icon"
|
|
29
|
+
size="14"
|
|
30
|
+
/>
|
|
31
|
+
</template>
|
|
27
32
|
</span>
|
|
28
33
|
</span>
|
|
29
34
|
</template>
|
|
@@ -61,7 +66,9 @@ export default {
|
|
|
61
66
|
hideIfEmpty: {
|
|
62
67
|
type: Boolean,
|
|
63
68
|
default: false
|
|
64
|
-
}
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
pulse: Boolean
|
|
65
72
|
}
|
|
66
73
|
}
|
|
67
74
|
</script>
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
:class="wrapperClasses"
|
|
4
|
-
v-tooltip.show.prepend="errorTooltip"
|
|
5
|
-
class="flex items-center -mx-1"
|
|
6
|
-
>
|
|
2
|
+
<div class="aw-code" v-tooltip.show.prepend="errorTooltip">
|
|
7
3
|
<input
|
|
8
4
|
class="sr-only"
|
|
9
5
|
v-bind="$attrs"
|
|
@@ -12,27 +8,43 @@
|
|
|
12
8
|
ref="element"
|
|
13
9
|
tabindex="-1"
|
|
14
10
|
/>
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
11
|
+
<div
|
|
12
|
+
class="aw-code__wrapper"
|
|
13
|
+
:class="{ 'aw-code__wrapper--compact': compact }"
|
|
14
|
+
>
|
|
15
|
+
<template v-for="(char, i) in pattern">
|
|
16
|
+
<span v-if="char === '-'" :key="`d-${i}`">-</span>
|
|
17
|
+
<div
|
|
18
|
+
v-else
|
|
19
|
+
:key="`i-${i}`"
|
|
20
|
+
class="aw-code__item"
|
|
21
|
+
:class="[
|
|
22
|
+
wrapperClasses,
|
|
23
|
+
{
|
|
24
|
+
'aw-code__item--filled': !!codeValue[i],
|
|
25
|
+
'aw-code__item--compact': compact
|
|
26
|
+
}
|
|
27
|
+
]"
|
|
28
|
+
>
|
|
29
|
+
<input
|
|
30
|
+
ref="fields"
|
|
31
|
+
type="tel"
|
|
32
|
+
inputmode="numeric"
|
|
33
|
+
pattern="[0-9]*"
|
|
34
|
+
maxlength="1"
|
|
35
|
+
autocomplete="off"
|
|
36
|
+
:value="codeValue[i]"
|
|
37
|
+
:class="[elClasses.element, 'text-center p-3']"
|
|
38
|
+
v-bind="skipAttr"
|
|
39
|
+
@input="_onInput($event, i)"
|
|
40
|
+
@keydown.left="_focus($event.target, -1)"
|
|
41
|
+
@keydown.right="_focus($event.target)"
|
|
42
|
+
@keydown.backspace="_focus($event.target, -1)"
|
|
43
|
+
@paste.prevent="_onPaste"
|
|
44
|
+
/>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
47
|
+
</div>
|
|
36
48
|
</div>
|
|
37
49
|
</template>
|
|
38
50
|
|
|
@@ -65,6 +77,13 @@ export default {
|
|
|
65
77
|
default() {
|
|
66
78
|
return conf(this, 'pattern')
|
|
67
79
|
}
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
compact: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
default() {
|
|
85
|
+
return conf(this, 'compact')
|
|
86
|
+
}
|
|
68
87
|
}
|
|
69
88
|
},
|
|
70
89
|
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<nav
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
<nav
|
|
3
|
+
v-if="items.length"
|
|
4
|
+
class="aw-mobile-menu-nav"
|
|
5
|
+
:class="{
|
|
6
|
+
'aw-mobile-menu-nav--default': theme === 'default',
|
|
7
|
+
'aw-mobile-menu-nav--primary': theme === 'primary',
|
|
8
|
+
'aw-mobile-menu-nav--island': theme === 'island'
|
|
9
|
+
}"
|
|
10
|
+
>
|
|
7
11
|
<h3 v-if="title || badge">
|
|
8
12
|
{{ title }}
|
|
9
13
|
<AwBadge v-if="badge" v-bind="badge" />
|
|
@@ -17,14 +21,20 @@
|
|
|
17
21
|
:_getChildrenCount="_getChildrenCount"
|
|
18
22
|
:isActive="isActive"
|
|
19
23
|
>
|
|
20
|
-
<li
|
|
24
|
+
<li
|
|
25
|
+
v-for="({ listeners, ...item }, i) in items"
|
|
26
|
+
:key="i"
|
|
27
|
+
v-show="!item.abstract"
|
|
28
|
+
>
|
|
21
29
|
<AwMobileMenuItem
|
|
22
30
|
v-bind="item"
|
|
23
31
|
:class="[
|
|
24
32
|
item.class,
|
|
25
33
|
{
|
|
26
34
|
'aw-mobile-menu-nav__item--divide':
|
|
27
|
-
theme !== 'island' &&
|
|
35
|
+
theme !== 'island' &&
|
|
36
|
+
(item.isDivide || allDivides) &&
|
|
37
|
+
i
|
|
28
38
|
}
|
|
29
39
|
]"
|
|
30
40
|
:theme="theme"
|
|
@@ -23,7 +23,16 @@
|
|
|
23
23
|
"
|
|
24
24
|
@focus="openDropdown"
|
|
25
25
|
>
|
|
26
|
+
<Component
|
|
27
|
+
v-if="userMenuAvatarComponent"
|
|
28
|
+
:is="userMenuAvatarComponent.is"
|
|
29
|
+
v-bind="[user, userMenuAvatarComponent.props]"
|
|
30
|
+
:size="outline ? 24 : 40"
|
|
31
|
+
tabindex="-1"
|
|
32
|
+
/>
|
|
33
|
+
|
|
26
34
|
<AwAvatar
|
|
35
|
+
v-else
|
|
27
36
|
v-bind="user"
|
|
28
37
|
:size="outline ? 24 : 40"
|
|
29
38
|
tabindex="-1"
|
|
@@ -57,6 +66,23 @@
|
|
|
57
66
|
<AwUserpic v-bind="user" big-image />
|
|
58
67
|
</Component>
|
|
59
68
|
|
|
69
|
+
<AwNavItem
|
|
70
|
+
class="aw-user-menu__nav-item border-b"
|
|
71
|
+
:href="profileUrl"
|
|
72
|
+
hide-external-icon
|
|
73
|
+
>
|
|
74
|
+
<AwIcon
|
|
75
|
+
name="awesio/profile"
|
|
76
|
+
size="16"
|
|
77
|
+
class="text-mono-400"
|
|
78
|
+
:class="{ 'mr-2': vertical, 'mr-4': !vertical }"
|
|
79
|
+
/>
|
|
80
|
+
|
|
81
|
+
<span class="aw-user-menu__nav-item-text">
|
|
82
|
+
{{ $t('My profile') }}
|
|
83
|
+
</span>
|
|
84
|
+
</AwNavItem>
|
|
85
|
+
|
|
60
86
|
<span class="aw-user-menu__theme">
|
|
61
87
|
<AwIconSystemMono
|
|
62
88
|
:size="16"
|
|
@@ -75,7 +101,7 @@
|
|
|
75
101
|
<AwSwitcher
|
|
76
102
|
v-model="isDarkTheme"
|
|
77
103
|
class="aw-user-menu__theme-switcher"
|
|
78
|
-
size="
|
|
104
|
+
size="md"
|
|
79
105
|
/>
|
|
80
106
|
</span>
|
|
81
107
|
|
|
@@ -159,7 +185,7 @@ export default {
|
|
|
159
185
|
},
|
|
160
186
|
|
|
161
187
|
computed: {
|
|
162
|
-
...mapGetters('awesIo', ['user']),
|
|
188
|
+
...mapGetters('awesIo', ['user', 'userMenuAvatarComponent']),
|
|
163
189
|
|
|
164
190
|
isDesktop() {
|
|
165
191
|
return this.$screen.lg
|
package/components/_config.js
CHANGED
package/nuxt/pages/more.vue
CHANGED
|
@@ -1,7 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="aw-more">
|
|
3
|
+
<div class="aw-more__buttons">
|
|
4
|
+
<AwButton color="mono" icon="awesio/arrow" @click="onClickGoBack" />
|
|
5
|
+
|
|
6
|
+
<AwButton
|
|
7
|
+
v-if="user"
|
|
8
|
+
color="mono"
|
|
9
|
+
icon="awesio/edit"
|
|
10
|
+
:href="profileUrl"
|
|
11
|
+
/>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
3
14
|
<div class="aw-more__profile" v-if="user">
|
|
4
|
-
<
|
|
15
|
+
<Component
|
|
16
|
+
v-if="userMenuAvatarComponent"
|
|
17
|
+
:is="userMenuAvatarComponent.is"
|
|
18
|
+
v-bind="userMenuAvatarComponent.props"
|
|
19
|
+
:name="user.name"
|
|
20
|
+
size="112"
|
|
21
|
+
/>
|
|
22
|
+
|
|
23
|
+
<AwAvatar v-else :src="user.src" :name="user.name" size="112" />
|
|
5
24
|
|
|
6
25
|
<AwHeadline tag="span" class="aw-more__profile-name mt-2">
|
|
7
26
|
{{ user.name }}
|
|
@@ -14,13 +33,6 @@
|
|
|
14
33
|
>
|
|
15
34
|
{{ user.description }}
|
|
16
35
|
</AwDescription>
|
|
17
|
-
|
|
18
|
-
<AwButton
|
|
19
|
-
class="mt-6 w-full"
|
|
20
|
-
:text="$t('Your profile')"
|
|
21
|
-
color="dark"
|
|
22
|
-
:href="profileUrl"
|
|
23
|
-
/>
|
|
24
36
|
</div>
|
|
25
37
|
|
|
26
38
|
<slot name="before-mobile-menu">
|
|
@@ -42,6 +54,16 @@
|
|
|
42
54
|
|
|
43
55
|
<AwMobileMenuNav :items="userMenu" theme="primary" class="mt-6">
|
|
44
56
|
<template #before>
|
|
57
|
+
<li v-if="user">
|
|
58
|
+
<AwMobileMenuItem
|
|
59
|
+
:href="profileUrl"
|
|
60
|
+
arrow
|
|
61
|
+
icon="awesio/profile"
|
|
62
|
+
:text="$t('My profile')"
|
|
63
|
+
class="aw-more__user-profile"
|
|
64
|
+
/>
|
|
65
|
+
</li>
|
|
66
|
+
|
|
45
67
|
<li class="aw-more__theme">
|
|
46
68
|
<AwIconSystemMono
|
|
47
69
|
:size="24"
|
|
@@ -56,6 +78,7 @@
|
|
|
56
78
|
<AwSwitcher
|
|
57
79
|
v-model="isDarkTheme"
|
|
58
80
|
class="aw-more__theme-switcher"
|
|
81
|
+
size="lg"
|
|
59
82
|
/>
|
|
60
83
|
</li>
|
|
61
84
|
</template>
|
|
@@ -105,6 +128,7 @@ export default {
|
|
|
105
128
|
...mapGetters('awesIo', [
|
|
106
129
|
'user',
|
|
107
130
|
'logoComponent',
|
|
131
|
+
'userMenuAvatarComponent',
|
|
108
132
|
'afterMobileMenuComponent',
|
|
109
133
|
'beforeMobileMenuComponent'
|
|
110
134
|
]),
|
|
@@ -154,6 +178,12 @@ export default {
|
|
|
154
178
|
this.$store.commit('awesIo/SET_DARK_THEME', val)
|
|
155
179
|
}
|
|
156
180
|
}
|
|
181
|
+
},
|
|
182
|
+
|
|
183
|
+
methods: {
|
|
184
|
+
onClickGoBack() {
|
|
185
|
+
this.$router.back()
|
|
186
|
+
}
|
|
157
187
|
}
|
|
158
188
|
}
|
|
159
189
|
</script>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awes-io/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.108.0",
|
|
4
4
|
"description": "User Interface (UI) components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui",
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"rollup-plugin-visualizer": "^2.6.0",
|
|
115
115
|
"rollup-plugin-vue": "^5.0.1"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "23930faef5cd5d91e72b8753a2968f3d5ab4510b"
|
|
118
118
|
}
|
package/store/awesIo.js
CHANGED
|
@@ -39,6 +39,7 @@ export const state = () => ({
|
|
|
39
39
|
},
|
|
40
40
|
mobileMenuOpened: false,
|
|
41
41
|
beforeMobileMenu: null,
|
|
42
|
+
userMenuAvatar: null,
|
|
42
43
|
afterMobileMenu: null,
|
|
43
44
|
bottomBarAction: null,
|
|
44
45
|
|
|
@@ -131,6 +132,10 @@ export const getters = {
|
|
|
131
132
|
return state.beforeMobileMenu
|
|
132
133
|
},
|
|
133
134
|
|
|
135
|
+
userMenuAvatarComponent(state) {
|
|
136
|
+
return state.userMenuAvatar
|
|
137
|
+
},
|
|
138
|
+
|
|
134
139
|
afterMobileMenuComponent(state) {
|
|
135
140
|
return state.afterMobileMenu
|
|
136
141
|
}
|
|
@@ -228,6 +233,12 @@ export const mutations = {
|
|
|
228
233
|
}
|
|
229
234
|
},
|
|
230
235
|
|
|
236
|
+
SET_USER_MENU_AVATAR(state, payload) {
|
|
237
|
+
if (payload && payload.component) {
|
|
238
|
+
state.userMenuAvatar = payload.component
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
|
|
231
242
|
SET_AFTER_MOBILE_MENU(state, payload) {
|
|
232
243
|
if (payload && payload.component) {
|
|
233
244
|
state.afterMobileMenu = payload.component
|