better display announcement
This commit is contained in:
@@ -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 }[
|
||||
|
||||
@@ -391,5 +391,5 @@
|
||||
|
||||
.announcement-header {
|
||||
text-align: right;
|
||||
margin-bottom: -10px;
|
||||
margin-bottom: -8px;
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user