chore: Fix pre-commit hooks (#3525)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Muhsin Keloth
2021-12-09 07:02:00 +05:30
committed by GitHub
parent 3ee6b7d6e9
commit 9306b725d8
19 changed files with 85 additions and 65 deletions

View File

@@ -1,13 +1,14 @@
<template>
<div>
<div class="ui-snackbar">
<div class="ui-snackbar-text">{{ message }}</div>
<div class="ui-snackbar-text">
{{ message }}
</div>
</div>
</div>
</template>
<script>
export default {
props: {
message: String,
@@ -22,9 +23,7 @@ export default {
toggleAfterTimeout: false,
};
},
methods: {
},
mounted() {
},
mounted() {},
methods: {},
};
</script>

View File

@@ -1,7 +1,13 @@
<template>
<label class="switch" :class="classObject">
<input class="switch-input" :name="name" :id="id" :disabled="disabled" v-model="value" type="checkbox">
<input
:id="id"
v-model="value"
class="switch-input"
:name="name"
:disabled="disabled"
type="checkbox"
/>
<div class="switch-paddle" :for="name">
<span class="show-for-sr">on off</span>
</div>
@@ -24,12 +30,6 @@ export default {
value: null,
};
},
beforeMount() {
this.value = this.checked;
},
mounted() {
this.$emit('input', this.value = !!this.checked);
},
computed: {
classObject() {
const { type, size, value } = this;
@@ -45,5 +45,11 @@ export default {
this.$emit('input', val);
},
},
beforeMount() {
this.value = this.checked;
},
mounted() {
this.$emit('input', (this.value = !!this.checked));
},
};
</script>

View File

@@ -1,7 +1,11 @@
<template>
<div class="row empty-state">
<h3 class="title">{{ title }}</h3>
<p class="message">{{ message }}</p>
<h3 class="title">
{{ title }}
</h3>
<p class="message">
{{ message }}
</p>
<slot />
</div>
</template>

View File

@@ -1,6 +1,6 @@
<template>
<div class="row loading-state">
<h6 class="message">{{message}}<span class="spinner"></span></h6>
<h6 class="message">{{ message }}<span class="spinner"></span></h6>
</div>
</template>
<script>

View File

@@ -42,7 +42,8 @@
</div>
<div class="features-item">
<h2 class="block-title">
<span class="emoji">👥</span>{{ $t('ONBOARDING.TEAM_MEMBERS.TITLE') }}
<span class="emoji">👥</span>
{{ $t('ONBOARDING.TEAM_MEMBERS.TITLE') }}
</h2>
<p class="intro-body">
{{ $t('ONBOARDING.TEAM_MEMBERS.DESCRIPTION') }}
@@ -55,7 +56,7 @@
<h2 class="block-title">
<span class="emoji">📥</span>{{ $t('ONBOARDING.INBOXES.TITLE') }}
</h2>
<p class="intro-body ">
<p class="intro-body">
{{ $t('ONBOARDING.INBOXES.DESCRIPTION') }}
</p>
<router-link :to="newInboxURL" class="onboarding--link">
@@ -66,7 +67,7 @@
<h2 class="block-title">
<span class="emoji">🏷</span>{{ $t('ONBOARDING.LABELS.TITLE') }}
</h2>
<p class="intro-body ">
<p class="intro-body">
{{ $t('ONBOARDING.LABELS.DESCRIPTION') }}
</p>
<router-link :to="newLabelsURL" class="onboarding--link">

View File

@@ -10,10 +10,9 @@
variant="hollow"
size="tiny"
@click="onAvatarDelete"
>{{
this.$t('INBOX_MGMT.DELETE.AVATAR_DELETE_BUTTON_TEXT')
}}</woot-button
>
{{ this.$t('INBOX_MGMT.DELETE.AVATAR_DELETE_BUTTON_TEXT') }}
</woot-button>
</div>
<label>
<input
@@ -26,7 +25,6 @@
<slot></slot>
</label>
</div>
</template>
<script>

View File

@@ -9,4 +9,4 @@
</woot-button>
</div>
</template>
<script>
<script></script>

View File

