Making a pass at adding a service worker.
This commit is contained in:
parent
2a1aabd773
commit
e16ff7781a
5 changed files with 17 additions and 1 deletions
|
@ -39,6 +39,7 @@
|
||||||
"markdown-it-sup": "^1.0.0",
|
"markdown-it-sup": "^1.0.0",
|
||||||
"moment": "^2.24.0",
|
"moment": "^2.24.0",
|
||||||
"reconnecting-websocket": "^4.4.0",
|
"reconnecting-websocket": "^4.4.0",
|
||||||
|
"register-service-worker": "^1.7.1",
|
||||||
"rxjs": "^6.6.3",
|
"rxjs": "^6.6.3",
|
||||||
"serialize-javascript": "^5.0.0",
|
"serialize-javascript": "^5.0.0",
|
||||||
"tippy.js": "^6.1.1",
|
"tippy.js": "^6.1.1",
|
||||||
|
|
|
@ -75,9 +75,12 @@ server.get('/*', async (req, res) => {
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
|
|
||||||
|
<!-- Web app manifest -->
|
||||||
|
<link rel="manifest" href="/assets/manifest.webmanifest">
|
||||||
|
|
||||||
<!-- Icons -->
|
<!-- Icons -->
|
||||||
<link rel="shortcut icon" type="image/svg+xml" href="/assets/favicon.svg" />
|
<link rel="shortcut icon" type="image/svg+xml" href="/assets/favicon.svg" />
|
||||||
<!-- <link rel="apple-touch-icon" href="/assets/apple-touch-icon.png" /> -->
|
<link rel="apple-touch-icon" href="/assets/apple-touch-icon.png" />
|
||||||
|
|
||||||
<!-- Styles -->
|
<!-- Styles -->
|
||||||
<link rel="stylesheet" type="text/css" href="/static/styles/styles.css" />
|
<link rel="stylesheet" type="text/css" href="/static/styles/styles.css" />
|
||||||
|
|
|
@ -556,6 +556,10 @@ export class User extends Component<any, UserState> {
|
||||||
this.state.userSettingsForm.default_listing_type
|
this.state.userSettingsForm.default_listing_type
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
showLocal={
|
||||||
|
this.state.siteRes.federated_instances &&
|
||||||
|
this.state.siteRes.federated_instances.length > 0
|
||||||
|
}
|
||||||
onChange={this.handleUserSettingsListingTypeChange}
|
onChange={this.handleUserSettingsListingTypeChange}
|
||||||
/>
|
/>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -444,6 +444,9 @@ export function setTheme(theme: string = 'darkly', loggedIn: boolean = false) {
|
||||||
// require('../assets/css/themes/_variables.darkly.scss');
|
// require('../assets/css/themes/_variables.darkly.scss');
|
||||||
// require('../assets/css/themes/_variables.darkly.scss');
|
// require('../assets/css/themes/_variables.darkly.scss');
|
||||||
// require('../assets/css/themes/_variables.darkly.scss');
|
// require('../assets/css/themes/_variables.darkly.scss');
|
||||||
|
// require('../../node_modules/bootswatch/dist/darkly/bootstrap.min.css');
|
||||||
|
// require('../../node_modules/bootswatch/dist/yeti/_variables.scss');
|
||||||
|
// require('../../node_modules/bootstrap/scss/bootstrap.scss');
|
||||||
// unload all the other themes
|
// unload all the other themes
|
||||||
// for (var i = 0; i < themes.length; i++) {
|
// for (var i = 0; i < themes.length; i++) {
|
||||||
// let styleSheet = document.getElementById(themes[i]);
|
// let styleSheet = document.getElementById(themes[i]);
|
||||||
|
|
|
@ -8199,6 +8199,11 @@ regexpu-core@^4.7.0:
|
||||||
unicode-match-property-ecmascript "^1.0.4"
|
unicode-match-property-ecmascript "^1.0.4"
|
||||||
unicode-match-property-value-ecmascript "^1.2.0"
|
unicode-match-property-value-ecmascript "^1.2.0"
|
||||||
|
|
||||||
|
register-service-worker@^1.7.1:
|
||||||
|
version "1.7.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/register-service-worker/-/register-service-worker-1.7.1.tgz#6308347ac6c0af0f6c0b22ea5d59d25e836bc932"
|
||||||
|
integrity sha512-IdTfUZ4u8iJL8o1w8es8l6UMGPmkwHolUdT+UmM1UypC80IB4KbpuIlvwWVj8UDS7eJwkEYRcKRgfRX+oTmJsw==
|
||||||
|
|
||||||
registry-auth-token@^3.0.1:
|
registry-auth-token@^3.0.1:
|
||||||
version "3.4.0"
|
version "3.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.4.0.tgz#d7446815433f5d5ed6431cd5dca21048f66b397e"
|
resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.4.0.tgz#d7446815433f5d5ed6431cd5dca21048f66b397e"
|
||||||
|
|
Loading…
Reference in a new issue