diff --git a/CHANGELOG.md b/CHANGELOG.md
index b2a4cb8014..f10fc1de26 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@
- `/addShows` - Add Shows ([#4564](https://github.com/pymedusa/Medusa/pull/4564))
- `/addRecommended` - Add Recommended Shows ([#4564](https://github.com/pymedusa/Medusa/pull/4564))
- Removed the old `/ui` route ([#4565](https://github.com/pymedusa/Medusa/pull/4565))
+- Added a simple "Loading..." message while the page is loading ([#4629](https://github.com/pymedusa/Medusa/pull/4629))
- _Simple message describing the improvement, and a link to the pull request._
**Fixes**
diff --git a/themes-default/slim/views/displayShow.mako b/themes-default/slim/views/displayShow.mako
index 79a8e093a8..fe1b1808d9 100644
--- a/themes-default/slim/views/displayShow.mako
+++ b/themes-default/slim/views/displayShow.mako
@@ -28,6 +28,14 @@ const startVue = () => {
const { $store } = this;
$store.dispatch('getShows'); // Used by show-selector component
},
+ mounted() {
+ // Adjust the summary background position and size on page load and resize
+ this.$once('loaded', () => {
+ this.$nextTick(() => {
+ window.dispatchEvent(new Event('resize'));
+ });
+ });
+ }
});
};
diff --git a/themes-default/slim/views/layouts/main.mako b/themes-default/slim/views/layouts/main.mako
index a9fef4b89f..c6efe06b13 100644
--- a/themes-default/slim/views/layouts/main.mako
+++ b/themes-default/slim/views/layouts/main.mako
@@ -62,7 +62,12 @@
% endif
<%include file="/partials/alerts.mako"/>
-
+
+
Loading....
+ If this is taking too long,
+ click here to show the page.
+
+
<%block name="content" />
@@ -164,6 +169,11 @@
// @TODO: Remove this before v1.0.0
Vue.mixin({
+ data() {
+ return {
+ globalLoading: true
+ };
+ },
mounted() {
if (this.$root === this && !document.location.pathname.endsWith('/login/')) {
// We wait 1000ms to allow the mutations to show in vue dev-tools
@@ -171,13 +181,19 @@
setTimeout(() => {
const { store } = window;
store.dispatch('login');
- store.dispatch('getConfig');
+ store.dispatch('getConfig')
+ .then(() => this.$emit('loaded'));
}, 1000);
}
+
+ this.$once('loaded', () => {
+ this.globalLoading = false;
+ });
},
// Make auth and config accessible to all components
computed: store.mapState(['auth', 'config'])
- })
+ });
+
window.routes = [];
if ('${bool(app.DEVELOPER)}' === 'True') {
Vue.config.devtools = true;
diff --git a/themes-default/slim/views/snatchSelection.mako b/themes-default/slim/views/snatchSelection.mako
index 8232452924..32db0e3795 100644
--- a/themes-default/slim/views/snatchSelection.mako
+++ b/themes-default/slim/views/snatchSelection.mako
@@ -14,6 +14,14 @@ const startVue = () => {
el: '#vue-wrap',
data() {
return {};
+ },
+ mounted() {
+ // Adjust the summary background position and size on page load and resize
+ this.$once('loaded', () => {
+ this.$nextTick(() => {
+ window.dispatchEvent(new Event('resize'));
+ });
+ });
}
});
};
diff --git a/themes/dark/templates/displayShow.mako b/themes/dark/templates/displayShow.mako
index 79a8e093a8..fe1b1808d9 100644
--- a/themes/dark/templates/displayShow.mako
+++ b/themes/dark/templates/displayShow.mako
@@ -28,6 +28,14 @@ const startVue = () => {
const { $store } = this;
$store.dispatch('getShows'); // Used by show-selector component
},
+ mounted() {
+ // Adjust the summary background position and size on page load and resize
+ this.$once('loaded', () => {
+ this.$nextTick(() => {
+ window.dispatchEvent(new Event('resize'));
+ });
+ });
+ }
});
};
diff --git a/themes/dark/templates/layouts/main.mako b/themes/dark/templates/layouts/main.mako
index a9fef4b89f..c6efe06b13 100644
--- a/themes/dark/templates/layouts/main.mako
+++ b/themes/dark/templates/layouts/main.mako
@@ -62,7 +62,12 @@
% endif
<%include file="/partials/alerts.mako"/>
-
+
+
Loading....
+ If this is taking too long,
+ click here to show the page.
+
+
<%block name="content" />
@@ -164,6 +169,11 @@
// @TODO: Remove this before v1.0.0
Vue.mixin({
+ data() {
+ return {
+ globalLoading: true
+ };
+ },
mounted() {
if (this.$root === this && !document.location.pathname.endsWith('/login/')) {
// We wait 1000ms to allow the mutations to show in vue dev-tools
@@ -171,13 +181,19 @@
setTimeout(() => {
const { store } = window;
store.dispatch('login');
- store.dispatch('getConfig');
+ store.dispatch('getConfig')
+ .then(() => this.$emit('loaded'));
}, 1000);
}
+
+ this.$once('loaded', () => {
+ this.globalLoading = false;
+ });
},
// Make auth and config accessible to all components
computed: store.mapState(['auth', 'config'])
- })
+ });
+
window.routes = [];
if ('${bool(app.DEVELOPER)}' === 'True') {
Vue.config.devtools = true;
diff --git a/themes/dark/templates/snatchSelection.mako b/themes/dark/templates/snatchSelection.mako
index 8232452924..32db0e3795 100644
--- a/themes/dark/templates/snatchSelection.mako
+++ b/themes/dark/templates/snatchSelection.mako
@@ -14,6 +14,14 @@ const startVue = () => {
el: '#vue-wrap',
data() {
return {};
+ },
+ mounted() {
+ // Adjust the summary background position and size on page load and resize
+ this.$once('loaded', () => {
+ this.$nextTick(() => {
+ window.dispatchEvent(new Event('resize'));
+ });
+ });
}
});
};
diff --git a/themes/light/templates/displayShow.mako b/themes/light/templates/displayShow.mako
index 79a8e093a8..fe1b1808d9 100644
--- a/themes/light/templates/displayShow.mako
+++ b/themes/light/templates/displayShow.mako
@@ -28,6 +28,14 @@ const startVue = () => {
const { $store } = this;
$store.dispatch('getShows'); // Used by show-selector component
},
+ mounted() {
+ // Adjust the summary background position and size on page load and resize
+ this.$once('loaded', () => {
+ this.$nextTick(() => {
+ window.dispatchEvent(new Event('resize'));
+ });
+ });
+ }
});
};
diff --git a/themes/light/templates/layouts/main.mako b/themes/light/templates/layouts/main.mako
index a9fef4b89f..c6efe06b13 100644
--- a/themes/light/templates/layouts/main.mako
+++ b/themes/light/templates/layouts/main.mako
@@ -62,7 +62,12 @@
% endif
<%include file="/partials/alerts.mako"/>
-
+
+
Loading....
+ If this is taking too long,
+ click here to show the page.
+
+
<%block name="content" />
@@ -164,6 +169,11 @@
// @TODO: Remove this before v1.0.0
Vue.mixin({
+ data() {
+ return {
+ globalLoading: true
+ };
+ },
mounted() {
if (this.$root === this && !document.location.pathname.endsWith('/login/')) {
// We wait 1000ms to allow the mutations to show in vue dev-tools
@@ -171,13 +181,19 @@
setTimeout(() => {
const { store } = window;
store.dispatch('login');
- store.dispatch('getConfig');
+ store.dispatch('getConfig')
+ .then(() => this.$emit('loaded'));
}, 1000);
}
+
+ this.$once('loaded', () => {
+ this.globalLoading = false;
+ });
},
// Make auth and config accessible to all components
computed: store.mapState(['auth', 'config'])
- })
+ });
+
window.routes = [];
if ('${bool(app.DEVELOPER)}' === 'True') {
Vue.config.devtools = true;
diff --git a/themes/light/templates/snatchSelection.mako b/themes/light/templates/snatchSelection.mako
index 8232452924..32db0e3795 100644
--- a/themes/light/templates/snatchSelection.mako
+++ b/themes/light/templates/snatchSelection.mako
@@ -14,6 +14,14 @@ const startVue = () => {
el: '#vue-wrap',
data() {
return {};
+ },
+ mounted() {
+ // Adjust the summary background position and size on page load and resize
+ this.$once('loaded', () => {
+ this.$nextTick(() => {
+ window.dispatchEvent(new Event('resize'));
+ });
+ });
}
});
};