mirror of
https://github.com/urbit/shrub.git
synced 2024-12-25 04:52:06 +03:00
service-worker: fixing path and scope
This commit is contained in:
parent
ff024adfc7
commit
72ddbf1eb1
@ -26,6 +26,9 @@ if(urbitrc.URL) {
|
||||
devServer = {
|
||||
...devServer,
|
||||
index: 'index.html',
|
||||
// headers: {
|
||||
// 'Service-Worker-Allowed': '/'
|
||||
// },
|
||||
proxy: [
|
||||
{
|
||||
context: (path) => {
|
||||
|
@ -1,7 +1,7 @@
|
||||
if ('serviceWorker' in navigator && process.env.NODE_ENV !== 'development') {
|
||||
window.addEventListener('load', () => {
|
||||
navigator.serviceWorker.register('/~landscape/js/bundle/serviceworker.js', {
|
||||
scope: '/'
|
||||
navigator.serviceWorker.register('/apps/landscape/serviceworker.js', {
|
||||
scope: '/apps/landscape'
|
||||
}).then((reg) => {
|
||||
});
|
||||
});
|
||||
|
@ -1,11 +1,9 @@
|
||||
import { Box, Center, Col, LoadingSpinner, Text, Icon } from '@tlon/indigo-react';
|
||||
import { Col } from '@tlon/indigo-react';
|
||||
import {
|
||||
IndexedNotification,
|
||||
|
||||
JoinRequests, Notifications,
|
||||
|
||||
JoinRequests,
|
||||
Notifications,
|
||||
seen,
|
||||
|
||||
Timebox,
|
||||
unixToDa
|
||||
} from '@urbit/api';
|
||||
@ -13,10 +11,8 @@ import { BigInteger } from 'big-integer';
|
||||
import _ from 'lodash';
|
||||
import f from 'lodash/fp';
|
||||
import moment from 'moment';
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import React, { useEffect } from 'react';
|
||||
import { getNotificationKey } from '~/logic/lib/hark';
|
||||
import { useLazyScroll } from '~/logic/lib/useLazyScroll';
|
||||
import useLaunchState from '~/logic/state/launch';
|
||||
import { daToUnix } from '~/logic/lib/util';
|
||||
import useHarkState from '~/logic/state/hark';
|
||||
import { Invites } from './invites';
|
||||
@ -59,8 +55,6 @@ export default function Inbox(props: {
|
||||
};
|
||||
}, []);
|
||||
|
||||
const runtimeLag = useLaunchState(state => state.runtimeLag);
|
||||
|
||||
const ready = useHarkState(
|
||||
s => Object.keys(s.unreads.graph).length > 0
|
||||
);
|
||||
@ -99,14 +93,6 @@ export default function Inbox(props: {
|
||||
|
||||
return (
|
||||
<Col p={1} position="relative" height="100%" overflowY="auto" overflowX="hidden">
|
||||
{runtimeLag && (
|
||||
<Box bg="yellow" borderRadius={2} p={2} m={2}>
|
||||
<Icon verticalAlign="middle" mr={2} icon="Tutorial" />
|
||||
<Text verticalAlign="middle">
|
||||
Update your binary to continue receiving updates.
|
||||
</Text>
|
||||
</Box>
|
||||
)}
|
||||
<Invites pendingJoin={props.pendingJoin} />
|
||||
</Col>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user