sunrize 1.0.75 → 1.0.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/sunrize/Application/Application.js +9 -5
- package/src/sunrize/Application/Template.js +34 -19
- package/src/html/application.html +0 -71
- package/src/html/document.html +0 -36
- package/src/themes/default.css +0 -1442
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ const
|
|
|
6
6
|
path = require ("path"),
|
|
7
7
|
fs = require ("fs"),
|
|
8
8
|
util = require ("util"),
|
|
9
|
-
|
|
9
|
+
Template = require ("./Template"),
|
|
10
10
|
LocalStorage = require ("node-localstorage") .LocalStorage,
|
|
11
11
|
DataStorage = require ("../Application/DataStorage"),
|
|
12
12
|
_ = require ("../Application/GetText")
|
|
@@ -55,9 +55,9 @@ module .exports = class Application
|
|
|
55
55
|
timings: false,
|
|
56
56
|
})
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
Template .create (path .join (__dirname, "../../html/application-template.html"))
|
|
59
|
+
Template .create (path .join (__dirname, "../../html/document-template.html"))
|
|
60
|
+
Template .create (path .join (__dirname, "../../themes/default-template.css"))
|
|
61
61
|
|
|
62
62
|
this .setup ()
|
|
63
63
|
}
|
|
@@ -717,9 +717,13 @@ module .exports = class Application
|
|
|
717
717
|
|
|
718
718
|
quit ()
|
|
719
719
|
{
|
|
720
|
-
if (!
|
|
720
|
+
if (!this .applicationShouldQuitAfterLastWindowClosed)
|
|
721
721
|
return
|
|
722
722
|
|
|
723
|
+
Template .remove (path .join (__dirname, "../../html/application-template.html"))
|
|
724
|
+
Template .remove (path .join (__dirname, "../../html/document-template.html"))
|
|
725
|
+
Template .remove (path .join (__dirname, "../../themes/default-template.css"))
|
|
726
|
+
|
|
723
727
|
electron .app .quit ()
|
|
724
728
|
}
|
|
725
729
|
}
|
|
@@ -3,31 +3,46 @@ const
|
|
|
3
3
|
path = require ("path"),
|
|
4
4
|
url = require ("url")
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
class Template
|
|
7
7
|
{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
filename = path .resolve (dirname, basename .replace (/-template/, ""))
|
|
8
|
+
static create (template)
|
|
9
|
+
{
|
|
10
|
+
const filename = Template .filename (template)
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
const file = fs .readFileSync (template)
|
|
13
|
+
.toString ()
|
|
14
|
+
.replace (/(url\()(.*?)(\))/sg, Template .resolve)
|
|
15
|
+
.replace (/(href=")(.*?)(")/sg, Template .resolve)
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
fs .writeFileSync (filename, file)
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
}
|
|
19
|
+
return filename
|
|
20
|
+
}
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
{
|
|
25
|
-
|
|
22
|
+
static remove (template)
|
|
23
|
+
{
|
|
24
|
+
fs .unlinkSync (Template .filename (template))
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static filename (template)
|
|
28
|
+
{
|
|
29
|
+
const
|
|
30
|
+
dirname = path .dirname (template),
|
|
31
|
+
basename = path .basename (template),
|
|
32
|
+
filename = path .resolve (dirname, basename .replace (/-template/, ""))
|
|
33
|
+
|
|
34
|
+
return filename
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
static resolve (all, begin, filename, end)
|
|
38
|
+
{
|
|
39
|
+
const match = filename .match (/^.*?\/node_modules\/(.*?)$/)
|
|
26
40
|
|
|
27
|
-
|
|
28
|
-
|
|
41
|
+
if (!match)
|
|
42
|
+
return all
|
|
29
43
|
|
|
30
|
-
|
|
44
|
+
return begin + url .pathToFileURL (require .resolve (match [1])) + end
|
|
45
|
+
}
|
|
31
46
|
}
|
|
32
47
|
|
|
33
|
-
module .exports =
|
|
48
|
+
module .exports = Template
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
<html>
|
|
2
|
-
<head>
|
|
3
|
-
<meta charset="utf-8"/>
|
|
4
|
-
<!-- Theme -->
|
|
5
|
-
<link rel="stylesheet" type="text/css" href="../themes/default.css"/>
|
|
6
|
-
</head>
|
|
7
|
-
<body>
|
|
8
|
-
<tab-group sortable="true">
|
|
9
|
-
<style>
|
|
10
|
-
.etabs .nav {
|
|
11
|
-
height: var(--window-tabs-height);
|
|
12
|
-
background: var(--background-color);
|
|
13
|
-
box-shadow: none;
|
|
14
|
-
border: none;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.etabs .tab {
|
|
18
|
-
background: var(--window-tabs-background-color);
|
|
19
|
-
border-color: var(--border-color) !important;
|
|
20
|
-
padding: 4px 3px;
|
|
21
|
-
color: var(--window-tabs-text-color);
|
|
22
|
-
font-family: var(--sans-serif);
|
|
23
|
-
box-shadow: none;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.etabs .tab.active {
|
|
27
|
-
z-index: 1100;
|
|
28
|
-
background: var(--background-color);
|
|
29
|
-
color: var(--window-tabs-highlight-color);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.etabs::before {
|
|
33
|
-
z-index: 1000;
|
|
34
|
-
content: "";
|
|
35
|
-
position: relative;
|
|
36
|
-
display: block;
|
|
37
|
-
height: 1px;
|
|
38
|
-
width: 100%;
|
|
39
|
-
box-shadow: var(--tabs-shadow);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.etabs .buttons {
|
|
43
|
-
border-color: var(--border-color);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.etabs .buttons:hover button,
|
|
47
|
-
.etabs .tab-close button:hover {
|
|
48
|
-
background: none;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.etabs .buttons button:hover,
|
|
52
|
-
.etabs .tab-close:hover button {
|
|
53
|
-
color: var(--system-gray0);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.etabs .tab-close button {
|
|
57
|
-
visibility: hidden;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.etabs .tab.active .tab-close button,
|
|
61
|
-
.etabs .tab:hover .tab-close button {
|
|
62
|
-
visibility: visible;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.etabs .tab-close {
|
|
66
|
-
margin-left: 4px;
|
|
67
|
-
}
|
|
68
|
-
</style>
|
|
69
|
-
</tab-group>
|
|
70
|
-
</body>
|
|
71
|
-
</html>
|
package/src/html/document.html
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
<html>
|
|
2
|
-
<head>
|
|
3
|
-
<meta charset="utf-8"/>
|
|
4
|
-
<link rel="stylesheet" type="text/css" href="file:///Users/holger/Desktop/X_ITE/sunrize/node_modules/jquery-ui-dist/jquery-ui.min.css"/>
|
|
5
|
-
<link rel="stylesheet" type="text/css" href="file:///Users/holger/Desktop/X_ITE/sunrize/node_modules/qtip2/dist/jquery.qtip.min.css"/>
|
|
6
|
-
<link rel="stylesheet" type="text/css" href="../themes/default.css"/>
|
|
7
|
-
<link rel="stylesheet" data-name="vs/editor/editor.main" href="file:///Users/holger/Desktop/X_ITE/sunrize/node_modules/monaco-editor/min/vs/editor/editor.main.css">
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div id="vertical-splitter" class="vertical-splitter">
|
|
11
|
-
<div class="vertical-splitter-left">
|
|
12
|
-
<div id="horizontal-splitter" class="horizontal-splitter">
|
|
13
|
-
<div class="horizontal-splitter-top">
|
|
14
|
-
<div id="browser-pane">
|
|
15
|
-
<div id="browser-frame">
|
|
16
|
-
<x3d-canvas
|
|
17
|
-
id="browser"
|
|
18
|
-
preserveDrawingBuffer="true"
|
|
19
|
-
splashScreen="false"
|
|
20
|
-
contextMenu="false"
|
|
21
|
-
debug="false"></x3d-canvas>
|
|
22
|
-
</div>
|
|
23
|
-
<div id="secondary-toolbar" class="toolbar vertical-toolbar large-toolbar secondary-toolbar"></div>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
<div class="horizontal-splitter-bottom">
|
|
27
|
-
<div id="footer"></div>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
<div class="vertical-splitter-right">
|
|
32
|
-
<div id="sidebar" class="sidebar"></div>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
</body>
|
|
36
|
-
</html>
|