- widget/i18n/index.js: only import en.json and zh_CN.json (the only locale files present); remove 40+ imports for missing locale JSONs that caused Vite compile failure and global white screen - dashboard/i18n/index.js: remove unused locale imports for consistency - Remove 62 unused locale JSON files from widget/i18n/locale/ - Minor: update index.html, test helpers, e2e test, languages spec
61 lines
2.2 KiB
HTML
61 lines
2.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=0" />
|
|
<title>GoChat</title>
|
|
<link rel="icon" type="image/png" href="/favicon-32x32.png" />
|
|
<script>
|
|
// GoChat frontend runtime config — injected statically (decoupled from Rails).
|
|
// Originally these were rendered by Rails ERB (vueapp.html.erb).
|
|
// Override individual keys via window.__GOCHAT_CONFIG__ before this script
|
|
// runs, or via VITE_* env vars at build time (see config below).
|
|
(function () {
|
|
var cfg = window.__GOCHAT_CONFIG__ || {};
|
|
window.chatwootConfig = Object.assign(
|
|
{
|
|
hostURL: '', // API base URL (empty = same origin)
|
|
helpCenterURL: '',
|
|
fbAppId: '',
|
|
instagramAppId: '',
|
|
tiktokAppId: '',
|
|
googleOAuthClientId: '',
|
|
googleOAuthCallbackUrl: '',
|
|
allowedLoginMethods: ['email'],
|
|
fbApiVersion: '',
|
|
whatsappAppId: '',
|
|
whatsappConfigurationId: '',
|
|
whatsappApiVersion: '',
|
|
signupEnabled: 'true',
|
|
isEnterprise: 'false',
|
|
isMfaEnabled: 'false',
|
|
inboxEventsEnabled: 'false',
|
|
selectedLocale: 'zh_CN',
|
|
enabledLanguages: [
|
|
{ name: '中文', iso_639_1_code: 'zh_CN' },
|
|
{ name: 'English', iso_639_1_code: 'en' },
|
|
],
|
|
helpUrls: {},
|
|
},
|
|
cfg
|
|
);
|
|
window.globalConfig = Object.assign(
|
|
{
|
|
INSTALLATION_NAME: 'GoChat',
|
|
DISPLAY_MANIFEST: false,
|
|
LOGO_THUMBNAIL: '/favicon-32x32.png',
|
|
},
|
|
cfg.globalConfig || {}
|
|
);
|
|
window.errorLoggingConfig = '';
|
|
window.browserConfig = { browser_name: navigator.userAgent };
|
|
})();
|
|
</script>
|
|
</head>
|
|
<body class="text-slate-600">
|
|
<div id="app"></div>
|
|
<noscript id="noscript">This app works best with JavaScript enabled.</noscript>
|
|
<script type="module" src="/app/javascript/entrypoints/dashboard.js"></script>
|
|
</body>
|
|
</html>
|