Bolding no js message, fixing settheme and setLang on login event.

This commit is contained in:
Dessalines 2020-09-15 08:20:19 -05:00
parent 3399d976ce
commit a7d0f27b80
2 changed files with 3 additions and 1 deletions

View file

@ -100,7 +100,7 @@ server.get('/*', async (req, res) => {
<body ${helmet.bodyAttributes.toString()}> <body ${helmet.bodyAttributes.toString()}>
<noscript> <noscript>
<div class="alert alert-danger rounded-0" role="alert"> <div class="alert alert-danger rounded-0" role="alert">
Javascript is disabled. Actions will not work. <b>Javascript is disabled. Actions will not work.</b>
</div> </div>
</noscript> </noscript>

View file

@ -419,6 +419,8 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
// This is only called on a successful login // This is only called on a successful login
let data = res.data as GetSiteResponse; let data = res.data as GetSiteResponse;
UserService.Instance.user = data.my_user; UserService.Instance.user = data.my_user;
setTheme(UserService.Instance.user.theme);
i18n.changeLanguage(getLanguage());
this.state.isLoggedIn = true; this.state.isLoggedIn = true;
this.setState(this.state); this.setState(this.state);
} else if (res.op == UserOperation.CreateComment) { } else if (res.op == UserOperation.CreateComment) {