mirror of
https://github.com/flarum/framework.git
synced 2025-02-11 14:22:02 +08:00
Removed excess Widget class in favor of DashboardWidget (#2164)
This commit is contained in:
parent
389d86c7f0
commit
af26bd22f6
|
@ -15,7 +15,6 @@ import AddExtensionModal from './components/AddExtensionModal';
|
||||||
import ExtensionsPage from './components/ExtensionsPage';
|
import ExtensionsPage from './components/ExtensionsPage';
|
||||||
import AdminLinkButton from './components/AdminLinkButton';
|
import AdminLinkButton from './components/AdminLinkButton';
|
||||||
import PermissionGrid from './components/PermissionGrid';
|
import PermissionGrid from './components/PermissionGrid';
|
||||||
import Widget from './components/Widget';
|
|
||||||
import MailPage from './components/MailPage';
|
import MailPage from './components/MailPage';
|
||||||
import UploadImageButton from './components/UploadImageButton';
|
import UploadImageButton from './components/UploadImageButton';
|
||||||
import LoadingModal from './components/LoadingModal';
|
import LoadingModal from './components/LoadingModal';
|
||||||
|
@ -46,7 +45,6 @@ export default Object.assign(compat, {
|
||||||
'components/ExtensionsPage': ExtensionsPage,
|
'components/ExtensionsPage': ExtensionsPage,
|
||||||
'components/AdminLinkButton': AdminLinkButton,
|
'components/AdminLinkButton': AdminLinkButton,
|
||||||
'components/PermissionGrid': PermissionGrid,
|
'components/PermissionGrid': PermissionGrid,
|
||||||
'components/Widget': Widget,
|
|
||||||
'components/MailPage': MailPage,
|
'components/MailPage': MailPage,
|
||||||
'components/UploadImageButton': UploadImageButton,
|
'components/UploadImageButton': UploadImageButton,
|
||||||
'components/LoadingModal': LoadingModal,
|
'components/LoadingModal': LoadingModal,
|
||||||
|
|
|
@ -1,17 +1,8 @@
|
||||||
/*
|
|
||||||
* 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 '../../common/Component';
|
import Component from '../../common/Component';
|
||||||
|
|
||||||
export default class Widget extends Component {
|
export default class DashboardWidget extends Component {
|
||||||
view() {
|
view() {
|
||||||
return <div className={'Widget ' + this.className()}>{this.content()}</div>;
|
return <div className={'DashboardWidget Widget ' + this.className()}>{this.content()}</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,34 +0,0 @@
|
||||||
/*
|
|
||||||
* 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 '../../common/Component';
|
|
||||||
|
|
||||||
export default class DashboardWidget extends Component {
|
|
||||||
view() {
|
|
||||||
return <div className={'DashboardWidget ' + this.className()}>{this.content()}</div>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the class name to apply to the widget.
|
|
||||||
*
|
|
||||||
* @return {String}
|
|
||||||
*/
|
|
||||||
className() {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the content of the widget.
|
|
||||||
*
|
|
||||||
* @return {VirtualElement}
|
|
||||||
*/
|
|
||||||
content() {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -11,7 +11,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.Widget {
|
.DashboardWidget {
|
||||||
background: @body-bg;
|
background: @body-bg;
|
||||||
color: @text-color;
|
color: @text-color;
|
||||||
border-radius: @border-radius;
|
border-radius: @border-radius;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user