Files
gochat/frontend/app/javascript/entrypoints/dashboardConfig.js
T
Rogeeandrogee 867092fd99 HH-530: replace user-facing Chatwoot branding with GoChat (#117)
* fix(HH-530): replace user-facing Chatwoot branding

* fix(HH-530): close branding review blockers

* test(HH-530): cover update banner binding

---------

Co-authored-by: Rogee <rogee@ipao.vip>
2026-08-23 18:14:02 +08:00

48 lines
1.2 KiB
JavaScript

const config = window.__GOCHAT_CONFIG__ || {};
window.chatwootConfig = Object.assign(
{
hostURL: '',
helpCenterURL: '',
fbAppId: '',
instagramAppId: '',
tiktokAppId: '',
googleOAuthClientId: '',
googleOAuthCallbackUrl: '',
allowedLoginMethods: ['email'],
fbApiVersion: '',
whatsappAppId: '',
whatsappConfigurationId: '',
whatsappApiVersion: '',
signupEnabled: 'false',
isMfaEnabled: 'false',
inboxEventsEnabled: 'false',
selectedLocale: 'zh_CN',
enabledLanguages: [
{ name: '中文', iso_639_1_code: 'zh_CN' },
{ name: 'English', iso_639_1_code: 'en' },
],
helpUrls: {},
},
config
);
window.globalConfig = Object.assign(
{
INSTALLATION_NAME: 'GoChat',
BRAND_NAME: 'GoChat',
CREATE_NEW_ACCOUNT_FROM_DASHBOARD: false,
DISPLAY_MANIFEST: false,
LOGO: '/brand-assets/logo.svg',
LOGO_DARK: '/brand-assets/logo_dark.svg',
LOGO_THUMBNAIL: '/brand-assets/logo_thumbnail.svg',
WIDGET_BRAND_URL: '/',
},
config.globalConfig || {}
);
window.errorLoggingConfig = '';
window.browserConfig = { browser_name: navigator.userAgent };
['access-token', 'client', 'uid', 'token-type', 'expiry'].forEach(key =>
localStorage.removeItem(key)
);