fix: fix website title with global config

pull/90/head
moonrailgun 2 years ago
parent e2309371df
commit 0922f83bb9

@ -21,6 +21,7 @@ export const SYSTEM_USERID = '000000000000000000000000';
export const defaultGlobalConfig: GlobalConfig = {
uploadFileLimit: 1 * 1024 * 1024,
emailVerification: false,
serverName: 'Tailchat',
disableUserRegister: false,
disableGuestLogin: false,
};

@ -3,8 +3,8 @@
<head>
<meta http-equiv="Content-Language" content="zh-CN" />
<meta charset="utf-8"/>
<meta name="keywords" content="im,chat,聊天,开源,即时通讯">
<meta name="description" content="开源即时通讯软件">
<meta name="keywords" content="im,chat,聊天,开源,即时通讯,Tailchat">
<meta name="description" content="Tailchat: Next generation noIM application in your own workspace, not only another Slack/Discord/Rocke.chat">
<meta name="renderer" content="webkit">
<meta name="force-rendering" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
@ -14,7 +14,6 @@
<meta property="og:site_name" content="Tailchat">
<meta property="og:image" content="https://tailchat.msgbyte.com/img/logo.svg">
<link rel="manifest" href="/pwa.webmanifest">
<title><%= htmlWebpackPlugin.options.title %></title>
<script>
// vConsole DEBUG
if(location.search.indexOf('vconsole') >= 0) {

@ -56,7 +56,6 @@ const plugins: Configuration['plugins'] = [
'process.env.VERSION': JSON.stringify(VERSION),
}),
new HtmlWebpackPlugin({
title: 'Tailchat',
inject: true,
hash: false,
favicon: path.resolve(ROOT_PATH, './assets/images/favicon.ico'),

@ -10,6 +10,7 @@ import {
sharedEvent,
TcProvider,
useColorScheme,
useGlobalConfigStore,
useLanguage,
} from 'tailchat-shared';
import clsx from 'clsx';
@ -94,10 +95,14 @@ AppContainer.displayName = 'AppContainer';
const AppHeader: React.FC = React.memo(() => {
const { language } = useLanguage();
const { serverName } = useGlobalConfigStore((state) => ({
serverName: state.serverName,
}));
return (
<Helmet>
<meta httpEquiv="Content-Language" content={language} />
<title>{serverName}</title>
</Helmet>
);
});

Loading…
Cancel
Save