Merge branch 'release/2.9.1'

This commit is contained in:
Sojan 2022-09-22 14:22:29 -07:00
commit 7ad5ddaf8a
70 changed files with 209 additions and 100 deletions

View file

@ -135,7 +135,7 @@ GEM
byebug (11.1.3) byebug (11.1.3)
climate_control (1.1.1) climate_control (1.1.1)
coderay (1.1.3) coderay (1.1.3)
commonmarker (0.23.5) commonmarker (0.23.6)
concurrent-ruby (1.1.10) concurrent-ruby (1.1.10)
connection_pool (2.2.5) connection_pool (2.2.5)
crack (0.4.5) crack (0.4.5)

View file

@ -16,7 +16,9 @@ class Api::V1::Accounts::MacrosController < Api::V1::Accounts::BaseController
@macro.save! @macro.save!
end end
def show; end def show
head :not_found if @macro.nil?
end
def destroy def destroy
@macro.destroy! @macro.destroy!

View file

@ -1,6 +1,7 @@
class Public::Api::V1::PortalsController < PublicController class Public::Api::V1::PortalsController < PublicController
before_action :ensure_custom_domain_request, only: [:show] before_action :ensure_custom_domain_request, only: [:show]
before_action :portal before_action :portal
before_action :redirect_to_portal_with_locale, only: [:show]
layout 'portal' layout 'portal'
def show; end def show; end
@ -9,5 +10,12 @@ class Public::Api::V1::PortalsController < PublicController
def portal def portal
@portal ||= Portal.find_by!(slug: params[:slug], archived: false) @portal ||= Portal.find_by!(slug: params[:slug], archived: false)
@locale = params[:locale] || @portal.default_locale
end
def redirect_to_portal_with_locale
return if params[:locale].present?
redirect_to "/hc/#{@portal.slug}/#{@portal.default_locale}"
end end
end end

View file

