mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 23:04:36 -04:00
New admin portal build
This commit is contained in:
parent
90d359f157
commit
86bd746fa9
16118
public/assets/NOTICES
Normal file
16118
public/assets/NOTICES
Normal file
File diff suppressed because it is too large
Load Diff
54
public/flutter_service_worker.js
vendored
54
public/flutter_service_worker.js
vendored
@ -4,12 +4,12 @@ const TEMP = 'flutter-temp-cache';
|
|||||||
const CACHE_NAME = 'flutter-app-cache';
|
const CACHE_NAME = 'flutter-app-cache';
|
||||||
const RESOURCES = {
|
const RESOURCES = {
|
||||||
"favicon.ico": "51636d3a390451561744c42188ccd628",
|
"favicon.ico": "51636d3a390451561744c42188ccd628",
|
||||||
"main.dart.js": "cd8c6f1e43fbc5cda9be0da815856f01",
|
"main.dart.js": "c45ffe246b532ed8fbb547787d71472e",
|
||||||
"assets/web/assets/fonts/Roboto-Regular.ttf": "3e1af3ef546b9e6ecef9f3ba197bf7d2",
|
"assets/web/assets/fonts/Roboto-Regular.ttf": "3e1af3ef546b9e6ecef9f3ba197bf7d2",
|
||||||
|
"assets/NOTICES": "67284a1832789e462331a222ed497150",
|
||||||
"assets/fonts/MaterialIcons-Regular.ttf": "56d3ffdef7a25659eab6a68a3fbfaf16",
|
"assets/fonts/MaterialIcons-Regular.ttf": "56d3ffdef7a25659eab6a68a3fbfaf16",
|
||||||
"assets/fonts/Roboto-Regular.ttf": "3e1af3ef546b9e6ecef9f3ba197bf7d2",
|
"assets/fonts/Roboto-Regular.ttf": "3e1af3ef546b9e6ecef9f3ba197bf7d2",
|
||||||
"assets/FontManifest.json": "280b2f61f6810d59bd1bcd4cf01d3bf4",
|
"assets/FontManifest.json": "280b2f61f6810d59bd1bcd4cf01d3bf4",
|
||||||
"assets/LICENSE": "b38d6c1f865e1dac156600e592904647",
|
|
||||||
"assets/packages/font_awesome_flutter/lib/fonts/fa-brands-400.ttf": "5a37ae808cf9f652198acde612b5328d",
|
"assets/packages/font_awesome_flutter/lib/fonts/fa-brands-400.ttf": "5a37ae808cf9f652198acde612b5328d",
|
||||||
"assets/packages/font_awesome_flutter/lib/fonts/fa-regular-400.ttf": "2bca5ec802e40d3f4b60343e346cedde",
|
"assets/packages/font_awesome_flutter/lib/fonts/fa-regular-400.ttf": "2bca5ec802e40d3f4b60343e346cedde",
|
||||||
"assets/packages/font_awesome_flutter/lib/fonts/fa-solid-900.ttf": "2aa350bd2aeab88b601a593f793734c0",
|
"assets/packages/font_awesome_flutter/lib/fonts/fa-solid-900.ttf": "2aa350bd2aeab88b601a593f793734c0",
|
||||||
@ -23,8 +23,8 @@ const RESOURCES = {
|
|||||||
// The application shell files that are downloaded before a service worker can
|
// The application shell files that are downloaded before a service worker can
|
||||||
// start.
|
// start.
|
||||||
const CORE = [
|
const CORE = [
|
||||||
"main.dart.js",
|
"/",
|
||||||
"/",
|
"main.dart.js",
|
||||||
"index.html",
|
"index.html",
|
||||||
"assets/LICENSE",
|
"assets/LICENSE",
|
||||||
"assets/AssetManifest.json",
|
"assets/AssetManifest.json",
|
||||||
@ -34,7 +34,8 @@ const CORE = [
|
|||||||
self.addEventListener("install", (event) => {
|
self.addEventListener("install", (event) => {
|
||||||
return event.waitUntil(
|
return event.waitUntil(
|
||||||
caches.open(TEMP).then((cache) => {
|
caches.open(TEMP).then((cache) => {
|
||||||
return cache.addAll(CORE);
|
// Provide a no-cache param to ensure the latest version is downloaded.
|
||||||
|
return cache.addAll(CORE.map((value) => new Request(value, {'cache': 'no-cache'})));
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -53,6 +54,7 @@ self.addEventListener("activate", function(event) {
|
|||||||
// When there is no prior manifest, clear the entire cache.
|
// When there is no prior manifest, clear the entire cache.
|
||||||
if (!manifest) {
|
if (!manifest) {
|
||||||
await caches.delete(CACHE_NAME);
|
await caches.delete(CACHE_NAME);
|
||||||
|
contentCache = await caches.open(CACHE_NAME);
|
||||||
for (var request of await tempCache.keys()) {
|
for (var request of await tempCache.keys()) {
|
||||||
var response = await tempCache.match(request);
|
var response = await tempCache.match(request);
|
||||||
await contentCache.put(request, response);
|
await contentCache.put(request, response);
|
||||||
@ -102,6 +104,10 @@ self.addEventListener("activate", function(event) {
|
|||||||
self.addEventListener("fetch", (event) => {
|
self.addEventListener("fetch", (event) => {
|
||||||
var origin = self.location.origin;
|
var origin = self.location.origin;
|
||||||
var key = event.request.url.substring(origin.length + 1);
|
var key = event.request.url.substring(origin.length + 1);
|
||||||
|
// Redirect URLs to the index.html
|
||||||
|
if (event.request.url == origin || event.request.url.startsWith(origin + '/#')) {
|
||||||
|
key = '/';
|
||||||
|
}
|
||||||
// If the URL is not the the RESOURCE list, skip the cache.
|
// If the URL is not the the RESOURCE list, skip the cache.
|
||||||
if (!RESOURCES[key]) {
|
if (!RESOURCES[key]) {
|
||||||
return event.respondWith(fetch(event.request));
|
return event.respondWith(fetch(event.request));
|
||||||
@ -110,8 +116,10 @@ self.addEventListener("fetch", (event) => {
|
|||||||
.then((cache) => {
|
.then((cache) => {
|
||||||
return cache.match(event.request).then((response) => {
|
return cache.match(event.request).then((response) => {
|
||||||
// Either respond with the cached resource, or perform a fetch and
|
// Either respond with the cached resource, or perform a fetch and
|
||||||
// lazily populate the cache.
|
// lazily populate the cache. Ensure the resources are not cached
|
||||||
return response || fetch(event.request).then((response) => {
|
// by the browser for longer than the service worker expects.
|
||||||
|
var modifiedRequest = new Request(event.request, {'cache': 'no-cache'});
|
||||||
|
return response || fetch(modifiedRequest).then((response) => {
|
||||||
cache.put(event.request, response.clone());
|
cache.put(event.request, response.clone());
|
||||||
return response;
|
return response;
|
||||||
});
|
});
|
||||||
@ -120,3 +128,35 @@ self.addEventListener("fetch", (event) => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
self.addEventListener('message', (event) => {
|
||||||
|
// SkipWaiting can be used to immediately activate a waiting service worker.
|
||||||
|
// This will also require a page refresh triggered by the main worker.
|
||||||
|
if (event.message == 'skipWaiting') {
|
||||||
|
return self.skipWaiting();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.message = 'downloadOffline') {
|
||||||
|
downloadOffline();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Download offline will check the RESOURCES for all files not in the cache
|
||||||
|
// and populate them.
|
||||||
|
async function downloadOffline() {
|
||||||
|
var resources = [];
|
||||||
|
var contentCache = await caches.open(CACHE_NAME);
|
||||||
|
var currentContent = {};
|
||||||
|
for (var request of await contentCache.keys()) {
|
||||||
|
var key = request.url.substring(origin.length + 1);
|
||||||
|
if (key == "") {
|
||||||
|
key = "/";
|
||||||
|
}
|
||||||
|
currentContent[key] = true;
|
||||||
|
}
|
||||||
|
for (var resourceKey in Object.keys(RESOURCES)) {
|
||||||
|
if (!currentContent[resourceKey]) {
|
||||||
|
resources.add(resourceKey);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return Cache.addAll(resources);
|
||||||
|
}
|
||||||
|
198953
public/main.dart.js
vendored
198953
public/main.dart.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user