-
Notifications
You must be signed in to change notification settings - Fork 3
/
ux.html
53 lines (48 loc) · 1.79 KB
/
ux.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="ux.css">
<title>Editor</title>
</head>
<body>
<div class="menu" id="menu">
<span class="button">Menu</span>
<span class="button" onclick="gun.get('functions').get('add').once(pull)">Browse <input type="text" name="browse" value="AXE:dAppname"></span>
<span class="button">Edit</span>
<span class="button">Insert</span>
<span class="button" onclick="createView()">Create a new view</span>
<span class="button" onclick="push()">Publish</span>
</div>
<div class="container" id="cont">
</div>
</body>
<script src="https://cdn.jsdelivr.net/npm/gun/gun.js"></script>
<!-- SETUP -->
<script type="text/javascript">
var peers = ['http://18.222.4.31:8765/gun']
var gun = Gun({peers:peers, /*localStorage: false, radisk:false*/});
var script = gun.get('script');
script.map().once(inject);
function inject (obj, key) {
console.log(key, obj);
var scr = document.createElement('script');
scr.setAttribute('date', obj.date);
scr.setAttribute('version', obj.version);
scr.setAttribute('createdBy', obj.creator);
scr.innerHTML = obj.script;
document.all[0].appendChild(scr);
}
</script>
<!-- LIBRARIES -->
<script src="lib/_helpers.js" charset="utf-8"></script>
<script src="lib/typehierarchy.js" charset="utf-8"></script>
<script src="lib/thing.js" charset="utf-8"></script>
<script src="lib/relation.js" charset="utf-8"></script>
<script src="lib/graphToHtml.js" charset="utf-8"></script>
<script src="lib/join.js" charset="utf-8"></script>
<script src="lib/stores.js" charset="utf-8"></script>
<!-- PLAYGROUND
<script src="gOps.js" charset="utf-8"></script>
-->
</html>