修复关闭游客上传后公告无法弹出的问题

This commit is contained in:
Wisp X 2022-03-14 10:17:15 +08:00
parent db9d878fe2
commit 928727c149
3 changed files with 18 additions and 16 deletions

View File

@ -0,0 +1,16 @@
@if(\App\Utils::config(\App\Enums\ConfigKey::SiteNotice))
<x-modal>
<div class="markdown-body">
{!! (new Parsedown())->parse(\App\Utils::config(\App\Enums\ConfigKey::SiteNotice)) !!}
</div>
</x-modal>
@push('scripts')
<script>
if (! sessionStorage.getItem('noticed')) {
Alpine.store('modal').open = true;
sessionStorage.setItem('noticed', '1');
}
</script>
@endpush
@endif

View File

@ -46,6 +46,7 @@
</x-container>
</div>
</body>
@include('common.notice')
<script>
// 开关组件默认值
let setSwitch = function (e) {

View File

@ -35,21 +35,6 @@
</footer>
</div>
@if(\App\Utils::config(\App\Enums\ConfigKey::SiteNotice))
<x-modal>
<div class="markdown-body">
{!! (new Parsedown())->parse(\App\Utils::config(\App\Enums\ConfigKey::SiteNotice)) !!}
</div>
</x-modal>
@push('scripts')
<script>
if (! sessionStorage.getItem('noticed')) {
Alpine.store('modal').open = true;
sessionStorage.setItem('noticed', '1');
}
</script>
@endpush
@endif
@include('common.notice')
</x-guest-layout>