File tree Expand file tree Collapse file tree 3 files changed +35
-31
lines changed Expand file tree Collapse file tree 3 files changed +35
-31
lines changed Original file line number Diff line number Diff line change 3
3
<v-row justify =" center" no-gutters >
4
4
<container >
5
5
<v-toolbar ref =" toolbar" :flat =" flat" :height =" height" >
6
- <v-btn v-if =" showBack" icon size =" small" @click =" goBack" >
7
- <v-icon :icon =" mdiArrowLeft" size =" x-large" />
8
- </v-btn >
9
-
6
+ <back-button v-if =" showBack" @click =" goBack" />
10
7
<v-toolbar-title v-if =" title" class =" a-text-regular-enlarged" >
11
8
<div >{{ title }}</div >
12
9
<div v-if =" subtitle" class =" body-1" >
21
18
22
19
<script >
23
20
import { mdiArrowLeft } from ' @mdi/js'
21
+ import BackButton from ' @/components/common/BackButton/BackButton.vue'
24
22
25
23
export default {
24
+ components: { BackButton },
26
25
props: {
27
26
title: {
28
27
type: String ,
@@ -96,16 +95,6 @@ export default {
96
95
:deep(.v-toolbar-title :not (:first-child )) {
97
96
margin-inline-start : 0 ;
98
97
}
99
-
100
- :deep(.v-toolbar__content > .v-btn :first-child ) {
101
- margin-inline-start : 4px ;
102
- }
103
-
104
- :deep(.v-btn :hover ) {
105
- > .v-btn__overlay {
106
- opacity : 0 ;
107
- }
108
- }
109
98
}
110
99
111
100
.app-toolbar--fixed {
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<v-toolbar flat height =" 56" :class =" `${className}`" color =" transparent" >
3
- <v-btn icon @click =" goBack" >
3
+ <back-button @click =" goBack" >
4
4
<v-badge
5
5
v-if =" numOfNewMessages > 0"
6
6
:value =" numOfNewMessages"
9
9
:content =" numOfNewMessages > 99 ? '99+' : numOfNewMessages"
10
10
>
11
11
</v-badge >
12
- <v-icon :icon =" mdiArrowLeft" />
13
- </v-btn >
12
+ </back-button >
14
13
<div v-if =" !isWelcomeChat(partnerId)" >
15
14
<slot name =" avatar-toolbar" />
16
15
</div >
44
43
import partnerName from ' @/mixins/partnerName'
45
44
import { isAdamantChat , isWelcomeChat } from ' @/lib/chat/meta/utils'
46
45
import { mdiArrowLeft } from ' @mdi/js'
46
+ import BackButton from ' @/components/common/BackButton/BackButton.vue'
47
47
48
48
export default {
49
+ components: { BackButton },
49
50
mixins: [partnerName],
50
51
props: {
51
52
partnerId: {
@@ -140,13 +141,6 @@ export default {
140
141
}
141
142
}
142
143
143
- :deep(.v-toolbar__content > .v-btn :first-child ) {
144
- width : 36px ;
145
- height : 36px ;
146
- margin : 0 12px ;
147
- border-radius : 50% ;
148
- }
149
-
150
144
:deep(.v-text-field ) {
151
145
@include mixins .a-text-regular-enlarged-bold ();
152
146
@@ -181,13 +175,6 @@ export default {
181
175
margin-bottom : 0 ;
182
176
}
183
177
}
184
-
185
- :deep(.v-btn ) {
186
- & :hover > .v-btn__overlay {
187
- opacity : 0.2 ;
188
- transition : all 0.4s ease ;
189
- }
190
- }
191
178
}
192
179
193
180
/* * Themes **/
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <v-btn :class =" className" icon >
3
+ <slot />
4
+ <v-icon :icon =" mdiArrowLeft" />
5
+ </v-btn >
6
+ </template >
7
+
8
+ <script setup lang="ts">
9
+ import { mdiArrowLeft } from ' @mdi/js'
10
+
11
+ const className = ' back-button'
12
+ </script >
13
+
14
+ <style lang="scss">
15
+ .back-button {
16
+ & :first-child {
17
+ width : 36px ;
18
+ height : 36px ;
19
+ margin : 0 12px !important ;
20
+ border-radius : 50% ;
21
+ }
22
+
23
+ & :hover > .v-btn__overlay {
24
+ opacity : 0.2 ;
25
+ transition : all 0.4s ease ;
26
+ }
27
+ }
28
+ </style >
You can’t perform that action at this time.
0 commit comments