FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
httpsms/web/components/MessageThreadHeader.vue at main · blacdev/httpsms · GitHub
blacdev
/
httpsms
Public
forked from
NdoleStudio/httpsms
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
httpsms
/
web
/
components
/
MessageThreadHeader.vue
Copy path
More file actions
More file actions
Latest commit
History
History
History
316 lines (307 loc) · 10.3 KB
Breadcrumbs
httpsms
/
web
/
components
/
MessageThreadHeader.vue
Copy path
File metadata and controls
316 lines (307 loc) · 10.3 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
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
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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
<
template
>
<
v-sheet
class
=
"
pa-4 d-flex
"
:elevation
=
"
$vuetify.breakpoint.lgAndUp ? 0 : 2
"
:color
=
"
$vuetify.breakpoint.lgAndUp ? 'grey darken-4' : 'black'
"
>
<
div
:class
=
"
{ 'px-2': $vuetify.breakpoint.mdAndDown }
"
>
<
v-toolbar-title
>
<
div
class
=
"
d-flex pt-2
"
style
=
"
width
:
245
px
"
>
<
v-select
outlined
dense
:disabled
=
"
owners.length === 0
"
placeholder
=
"
Phone Numbers
"
:class
=
"
{ 'mb-n6': !$store.getters.getOwner }
"
:items
=
"
owners
"
:value
=
"
$store.getters.getOwner
"
@change
=
"
onOwnerChanged
"
>
</
v-select
>
<
div
style
=
"
width
:
50
px
"
>
<
v-progress-circular
v-if
=
"
$store.getters.getPolling
"
indeterminate
:size
=
"
20
"
:width
=
"
1
"
class
=
"
mt-3 ml-2
"
color
=
"
success
"
></
v-progress-circular
>
</
div
>
</
div
>
</
v-toolbar-title
>
<
div
v-if
=
"
$store.getters.getOwner
"
class
=
"
d-flex mt-n4
"
>
<
p
class
=
"
text--secondary mb-n1
"
>
{{ $store.getters.getOwner | phoneCountry }}
</
p
>
<
v-tooltip
v-if
=
"
$store.getters.getHeartbeat
"
right
:open-on-focus
=
"
false
"
:open-on-hover
=
"
true
"
open-on-click
>
<
template
#
activator
=
"
{
on
,
attrs
}
"
>
<
v-btn
x-small
v-bind
=
"
attrs
"
:to
=
"
{
name: 'heartbeats-id',
params: { id: $store.getters.getOwner },
}
"
color
=
"
success
"
class
=
"
ml-2 mt-1 mb-n1
"
icon
v-on
=
"
on
"
>
<
v-icon
v-if
=
"
$store.getters.getHeartbeat.charging
"
small
class
=
"
mt-n1
"
>{{ mdiBatteryCharging }}</
v-icon
>
<
v-icon
v-else
x-small
>{{ mdiCircle }}</
v-icon
>
</
v-btn
>
</
template
>
<
h4
>Last Heartbeat</
h4
>
{{ $store.getters.getHeartbeat.timestamp | humanizeTime }} ago
</
v-tooltip
>
</
div
>
</
div
>
<
v-spacer
></
v-spacer
>
<
v-menu
offset-y
>
<
template
#
activator
=
"
{
on
}
"
>
<
v-btn
icon
text
class
=
"
mt-2
"
v-on
=
"
on
"
>
<
v-icon
>{{ mdiDotsVertical }}</
v-icon
>
</
v-btn
>
</
template
>
<
v-list
class
=
"
px-2
"
nav
:dense
=
"
$vuetify.breakpoint.mdAndDown
"
>
<
v-list-item-group
v-model
=
"
selectedMenuItem
"
>
<
v-list-item
@click.prevent
=
"
toggleArchive
"
>
<
v-list-item-icon
class
=
"
pl-2
"
>
<
v-icon
v-if
=
"
!$store.getters.getIsArchived
"
dense
>
{{ mdiPackageDown }}
</
v-icon
>
<
v-icon
v-if
=
"
$store.getters.getIsArchived
"
dense
>
{{ mdiPackageUp }}
</
v-icon
>
</
v-list-item-icon
>
<
v-list-item-content
class
=
"
ml-n3
"
>
<
v-list-item-title
class
=
"
pr-16 py-1
"
>
<
span
v-if
=
"
!$store.getters.getIsArchived
"
:class
=
"
{ 'pr-16': $vuetify.breakpoint.mdAndUp }
"
>
Archived
</
span
>
<
span
v-if
=
"
$store.getters.getIsArchived
"
:class
=
"
{ 'pr-16': $vuetify.breakpoint.mdAndUp }
"
>
Unarchived
</
span
>
</
v-list-item-title
>
</
v-list-item-content
>
</
v-list-item
>
<
v-list-item
v-if
=
"
$store.getters.getOwner
"
:to
=
"
{ name: 'messages' }
"
exact
>
<
v-list-item-icon
class
=
"
pl-2
"
>
<
v-icon
dense
>{{ mdiPlus }}</
v-icon
>
</
v-list-item-icon
>
<
v-list-item-content
class
=
"
ml-n3
"
>
<
v-list-item-title
class
=
"
pr-16 py-1
"
>
<
span
:class
=
"
{ 'pr-16': $vuetify.breakpoint.mdAndUp }
"
>
New Message
</
span
>
</
v-list-item-title
>
</
v-list-item-content
>
</
v-list-item
>
<
v-list-item
v-if
=
"
$store.getters.getOwner
"
:to
=
"
{ name: 'bulk-messages' }
"
exact
>
<
v-list-item-icon
class
=
"
pl-2
"
>
<
v-icon
dense
>{{ mdiCommentTextMultipleOutline }}</
v-icon
>
</
v-list-item-icon
>
<
v-list-item-content
class
=
"
ml-n3
"
>
<
v-list-item-title
class
=
"
pr-16 py-1
"
>
<
span
:class
=
"
{ 'pr-16': $vuetify.breakpoint.mdAndUp }
"
>
Bulk Messages
</
span
>
</
v-list-item-title
>
</
v-list-item-content
>
</
v-list-item
>
<
v-list-item
v-if
=
"
$store.getters.getOwner
"
:to
=
"
{ name: 'search-messages' }
"
exact
>
<
v-list-item-icon
class
=
"
pl-2
"
>
<
v-icon
dense
>{{ mdiMagnify }}</
v-icon
>
</
v-list-item-icon
>
<
v-list-item-content
class
=
"
ml-n3
"
>
<
v-list-item-title
class
=
"
pr-16 py-1
"
>
<
span
:class
=
"
{ 'pr-16': $vuetify.breakpoint.mdAndUp }
"
>
Search Messages
</
span
>
</
v-list-item-title
>
</
v-list-item-content
>
</
v-list-item
>
<
v-list-item
:to
=
"
{ name: 'settings' }
"
exact
>
<
v-list-item-icon
class
=
"
pl-2
"
>
<
v-icon
dense
>{{ mdiAccountCog }}</
v-icon
>
</
v-list-item-icon
>
<
v-list-item-content
class
=
"
ml-n3
"
>
<
v-list-item-title
class
=
"
pr-16 py-1
"
>
<
span
:class
=
"
{ 'pr-16': $vuetify.breakpoint.mdAndUp }
"
>
Settings
</
span
>
</
v-list-item-title
>
</
v-list-item-content
>
</
v-list-item
>
<
v-list-item
:to
=
"
{ name: 'phone-api-keys' }
"
exact
>
<
v-list-item-icon
class
=
"
pl-2
"
>
<
v-icon
dense
>{{ mdiCellphoneKey }}</
v-icon
>
</
v-list-item-icon
>
<
v-list-item-content
class
=
"
ml-n3
"
>
<
v-list-item-title
class
=
"
pr-16 py-1
"
>
<
span
:class
=
"
{ 'pr-16': $vuetify.breakpoint.mdAndUp }
"
>
Phone API Keys
</
span
>
</
v-list-item-title
>
</
v-list-item-content
>
</
v-list-item
>
<
v-list-item
v-if
=
"
$store.getters.getOwner
"
:href
=
"
$store.getters.getAppData.appDownloadUrl
"
exact
@click
=
"
$store.dispatch('addNotification', {
type: 'info',
message: 'Downloading the httpSMS Android App',
})
"
>
<
v-list-item-icon
class
=
"
pl-2
"
>
<
v-icon
dense
>{{ mdiDownload }}</
v-icon
>
</
v-list-item-icon
>
<
v-list-item-content
class
=
"
ml-n3
"
>
<
v-list-item-title
class
=
"
pr-16 py-1
"
>
<
span
:class
=
"
{ 'pr-16': $vuetify.breakpoint.mdAndUp }
"
>
Install App
</
span
>
</
v-list-item-title
>
</
v-list-item-content
>
</
v-list-item
>
<
v-list-item
:to
=
"
{ name: 'billing' }
"
exact
>
<
v-list-item-icon
class
=
"
pl-2
"
>
<
v-icon
dense
>{{ mdiFinance }}</
v-icon
>
</
v-list-item-icon
>
<
v-list-item-content
class
=
"
ml-n3
"
>
<
v-list-item-title
class
=
"
pr-16 py-1
"
>
<
span
:class
=
"
{ 'pr-16': $vuetify.breakpoint.mdAndUp }
"
>
Usage & Billing
</
span
>
</
v-list-item-title
>
</
v-list-item-content
>
</
v-list-item
>
<
v-list-item
@click.prevent
=
"
logout
"
>
<
v-list-item-icon
class
=
"
pl-2
"
>
<
v-icon
dense
>{{ mdiLogout }}</
v-icon
>
</
v-list-item-icon
>
<
v-list-item-content
class
=
"
ml-n3
"
>
<
v-list-item-title
class
=
"
pr-16 py-1
"
>
<
span
:class
=
"
{ 'pr-16': $vuetify.breakpoint.mdAndUp }
"
>
Logout
</
span
>
</
v-list-item-title
>
</
v-list-item-content
>
</
v-list-item
>
</
v-list-item-group
>
</
v-list
>
</
v-menu
>
</
v-sheet
>
</
template
>
<
script
lang="ts">
import
{
Vue
,
Component
}
from
'
vue-property-decorator
'
import
{
mdiPlus
,
mdiAccountCog
,
mdiLogout
,
mdiCellphoneKey
,
mdiDownload
,
mdiFinance
,
mdiBatteryChargingHigh
,
mdiPackageUp
,
mdiPackageDown
,
mdiDotsVertical
,
mdiMagnify
,
mdiCommentTextMultipleOutline
,
mdiCircle
,
}
from
'
@mdi/js
'
import
{
SelectItem
}
from
'
~/types
'
import
{
EntitiesPhone
}
from
'
~/models/api
'
@
Component
export
default
class
MessageThreadHeader
extends
Vue
{
selectedMenuItem
=
-
1
mdiPlus
=
mdiPlus
mdiAccountCog
=
mdiAccountCog
mdiLogout
=
mdiLogout
mdiDownload
=
mdiDownload
mdiCellphoneKey
=
mdiCellphoneKey
mdiPackageUp
=
mdiPackageUp
mdiCommentTextMultipleOutline
=
mdiCommentTextMultipleOutline
mdiFinance
=
mdiFinance
mdiPackageDown
=
mdiPackageDown
mdiDotsVertical
=
mdiDotsVertical
mdiCircle
=
mdiCircle
mdiBatteryCharging
=
mdiBatteryChargingHigh
mdiMagnify
=
mdiMagnify
get
owners()
:
Array
<
SelectItem
> {
return
this
.
$store
.
getters
.
getPhones
.
map
(
(
phone
:
EntitiesPhone
)
:
SelectItem
=>
{
return
{
text:
this
.
$options
.
filters
?.
phoneNumber
(
phone
.
phone_number
),
value:
phone
.
phone_number
,
}
},
)
}
async
onOwnerChanged(
owner
:
string
) {
await
this
.
$store
.
dispatch
(
'
updateUser
'
, {
owner
})
if
(
this
.
$route
.
name
!==
'
threads
'
) {
await
this
.
$store
.
dispatch
(
'
setThreadId
'
,
null
)
await
this
.
$router
.
push
({ name:
'
threads
'
})
return
}
await
this
.
$store
.
dispatch
(
'
loadThreads
'
)
}
async
toggleArchive() {
await
this
.
$store
.
dispatch
(
'
toggleArchive
'
)
setTimeout
(()
=>
{
this
.
selectedMenuItem
=
-
1
},
1000
)
if
(
this
.
$route
.
name
!==
'
threads
'
) {
await
this
.
$store
.
dispatch
(
'
setThreadId
'
,
null
)
await
this
.
$router
.
push
({ name:
'
threads
'
})
return
}
await
this
.
$store
.
dispatch
(
'
loadThreads
'
)
}
logout()
:
void
{
this
.
$fire
.
auth
.
signOut
().
then
(()
=>
{
this
.
$store
.
dispatch
(
'
setAuthUser
'
,
null
)
this
.
$store
.
dispatch
(
'
resetState
'
)
this
.
$store
.
dispatch
(
'
addNotification
'
, {
type:
'
info
'
,
message:
'
You have successfully logged out
'
,
})
this
.
$router
.
push
({ name:
'
index
'
})
})
}
}
</
script
>
Back
|
FazBrowse Home
|
New Git URL