@@ -81,7 +81,6 @@ import { required } from 'vuelidate/lib/validators';
import router from '../../../../index';
import PageHeader from '../../SettingsSubPageHeader';
export default {
components: {
PageHeader,
@@ -114,15 +113,18 @@ export default {
}
try {
const lineChannel = await this.$store.dispatch('inboxes/createChannel', {
name: this.channelName,
channel: {
type: 'line',
line_channel_id: this.lineChannelId,
line_channel_secret: this.lineChannelSecret,
line_channel_token: this.lineChannelToken,
},
});
const lineChannel = await this.$store.dispatch(
'inboxes/createChannel',
{
name: this.channelName,
channel: {
type: 'line',
line_channel_id: this.lineChannelId,
line_channel_secret: this.lineChannelSecret,
line_channel_token: this.lineChannelToken,
},
}
);
router.replace({
name: 'settings_inboxes_add_agents',
@@ -132,7 +134,9 @@ export default {
},
});
} catch (error) {
this.showAlert(this.$t('INBOX_MGMT.ADD.LINE_CHANNEL.API.ERROR_MESSAGE'));
this.showAlert(
this.$t('INBOX_MGMT.ADD.LINE_CHANNEL.API.ERROR_MESSAGE')
);
}
},
},

View File

@@ -4,7 +4,7 @@
:header-title="$t('INBOX_MGMT.ADD.SMS.TITLE')"
:header-content="$t('INBOX_MGMT.ADD.SMS.DESC')"
/>
<twilio type="sms"></twilio>
<twilio type="sms"></twilio>
</div>
</template>
@@ -15,7 +15,7 @@ import Twilio from './Twilio';
export default {
components: {
PageHeader,
Twilio,
Twilio,
},
};
</script>

View File

@@ -313,6 +313,7 @@ export default {
this.hasEnabledPushPermissions = true;
}
})
// eslint-disable-next-line no-console
.catch(error => console.log(error))
);
},

View File

@@ -149,13 +149,17 @@ export default {
}
if (response && response.status === 401) {
const { errors } = response.data;
const hasAuthErrorMsg = errors && errors.length && errors[0] && typeof errors[0] === 'string';
const { errors } = response.data;
const hasAuthErrorMsg =
errors &&
errors.length &&
errors[0] &&
typeof errors[0] === 'string';
if (hasAuthErrorMsg) {
this.showAlert(errors[0]);
} else {
this.showAlert(this.$t('LOGIN.API.UNAUTH'));
}
this.showAlert(this.$t('LOGIN.API.UNAUTH'));
}
return;
}
this.showAlert(this.$t('LOGIN.API.ERROR_MESSAGE'));

View File

@@ -68,10 +68,7 @@ export const mutations = {
Vue.set(chat.meta, 'team', team);
},
[types.UPDATE_CONVERSATION_CUSTOM_ATTRIBUTES](
_state,
custom_attributes
) {
[types.UPDATE_CONVERSATION_CUSTOM_ATTRIBUTES](_state, custom_attributes) {
const [chat] = getSelectedChatConversation(_state);
Vue.set(chat, 'custom_attributes', custom_attributes);
},
@@ -165,10 +162,7 @@ export const mutations = {
Vue.set(chat.meta, 'assignee', payload.assignee);
},
[types.UPDATE_CONVERSATION_CONTACT](
_state,
{ conversationId, ...payload }
) {
[types.UPDATE_CONVERSATION_CONTACT](_state, { conversationId, ...payload }) {
const [chat] = _state.allConversations.filter(c => c.id === conversationId);
if (chat) {
Vue.set(chat.meta, 'sender', payload);
@@ -179,10 +173,7 @@ export const mutations = {
_state.currentInbox = inboxId ? parseInt(inboxId, 10) : null;
},
[types.SET_CONVERSATION_CAN_REPLY](
_state,
{ conversationId, canReply }
) {
[types.SET_CONVERSATION_CAN_REPLY](_state, { conversationId, canReply }) {
const [chat] = _state.allConversations.filter(c => c.id === conversationId);
if (chat) {
Vue.set(chat, 'can_reply', canReply);

View File

@@ -56,7 +56,7 @@ export default {
};
},
watch: {
value: function (newValue) {
value: function(newValue) {
this.greetingsMessage = newValue;
},
},

View File

@@ -23,8 +23,7 @@
outline-none
"
:class="{
'border-black-200 hover:border-black-300 focus:border-black-300':
!error,
'border-black-200 hover:border-black-300 focus:border-black-300': !error,
'border-red-200 hover:border-red-300 focus:border-red-300': error,
}"
:placeholder="placeholder"