Skip to content

Commit c214b24

Browse files
committed
Bump 3.6.0
1 parent 77e3172 commit c214b24

28 files changed

+408
-34
lines changed

config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version='1.0' encoding='utf-8'?>
2-
<widget android-versionCode="34000" id="com.ecarriou.systemdesignerios" version="3.4.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
2+
<widget android-versionCode="36000" id="com.ecarriou.systemdesignerios" version="3.6.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
33
<name>System Designer</name>
44
<description>
55
System Designer, an IDE for designing systems.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.ecarriou.systemdesignerios",
3-
"version": "3.4.0",
3+
"version": "3.6.0",
44
"license": "Apache-2.0",
55
"repository": {
66
"type": "git",
@@ -33,4 +33,4 @@
3333
"cordova-icon": "1.0.0",
3434
"cordova-splash": "1.0.0"
3535
}
36-
}
36+
}

www/app/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html>
2+
<html lang="en" manifest="../system-designer.appcache">
33

44
<head>
55
<title>Loading...</title>

www/behavior.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html>
2+
<html lang="en" manifest="system-designer.appcache">
33

44
<head>
55
<meta charset="utf-8">
@@ -57,6 +57,8 @@
5757
<script src="lib/editor/vendor.js"></script>
5858
<!-- designer -->
5959
<script type="text/javascript" src="scripts/editor-behavior.js"></script>
60+
61+
<script>if ("serviceWorker" in navigator) navigator.serviceWorker.register("./cache.js");</script>
6062
</body>
6163

6264
</html>

www/cache.js

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
// System Designer - Copyright 2019 Erwan Carriou
2+
// Licensed under the Apache License, Version 2.0 (the "License")
3+
4+
const version = 'v3.6.0';
5+
6+
const clearCaches = () => {
7+
return caches.keys().then(keys => {
8+
return Promise.all(keys.filter(key => {
9+
return key.indexOf(version) !== 0;
10+
}).map(key => {
11+
return caches.delete(key);
12+
})
13+
);
14+
})
15+
}
16+
17+
self.addEventListener('install', e => {
18+
e.waitUntil(
19+
caches.open(version).then(cache => {
20+
return cache.addAll([
21+
'/',
22+
'app/index.html',
23+
'img/icon.png',
24+
'img/logo.png',
25+
'lib/bootstrap/dist/css/bootstrap.min.css',
26+
'lib/bootstrap/dist/css/bootstrap.min.css.map',
27+
'lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff',
28+
'lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2',
29+
'lib/codemirror/addon/hint/show-hint.css',
30+
'lib/codemirror/theme/eclipse.css',
31+
'lib/codemirror/codemirror.css',
32+
'lib/designer/vendor.js',
33+
'lib/editor/vendor.js',
34+
'lib/prism/prism.css',
35+
'lib/system-runtime/system-runtime.min.js',
36+
'scripts/designer-runtime.js',
37+
'scripts/diagram.js',
38+
'scripts/editor-behavior.js',
39+
'scripts/editor-component.js',
40+
'scripts/editor-model.js',
41+
'scripts/editor-schema.js',
42+
'scripts/editor-system.js',
43+
'scripts/editor-type.js',
44+
'scripts/mobile.js',
45+
'scripts/system-designer.js',
46+
'styles/designer.css',
47+
'styles/diagram.css',
48+
'styles/editor.css',
49+
'styles/mobile.css',
50+
'behavior.html',
51+
'component.html',
52+
'cordova.js',
53+
'index.html',
54+
'model.html',
55+
'schema.html',
56+
'system.html',
57+
'type.html'
58+
]).then(() => self.skipWaiting());
59+
})
60+
);
61+
});
62+
63+
self.addEventListener('activate', event => {
64+
event.waitUntil(
65+
clearCaches().then(() => {
66+
return self.clients.claim();
67+
})
68+
);
69+
});
70+
71+
self.addEventListener('fetch', event => {
72+
if (event.request.cache === 'only-if-cached' && event.request.mode !== 'same-origin') {
73+
return;
74+
}
75+
event.respondWith(
76+
caches.match(event.request, { ignoreSearch: true }).then(response => {
77+
return response || fetch(event.request);
78+
})
79+
);
80+
});

www/component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html>
2+
<html lang="en" manifest="system-designer.appcache">
33

44
<head>
55
<meta charset="utf-8">
@@ -57,6 +57,8 @@
5757
<script src="lib/editor/vendor.js"></script>
5858
<!-- designer -->
5959
<script type="text/javascript" src="scripts/editor-component.js"></script>
60+
61+
<script>if ("serviceWorker" in navigator) navigator.serviceWorker.register("./cache.js");</script>
6062
</body>
6163

6264
</html>

www/cordova.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
if (typeof window.cordova !== undefined) {
2+
window.cordova = {};
3+
}

www/img/icon.png

49.8 KB
Loading

www/index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
<!DOCTYPE html>
2-
<html>
2+
<html lang="en" manifest="system-designer.appcache">
33

44
<head>
55
<meta charset="utf-8">
66
<meta http-equiv="X-UA-Compatible" content="IE=edge">
77
<meta name="description" content="An IDE for designing systems">
88
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover' name='viewport' />
9+
<link rel="manifest" href="manifest.json">
910
<title>System Designer</title>
1011
<!-- bootstrap -->
1112
<link href="lib/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
@@ -74,6 +75,8 @@
7475
<script src="lib/designer/vendor.js"></script>
7576
<!-- designer -->
7677
<script type="text/javascript" src="scripts/system-designer.js"></script>
78+
79+
<script>if ("serviceWorker" in navigator) navigator.serviceWorker.register("./cache.js");</script>
7780
</body>
7881

7982
</html>

0 commit comments

Comments
 (0)