Browse Source

better display announcement

master
hole-thu 3 years ago
parent
commit
ebf51ec34a
  1. 1
      src/App.js
  2. 2
      src/Flows.css
  3. 4
      src/Flows.js

1
src/App.js

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

2
src/Flows.css

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

4
src/Flows.js

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

Loading…
Cancel
Save