mirror of
https://github.com/flarum/framework.git
synced 2025-02-01 00:15:17 +08:00
Merge branch 'loading-indicator'
This commit is contained in:
commit
5c0b6d68f5
|
@ -137,3 +137,10 @@ blockquote ol:last-child {
|
|||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#flarum-loading {
|
||||
text-align: center;
|
||||
padding: 50px 0;
|
||||
font-size: 18px;
|
||||
color: @muted-more-color;
|
||||
}
|
||||
|
|
|
@ -22,30 +22,35 @@
|
|||
<div id="alerts"></div>
|
||||
|
||||
@if (! $noJs)
|
||||
@foreach ($scripts as $file)
|
||||
<script src="{{ $forum->attributes->baseUrl . str_replace(public_path(), '', $file) }}"></script>
|
||||
@endforeach
|
||||
<script>
|
||||
document.getElementById('flarum-loading').style.display = 'block';
|
||||
</script>
|
||||
|
||||
<script>
|
||||
@if (! $forum->attributes->debug)
|
||||
try {
|
||||
@endif
|
||||
var app = System.get('flarum/app').default;
|
||||
@foreach ($scripts as $file)
|
||||
<script src="{{ $forum->attributes->baseUrl . str_replace(public_path(), '', $file) }}"></script>
|
||||
@endforeach
|
||||
|
||||
babelHelpers._extends(app, {!! json_encode($app) !!});
|
||||
<script>
|
||||
document.getElementById('flarum-loading').style.display = 'none';
|
||||
@if (! $forum->attributes->debug)
|
||||
try {
|
||||
@endif
|
||||
var app = System.get('flarum/app').default;
|
||||
|
||||
@foreach ($bootstrappers as $bootstrapper)
|
||||
System.get('{{ $bootstrapper }}');
|
||||
@endforeach
|
||||
babelHelpers._extends(app, {!! json_encode($app) !!});
|
||||
|
||||
app.boot();
|
||||
@if (! $forum->attributes->debug)
|
||||
} catch (e) {
|
||||
var nojs = window.location.search ? '&nojs=1' : '?nojs=1';
|
||||
window.location = window.location + nojs;
|
||||
}
|
||||
@endif
|
||||
</script>
|
||||
@foreach ($bootstrappers as $bootstrapper)
|
||||
System.get('{{ $bootstrapper }}');
|
||||
@endforeach
|
||||
|
||||
app.boot();
|
||||
@if (! $forum->attributes->debug)
|
||||
} catch (e) {
|
||||
var nojs = window.location.search ? '&nojs=1' : '?nojs=1';
|
||||
window.location = window.location + nojs;
|
||||
}
|
||||
@endif
|
||||
</script>
|
||||
@endif
|
||||
|
||||
{!! $foot !!}
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
<div id="flarum-loading" style="display: none">
|
||||
{{ $translator->trans('core.basic.loading_text') }}
|
||||
</div>
|
||||
|
||||
@if (! $noJs) <noscript> @endif
|
||||
<div class="Alert">
|
||||
<div class="container">
|
||||
@if ($noJs)
|
||||
{{ $translator->trans('core.basic.load_error_message') }}
|
||||
@else
|
||||
{{ $translator->trans('core.basic.javascript_disabled_message') }}
|
||||
@endif
|
||||
</div>
|
||||
<div class="container">
|
||||
@if ($noJs)
|
||||
{{ $translator->trans('core.basic.load_error_message') }}
|
||||
@else
|
||||
{{ $translator->trans('core.basic.javascript_disabled_message') }}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! $content !!}
|
||||
|
|
Loading…
Reference in New Issue
Block a user