mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-28 08:10:51 +02:00
Added loading spinner while page is loading
This commit is contained in:
@@ -5,6 +5,7 @@ const app = new Vue({
|
||||
el: '#app',
|
||||
components: { FileInfoModal },
|
||||
data: () => ({
|
||||
loading: true,
|
||||
theme: 'light',
|
||||
menuOpen: false,
|
||||
}),
|
||||
@@ -37,6 +38,8 @@ const app = new Vue({
|
||||
this.$refs.scrollToTop.classList.add('hidden');
|
||||
}
|
||||
}.bind(this));
|
||||
|
||||
this.loading = false;
|
||||
},
|
||||
watch: {
|
||||
theme: value => localStorage.setItem('theme', value),
|
||||
|
@@ -17,10 +17,14 @@
|
||||
|
||||
<title>{{ title }} • Directory Lister</title>
|
||||
|
||||
<div id="app" v-bind:class="{ dark: darkMode }" v-cloak>
|
||||
<div id="app" v-bind:class="{ dark: darkMode }">
|
||||
<div class="flex flex-col min-h-screen font-sans dark:bg-gray-800">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
|
||||
<div class="fixed inset-0 flex flex-col justify-center items-center min-h-screen bg-gray-900 bg-opacity-90" v-show="loading">
|
||||
<i class="fas fa-spinner fa-pulse fa-5x text-white"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="{{ asset('app.js') }}" defer></script>
|
||||
<script src="{{ asset('app.js') }}"></script>
|
||||
|
Reference in New Issue
Block a user