From 7f6cdcc0901c01b878d600392eeaba854b3c8529 Mon Sep 17 00:00:00 2001 From: Craig Stephenson Date: Mon, 27 Jan 2025 10:58:31 -0900 Subject: [PATCH] Add "slow loading" banner if SITE_SLOW environment variable is set. --- components/App.vue | 21 +++++++++++++++++++++ nuxt.config.js | 1 + 2 files changed, 22 insertions(+) diff --git a/components/App.vue b/components/App.vue index e6065a33..eac9c542 100644 --- a/components/App.vue +++ b/components/App.vue @@ -23,6 +23,26 @@
+
+
+ +

+ We’re sorry! Northern Climate Reports is experiencing slower + load times than usual. We’re working to improve performance + as soon as possible, but we don’t have an estimated time for + completion. Please check back soon, or reach out to us at + uaf-snap-data-tools@alaska.edu + with questions. +

+
+
+
@@ -77,6 +97,7 @@ export default { data() { return { offline: process.env.offline, + slow: process.env.slow, } }, computed: { diff --git a/nuxt.config.js b/nuxt.config.js index 8645b55a..740bd307 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -114,6 +114,7 @@ export default { apiUrl: process.env.SNAP_API_URL || 'https://earthmaps.io', localStorageExpiration: 4, offline: process.env.SITE_OFFLINE?.toLowerCase() == 'true', + slow: process.env.SITE_SLOW?.toLowerCase() == 'true', }, // Router customizations