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
No known key found for this signature in database
GPG key ID: 7C52899193467641
4 changed files with 8 additions and 7 deletions

View file

@ -3,10 +3,10 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Brainlet</title> <title>app</title>
</head> </head>
<body> <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> <div id="root"></div>
</body> </body>

View file

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

View file

@ -24,6 +24,7 @@ const ChannelView = ({ messages, channel, channelPresenceClientList }) => {
if (!channel) return; if (!channel) return;
dispatch({ type: 'channels/selectchannel', channelId: channel._id }); dispatch({ type: 'channels/selectchannel', channelId: channel._id });
document.title = `#${channel.title}`;
}, [dispatch, channel]); }, [dispatch, channel]);
if (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 } module.exports = { couldNotReach, getLoginMessageFromError, getSignupMessageFromError, getCreatePostError, getCreateChannelError }