mirror of
https://github.com/flarum/framework.git
synced 2024-12-12 22:53:37 +08:00
Begin JavaScript cleanup
This commit is contained in:
parent
156462d33e
commit
941479edb8
|
@ -1,3 +1,12 @@
|
|||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
* (c) Toby Zerner <toby.zerner@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
import Modal from 'flarum/components/Modal';
|
||||
|
||||
export default class AddExtensionModal extends Modal {
|
||||
|
@ -14,7 +23,7 @@ export default class AddExtensionModal extends Modal {
|
|||
<div className="Modal-body">
|
||||
<p>One day in the not-too-distant future, this dialog will allow you to add an extension to your forum with ease. We're building an ecosystem as we speak!</p>
|
||||
<p>In the meantime, if you manage to get your hands on a new extension, simply drop it in your forum's <code>extensions</code> directory.</p>
|
||||
<p>If you're a developer, you can <a href="">read the docs</a> and have a go at building your own.</p>
|
||||
<p>If you're a developer, you can <a href="http://flarum.org/docs/extend">read the docs</a> and have a go at building your own.</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
* (c) Toby Zerner <toby.zerner@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
import LinkButton from 'flarum/components/LinkButton';
|
||||
|
||||
export default class AdminLinkButton extends LinkButton {
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
* (c) Toby Zerner <toby.zerner@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
import Component from 'flarum/Component';
|
||||
import AdminLinkButton from 'flarum/components/AdminLinkButton';
|
||||
import SelectDropdown from 'flarum/components/SelectDropdown';
|
||||
|
@ -6,13 +15,20 @@ import ItemList from 'flarum/utils/ItemList';
|
|||
|
||||
export default class AdminNav extends Component {
|
||||
view() {
|
||||
return SelectDropdown.component({
|
||||
className: 'AdminNav App-titleControl',
|
||||
buttonClassName: 'Button',
|
||||
children: this.items().toArray()
|
||||
});
|
||||
return (
|
||||
<SelectDropdown
|
||||
className="AdminNav App-titleControl"
|
||||
buttonClassName="Button"
|
||||
children={this.items().toArray()}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an item list of links to show in the admin navigation.
|
||||
*
|
||||
* @return {ItemList}
|
||||
*/
|
||||
items() {
|
||||
const items = new ItemList();
|
||||
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
/*
|
||||
* This file is part of Flarum.
|
||||
*
|
||||
* (c) Toby Zerner <toby.zerner@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
* The `Component` class defines a user interface 'building block'. A component
|
||||
* can generate a virtual DOM to be rendered on each redraw.
|
||||
|
|
|
@ -35,11 +35,12 @@ export default class Alert extends Component {
|
|||
const dismissControl = [];
|
||||
|
||||
if (dismissible || dismissible === undefined) {
|
||||
dismissControl.push(Button.component({
|
||||
icon: 'times',
|
||||
className: 'Button Button--link Button--icon Alert-dismiss',
|
||||
onclick: ondismiss
|
||||
}));
|
||||
dismissControl.push(
|
||||
<Button
|
||||
icon="times"
|
||||
className="Button Button--link Button--icon Alert-dismiss"
|
||||
onclick={ondismiss}/>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
Loading…
Reference in New Issue
Block a user