From 156e71fff2253196134c66f6e4479ae5710862bb Mon Sep 17 00:00:00 2001 From: Nikita Krupin Date: Wed, 5 Jan 2022 00:23:18 -0500 Subject: [PATCH] added notification warning for Chrome < 70 and FF < 60 --- Website/layouts/default.vue | 65 ++++++++++++++++++++++++++++++++- Website/pages/docs.vue | 13 +++---- Website/pages/docs/fetching.vue | 3 +- 3 files changed, 71 insertions(+), 10 deletions(-) diff --git a/Website/layouts/default.vue b/Website/layouts/default.vue index e7aaf4b..c40259f 100644 --- a/Website/layouts/default.vue +++ b/Website/layouts/default.vue @@ -1,7 +1,7 @@ @@ -39,7 +65,35 @@ export default { { name: "Donate", path: "/donate" }, { name: "Links", path: "/links" }, ], + alert: { + show: false, + html: "", + }, }), + mounted() { + setTimeout(() => { + // check if browser version out of date + if ( + window.navigator.userAgent.indexOf("Chrome") > -1 && + window.navigator.userAgent.indexOf("Edge") === -1 + ) { + let chrome = window.navigator.userAgent.match(/Chrome\/(\d+)/); + let chromeVersion = chrome ? chrome[1] : 0; + if (chromeVersion < 70) { + this.alert.html = `You are using ${this.$ua._parsed.name} ${this.$ua._parsed.version}. Please update to the latest version.`; + this.alert.show = true; + } + } + if (window.navigator.userAgent.indexOf("Firefox") > -1) { + let firefox = window.navigator.userAgent.match(/Firefox\/(\d+)/); + let firefoxVersion = firefox ? firefox[1] : 0; + if (firefoxVersion < 60) { + this.alert.html = `You are using ${this.$ua._parsed.name} ${this.$ua._parsed.version}. Please update to the latest version.`; + this.alert.show = true; + } + } + }, 1000); + }, }; @@ -53,6 +107,11 @@ body { overflow: auto; } +::selection { + background: #f44; + color: #111; +} + ::-webkit-scrollbar { width: 1rem; } @@ -78,6 +137,10 @@ body { outline: 2px solid red; } +.v-sheet.v-snack__wrapper{ + border-radius: 0.75rem !important; +} + .mainAltButton { margin: 0.25em; } diff --git a/Website/pages/docs.vue b/Website/pages/docs.vue index 8833592..0489fcb 100644 --- a/Website/pages/docs.vue +++ b/Website/pages/docs.vue @@ -1,10 +1,9 @@