-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
230 lines (204 loc) · 5.42 KB
/
index.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<html>
<head>
<title>BeContracts MANAGER</title>
</head>
<body>
<div id="app"></div>
</body>
</html>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="libraries/sha256.js"></script>
<script src="libraries/cryptico.js"></script>
<script src="libraries/vue.js"></script>
<script src="components/component-auth.js"></script>
<script src="components/component-uploader.js"></script>
<script src="components/component-form.js"></script>
<script src="components/component-contracts.js"></script>
<script src="components/component-more-info.js"></script>
<script src="components/component-dialog-message.js"></script>
<script src="components/component-targeter.js"></script>
<script src="components/component-market.js"></script>
<script src="components/component-gtm.js"></script>
<script src="mixins/manager.js"></script>
<script src="mixins/contracts-api.js"></script>
<script src="mixins/contracts-methods.js"></script>
<script src="mixins/generators.js"></script>
<script src="mixins/indexDB.js"></script>
<script>
let App = {
el: '#app',
template: `
<div id="app">
<div class="custom-header" @click="$root.tooglePanels(); $root.addToDb()">
<h1>⎌beContract MANAGER</h1>
<div class="sub-custom-header">Create smart economy now!</div>
</div>
<div id="RTA_board" :class="app.boardCss">
<div class="custom-content flex">
<div class="f200 menu">
<div v-if="!user.RSA" class="message field-message">
First, authenticate user!
</div>
<!-- auth -->
<h2>Authentication</h2>
<component-auth/>
<!-- menu -->
<div class="items">
<div
:class="['board_menu_item',{'active' : (item.component==app.bodyContent.tpl)}]"
v-for="(item, index) in app.boardMenu"
v-on:click="app.bodyContent.tpl=item.component">
{{item.label}}
</div>
</div>
</div>
<div class="fminus200">
<!-- Contracts area -->
<component
ref="app.bodyContent"
:me="app.bodyContent.me"
:is="app.bodyContent.tpl"
/>
</div>
</div>
</div>
<!-- right bar -->
<div
id="RTA_sidebar"
v-if="app.rightBar.tpl">
<!-- Sidebar HEADER -->
<div id="RTA_sidebar_header">
<h1>
Title <span
@click="app.rightBar.tpl=false; app.boardCss.remove('minus20');"
class="xclose">X</span>
</h1>
<div class="rta_sidebar_header_subtitle">
Subtitle
</div>
</div>
<component
ref="app.rightBar"
:me="app.rightBar.me"
:is="app.rightBar.tpl"
/>
</div>
<div class="custom-footer">
<a href="#">Dont readme</a>
</div>
<div
id="dialog"
:class="app.dialog.class"
v-if="app.dialog.tpl">
<span @click="app.dialog.tpl=false" class="xclose">X</span>
<h2>Dialog message</h2>
<component
id="dialog-body"
ref="app.dialog"
:me="app.dialog.me"
:is="app.dialog.tpl"
/>
<div class="dialog-decorator"></div>
</div>
<component
v-if="app.targeter.tpl"
id="targeter"
ref="app.targeter"
:me="app.targeter.me"
:is="app.targeter.tpl"
/>
</div>
`,
data () {
return {
app: {
RSA: null,
publicKey: null,
storageContracts: JSON.parse(
localStorage.getItem('contracts')) || [],
boardCss: ['boxscroll'],
boardMenu:[
{
label:'My Contracts',
component: 'component-contracts'
},
{
label:'Contracts Market',
component: 'component-market'
},
{
label:'GTM manager (job)',
component: 'component-gtm'
}
],
bodyContent: {
tpl: 'component-contracts',
me: null,
},
rightBar: {
tpl: false,
me: {},
},
dialog:{
tpl: false,
class: [],
me: {},
},
targeter:{
tpl: false,
me: {},
}
},
user:{
RSA: null,
publicKey: null,
login: null,
email: null,
},
falseMessages:{
'not_auth' : 'Please finish authentication as user.',
'shema_sign' : 'Contract is active now.',
'not_active_contract': 'To activate this contact, create owner signature.',
'access_locked': 'Access locked. Auth as contract owner.',
},
db:{
instance:null,
request:null,
}
}
},
mixins : [
// indexDB,
manager,
contractMethods,
contractApi,
generators
],
methods: {
/* ## active contract have signed email data and login data */
/* ## contract attachment names mustbe unique */
/* ## dataLayer objects in values have only arrays types */
},
};
let AppInstance = new Vue(App);
/* confirm reaload page */
// window.addEventListener('beforeunload', function (e) {
// e.preventDefault();
// e.returnValue = '';
// });
Array.prototype.remove = function() {
var what, a = arguments, L = a.length, ax;
while (L && this.length) {
what = a[--L];
while ((ax = this.indexOf(what)) !== -1) {
this.splice(ax, 1);
}
}
return this;
};
</script>
<div style="margin:0 20%; line-height:2.5em; letter-spacing: 8px;">
<h1> /* dont README */
/* now its depreciated - load app folder as chrome extention */
</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>