refactor: make app more brainding-agnostic and change page title depending on selected channel

This commit is contained in:
hippoz 2021-09-15 17:30:51 +03:00
parent 8b2dfa92d9
commit 6121f3f1bf
Signed by: hippoz
GPG key ID: 7C52899193467641
4 changed files with 8 additions and 7 deletions

View file

@ -3,10 +3,10 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Brainlet</title>
<title>app</title>
</head>
<body>
<noscript>Sorry, but JavaScript is required to render and interact with this page.</noscript>
<noscript>Sorry, but JavaScript is required to use this app.</noscript>
<div id="root"></div>
</body>

View file

@ -1,8 +1,8 @@
{
"short_name": "Brainlet",
"name": "Brainlet",
"short_name": "waffle",
"name": "waffle",
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
"theme_color": "#22232b",
"background_color": "#22232b"
}

View file

@ -24,6 +24,7 @@ const ChannelView = ({ messages, channel, channelPresenceClientList }) => {
if (!channel) return;
dispatch({ type: 'channels/selectchannel', channelId: channel._id });
document.title = `#${channel.title}`;
}, [dispatch, channel]);
if (channel) {

View file

@ -110,6 +110,6 @@ const getCreateChannelError = (json) => {
}
};
const couldNotReach = "Whoops! We couldn't reach Brainlet.";
const couldNotReach = "Whoops! We couldn't reach the server.";
module.exports = { couldNotReach, getLoginMessageFromError, getSignupMessageFromError, getCreatePostError, getCreateChannelError }