From 430a8cd5754517043bb7a09d05ca80f5d58be7b4 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Thu, 27 Aug 2015 10:50:15 +0930 Subject: [PATCH] Polish admin dashboard --- .../core/js/admin/src/components/DashboardPage.js | 6 +++--- framework/core/less/admin/DashboardPage.less | 12 ++++++++++++ .../core/src/Api/Serializers/ForumSerializer.php | 2 ++ framework/core/src/Core/Application.php | 4 ++-- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/framework/core/js/admin/src/components/DashboardPage.js b/framework/core/js/admin/src/components/DashboardPage.js index 93534b5a3..c0f565591 100644 --- a/framework/core/js/admin/src/components/DashboardPage.js +++ b/framework/core/js/admin/src/components/DashboardPage.js @@ -6,9 +6,9 @@ export default class DashboardPage extends Component {

Welcome to Flarum Beta

-

This is beta software; you shouldn't use it in production.

-

You're running version X

-

Get help on X. Report bugs here. Feedback here. Contribute here.

+

Thanks for trying out Flarum! You are running version {app.forum.attribute('version')}.

+

This is beta software, and should not be used in production. If you run into any trouble, please read the Troubleshooting docs. You can get further help on the support forum and report bugs on GitHub.

+

If you'd like to contribute, check out the Contributing page.

); diff --git a/framework/core/less/admin/DashboardPage.less b/framework/core/less/admin/DashboardPage.less index eacbbe62b..1c5c70380 100644 --- a/framework/core/less/admin/DashboardPage.less +++ b/framework/core/less/admin/DashboardPage.less @@ -1,4 +1,10 @@ .DashboardPage { + background: @control-bg; + color: @control-color; + min-height: 100vh; + font-size: 16px; + line-height: 1.7; + @media @desktop-up { .container { max-width: 600px; @@ -6,4 +12,10 @@ margin: 0; } } + + h2 { + font-size: 30px; + font-weight: 300; + margin-top: 0; + } } diff --git a/framework/core/src/Api/Serializers/ForumSerializer.php b/framework/core/src/Api/Serializers/ForumSerializer.php index 61bfce741..7490adfb4 100644 --- a/framework/core/src/Api/Serializers/ForumSerializer.php +++ b/framework/core/src/Api/Serializers/ForumSerializer.php @@ -11,6 +11,7 @@ namespace Flarum\Api\Serializers; use Flarum\Core; +use Flarum\Core\Application; class ForumSerializer extends Serializer { @@ -49,6 +50,7 @@ class ForumSerializer extends Serializer if ($this->actor->isAdmin()) { $attributes['adminUrl'] = Core::url('admin'); + $attributes['version'] = Application::VERSION; } return $attributes; diff --git a/framework/core/src/Core/Application.php b/framework/core/src/Core/Application.php index 2720ea04a..b3de34329 100644 --- a/framework/core/src/Core/Application.php +++ b/framework/core/src/Core/Application.php @@ -23,11 +23,11 @@ use Illuminate\Contracts\Foundation\Application as ApplicationContract; class Application extends Container implements ApplicationContract { /** - * The Laravel framework version. + * The Flarum version. * * @var string */ - const VERSION = '5.1.9 (LTS)'; + const VERSION = '0.1.0-beta'; /** * The base path for the Laravel installation.