From af26bd22f6e18a57653fef442f07a69db443f2ab Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov <38059171+askvortsov1@users.noreply.github.com> Date: Tue, 19 May 2020 20:52:07 -0400 Subject: [PATCH] Removed excess Widget class in favor of DashboardWidget (#2164) --- framework/core/js/src/admin/compat.js | 2 -- .../src/admin/components/DashboardWidget.js | 13 ++----- .../core/js/src/admin/components/Widget.js | 34 ------------------- framework/core/less/admin/DashboardPage.less | 2 +- 4 files changed, 3 insertions(+), 48 deletions(-) delete mode 100644 framework/core/js/src/admin/components/Widget.js diff --git a/framework/core/js/src/admin/compat.js b/framework/core/js/src/admin/compat.js index 0b5706b04..ff3abdea7 100644 --- a/framework/core/js/src/admin/compat.js +++ b/framework/core/js/src/admin/compat.js @@ -15,7 +15,6 @@ import AddExtensionModal from './components/AddExtensionModal'; import ExtensionsPage from './components/ExtensionsPage'; import AdminLinkButton from './components/AdminLinkButton'; import PermissionGrid from './components/PermissionGrid'; -import Widget from './components/Widget'; import MailPage from './components/MailPage'; import UploadImageButton from './components/UploadImageButton'; import LoadingModal from './components/LoadingModal'; @@ -46,7 +45,6 @@ export default Object.assign(compat, { 'components/ExtensionsPage': ExtensionsPage, 'components/AdminLinkButton': AdminLinkButton, 'components/PermissionGrid': PermissionGrid, - 'components/Widget': Widget, 'components/MailPage': MailPage, 'components/UploadImageButton': UploadImageButton, 'components/LoadingModal': LoadingModal, diff --git a/framework/core/js/src/admin/components/DashboardWidget.js b/framework/core/js/src/admin/components/DashboardWidget.js index dd8bdb4e7..68bff531b 100644 --- a/framework/core/js/src/admin/components/DashboardWidget.js +++ b/framework/core/js/src/admin/components/DashboardWidget.js @@ -1,17 +1,8 @@ -/* - * This file is part of Flarum. - * - * (c) Toby Zerner - * - * 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 Widget extends Component { +export default class DashboardWidget extends Component { view() { - return
{this.content()}
; + return
{this.content()}
; } /** diff --git a/framework/core/js/src/admin/components/Widget.js b/framework/core/js/src/admin/components/Widget.js deleted file mode 100644 index 5a8809a1d..000000000 --- a/framework/core/js/src/admin/components/Widget.js +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This file is part of Flarum. - * - * (c) Toby Zerner - * - * 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
{this.content()}
; - } - - /** - * Get the class name to apply to the widget. - * - * @return {String} - */ - className() { - return ''; - } - - /** - * Get the content of the widget. - * - * @return {VirtualElement} - */ - content() { - return []; - } -} diff --git a/framework/core/less/admin/DashboardPage.less b/framework/core/less/admin/DashboardPage.less index b5cc811e3..9bab2986d 100644 --- a/framework/core/less/admin/DashboardPage.less +++ b/framework/core/less/admin/DashboardPage.less @@ -11,7 +11,7 @@ } } -.Widget { +.DashboardWidget { background: @body-bg; color: @text-color; border-radius: @border-radius;