@ -188,6 +188,10 @@ export default {
return false; return false;
}, },
message() { message() {
if (this.contentType === 'input_csat') {
return this.$t('CONVERSATION.CSAT_REPLY_MESSAGE');
}
// If the message is an email, emailMessageContent would be present // If the message is an email, emailMessageContent would be present
// In that case, we would use letter package to render the email // In that case, we would use letter package to render the email
if (this.emailMessageContent && this.isIncoming) { if (this.emailMessageContent && this.isIncoming) {

View file

@ -0,0 +1,15 @@
export const buildPortalURL = portalSlug => {
const { hostURL, helpCenterURL } = window.chatwootConfig;
const baseURL = helpCenterURL || hostURL || '';
return `${baseURL}/hc/${portalSlug}`;
};
export const buildPortalArticleURL = (
portalSlug,
categorySlug,
locale,
articleId
) => {
const portalURL = buildPortalURL(portalSlug);
return `${portalURL}/${locale}/${categorySlug}/${articleId}`;
};

View file

@ -0,0 +1,29 @@
import { buildPortalArticleURL, buildPortalURL } from '../portalHelper';
describe('PortalHelper', () => {
describe('buildPortalURL', () => {
it('returns the correct url', () => {
window.chatwootConfig = {
hostURL: 'https://app.chatwoot.com',
helpCenterURL: 'https://help.chatwoot.com',
};
expect(buildPortalURL('handbook')).toEqual(
'https://help.chatwoot.com/hc/handbook'
);
window.chatwootConfig = {};
});
});
describe('buildPortalArticleURL', () => {
it('returns the correct url', () => {
window.chatwootConfig = {
hostURL: 'https://app.chatwoot.com',
helpCenterURL: 'https://help.chatwoot.com',
};
expect(buildPortalArticleURL('handbook', 'culture', 'fr', 1)).toEqual(
'https://help.chatwoot.com/hc/handbook/fr/culture/1'
);
window.chatwootConfig = {};
});
});
});

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,6 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal-Slug für URLs", "PLACEHOLDER": "Portal-Slug für URLs",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug ist erforderlich" "ERROR": "Slug ist erforderlich"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +246,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Kategorie-Slug für URLs", "PLACEHOLDER": "Kategorie-Slug für URLs",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug ist erforderlich" "ERROR": "Slug ist erforderlich"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -1,6 +1,7 @@
{ {
"CONVERSATION": { "CONVERSATION": {
"SELECT_A_CONVERSATION": "Please select a conversation from left pane", "SELECT_A_CONVERSATION": "Please select a conversation from left pane",
"CSAT_REPLY_MESSAGE": "Please rate the conversation",
"404": "Sorry, we cannot find the conversation. Please try again", "404": "Sorry, we cannot find the conversation. Please try again",
"SWITCH_VIEW_LAYOUT": "Switch the layout", "SWITCH_VIEW_LAYOUT": "Switch the layout",
"DASHBOARD_APP_TAB_MESSAGES": "Messages", "DASHBOARD_APP_TAB_MESSAGES": "Messages",

View file

@ -160,7 +160,8 @@
} }
}, },
"ADD": { "ADD": {
"CREATE_FLOW": [{ "CREATE_FLOW": [
{
"title": "Help center information", "title": "Help center information",
"route": "new_portal_information", "route": "new_portal_information",
"body": "Basic information about portal", "body": "Basic information about portal",
@ -211,7 +212,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -352,7 +353,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {
@ -383,7 +384,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug مورد نیاز است" "ERROR": "Slug مورد نیاز است"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Slug دسته برای آدرس ها", "PLACEHOLDER": "Slug دسته برای آدرس ها",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug مورد نیاز است" "ERROR": "Slug مورد نیاز است"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Slug portale per URLs", "PLACEHOLDER": "Slug portale per URLs",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug è obbligatorio" "ERROR": "Slug è obbligatorio"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Slug categoria per url", "PLACEHOLDER": "Slug categoria per url",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug è obbligatorio" "ERROR": "Slug è obbligatorio"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Slug do Portal para URLs", "PLACEHOLDER": "Slug do Portal para URLs",
"HELP_TEXT": "app.chatwoot.com/portal/meu-portal", "HELP_TEXT": "app.chatwoot.com/hc/meu-portal",
"ERROR": "Slug é obrigatório" "ERROR": "Slug é obrigatório"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Categoria de slug para URLs", "PLACEHOLDER": "Categoria de slug para URLs",
"HELP_TEXT": "app.chatwoot.com/portal/meu-portal/en-US/categories/meu-slug", "HELP_TEXT": "app.chatwoot.com/hc/meu-portal/en-US/categories/meu-slug",
"ERROR": "Slug é obrigatório" "ERROR": "Slug é obrigatório"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Метка", "LABEL": "Метка",
"PLACEHOLDER": "Слаг портала для url", "PLACEHOLDER": "Слаг портала для url",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Необходимо указать метку" "ERROR": "Необходимо указать метку"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Метка", "LABEL": "Метка",
"PLACEHOLDER": "Метка категории для url", "PLACEHOLDER": "Метка категории для url",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Необходимо указать метку" "ERROR": "Необходимо указать метку"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Slug portala za adrese", "PLACEHOLDER": "Slug portala za adrese",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug je obavezan" "ERROR": "Slug je obavezan"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Slug kategorije za adrese", "PLACEHOLDER": "Slug kategorije za adrese",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug je obavezan" "ERROR": "Slug je obavezan"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Мітка", "LABEL": "Мітка",
"PLACEHOLDER": "Портал slug для URL-адрес", "PLACEHOLDER": "Портал slug для URL-адрес",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Необхідно вказати мітку" "ERROR": "Необхідно вказати мітку"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Мітка", "LABEL": "Мітка",
"PLACEHOLDER": "Мітка категорії для URL-адрес", "PLACEHOLDER": "Мітка категорії для URL-адрес",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Необхідно вказати мітку" "ERROR": "Необхідно вказати мітку"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/zh-CN/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/zh-CN/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -164,7 +164,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Portal slug for urls", "PLACEHOLDER": "Portal slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DOMAIN": { "DOMAIN": {
@ -247,7 +247,7 @@
"SLUG": { "SLUG": {
"LABEL": "Slug", "LABEL": "Slug",
"PLACEHOLDER": "Category slug for urls", "PLACEHOLDER": "Category slug for urls",
"HELP_TEXT": "app.chatwoot.com/portal/my-portal/en-US/categories/my-slug", "HELP_TEXT": "app.chatwoot.com/hc/my-portal/en-US/categories/my-slug",
"ERROR": "Slug is required" "ERROR": "Slug is required"
}, },
"DESCRIPTION": { "DESCRIPTION": {

View file

@ -1,8 +1,9 @@
<template> <template>
<div class="edit-article--container"> <div class="edit-article--container">
<input <resizable-text-area
v-model="articleTitle" v-model="articleTitle"
type="text" type="text"
rows="1"
class="article-heading" class="article-heading"
:placeholder="$t('HELP_CENTER.EDIT_ARTICLE.TITLE_PLACEHOLDER')" :placeholder="$t('HELP_CENTER.EDIT_ARTICLE.TITLE_PLACEHOLDER')"
@focus="onFocus" @focus="onFocus"
@ -23,11 +24,13 @@
<script> <script>
import { debounce } from '@chatwoot/utils'; import { debounce } from '@chatwoot/utils';
import ResizableTextArea from 'shared/components/ResizableTextArea';
import WootMessageEditor from 'dashboard/components/widgets/WootWriter/Editor.vue'; import WootMessageEditor from 'dashboard/components/widgets/WootWriter/Editor.vue';
export default { export default {
components: { components: {
WootMessageEditor, WootMessageEditor,
ResizableTextArea,
}, },
props: { props: {
article: { article: {
@ -83,7 +86,8 @@ export default {
font-size: var(--font-size-giga); font-size: var(--font-size-giga);
font-weight: var(--font-weight-bold); font-weight: var(--font-weight-bold);
min-height: var(--space-jumbo); min-height: var(--space-jumbo);
max-height: var(--space-jumbo); max-height: 64rem;
height: auto;
border: 0px solid transparent; border: 0px solid transparent;
padding: 0; padding: 0;
color: var(--s-900); color: var(--s-900);

View file

@ -243,7 +243,7 @@ export default {
this.$emit('add-locale', this.portal.id); this.$emit('add-locale', this.portal.id);
}, },
openSite() { openSite() {
this.$emit('open-site'); this.$emit('open-site', this.portal.slug);
}, },
openSettings() { openSettings() {
this.fetchPortalsAndItsCategories(); this.fetchPortalsAndItsCategories();

View file

@ -50,7 +50,7 @@
:error="slugError" :error="slugError"
:label="$t('HELP_CENTER.PORTAL.ADD.SLUG.LABEL')" :label="$t('HELP_CENTER.PORTAL.ADD.SLUG.LABEL')"
:placeholder="$t('HELP_CENTER.PORTAL.ADD.SLUG.PLACEHOLDER')" :placeholder="$t('HELP_CENTER.PORTAL.ADD.SLUG.PLACEHOLDER')"
:help-text="$t('HELP_CENTER.PORTAL.ADD.SLUG.HELP_TEXT')" :help-text="domainHelpText"
@input="$v.slug.$touch" @input="$v.slug.$touch"
/> />
</div> </div>
@ -80,6 +80,7 @@
import thumbnail from 'dashboard/components/widgets/Thumbnail'; import thumbnail from 'dashboard/components/widgets/Thumbnail';
import { required, minLength } from 'vuelidate/lib/validators'; import { required, minLength } from 'vuelidate/lib/validators';
import { convertToCategorySlug } from 'dashboard/helper/commons.js'; import { convertToCategorySlug } from 'dashboard/helper/commons.js';
import { buildPortalURL } from 'dashboard/helper/portalHelper';
export default { export default {
components: { components: {
@ -132,6 +133,9 @@ export default {
domainError() { domainError() {
return this.$v.domain.$error; return this.$v.domain.$error;
}, },
domainHelpText() {
return buildPortalURL(this.slug);
},
}, },
mounted() { mounted() {
const portal = this.portal || {}; const portal = this.portal || {};

View file

@ -51,6 +51,7 @@ import Spinner from 'shared/components/Spinner';
import portalMixin from '../../mixins/portalMixin'; import portalMixin from '../../mixins/portalMixin';
import alertMixin from 'shared/mixins/alertMixin'; import alertMixin from 'shared/mixins/alertMixin';
import wootConstants from 'dashboard/constants'; import wootConstants from 'dashboard/constants';
import { buildPortalArticleURL } from 'dashboard/helper/portalHelper';
const { ARTICLE_STATUS_TYPES } = wootConstants; const { ARTICLE_STATUS_TYPES } = wootConstants;
export default { export default {
@ -86,7 +87,12 @@ export default {
}, },
portalLink() { portalLink() {
const slug = this.$route.params.portalSlug; const slug = this.$route.params.portalSlug;
return `/hc/${slug}/${this.article.category.slug}/${this.article.id}`; return buildPortalArticleURL(
slug,
this.article.category.slug,
this.article.category.locale,
this.article.id
);
}, },
}, },
mounted() { mounted() {

View file

@ -1,5 +1,5 @@
<template> <template>
<div class="container"> <div class="container overflow-auto">
<article-header <article-header
:header-title="headerTitle" :header-title="headerTitle"
:count="articleCount" :count="articleCount"
@ -149,6 +149,7 @@ export default {
.container { .container {
padding: 0 var(--space-normal); padding: 0 var(--space-normal);
width: 100%; width: 100%;
overflow: auto;
.articles--loader { .articles--loader {
align-items: center; align-items: center;
display: flex; display: flex;

View file

@ -126,5 +126,6 @@ export default {
} }
.is-sidebar-open { .is-sidebar-open {
flex: 0.7; flex: 0.7;
flex-grow: 1;
} }
</style> </style>

View file

@ -21,6 +21,7 @@
:portal="portal" :portal="portal"
:status="portalStatus" :status="portalStatus"
@add-locale="addLocale" @add-locale="addLocale"
@open-site="openPortal"
/> />
<div v-if="isFetching" class="portals--loader"> <div v-if="isFetching" class="portals--loader">
<spinner /> <spinner />
@ -51,6 +52,8 @@ import PortalListItem from '../../components/PortalListItem';
import Spinner from 'shared/components/Spinner.vue'; import Spinner from 'shared/components/Spinner.vue';
import EmptyState from 'dashboard/components/widgets/EmptyState'; import EmptyState from 'dashboard/components/widgets/EmptyState';
import AddLocale from '../../components/AddLocale'; import AddLocale from '../../components/AddLocale';
import { buildPortalURL } from 'dashboard/helper/portalHelper';
export default { export default {
components: { components: {
PortalListItem, PortalListItem,
@ -79,6 +82,9 @@ export default {
}, },
}, },
methods: { methods: {
openPortal(portalSlug) {
window.open(buildPortalURL(portalSlug), '_blank');
},
addPortal() { addPortal() {
this.$router.push({ name: 'new_portal_information' }); this.$router.push({ name: 'new_portal_information' });
}, },

View file

@ -11,4 +11,12 @@ class ApplicationRecord < ActiveRecord::Base
"#{self.class.name}Drop".constantize.new(self) "#{self.class.name}Drop".constantize.new(self)
end end
private
def normalize_empty_string_to_nil(attrs = [])
attrs.each do |attr|
self[attr] = nil if self[attr].blank?
end
end
end end

View file

@ -38,6 +38,7 @@ class Portal < ApplicationRecord
source: :user source: :user
has_one_attached :logo has_one_attached :logo
before_validation -> { normalize_empty_string_to_nil(%i[custom_domain homepage_link]) }
validates :account_id, presence: true validates :account_id, presence: true
validates :name, presence: true validates :name, presence: true
validates :slug, presence: true, uniqueness: true validates :slug, presence: true, uniqueness: true

View file

@ -9,6 +9,8 @@ json.meta article.meta
json.category do json.category do
json.id article.category_id json.id article.category_id
json.name article.category.name json.name article.category.name
json.slug article.category.slug
json.locale article.category.locale
end end
if article.portal.present? if article.portal.present?

View file

@ -33,6 +33,7 @@
<script> <script>
window.chatwootConfig = { window.chatwootConfig = {
hostURL: '<%= ENV.fetch('FRONTEND_URL', '') %>', hostURL: '<%= ENV.fetch('FRONTEND_URL', '') %>',
helpCenterURL: '<%= ENV.fetch('HELPCENTER_URL', '') %>',
fbAppId: '<%= ENV.fetch('FB_APP_ID', nil) %>', fbAppId: '<%= ENV.fetch('FB_APP_ID', nil) %>',
fbApiVersion: '<%= @global_config['FACEBOOK_API_VERSION'] %>', fbApiVersion: '<%= @global_config['FACEBOOK_API_VERSION'] %>',
signupEnabled: '<%= @global_config['ENABLE_ACCOUNT_SIGNUP'] %>', signupEnabled: '<%= @global_config['ENABLE_ACCOUNT_SIGNUP'] %>',

View file

@ -15,7 +15,7 @@
</div> </div>
<% else %> <% else %>
<% category.articles.published.take(5).each do |article| %> <% category.articles.published.take(5).each do |article| %>
<div class="flex justify-between content-center h-8 my-1"> <div class="flex justify-between content-center my-1">
<a <a
class="text-slate-800 hover:underline leading-8" class="text-slate-800 hover:underline leading-8"
href="/hc/<%= portal.slug %>/<%= category.locale %>/<%= category.slug %>/<%= article.id %>" href="/hc/<%= portal.slug %>/<%= category.locale %>/<%= category.slug %>/<%= article.id %>"

View file

@ -17,6 +17,7 @@
</div> </div>
<% end %> <% end %>
</div> </div>
<% if @portal.config["allowed_locales"].length > 1 %>
<div class="flex items-center"> <div class="flex items-center">
<div class="inline-flex relative w-24"> <div class="inline-flex relative w-24">
<select <select
@ -32,5 +33,6 @@
</div> </div>
</div> </div>
</div> </div>
<% end %>
</nav> </nav>
</header> </header>

View file

@ -1,7 +1,7 @@
<%= render "public/api/v1/portals/hero", portal: @portal %> <%= render "public/api/v1/portals/hero", portal: @portal %>
<div class="max-w-5xl w-full flex-grow mx-auto py-8 px-4"> <div class="max-w-5xl w-full flex-grow mx-auto py-8 px-4">
<div class="grid grid-cols-1 lg:grid-cols-2 gap-x-32 gap-y-0 lg:gap-y-12"> <div class="grid grid-cols-1 lg:grid-cols-2 gap-x-32 gap-y-0 lg:gap-y-12">
<% @portal.categories.where(locale: params[:locale]).each do |category| %> <% @portal.categories.where(locale: @locale).each do |category| %>
<%= render "public/api/v1/portals/category-block", category: category, portal: @portal %> <%= render "public/api/v1/portals/category-block", category: category, portal: @portal %>
<% end %> <% end %>
</div> </div>

View file

@ -1,5 +1,5 @@
shared: &shared shared: &shared
version: '2.9.0' version: '2.9.1'
development: development:
<<: *shared <<: *shared

View file

@ -287,6 +287,7 @@ Rails.application.routes.draw do
end end
end end
get 'hc/:slug', to: 'public/api/v1/portals#show'
get 'hc/:slug/:locale', to: 'public/api/v1/portals#show' get 'hc/:slug/:locale', to: 'public/api/v1/portals#show'
get 'hc/:slug/:locale/categories', to: 'public/api/v1/portals/categories#index' get 'hc/:slug/:locale/categories', to: 'public/api/v1/portals/categories#index'
get 'hc/:slug/:locale/:category_slug', to: 'public/api/v1/portals/categories#show' get 'hc/:slug/:locale/:category_slug', to: 'public/api/v1/portals/categories#show'

View file

@ -1,6 +1,6 @@
{ {
"name": "@chatwoot/chatwoot", "name": "@chatwoot/chatwoot",
"version": "2.9.0", "version": "2.9.1",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"eslint": "eslint app/**/*.{js,vue}", "eslint": "eslint app/**/*.{js,vue}",

View file

@ -173,6 +173,13 @@ RSpec.describe 'Api::V1::Accounts::MacrosController', type: :request do
expect(json_response['payload']['name']).to eql(macro.name) expect(json_response['payload']['name']).to eql(macro.name)
expect(json_response['payload']['created_by']['id']).to eql(administrator.id) expect(json_response['payload']['created_by']['id']).to eql(administrator.id)
end end
it 'return not_found status when macros not available' do
get "/api/v1/accounts/#{account.id}/macros/15",
headers: administrator.create_new_auth_token
expect(response).to have_http_status(:not_found)
end
end end
end end

View file

@ -32,6 +32,11 @@ RSpec.describe Portal, type: :model do
expect(portal).not_to be_valid expect(portal).not_to be_valid
expect(portal.errors.full_messages[0]).to eq('Cofig in portal on some_other_key is not supported.') expect(portal.errors.full_messages[0]).to eq('Cofig in portal on some_other_key is not supported.')
end end
it 'converts empty string to nil' do
portal.update(custom_domain: '')
expect(portal.custom_domain).to be_nil
end
end end
end end
end end

View file

@ -5,6 +5,7 @@ module.exports = {
'./app/javascript/widget/**/*.vue', './app/javascript/widget/**/*.vue',
'./app/javascript/shared/**/*.vue', './app/javascript/shared/**/*.vue',
'./app/javascript/survey/**/*.vue', './app/javascript/survey/**/*.vue',
'./app/views/**/*.html.erb',
], ],
future: { future: {
removeDeprecatedGapUtilities: true, removeDeprecatedGapUtilities: true,