2020-05-11 20:01:40 +00:00
|
|
|
const {
|
2021-06-07 18:52:36 +00:00
|
|
|
API_CHANNEL_NAME: apiChannelName,
|
|
|
|
API_CHANNEL_THUMBNAIL: apiChannelThumbnail,
|
2020-07-26 16:20:59 +00:00
|
|
|
APP_VERSION: appVersion,
|
2020-07-30 18:28:42 +00:00
|
|
|
BRAND_NAME: brandName,
|
2021-02-08 11:08:35 +00:00
|
|
|
CHATWOOT_INBOX_TOKEN: chatwootInboxToken,
|
2021-01-17 18:29:09 +00:00
|
|
|
CREATE_NEW_ACCOUNT_FROM_DASHBOARD: createNewAccountFromDashboard,
|
2022-02-15 10:46:54 +00:00
|
|
|
DIRECT_UPLOADS_ENABLED: directUploadsEnabled,
|
2021-01-17 18:29:09 +00:00
|
|
|
DISPLAY_MANIFEST: displayManifest,
|
2022-02-18 14:32:50 +00:00
|
|
|
HCAPTCHA_SITE_KEY: hCaptchaSiteKey,
|
2020-07-26 07:24:50 +00:00
|
|
|
INSTALLATION_NAME: installationName,
|
2020-05-11 20:01:40 +00:00
|
|
|
LOGO_THUMBNAIL: logoThumbnail,
|
|
|
|
LOGO: logo,
|
|
|
|
PRIVACY_URL: privacyURL,
|
2020-07-26 07:24:50 +00:00
|
|
|
TERMS_URL: termsURL,
|
|
|
|
WIDGET_BRAND_URL: widgetBrandURL,
|
2022-02-25 11:06:36 +00:00
|
|
|
DISABLE_USER_PROFILE_UPDATE: disableUserProfileUpdate,
|
2022-07-19 13:34:17 +00:00
|
|
|
DEPLOYMENT_ENV: deploymentEnv,
|
2021-04-30 09:54:00 +00:00
|
|
|
} = window.globalConfig || {};
|
2020-05-11 20:01:40 +00:00
|
|
|
|
|
|
|
const state = {
|
2021-06-07 18:52:36 +00:00
|
|
|
apiChannelName,
|
|
|
|
apiChannelThumbnail,
|
2020-07-26 16:20:59 +00:00
|
|
|
appVersion,
|
2020-07-30 18:28:42 +00:00
|
|
|
brandName,
|
2021-02-08 11:08:35 +00:00
|
|
|
chatwootInboxToken,
|
2022-07-19 13:34:17 +00:00
|
|
|
deploymentEnv,
|
2021-01-17 18:29:09 +00:00
|
|
|
createNewAccountFromDashboard,
|
2022-02-15 10:46:54 +00:00
|
|
|
directUploadsEnabled: directUploadsEnabled === 'true',
|
2022-02-25 11:06:36 +00:00
|
|
|
disableUserProfileUpdate: disableUserProfileUpdate === 'true',
|
2021-01-17 18:29:09 +00:00
|
|
|
displayManifest,
|
2022-02-18 14:32:50 +00:00
|
|
|
hCaptchaSiteKey,
|
2020-05-11 20:01:40 +00:00
|
|
|
installationName,
|
2020-07-26 07:24:50 +00:00
|
|
|
logo,
|
|
|
|
logoThumbnail,
|
2020-05-11 20:01:40 +00:00
|
|
|
privacyURL,
|
2020-07-26 07:24:50 +00:00
|
|
|
termsURL,
|
|
|
|
widgetBrandURL,
|
2020-05-11 20:01:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export const getters = {
|
|
|
|
get: $state => $state,
|
2022-07-19 13:34:17 +00:00
|
|
|
isOnChatwootCloud: $state => $state.deploymentEnv === 'cloud',
|
2022-07-27 05:19:06 +00:00
|
|
|
isACustomBrandedInstance: $state => $state.installationName !== 'Chatwoot',
|
2020-05-11 20:01:40 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export const actions = {};
|
|
|
|
|
|
|
|
export const mutations = {};
|
|
|
|
|
|
|
|
export default {
|
|
|
|
namespaced: true,
|
|
|
|
state,
|
|
|
|
getters,
|
|
|
|
actions,
|
|
|
|
mutations,
|
|
|
|
};
|