@burh/nuxt-core 1.0.413 → 1.0.415
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.
|
@@ -1,194 +1,209 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="recruitment__user__card">
|
|
3
|
-
<div
|
|
4
|
-
class="recruitment__user__card__header"
|
|
5
|
-
:class="[
|
|
6
|
-
{ 'header__cover--shadow':
|
|
7
|
-
{ 'header__cover--glass': glass }
|
|
8
|
-
]"
|
|
9
|
-
>
|
|
10
|
-
<div class="recruitment__user__card__header__actions">
|
|
11
|
-
<div class="left">
|
|
12
|
-
<slot name="header-left" />
|
|
13
|
-
</div>
|
|
14
|
-
<div class="right">
|
|
15
|
-
<slot name="header-right" />
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
|
18
|
-
<img
|
|
19
|
-
v-if="
|
|
20
|
-
:src="cover"
|
|
21
|
-
class="user__cover"
|
|
22
|
-
@error="
|
|
23
|
-
>
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<div class="recruitment__user__card__content">
|
|
27
|
-
<img
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<slot name="card-
|
|
34
|
-
</div>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
type: String,
|
|
48
|
-
default: null
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
type: String,
|
|
52
|
-
default: null
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
type: String,
|
|
56
|
-
default: null
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
type:
|
|
60
|
-
default:
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
margin:
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="recruitment__user__card">
|
|
3
|
+
<div
|
|
4
|
+
class="recruitment__user__card__header"
|
|
5
|
+
:class="[
|
|
6
|
+
{ 'header__cover--shadow': hasCover },
|
|
7
|
+
{ 'header__cover--glass': glass }
|
|
8
|
+
]"
|
|
9
|
+
>
|
|
10
|
+
<div class="recruitment__user__card__header__actions">
|
|
11
|
+
<div class="left">
|
|
12
|
+
<slot name="header-left" />
|
|
13
|
+
</div>
|
|
14
|
+
<div class="right">
|
|
15
|
+
<slot name="header-right" />
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<img
|
|
19
|
+
v-if="hasCover"
|
|
20
|
+
:src="cover"
|
|
21
|
+
class="user__cover"
|
|
22
|
+
@error="hasCover = false"
|
|
23
|
+
>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div class="recruitment__user__card__content">
|
|
27
|
+
<img
|
|
28
|
+
:src="(avatar) ? avatar : getNameInitials(name, last_name)"
|
|
29
|
+
:alt="name"
|
|
30
|
+
@error="img => getImageFallback(img, name)"
|
|
31
|
+
>
|
|
32
|
+
|
|
33
|
+
<slot name="card-content" />
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div class="recruitment__user__card__footer">
|
|
37
|
+
<slot name="card-footer" />
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<script>
|
|
43
|
+
export default {
|
|
44
|
+
name: 'recruitment-user-card',
|
|
45
|
+
props: {
|
|
46
|
+
cover: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: null
|
|
49
|
+
},
|
|
50
|
+
avatar: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: null
|
|
53
|
+
},
|
|
54
|
+
name: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: null
|
|
57
|
+
},
|
|
58
|
+
last_name: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: null
|
|
61
|
+
},
|
|
62
|
+
glass: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
default: false
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
data() {
|
|
68
|
+
return {
|
|
69
|
+
hasCover: true
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
methods: {
|
|
73
|
+
getImageFallback(img, name) {
|
|
74
|
+
img.target.src = this.getNameInitials(name);
|
|
75
|
+
},
|
|
76
|
+
getNameInitials(name, last_name) {
|
|
77
|
+
const avatarUrl = process.env.routes.avatar;
|
|
78
|
+
|
|
79
|
+
let userAvatarName;
|
|
80
|
+
|
|
81
|
+
if (name && last_name) {
|
|
82
|
+
userAvatarName = `${name.toUpperCase().charAt(0)}${last_name.toUpperCase().charAt(0)}`;
|
|
83
|
+
} else if (name && !last_name) {
|
|
84
|
+
userAvatarName = name.slice(0, 1).toUpperCase();
|
|
85
|
+
} else {
|
|
86
|
+
userAvatarName = 'BURH';
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return avatarUrl.replace(':size', '64x64').replace(':initials', userAvatarName);
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
mounted() {
|
|
93
|
+
!this.cover && (this.hasCover = false);
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
</script>
|
|
97
|
+
|
|
98
|
+
<style lang="scss" scoped>
|
|
99
|
+
|
|
100
|
+
.recruitment__user__card {
|
|
101
|
+
background: #fff;
|
|
102
|
+
box-shadow: 0 3px 20px rgba(0, 0, 0, 0.08);
|
|
103
|
+
border-radius: 4px;
|
|
104
|
+
overflow: hidden;
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
transition: transform 0.25s;
|
|
107
|
+
&:focus {
|
|
108
|
+
outline: none;
|
|
109
|
+
transform: translateY(-5px);
|
|
110
|
+
}
|
|
111
|
+
&:hover {
|
|
112
|
+
transform: translateY(-5px);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
img {
|
|
116
|
+
user-select: none;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&__header {
|
|
120
|
+
width: 100%;
|
|
121
|
+
height: 70px;
|
|
122
|
+
overflow: hidden;
|
|
123
|
+
position: relative;
|
|
124
|
+
background: #1F8CEB;
|
|
125
|
+
&.header__cover--shadow::before {
|
|
126
|
+
content: '';
|
|
127
|
+
position: absolute;
|
|
128
|
+
top: 0;
|
|
129
|
+
left: 0;
|
|
130
|
+
width: 100%;
|
|
131
|
+
height: 100%;
|
|
132
|
+
background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), 80%, transparent);
|
|
133
|
+
z-index: 1;
|
|
134
|
+
}
|
|
135
|
+
&.header__cover--glass {
|
|
136
|
+
&::before {
|
|
137
|
+
backdrop-filter: blur( 4px );
|
|
138
|
+
-webkit-backdrop-filter: blur( 4px );
|
|
139
|
+
background: rgba(0,0,0,0.2)!important;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
.user__cover {
|
|
143
|
+
width: 100%;
|
|
144
|
+
height: 100%;
|
|
145
|
+
object-fit: cover;
|
|
146
|
+
}
|
|
147
|
+
&__actions {
|
|
148
|
+
position: absolute;
|
|
149
|
+
top: 0;
|
|
150
|
+
left: 0;
|
|
151
|
+
width: 100%;
|
|
152
|
+
display: flex;
|
|
153
|
+
align-items: center;
|
|
154
|
+
justify-content: space-between;
|
|
155
|
+
padding: 10px 15px;
|
|
156
|
+
z-index: 2;
|
|
157
|
+
.right {
|
|
158
|
+
display: flex;
|
|
159
|
+
align-items: center;
|
|
160
|
+
flex-direction: row;
|
|
161
|
+
button {
|
|
162
|
+
color: #fff;
|
|
163
|
+
border: 0;
|
|
164
|
+
background: transparent;
|
|
165
|
+
width: 32px;
|
|
166
|
+
height: 32px;
|
|
167
|
+
display: flex;
|
|
168
|
+
align-items: center;
|
|
169
|
+
justify-content: center;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
&__content {
|
|
175
|
+
display: flex;
|
|
176
|
+
flex-direction: column;
|
|
177
|
+
align-items: center;
|
|
178
|
+
justify-content: center;
|
|
179
|
+
padding: 0 15px;
|
|
180
|
+
img {
|
|
181
|
+
width: 120px;
|
|
182
|
+
height: 120px;
|
|
183
|
+
border-radius: 100px;
|
|
184
|
+
object-fit: contain;
|
|
185
|
+
margin-top: -20px;
|
|
186
|
+
z-index: 10;
|
|
187
|
+
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
|
|
188
|
+
background: #fff;
|
|
189
|
+
border: 4px solid #fff;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
&__footer {
|
|
193
|
+
display: flex;
|
|
194
|
+
align-items: center;
|
|
195
|
+
justify-content: center;
|
|
196
|
+
padding-bottom: 20px;
|
|
197
|
+
span {
|
|
198
|
+
font-size: 0.875rem;
|
|
199
|
+
font-weight: 500;
|
|
200
|
+
margin: 0 10px;
|
|
201
|
+
color: #AEB6BE;
|
|
202
|
+
&.new {
|
|
203
|
+
color: #1F8CEB;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
</style>
|
|
@@ -1,222 +1,226 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<base-header class="app-header" :type="'white'">
|
|
3
|
-
<div class="row justify-content-between">
|
|
4
|
-
<div
|
|
5
|
-
:class="{ 'images__container': users.length }"
|
|
6
|
-
class="col-8 my-auto header__container"
|
|
7
|
-
>
|
|
8
|
-
<slot name="header-top" />
|
|
9
|
-
|
|
10
|
-
<div class="header__content">
|
|
11
|
-
<div class="d-flex align-items-center flex-row">
|
|
12
|
-
<button class="back__button" v-if="hasBackButton" @click="goBack()">
|
|
13
|
-
<i class="fas fa-arrow-left"></i>
|
|
14
|
-
</button>
|
|
15
|
-
<h2 class="font-weight-bold display-3">{{name}}</h2>
|
|
16
|
-
</div>
|
|
17
|
-
<div class="images" v-if="users.length">
|
|
18
|
-
<el-tooltip
|
|
19
|
-
v-for="user in users"
|
|
20
|
-
:key="user.id"
|
|
21
|
-
placement="top"
|
|
22
|
-
:content="user.name"
|
|
23
|
-
class="user__avatar"
|
|
24
|
-
:class="{ 'user__avatar--active': activeUserId === user.id }"
|
|
25
|
-
>
|
|
26
|
-
<img
|
|
27
|
-
@click="setActiveUser(user.id)"
|
|
28
|
-
:src="(user.avatar) ? user.avatar : getNameInitials(user.name, user.last_name)"
|
|
29
|
-
:alt="user.name"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
</
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
userAvatarName =
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
this
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
.
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
}
|
|
222
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<base-header class="app-header" :type="'white'">
|
|
3
|
+
<div class="row justify-content-between">
|
|
4
|
+
<div
|
|
5
|
+
:class="{ 'images__container': users.length }"
|
|
6
|
+
class="col-8 my-auto header__container"
|
|
7
|
+
>
|
|
8
|
+
<slot name="header-top" />
|
|
9
|
+
|
|
10
|
+
<div class="header__content">
|
|
11
|
+
<div class="d-flex align-items-center flex-row">
|
|
12
|
+
<button class="back__button" v-if="hasBackButton" @click="goBack()">
|
|
13
|
+
<i class="fas fa-arrow-left"></i>
|
|
14
|
+
</button>
|
|
15
|
+
<h2 class="font-weight-bold display-3">{{name}}</h2>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="images" v-if="users.length">
|
|
18
|
+
<el-tooltip
|
|
19
|
+
v-for="user in users"
|
|
20
|
+
:key="user.id"
|
|
21
|
+
placement="top"
|
|
22
|
+
:content="user.name"
|
|
23
|
+
class="user__avatar"
|
|
24
|
+
:class="{ 'user__avatar--active': activeUserId === user.id }"
|
|
25
|
+
>
|
|
26
|
+
<img
|
|
27
|
+
@click="setActiveUser(user.id)"
|
|
28
|
+
:src="(user.avatar) ? user.avatar : getNameInitials(user.name, user.last_name)"
|
|
29
|
+
:alt="user.name"
|
|
30
|
+
@error="img => getImageFallback(img, user.name)"
|
|
31
|
+
>
|
|
32
|
+
</el-tooltip>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<span id="credits-amount" v-if="subheader !== null">
|
|
37
|
+
{{ subheader }} Créditos
|
|
38
|
+
</span>
|
|
39
|
+
|
|
40
|
+
<slot name="header-bottom" />
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div class="col-4 d-flex justify-content-end align-items-start">
|
|
44
|
+
<el-tooltip v-for="(item, index) in icons" :key="index"
|
|
45
|
+
v-show="!item.disabled"
|
|
46
|
+
class="item" effect="dark" :content="item.title" placement="top">
|
|
47
|
+
<base-button size="md" type="link" class="text-primary px-2 w-auto"
|
|
48
|
+
@click="$emit(item.event, item)">
|
|
49
|
+
<font-awesome-icon :icon="item.icon" class="mr-2" />
|
|
50
|
+
</base-button>
|
|
51
|
+
</el-tooltip>
|
|
52
|
+
|
|
53
|
+
<slot name="buttons" />
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<slot/>
|
|
57
|
+
</div>
|
|
58
|
+
</base-header>
|
|
59
|
+
</template>
|
|
60
|
+
<script>
|
|
61
|
+
export default {
|
|
62
|
+
data(){
|
|
63
|
+
return{
|
|
64
|
+
default: '',
|
|
65
|
+
activeUserId: null
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
props:{
|
|
69
|
+
icons:{
|
|
70
|
+
type: Array,
|
|
71
|
+
default: () =>[{ event: 'view', icon: ['fas', 'eye'], disabled: false, title: 'Visualizar' }, { event: 'config', icon: ['fas', 'cog'], disabled: false, title: 'Editar' } ]
|
|
72
|
+
},
|
|
73
|
+
name: {
|
|
74
|
+
type: String,
|
|
75
|
+
default: 'Teste de matematica'
|
|
76
|
+
},
|
|
77
|
+
subheader: {
|
|
78
|
+
type: Number,
|
|
79
|
+
default: null
|
|
80
|
+
},
|
|
81
|
+
users: {
|
|
82
|
+
type: Array,
|
|
83
|
+
default: () => []
|
|
84
|
+
},
|
|
85
|
+
hasBackButton: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: false
|
|
88
|
+
},
|
|
89
|
+
backClickAction: {
|
|
90
|
+
type: Function || null,
|
|
91
|
+
default: null
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
methods: {
|
|
95
|
+
goBack() {
|
|
96
|
+
if (this.backClickAction === null) {
|
|
97
|
+
this.$router.go(-1);
|
|
98
|
+
} else {
|
|
99
|
+
this.backClickAction();
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
getImageFallback(img, name) {
|
|
103
|
+
img.target.src = this.getNameInitials(name);
|
|
104
|
+
},
|
|
105
|
+
getNameInitials(name, last_name) {
|
|
106
|
+
const avatarUrl = process.env.routes.avatar;
|
|
107
|
+
|
|
108
|
+
let userAvatarName;
|
|
109
|
+
|
|
110
|
+
if (name && last_name) {
|
|
111
|
+
userAvatarName = `${name.toUpperCase().charAt(0)}${last_name.toUpperCase().charAt(0)}`;
|
|
112
|
+
} else if (name && !last_name) {
|
|
113
|
+
userAvatarName = name.slice(0, 1).toUpperCase();
|
|
114
|
+
} else {
|
|
115
|
+
userAvatarName = 'BURH';
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return avatarUrl.replace(':size', '64x64').replace(':initials', userAvatarName);
|
|
119
|
+
},
|
|
120
|
+
setActiveUser(userId) {
|
|
121
|
+
if (this.activeUserId !== userId) {
|
|
122
|
+
this.activeUserId = userId;
|
|
123
|
+
this.$emit('active-user', userId);
|
|
124
|
+
} else {
|
|
125
|
+
this.activeUserId = null;
|
|
126
|
+
this.$emit('active-user', null);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
</script>
|
|
132
|
+
<style lang="scss" scoped>
|
|
133
|
+
#credits-amount {
|
|
134
|
+
margin: 0!important;
|
|
135
|
+
min-width: 8em;
|
|
136
|
+
margin: 1rem 1rem 1rem 0;
|
|
137
|
+
padding: 0.25em 1em;
|
|
138
|
+
font-size: 0.85rem;
|
|
139
|
+
line-height: 1.4em;
|
|
140
|
+
border-radius: 23rem;
|
|
141
|
+
font-weight: 400;
|
|
142
|
+
text-align: center;
|
|
143
|
+
background-color: rgba(29, 161, 241, 0.1);
|
|
144
|
+
color: #5865F2;
|
|
145
|
+
}
|
|
146
|
+
</style>
|
|
147
|
+
<style lang="scss">
|
|
148
|
+
|
|
149
|
+
.app-header {
|
|
150
|
+
width: 100%;
|
|
151
|
+
padding-top: 1.25rem;
|
|
152
|
+
box-shadow: 0 0 2rem 0 rgba(136, 152, 170, 0.15);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.back__button {
|
|
156
|
+
cursor: pointer;
|
|
157
|
+
width: 42px;
|
|
158
|
+
height: 42px;
|
|
159
|
+
display: flex;
|
|
160
|
+
align-items: center;
|
|
161
|
+
justify-content: center;
|
|
162
|
+
margin-right: 10px;
|
|
163
|
+
border-radius: 100px;
|
|
164
|
+
transition: background 0.5s;
|
|
165
|
+
margin-left: -15px;
|
|
166
|
+
border: 0;
|
|
167
|
+
background: transparent;
|
|
168
|
+
color: #32325d;
|
|
169
|
+
&:focus {
|
|
170
|
+
outline: none;
|
|
171
|
+
}
|
|
172
|
+
&:not(:disabled):hover, &:focus:not(:disabled):hover {
|
|
173
|
+
background: rgba(0, 0, 0, 0.08);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.header__container {
|
|
178
|
+
display: flex;
|
|
179
|
+
flex-direction: column;
|
|
180
|
+
justify-content: center;
|
|
181
|
+
align-items: flex-start;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.images__container {
|
|
185
|
+
display: flex;
|
|
186
|
+
align-items: flex-start;
|
|
187
|
+
justify-content: center;
|
|
188
|
+
.header__content {
|
|
189
|
+
display: flex;
|
|
190
|
+
align-items: center;
|
|
191
|
+
flex-direction: row;
|
|
192
|
+
padding: 10px 0;
|
|
193
|
+
h2 {
|
|
194
|
+
margin-bottom: 0;
|
|
195
|
+
}
|
|
196
|
+
.images {
|
|
197
|
+
margin-left: 10px;
|
|
198
|
+
display: flex;
|
|
199
|
+
align-items: center;
|
|
200
|
+
user-select: none;
|
|
201
|
+
.user__avatar {
|
|
202
|
+
cursor: pointer;
|
|
203
|
+
border: 2px solid transparent;
|
|
204
|
+
transition: border-color 0.5s;
|
|
205
|
+
border: 2px solid #fff;
|
|
206
|
+
background: #fff;
|
|
207
|
+
&--active {
|
|
208
|
+
border-color: #5865F2;
|
|
209
|
+
z-index: 10;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
img {
|
|
213
|
+
$size: 42px;
|
|
214
|
+
display: block;
|
|
215
|
+
width: $size;
|
|
216
|
+
height: $size;
|
|
217
|
+
object-fit: cover;
|
|
218
|
+
border-radius: 100px;
|
|
219
|
+
&:not(:first-child) {
|
|
220
|
+
margin-left: -10px;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
</style>
|