mirror of
https://github.com/flarum/core.git
synced 2025-08-11 10:55:47 +02:00
Replace Ember app with Mithril app
This commit is contained in:
@@ -13,13 +13,8 @@ class IndexAction extends Action
|
||||
public function handle(Request $request, $params = [])
|
||||
{
|
||||
$config = [
|
||||
'modulePrefix' => 'flarum-admin',
|
||||
'environment' => 'production',
|
||||
'baseURL' => '/admin',
|
||||
'apiURL' => '/api',
|
||||
'locationType' => 'hash',
|
||||
'EmberENV' => [],
|
||||
'APP' => [],
|
||||
'baseURL' => 'http://flarum.dev/admin',
|
||||
'apiURL' => 'http://flarum.dev/api',
|
||||
'forumTitle' => Config::get('flarum::forum_title', 'Flarum Demo Forum')
|
||||
];
|
||||
$data = [];
|
||||
@@ -46,7 +41,7 @@ class IndexAction extends Action
|
||||
->with('styles', app('flarum.admin.assetManager')->getCSSFiles())
|
||||
->with('scripts', app('flarum.admin.assetManager')->getJSFiles())
|
||||
->with('config', $config)
|
||||
->with('content', '')
|
||||
->with('layout', View::make('flarum.admin::admin'))
|
||||
->with('data', $data)
|
||||
->with('session', $session)
|
||||
->with('alert', $alert);
|
||||
|
@@ -19,8 +19,7 @@ class AdminServiceProvider extends ServiceProvider
|
||||
$assetManager = $this->app['flarum.admin.assetManager'];
|
||||
|
||||
$assetManager->addFile([
|
||||
$root.'/ember/admin/dist/assets/vendor.js',
|
||||
$root.'/ember/admin/dist/assets/flarum-admin.js',
|
||||
$root.'/js/admin/dist/app.js',
|
||||
$root.'/less/admin/app.less'
|
||||
]);
|
||||
|
||||
|
@@ -12,13 +12,8 @@ class IndexAction extends BaseAction
|
||||
public function handle(Request $request, $params = [])
|
||||
{
|
||||
$config = [
|
||||
'modulePrefix' => 'flarum-forum',
|
||||
'environment' => 'production',
|
||||
'baseURL' => '/',
|
||||
'apiURL' => '/api',
|
||||
'locationType' => 'hash',
|
||||
'EmberENV' => [],
|
||||
'APP' => [],
|
||||
'baseURL' => 'http://flarum.dev',
|
||||
'apiURL' => 'http://flarum.dev/api',
|
||||
'forumTitle' => Config::get('flarum::forum_title', 'Flarum Demo Forum'),
|
||||
'welcomeDescription' => 'Flarum is now at a point where you can have basic conversations, so here is a little demo for you to break. <a href="http://demo.flarum.org/#/1/welcome-to-the-first-public-demo-of-flarum">Learn more »</a>'
|
||||
];
|
||||
@@ -41,14 +36,12 @@ class IndexAction extends BaseAction
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return View::make('flarum.forum::index')
|
||||
->with('title', Config::get('flarum::forum_title', 'Flarum Demo Forum'))
|
||||
->with('styles', app('flarum.forum.assetManager')->getCSSFiles())
|
||||
->with('scripts', app('flarum.forum.assetManager')->getJSFiles())
|
||||
->with('config', $config)
|
||||
->with('content', '')
|
||||
->with('layout', View::make('flarum.forum::forum'))
|
||||
->with('data', $data)
|
||||
->with('session', $session)
|
||||
->with('alert', $alert);
|
||||
|
@@ -19,8 +19,7 @@ class ForumServiceProvider extends ServiceProvider
|
||||
$assetManager = $this->app['flarum.forum.assetManager'];
|
||||
|
||||
$assetManager->addFile([
|
||||
$root.'/ember/forum/dist/assets/vendor.js',
|
||||
$root.'/ember/forum/dist/assets/flarum-forum.js',
|
||||
$root.'/js/forum/dist/app.js',
|
||||
$root.'/less/forum/app.less'
|
||||
]);
|
||||
|
||||
|
Reference in New Issue
Block a user