mirror of https://github.com/vector-im/riot-web
Remember acceptance for unsupported browsers.
Addresses #3624. This stores the flag in localStorage, after checking if localStorage is available. If localStorage is not available, the user will be prompted just like before this commit. Signed-off-by: Travis Ralston <travpc@gmail.com>pull/3694/head
parent
2afe9e6928
commit
e877ad2e63
|
@ -263,6 +263,11 @@ async function loadApp() {
|
||||||
configError = e;
|
configError = e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (window.localStorage && window.localStorage.getItem('accepts_unsupported_browser')) {
|
||||||
|
console.log('User has previously accepted risks in using an unsupported browser');
|
||||||
|
validBrowser = true;
|
||||||
|
}
|
||||||
|
|
||||||
console.log("Vector starting at "+window.location);
|
console.log("Vector starting at "+window.location);
|
||||||
if (configError) {
|
if (configError) {
|
||||||
window.matrixChat = ReactDOM.render(<div className="error">
|
window.matrixChat = ReactDOM.render(<div className="error">
|
||||||
|
@ -294,6 +299,7 @@ async function loadApp() {
|
||||||
var CompatibilityPage = sdk.getComponent("structures.CompatibilityPage");
|
var CompatibilityPage = sdk.getComponent("structures.CompatibilityPage");
|
||||||
window.matrixChat = ReactDOM.render(
|
window.matrixChat = ReactDOM.render(
|
||||||
<CompatibilityPage onAccept={function() {
|
<CompatibilityPage onAccept={function() {
|
||||||
|
if (window.localStorage) window.localStorage.setItem('accepts_unsupported_browser', true);
|
||||||
validBrowser = true;
|
validBrowser = true;
|
||||||
console.log("User accepts the compatibility risks.");
|
console.log("User accepts the compatibility risks.");
|
||||||
loadApp();
|
loadApp();
|
||||||
|
|
Loading…
Reference in New Issue