@@ -3,7 +3,7 @@ class ApiController < ApplicationController
|
||||
|
||||
def index
|
||||
render json: { version: Chatwoot.config[:version],
|
||||
timestamp: Time.now.utc.to_formatted_s(:db),
|
||||
timestamp: Time.now.utc.to_fs(:db),
|
||||
queue_services: redis_status,
|
||||
data_services: postgres_status }
|
||||
end
|
||||
|
||||
@@ -41,7 +41,7 @@ class WidgetsController < ActionController::Base
|
||||
source_id: @auth_token_params[:source_id]
|
||||
)
|
||||
|
||||
@contact = @contact_inbox ? @contact_inbox.contact : nil
|
||||
@contact = @contact_inbox&.contact
|
||||
end
|
||||
|
||||
def build_contact
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div v-on-clickaway="onCloseAgentList" class="bulk-action__agents">
|
||||
<div class="triangle" :style="cssVars">
|
||||
<div class="triangle">
|
||||
<svg height="12" viewBox="0 0 24 12" width="24">
|
||||
<path
|
||||
d="M20 12l-8-8-12 12"
|
||||
@@ -104,14 +104,13 @@ import { mapGetters } from 'vuex';
|
||||
import Thumbnail from 'dashboard/components/widgets/Thumbnail.vue';
|
||||
import Spinner from 'shared/components/Spinner';
|
||||
import { mixin as clickaway } from 'vue-clickaway';
|
||||
import bulkActionsMixin from 'dashboard/mixins/bulkActionsMixin.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Thumbnail,
|
||||
Spinner,
|
||||
},
|
||||
mixins: [clickaway, bulkActionsMixin],
|
||||
mixins: [clickaway],
|
||||
props: {
|
||||
selectedInboxes: {
|
||||
type: Array,
|
||||
@@ -240,7 +239,7 @@ export default {
|
||||
display: block;
|
||||
z-index: var(--z-index-one);
|
||||
position: absolute;
|
||||
top: calc(var(--space-slab) * -1);
|
||||
top: var(--space-minus-slab);
|
||||
right: var(--triangle-position);
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
<transition name="popover-animation">
|
||||
<label-actions
|
||||
v-if="showLabelActions"
|
||||
triangle-position="8.5"
|
||||
class="label-actions-box"
|
||||
@assign="assignLabels"
|
||||
@close="showLabelActions = false"
|
||||
/>
|
||||
@@ -66,12 +66,12 @@
|
||||
<transition name="popover-animation">
|
||||
<update-actions
|
||||
v-if="showUpdateActions"
|
||||
class="update-actions-box"
|
||||
:selected-inboxes="selectedInboxes"
|
||||
:conversation-count="conversations.length"
|
||||
:show-resolve="!showResolvedAction"
|
||||
:show-reopen="!showOpenAction"
|
||||
:show-snooze="!showSnoozedAction"
|
||||
triangle-position="5.6"
|
||||
@update="updateConversations"
|
||||
@close="showUpdateActions = false"
|
||||
/>
|
||||
@@ -79,9 +79,9 @@
|
||||
<transition name="popover-animation">
|
||||
<agent-selector
|
||||
v-if="showAgentsList"
|
||||
class="agent-actions-box"
|
||||
:selected-inboxes="selectedInboxes"
|
||||
:conversation-count="conversations.length"
|
||||
triangle-position="2.8"
|
||||
@select="submit"
|
||||
@close="showAgentsList = false"
|
||||
/>
|
||||
@@ -89,7 +89,7 @@
|
||||
<transition name="popover-animation">
|
||||
<team-actions
|
||||
v-if="showTeamsList"
|
||||
triangle-position="0.2"
|
||||
class="team-actions-box"
|
||||
@assign-team="assignTeam"
|
||||
@close="showTeamsList = false"
|
||||
/>
|
||||
@@ -247,4 +247,17 @@ export default {
|
||||
opacity: 0;
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
.label-actions-box {
|
||||
--triangle-position: 8.5rem;
|
||||
}
|
||||
.update-actions-box {
|
||||
--triangle-position: 5.6rem;
|
||||
}
|
||||
.agent-actions-box {
|
||||
--triangle-position: 2.8rem;
|
||||
}
|
||||
.team-actions-box {
|
||||
--triangle-position: 0.2rem;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div v-on-clickaway="onClose" class="labels-container">
|
||||
<div class="triangle" :style="cssVars">
|
||||
<div class="triangle">
|
||||
<svg height="12" viewBox="0 0 24 12" width="24">
|
||||
<path
|
||||
d="M20 12l-8-8-12 12"
|
||||
@@ -75,10 +75,9 @@
|
||||
<script>
|
||||
import { mixin as clickaway } from 'vue-clickaway';
|
||||
import { mapGetters } from 'vuex';
|
||||
import bulkActionsMixin from 'dashboard/mixins/bulkActionsMixin.js';
|
||||
|
||||
export default {
|
||||
mixins: [clickaway, bulkActionsMixin],
|
||||
mixins: [clickaway],
|
||||
data() {
|
||||
return {
|
||||
query: '',
|
||||
@@ -207,7 +206,7 @@ export default {
|
||||
position: absolute;
|
||||
right: var(--triangle-position);
|
||||
text-align: left;
|
||||
top: calc(var(--space-slab) * -1);
|
||||
top: var(--space-minus-slab);
|
||||
z-index: var(--z-index-one);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div v-on-clickaway="onClose" class="bulk-action__teams">
|
||||
<div class="triangle" :style="cssVars">
|
||||
<div class="triangle">
|
||||
<svg height="12" viewBox="0 0 24 12" width="24">
|
||||
<path
|
||||
d="M20 12l-8-8-12 12"
|
||||
@@ -59,9 +59,8 @@
|
||||
<script>
|
||||
import { mixin as clickaway } from 'vue-clickaway';
|
||||
import { mapGetters } from 'vuex';
|
||||
import bulkActionsMixin from 'dashboard/mixins/bulkActionsMixin.js';
|
||||
export default {
|
||||
mixins: [clickaway, bulkActionsMixin],
|
||||
mixins: [clickaway],
|
||||
data() {
|
||||
return {
|
||||
query: '',
|
||||
@@ -141,7 +140,7 @@ export default {
|
||||
display: block;
|
||||
z-index: var(--z-index-one);
|
||||
position: absolute;
|
||||
top: calc(var(--space-slab) * -1);
|
||||
top: var(--space-minus-slab);
|
||||
right: var(--triangle-position);
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div v-on-clickaway="onClose" class="actions-container">
|
||||
<div class="triangle" :style="cssVars">
|
||||
<div class="triangle">
|
||||
<svg height="12" viewBox="0 0 24 12" width="24">
|
||||
<path
|
||||
d="M20 12l-8-8-12 12"
|
||||
@@ -45,14 +45,13 @@
|
||||
import { mixin as clickaway } from 'vue-clickaway';
|
||||
import WootDropdownItem from 'shared/components/ui/dropdown/DropdownItem.vue';
|
||||
import WootDropdownMenu from 'shared/components/ui/dropdown/DropdownMenu.vue';
|
||||
import bulkActionsMixin from 'dashboard/mixins/bulkActionsMixin.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
WootDropdownItem,
|
||||
WootDropdownMenu,
|
||||
},
|
||||
mixins: [clickaway, bulkActionsMixin],
|
||||
mixins: [clickaway],
|
||||
props: {
|
||||
selectedInboxes: {
|
||||
type: Array,
|
||||
@@ -156,7 +155,7 @@ export default {
|
||||
position: absolute;
|
||||
right: var(--triangle-position);
|
||||
text-align: left;
|
||||
top: calc(var(--space-slab) * -1);
|
||||
top: var(--space-minus-slab);
|
||||
z-index: var(--z-index-one);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ class ApplicationMailbox < ActionMailbox::Base
|
||||
# Last part is the regex for the UUID
|
||||
# Eg: email should be something like : reply+6bdc3f4d-0bec-4515-a284-5d916fdde489@domain.com
|
||||
REPLY_EMAIL_UUID_PATTERN = /^reply\+([0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12})$/i
|
||||
CONVERSATION_MESSAGE_ID_PATTERN = %r{conversation/([a-zA-Z0-9\-]*?)/messages/(\d+?)@(\w+\.\w+)}
|
||||
CONVERSATION_MESSAGE_ID_PATTERN = %r{conversation/([a-zA-Z0-9-]*?)/messages/(\d+?)@(\w+\.\w+)}
|
||||
|
||||
# routes as a reply to existing conversations
|
||||
routing(
|
||||
|
||||
@@ -62,7 +62,7 @@ class Attachment < ApplicationRecord
|
||||
|
||||
def thumb_url
|
||||
if file.attached? && file.representable?
|
||||
url_for(file.representation(resize: '250x250'))
|
||||
url_for(file.representation(resize_to_fill: [250, nil]))
|
||||
else
|
||||
''
|
||||
end
|
||||
|
||||
@@ -11,7 +11,7 @@ module Avatarable
|
||||
end
|
||||
|
||||
def avatar_url
|
||||
return url_for(avatar.representation(resize: '250x250')) if avatar.attached? && avatar.representable?
|
||||
return url_for(avatar.representation(resize_to_fill: [250, nil])) if avatar.attached? && avatar.representable?
|
||||
|
||||
''
|
||||
end
|
||||
|
||||
@@ -10,7 +10,7 @@ module Pubsubable
|
||||
|
||||
def pubsub_token
|
||||
# backfills tokens for existing records
|
||||
regenerate_pubsub_token if self[:pubsub_token].blank?
|
||||
regenerate_pubsub_token if self[:pubsub_token].blank? && persisted?
|
||||
self[:pubsub_token]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
json.identifier @inbox_channel.identifier
|
||||
json.identity_validation_enabled @inbox_channel.hmac_mandatory
|
||||
json.partial! 'public/api/v1/models/inbox.json.jbuilder', resource: @inbox_channel.inbox
|
||||
json.partial! 'public/api/v1/models/inbox', formats: [:json], resource: @inbox_channel.inbox
|
||||
|
||||
@@ -7,20 +7,20 @@ json.position category.position
|
||||
json.related_categories do
|
||||
if category.related_categories.any?
|
||||
json.array! category.related_categories.each do |related_category|
|
||||
json.partial! partial: 'public/api/v1/models/associated_category.json.jbuilder', category: related_category
|
||||
json.partial! partial: 'public/api/v1/models/associated_category', formats: [:json], category: related_category
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if category.parent_category.present?
|
||||
json.parent_category do
|
||||
json.partial! partial: 'public/api/v1/models/associated_category.json.jbuilder', category: category.parent_category
|
||||
json.partial! partial: 'public/api/v1/models/associated_category', formats: [:json], category: category.parent_category
|
||||
end
|
||||
end
|
||||
|
||||
if category.root_category.present?
|
||||
json.root_category do
|
||||
json.partial! partial: 'public/api/v1/models/associated_category.json.jbuilder', category: category.root_category
|
||||
json.partial! partial: 'public/api/v1/models/associated_category', formats: [:json], category: category.root_category
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
json.payload do
|
||||
json.array! @articles, partial: 'public/api/v1/models/article.json.jbuilder', as: :article
|
||||
json.array! @articles, partial: 'public/api/v1/models/article', formats: [:json], as: :article
|
||||
end
|
||||
|
||||
json.meta do
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
json.payload do
|
||||
json.array! @categories, partial: 'public/api/v1/models/category.json.jbuilder', as: :category
|
||||
json.array! @categories, partial: 'public/api/v1/models/category', formats: [:json], as: :category
|
||||
end
|
||||
|
||||
@@ -1 +1 @@
|
||||
json.array! @portals, partial: 'public/api/v1/models/portal.json.jbuilder', as: :portal
|
||||
json.array! @portals, partial: 'public/api/v1/models/portal', formats: [:json], as: :portal
|
||||
|
||||
Reference in New Issue
Block a user