Skip to content

Commit

Permalink
fix: fix website title with global config
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed May 13, 2023
1 parent e230937 commit 0922f83
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions client/shared/utils/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
5 changes: 2 additions & 3 deletions client/web/assets/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand All @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion client/web/build/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
5 changes: 5 additions & 0 deletions client/web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
sharedEvent,
TcProvider,
useColorScheme,
useGlobalConfigStore,
useLanguage,
} from 'tailchat-shared';
import clsx from 'clsx';
Expand Down Expand Up @@ -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>
);
});
Expand Down

0 comments on commit 0922f83

Please sign in to comment.