1
0
mirror of https://github.com/flarum/core.git synced 2025-07-30 21:20:24 +02:00

Use new config keys

This commit is contained in:
Toby Zerner
2015-05-02 08:44:03 +09:30
parent ffc2863f70
commit 5fad4acd76
4 changed files with 11 additions and 17 deletions

View File

@@ -4,27 +4,21 @@ export default class WelcomeHero extends Component {
constructor(props) {
super(props);
this.title = m.prop('Mithril Forum')
this.description = m.prop('Hello')
this.hidden = m.prop(localStorage.getItem('welcomeHidden'))
this.hidden = m.prop(localStorage.getItem('welcomeHidden'));
}
hide() {
localStorage.setItem('welcomeHidden', 'true')
this.hidden(true)
localStorage.setItem('welcomeHidden', 'true');
this.hidden(true);
}
view() {
var root = m.prop()
var self = this;
return this.hidden() ? m('') : m('header.hero.welcome-hero', {config: root}, [
return this.hidden() ? m('') : m('header.hero.welcome-hero', {config: this.element}, [
m('div.container', [
m('button.close.btn.btn-icon.btn-link', {onclick: function() {
$(root()).slideUp(self.hide.bind(self))
}}, m('i.fa.fa-times')),
m('button.close.btn.btn-icon.btn-link', {onclick: () => this.$().slideUp(this.hide.bind(this))}, m('i.fa.fa-times')),
m('div.container-narrow', [
m('h2', this.title()),
m('p', this.description())
m('h2', app.config['welcome_title']),
m('div.subtitle', m.trust(app.config['welcome_message']))
])
])
])