add <noscript> message
This commit is contained in:
@@ -340,6 +340,32 @@ li.right:hover .menuTrigger {
|
||||
}
|
||||
|
||||
/* Top-level application layout style: sidepanel + main view */
|
||||
#noscript-alertbox {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: 30rem;
|
||||
overflow: hidden;
|
||||
margin-top: 5rem;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
border-radius: 0.25rem;
|
||||
box-shadow: 1px 2px 0.3rem gray;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
#noscript-title {
|
||||
padding: 1rem;
|
||||
font-size: 120%;
|
||||
font-weight: bolder;
|
||||
background-color: #2196f3; /* blue 500 */
|
||||
color: #bbdefb; /* light-blue 100 */
|
||||
}
|
||||
|
||||
#noscript-content {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
#app-container {
|
||||
position: relative;
|
||||
display: flex;
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -31,6 +31,12 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<noscript><div id="noscript-alertbox"><div id="noscript-title">Javascript support is required.</div>
|
||||
<div id="noscript-content">It appears JavaScript is turned off or is not supported by your browser.
|
||||
TinodeWeb does not work without JavaScript. Please enable JavaScript by changing your browser options,
|
||||
then <a href="">try again</a>.
|
||||
</div>
|
||||
</div></noscript>
|
||||
<div id="mountPoint"></div>
|
||||
<script src="firebase-init.js"></script>
|
||||
<script src="umd/index.dev.js"></script>
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
<link rel="stylesheet" href="css/base.min.css" />
|
||||
</head>
|
||||
<body>
|
||||
<noscript><div id="noscript-alertbox"><div id="noscript-title">Javascript support is required.</div>
|
||||
<div id="noscript-content">It appears JavaScript is turned off or is not supported by your browser.
|
||||
TinodeWeb does not work without JavaScript. Please enable JavaScript by changing your browser options,
|
||||
then <a href="">try again</a>.</div></div></noscript>
|
||||
<div id="mountPoint"></div>
|
||||
<script src="firebase-init.js"></script>
|
||||
<script src="umd/index.prod.js"></script>
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
// Must be located at the root.
|
||||
importScripts('https://unpkg.com/firebase@5.5.5/firebase-app.js');
|
||||
importScripts('https://unpkg.com/firebase@5.5.5/firebase-messaging.js');
|
||||
importScripts('/src/firebase-init.js');
|
||||
importScripts('firebase-init.js');
|
||||
|
||||
firebase.initializeApp(FIREBASE_INIT);
|
||||
|
||||
@@ -69,7 +69,7 @@ self.addEventListener('notificationclick', function(event) {
|
||||
});
|
||||
|
||||
// This is needed for 'Add to Home Screen'.
|
||||
self.addEventListener('fetch', function (event) {
|
||||
self.addEventListener('fetch', function(event) {
|
||||
event.respondWith(
|
||||
// Try to find response in cache.
|
||||
caches.match(event.request)
|
||||
@@ -77,9 +77,9 @@ self.addEventListener('fetch', function (event) {
|
||||
// If response is found in cache, return it. Otherwise fetch.
|
||||
return resp || fetch(event.request);
|
||||
})
|
||||
.catch((err) {
|
||||
.catch((err) => {
|
||||
// Something went wrong.
|
||||
console.error("Service worker Fetch: ", err);
|
||||
console.log("Service worker Fetch: ", err);
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
@@ -16,7 +16,7 @@ import SidepanelView from './sidepanel-view.jsx';
|
||||
|
||||
import { API_KEY, APP_NAME, MEDIA_BREAKPOINT, READ_DELAY, RECEIVED_DELAY } from '../config.js';
|
||||
import { makeImageUrl } from '../lib/blob-helpers.js';
|
||||
import { isLocalHost, isSecureConnection } from '../lib/host-name.js';
|
||||
import { detectServerAddress, isLocalHost, isSecureConnection } from '../lib/host-name.js';
|
||||
import LocalStorageUtil from '../lib/local-storage.js';
|
||||
import HashNavigation from '../lib/navigation.js';
|
||||
import { updateFavicon } from '../lib/utils.js';
|
||||
@@ -24,9 +24,6 @@ import { updateFavicon } from '../lib/utils.js';
|
||||
// Sound to play on message received.
|
||||
const POP_SOUND = new Audio('audio/msg.mp3');
|
||||
|
||||
console.log("desktop alerts: is secure, is localhost, firebase, navigator, fb_init",
|
||||
isSecureConnection(), isLocalHost(), (typeof firebase), (typeof navigator), (typeof FIREBASE_INIT));
|
||||
|
||||
class TinodeWeb extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
+21
-21
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user