mirror of
https://github.com/flarum/core.git
synced 2025-07-31 21:50:50 +02:00
Frontend refactor (#1471)
Refactor Frontend + Asset code - Use Laravel's Filesystem component for asset IO, meaning theoretically assets should be storable on S3 etc. - More reliable checking for asset recompilation when debug mode is on, so you don't have to constantly delete the compiled assets to force a recompile. Should also fix issues with locale JS files being recompiled with the same name and cached. - Remove JavaScript minification, because it will be done by Webpack (exception is for the TextFormatter JS). - Add support for JS sourcemaps. - Separate frontend view and assets completely. This is an important distinction because frontend assets are compiled independent of a request, whereas putting together a view depends on a request. - Bind frontend view/asset factory instances to the container (in service providers) rather than subclassing. Asset and content populators can be added to these factories – these are simply objects that populate the asset compilers or the view with information. - Add RouteHandlerFactory functions that make it easy to hook up a frontend controller with a frontend instance ± some content. - Remove the need for "nojs" - Fix cache:clear command - Recompile assets when settings/enabled extensions change
This commit is contained in:
@@ -1,23 +1,23 @@
|
||||
<div id="flarum-loading" style="display: none">
|
||||
{{ $translator->trans('core.views.content.loading_text') }}
|
||||
{{ $translator->trans('core.views.content.loading_text') }}
|
||||
</div>
|
||||
|
||||
@if ($allowJs)
|
||||
<noscript>
|
||||
<noscript>
|
||||
<div class="Alert">
|
||||
<div class="container">
|
||||
{{ $translator->trans('core.views.content.javascript_disabled_message') }}
|
||||
</div>
|
||||
<div class="container">
|
||||
{{ $translator->trans('core.views.content.javascript_disabled_message') }}
|
||||
</div>
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
<div id="flarum-loading-error" style="display: none">
|
||||
<div class="Alert">
|
||||
<div class="container">
|
||||
{{ $translator->trans('core.views.content.load_error_message') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<noscript id="flarum-content">
|
||||
{!! $content !!}
|
||||
</noscript>
|
||||
@else
|
||||
<div class="Alert Alert--error">
|
||||
<div class="container">
|
||||
{{ $translator->trans('core.views.content.load_error_message') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! $content !!}
|
||||
@endif
|
||||
</noscript>
|
||||
|
Reference in New Issue
Block a user