better display announcement

This commit is contained in:
2022-08-30 21:21:31 +08:00
parent aac1f8661c
commit ebf51ec34a
3 changed files with 5 additions and 2 deletions

View File

@@ -22,6 +22,7 @@ class App extends Component {
load_config();
load_attentions();
window.AS_BACKUP = localStorage['DEFAULT_ALLOW_SEARCH'] ? true : false;
window.ANN = localStorage['ANN'];
window.LAST_ANN = localStorage['LAST_ANN'];
listen_darkmode(
{ default: undefined, light: false, dark: true }[

View File

@@ -391,5 +391,5 @@
.announcement-header {
text-align: right;
margin-bottom: -10px;
margin-bottom: -8px;
}

View File

@@ -1324,7 +1324,7 @@ export class Flow extends PureComponent {
}
this.state = {
submode: submode,
announcement: null,
announcement: window.ANN,
};
}
@@ -1350,6 +1350,8 @@ export class Flow extends PureComponent {
update_announcement(text) {
if (text !== this.state.announcement) {
window.ANN = text;
localStorage['ANN'] = text;
this.setState({
announcement: text,
});