mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-03 20:48:07 +00:00
fix: Help Center articles are not available on the widget [CW-2534] (#7954)
This commit is contained in:
committed by
GitHub
parent
bdeb2f9812
commit
fabb3c8da4
@@ -5,6 +5,7 @@ import {
|
||||
SET_WIDGET_APP_CONFIG,
|
||||
SET_WIDGET_COLOR,
|
||||
TOGGLE_WIDGET_OPEN,
|
||||
SET_WIDGET_LOCALE,
|
||||
} from '../types';
|
||||
|
||||
const state = {
|
||||
@@ -18,6 +19,7 @@ const state = {
|
||||
widgetColor: '',
|
||||
widgetStyle: 'standard',
|
||||
darkMode: 'light',
|
||||
locale: 'en',
|
||||
};
|
||||
|
||||
export const getters = {
|
||||
@@ -29,6 +31,7 @@ export const getters = {
|
||||
getReferrerHost: $state => $state.referrerHost,
|
||||
isWidgetStyleFlat: $state => $state.widgetStyle === 'flat',
|
||||
darkMode: $state => $state.darkMode,
|
||||
widgetLocale: $state => $state.locale,
|
||||
};
|
||||
|
||||
export const actions = {
|
||||
@@ -65,6 +68,9 @@ export const actions = {
|
||||
setBubbleVisibility({ commit }, hideMessageBubble) {
|
||||
commit(SET_BUBBLE_VISIBILITY, hideMessageBubble);
|
||||
},
|
||||
setLocale({ commit }, locale) {
|
||||
commit(SET_WIDGET_LOCALE, locale);
|
||||
},
|
||||
};
|
||||
|
||||
export const mutations = {
|
||||
@@ -74,6 +80,7 @@ export const mutations = {
|
||||
$state.hideMessageBubble = data.hideMessageBubble;
|
||||
$state.widgetStyle = data.widgetStyle;
|
||||
$state.darkMode = data.darkMode;
|
||||
$state.locale = data.locale || $state.locale;
|
||||
},
|
||||
[TOGGLE_WIDGET_OPEN]($state, isWidgetOpen) {
|
||||
$state.isWidgetOpen = isWidgetOpen;
|
||||
@@ -90,6 +97,9 @@ export const mutations = {
|
||||
[SET_COLOR_SCHEME]($state, darkMode) {
|
||||
$state.darkMode = darkMode;
|
||||
},
|
||||
[SET_WIDGET_LOCALE]($state, locale) {
|
||||
$state.locale = locale || $state.locale;
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user