diff --git a/.browserslistrc b/.browserslistrc index 1a243af..21b0846 100644 --- a/.browserslistrc +++ b/.browserslistrc @@ -1,7 +1,4 @@ -last 10 Chrome version -last 10 Firefox version -last 10 Edge major versions -last 2 Safari major versions -last 2 iOS major versions -Firefox ESR -not IE >= 0 # IE is dead \ No newline at end of file +# After changes are made to this file run the script 'supportedBrowsers' to update the JS file, +# see: https://www.npmjs.com/package/browserslist-useragent-regexp?activeTab=readme +defaults +fully supports resizeobserver diff --git a/package.json b/package.json index 69b94cc..8f613e7 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,8 @@ "start": "ng serve", "build": "ng build", "test": "ng test", - "lint": "ng lint" + "lint": "ng lint", + "supportedBrowsers": "(echo module.exports = && browserslist-useragent-regexp --allowHigherVersions) > src/assets/supportedBrowsers.js" }, "dependencies": { "@angular/animations": "^17.2.1", @@ -56,6 +57,8 @@ "@types/node": "~20.11.17", "@typescript-eslint/eslint-plugin": "6.21.0", "@typescript-eslint/parser": "6.21.0", + "browserslist": "^4.23.0", + "browserslist-useragent-regexp": "^4.1.1", "eslint": "^8.56.0", "eslint-plugin-import": "~2.29.1", "eslint-plugin-jsdoc": "~48.0.6", diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 1750866..4707f95 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -12,7 +12,7 @@ import { debounceTime } from 'rxjs/operators'; import { DisplayModeSelectorComponent } from './components/display-mode-selector/display-mode-selector.component'; import { HotKeysService } from './hotkeys.service'; import { SettingsService } from './settings.service'; -// import { version } from '../../package.json'; +import * as supportedBrowsers from '../assets/supportedBrowsers'; @Component({ selector: 'app-root', @@ -46,6 +46,9 @@ export class AppComponent implements OnInit { } ngOnInit(): void { + if (!(supportedBrowsers.test(navigator.userAgent))) { + window.location.replace("/assets/notsupported.html"); + } this.openlpService.retrieveSystemInformation().subscribe(res => this.showLogin = res.login_required); this.addHotKeys(); this.fastSwitching = this.settingsService.get('fastSwitching'); diff --git a/src/assets/loading_old.png b/src/assets/loading_old.png deleted file mode 100644 index 0adfeea..0000000 Binary files a/src/assets/loading_old.png and /dev/null differ diff --git a/src/assets/notsupported.html b/src/assets/notsupported.html index cda974b..6471ffa 100644 --- a/src/assets/notsupported.html +++ b/src/assets/notsupported.html @@ -20,6 +20,13 @@
Please download and install an older version of Web Remote from here.
+
+ To install go to the directory "remotes" in your OpenLP data folder.
+ The location of the data folder can be found under the advanced settings of OpenLP.
+
+ Unzip the contents of the downloaded Web Remote file to that directory overwriting everything in it. +