Skip to content

Commit 570b2f5

Browse files
committed
Run prettier
1 parent 8a4b70c commit 570b2f5

File tree

10 files changed

+48
-45
lines changed

10 files changed

+48
-45
lines changed

web/components/FirebaseAuth.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default class FirebaseAuth extends Vue {
4646
return {
4747
callbacks: {
4848
signInSuccessWithAuthResult: (
49-
authResult: firebase.auth.UserCredential
49+
authResult: firebase.auth.UserCredential,
5050
) => {
5151
this.$store.dispatch('addNotification', {
5252
message: 'Login successfull!',
@@ -66,7 +66,7 @@ export default class FirebaseAuth extends Vue {
6666
this.firebaseUIInitialized = true
6767
const container = this.$refs.authContainer as HTMLElement
6868
Array.from(
69-
container.getElementsByClassName('firebaseui-idp-text-long')
69+
container.getElementsByClassName('firebaseui-idp-text-long'),
7070
).forEach((item: Element) => {
7171
item.textContent =
7272
item.textContent?.replace('Sign in with', 'Continue with') || null

web/components/MessageThreadHeader.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export default class MessageThreadHeader extends Vue {
213213
text: this.$options.filters?.phoneNumber(phone.phone_number),
214214
value: phone.phone_number,
215215
}
216-
}
216+
},
217217
)
218218
}
219219

web/layouts/default.vue

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,14 @@ export default class DefaultLayout extends Vue {
4040
4141
mounted() {
4242
// this.startPoller()
43-
setTimeout(() => {
44-
if (this.poller) {
45-
clearInterval(this.poller)
46-
}
47-
}, 60 * 1000 * 60)
43+
setTimeout(
44+
() => {
45+
if (this.poller) {
46+
clearInterval(this.poller)
47+
}
48+
},
49+
60 * 1000 * 60,
50+
)
4851
}
4952
5053
beforeDestroy(): void {
@@ -62,7 +65,7 @@ export default class DefaultLayout extends Vue {
6265
setAuthHeader((await this.$fire.auth.currentUser?.getIdToken()) ?? '')
6366
promises.push(
6467
this.$store.dispatch('loadThreads'),
65-
this.$store.dispatch('getHeartbeat')
68+
this.$store.dispatch('getHeartbeat'),
6669
)
6770
}
6871
@@ -74,8 +77,8 @@ export default class DefaultLayout extends Vue {
7477
promises.push(
7578
this.$store.dispatch(
7679
'loadThreadMessages',
77-
this.$store.getters.getThread.id
78-
)
80+
this.$store.getters.getThread.id,
81+
),
7982
)
8083
}
8184
await Promise.all(promises)

web/pages/billing/index.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
Your next bill is for <b>${{ plan.price }}</b> on
5050
<b>{{
5151
new Date(
52-
$store.getters.getUser.subscription_renews_at
52+
$store.getters.getUser.subscription_renews_at,
5353
).toLocaleDateString()
5454
}}</b>
5555
</p>
@@ -64,7 +64,7 @@
6464
You will be downgraded to the <b>FREE</b> plan on
6565
<b>{{
6666
new Date(
67-
$store.getters.getUser.subscription_ends_at
67+
$store.getters.getUser.subscription_ends_at,
6868
).toLocaleDateString()
6969
}}</b>
7070
</p>
@@ -116,7 +116,7 @@
116116
of the current billing period on
117117
<b>{{
118118
new Date(
119-
$store.getters.getUser.subscription_renews_at
119+
$store.getters.getUser.subscription_renews_at,
120120
).toLocaleDateString()
121121
}}</b>
122122
</p>
@@ -238,8 +238,8 @@
238238
<div class="d-flex">
239239
<h2 class="text-h4 font-weight-bold mt-4">
240240
{{
241-
$store.getters.getBillingUsage.received_messages |
242-
decimal
241+
$store.getters.getBillingUsage.received_messages
242+
| decimal
243243
}}
244244
</h2>
245245
</div>
@@ -411,7 +411,7 @@ export default Vue.extend({
411411
plan(): PaymentPlan {
412412
return this.plans.find(
413413
(x) =>
414-
x.id === (this.$store.getters.getUser?.subscription_name || 'free')
414+
x.id === (this.$store.getters.getUser?.subscription_name || 'free'),
415415
)!
416416
},
417417
isOnFreePlan(): boolean {

web/pages/heartbeats/_id.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export default {
115115
if (index < this.heartbeats.length - 1) {
116116
interval = this.getDiff(
117117
heartbeat.timestamp,
118-
this.heartbeats[index + 1].timestamp
118+
this.heartbeats[index + 1].timestamp,
119119
)
120120
}
121121
const item = {
@@ -148,7 +148,7 @@ export default {
148148
}
149149
const duration = intervalToDuration({
150150
start: new Date(
151-
context.dataset.data[context.dataIndex + 1].x
151+
context.dataset.data[context.dataIndex + 1].x,
152152
),
153153
end: new Date(context.dataset.data[context.dataIndex].x),
154154
})

web/pages/messages/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ export default {
109109
errors.set(
110110
'to',
111111
response.data.data.to.map((x) =>
112-
x.replace('to field', 'phone number field')
113-
)
112+
x.replace('to field', 'phone number field'),
113+
),
114114
)
115115
}
116116
if (response.data.data.from) {

web/pages/settings/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ export default Vue.extend({
732732
id: webhook.id,
733733
url: webhook.url,
734734
phone_numbers: webhook.phone_numbers.filter(
735-
(x) => this.phoneNumbers.find((y) => y === x) !== undefined
735+
(x) => this.phoneNumbers.find((y) => y === x) !== undefined,
736736
),
737737
signing_key: webhook.signing_key,
738738
events: webhook.events,
@@ -762,7 +762,7 @@ export default Vue.extend({
762762
url: '',
763763
signing_key: '',
764764
phone_numbers: this.$store.getters.getPhones.map(
765-
(phone) => phone.phone_number
765+
(phone) => phone.phone_number,
766766
),
767767
events: ['message.phone.received'],
768768
}

web/plugins/chart.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ChartJS.register(
2626
CategoryScale,
2727
LinearScale,
2828
LineElement,
29-
ArcElement
29+
ArcElement,
3030
)
3131

3232
Vue.component('BarChart', {

web/plugins/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const sanitize = (key: string, values: Array<string>): Array<string> => {
2121
.split(' char')
2222
.join(' character')
2323
.split(' field ')
24-
.join(' ')
24+
.join(' '),
2525
)
2626
})
2727
}

web/store/index.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ export const actions = {
327327

328328
if (context.state.user && context.state.user.active_phone_id) {
329329
const phone = response.data.data.find(
330-
(x: EntitiesPhone) => x.id === context.state.user?.active_phone_id
330+
(x: EntitiesPhone) => x.id === context.state.user?.active_phone_id,
331331
)
332332
if (phone) {
333333
context.commit('setOwner', phone.phone_number)
@@ -351,15 +351,15 @@ export const actions = {
351351

352352
async updatePhone(
353353
context: ActionContext<State, State>,
354-
phone: EntitiesPhone
354+
phone: EntitiesPhone,
355355
) {
356356
await axios
357357
.put(`/v1/phones`, {
358358
fcm_token: phone.fcm_token,
359359
sim: phone.sim,
360360
phone_number: phone.phone_number,
361361
message_expiration_seconds: parseInt(
362-
phone.message_expiration_seconds.toString()
362+
phone.message_expiration_seconds.toString(),
363363
),
364364
max_send_attempts: parseInt(phone.max_send_attempts.toString()),
365365
messages_per_minute: parseInt(phone.messages_per_minute.toString()),
@@ -379,7 +379,7 @@ export const actions = {
379379

380380
async handleAxiosError(
381381
context: ActionContext<State, State>,
382-
error: AxiosError
382+
error: AxiosError,
383383
) {
384384
const errorMessage =
385385
error.response?.data?.data[Object.keys(error.response?.data?.data)[0]][0]
@@ -394,7 +394,7 @@ export const actions = {
394394

395395
getHeartbeat(
396396
context: ActionContext<State, State>,
397-
limit = 1
397+
limit = 1,
398398
): Promise<Array<Heartbeat>> {
399399
return new Promise<Array<Heartbeat>>((resolve, reject) => {
400400
axios
@@ -430,7 +430,7 @@ export const actions = {
430430

431431
async sendMessage(
432432
context: ActionContext<State, State>,
433-
request: SendMessageRequest
433+
request: SendMessageRequest,
434434
) {
435435
try {
436436
const response = await axios.post('/v1/messages/send', request)
@@ -455,7 +455,7 @@ export const actions = {
455455

456456
addNotification(
457457
context: ActionContext<State, State>,
458-
request: NotificationRequest
458+
request: NotificationRequest,
459459
) {
460460
context.commit('setNotification', request)
461461
},
@@ -466,7 +466,7 @@ export const actions = {
466466

467467
loadThreadMessages(
468468
context: ActionContext<State, State>,
469-
threadId: string | null
469+
threadId: string | null,
470470
): Promise<Array<Message>> {
471471
context.commit('setThreadId', threadId)
472472
return new Promise<Array<Message>>((resolve, reject) => {
@@ -494,7 +494,7 @@ export const actions = {
494494

495495
async setAuthUser(
496496
context: ActionContext<State, State>,
497-
user: AuthUser | null | undefined
497+
user: AuthUser | null | undefined,
498498
) {
499499
const userChanged = user?.id !== context.getters.getAuthUser?.id
500500

@@ -511,7 +511,7 @@ export const actions = {
511511
])
512512

513513
const phone = context.getters.getPhones.find(
514-
(x: EntitiesPhone) => x.id === context.getters.getUser.active_phone_id
514+
(x: EntitiesPhone) => x.id === context.getters.getUser.active_phone_id,
515515
)
516516
if (phone) {
517517
await context.dispatch('updateUser', {
@@ -524,7 +524,7 @@ export const actions = {
524524
async onAuthStateChanged(
525525
context: ActionContext<State, State>,
526526
// @ts-ignore
527-
{ authUser }
527+
{ authUser },
528528
) {
529529
if (authUser == null) {
530530
await Promise.all([
@@ -544,7 +544,7 @@ export const actions = {
544544
async onIdTokenChanged(
545545
_: ActionContext<State, State>,
546546
// @ts-ignore
547-
{ authUser }
547+
{ authUser },
548548
) {
549549
if (authUser == null) {
550550
setApiKey('')
@@ -559,7 +559,7 @@ export const actions = {
559559

560560
async updateUser(
561561
context: ActionContext<State, State>,
562-
payload: { owner: string; timezone: string }
562+
payload: { owner: string; timezone: string },
563563
) {
564564
await context.commit('setOwner', payload.owner)
565565

@@ -579,7 +579,7 @@ export const actions = {
579579

580580
async updateThread(
581581
context: ActionContext<State, State>,
582-
payload: { threadId: string; isArchived: boolean }
582+
payload: { threadId: string; isArchived: boolean },
583583
) {
584584
await axios.put(`/v1/message-threads/${payload.threadId}`, {
585585
is_archived: payload.isArchived,
@@ -632,7 +632,7 @@ export const actions = {
632632

633633
createDiscord(
634634
context: ActionContext<State, State>,
635-
payload: RequestsDiscordStore
635+
payload: RequestsDiscordStore,
636636
): Promise<EntitiesDiscord> {
637637
return new Promise<EntitiesDiscord>((resolve, reject) => {
638638
axios
@@ -681,13 +681,13 @@ export const actions = {
681681

682682
updateDiscordIntegration(
683683
context: ActionContext<State, State>,
684-
payload: RequestsDiscordUpdate & { id: string }
684+
payload: RequestsDiscordUpdate & { id: string },
685685
) {
686686
return new Promise<EntitiesDiscord>((resolve, reject) => {
687687
axios
688688
.put<ResponsesDiscordResponse>(
689689
`/v1/discord-integrations/${payload.id}`,
690-
payload
690+
payload,
691691
)
692692
.then((response: AxiosResponse<ResponsesDiscordResponse>) => {
693693
resolve(response.data.data)
@@ -708,7 +708,7 @@ export const actions = {
708708

709709
deleteDiscordIntegration(
710710
context: ActionContext<State, State>,
711-
payload: string
711+
payload: string,
712712
) {
713713
return new Promise<void>((resolve, reject) => {
714714
axios
@@ -732,7 +732,7 @@ export const actions = {
732732

733733
createWebhook(
734734
context: ActionContext<State, State>,
735-
payload: RequestsWebhookStore
735+
payload: RequestsWebhookStore,
736736
) {
737737
return new Promise<EntitiesWebhook>((resolve, reject) => {
738738
axios
@@ -780,7 +780,7 @@ export const actions = {
780780

781781
updateWebhook(
782782
context: ActionContext<State, State>,
783-
payload: RequestsWebhookUpdate & { id: string }
783+
payload: RequestsWebhookUpdate & { id: string },
784784
) {
785785
return new Promise<EntitiesWebhook>((resolve, reject) => {
786786
axios

0 commit comments

Comments
 (0)