-
Notifications
You must be signed in to change notification settings - Fork 0
/
Homescreen.html
224 lines (220 loc) · 9.91 KB
/
Homescreen.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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="css/materialize.min.css" media="screen,projection" />
<link rel="stylesheet" href="stylesheet.css">
<link rel="stylesheet" href="material-icons.css">
<link rel="stylesheet" href="css/animation.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>OpenSourceSync</title>
</head>
<body>
<div id="app" class="content">
<div id="sidebar">
<a href="#" v-on:click="homeClick" class="waves-effect waves-light btn">
<div class="bdiv">
<i class="material-icons">home</i>
<p>Home</p>
</div>
</a>
<a href="#" v-on:click="connectClick" class="waves-effect waves-light btn">
<div class="bdiv">
<i class="material-icons">network_wifi</i>
<p>Connectivity</p>
</div>
</a>
<a href="#" v-on:click="bindingsClick" class="waves-effect waves-light btn">
<div class="bdiv">
<i class="material-icons">keyboard</i>
<p>Shortcuts</p>
</div>
</a>
<a href="#" v-on:click="securityClick" class="waves-effect waves-light btn">
<div class="bdiv">
<i class="material-icons">security</i>
<p>Security</p>
</div>
</a>
<a href="#" v-on:click="downloadClick" class="waves-effect waves-light btn">
<div class="bdiv">
<i class="material-icons">archive</i>
<p>Downloads</p>
</div>
</a>
</div>
<div class="main">
<div v-if="homeP" class="main-content">
<div class="valign-wrapper">
<img src="./images/logo.png">
<h2>Welcome to OpenSourceSync</h2>
</div>
<br/>
<<<<<<< Updated upstream
<a href="#" class="waves-effect waves-light btn">Start</a>
<a href="#" class="waves-effect waves-light btn" v-on:click="destroyConnections">Stop</a>
=======
<a href="#" v-on:click="resumeOSS" class="waves-effect waves-light btn">Start</a>
<a href="#" v-on:click="stopOSS" class="waves-effect waves-light btn">Stop</a>
>>>>>>> Stashed changes
<div class="footer">
<p>Status: {{ connectionState }}</p>
</div>
</div>
<div v-if="connectP" class="main-content">
<div class="fixed-content">
<div v-if="connectedList.length > 0">
<p>Rearrange Connected Devices</p>
<div class="center-align">
<ul v-sortable class="center-align row">
<draggable v-model="connectedList">
<li style="margin-bottom:1%;" v-for="item in connectedList" class="col s2">
<i style="font-size: 3vw;" class="material-icons">desktop_windows</i>
<br/>
{{item.name}}
<br/>
{{item.ip}}
<br/>
</li>
</draggable>
</ul>
</div>
</div>
<br/>
<p>List of Connected Devices</p>
<table class="highlight centered">
<thead>
<tr>
<th>PC Name</th>
<th>IP Address</th>
</tr>
</thead>
<tbody>
<tr v-for="item in connectedList">
<td> {{item.name}} </td>
<td> {{item.ip}} </td>
</tr>
</tbody>
</table>
<br/>
<transition name="slide">
<div v-if="loading" class="sk-folding-cube">
<div class="sk-cube1 sk-cube"></div>
<div class="sk-cube2 sk-cube"></div>
<div class="sk-cube4 sk-cube"></div>
<div class="sk-cube3 sk-cube"></div>
</div>
</transition>
<a href="#" v-on:click="searchDevices" class="waves-effect waves-light btn" style="width:100%;">Add or Remove a PC</a>
</div>
<div class="footer">
<p>Status: {{ connectionState }}</p>
</div>
</div>
<div v-if="bindingsP" class="main-content">
<div class="container">
<br/>
<table class="highlight centered">
<thead>
<tr>
<th>Action</th>
<th>Key Binding</th>
</tr>
</thead>
<tbody>
<tr class="bindingRow" v-for="item in bindingList">
<td> {{item.action}} </td>
<td contenteditable="true">
<input v-model="item.binding">
</td>
</tr>
</tbody>
</table>
<br/>
<button class="waves-effect waves-light btn" style="width: 80%;" v-on:click="updateKeys"> Apply Changes </button>
</div>
<div class="footer">
<p>Status: {{ connectionState }}</p>
</div>
</div>
<div v-if="selectingP" class="main-content">
<div class="container">
<br/>
<table class="highlight centered">
<thead>
<tr>
<th>PC Name</th>
<th>IP Address</th>
<th></th>
</tr>
</thead>
<tbody>
<tr v-for="item in selectList">
<td> {{item.name}} </td>
<td> {{item.ip}} </td>
<td>
<a href="#" class="waves-effect waves-light btn" v-if="!(connected(item.ip))" v-on:click="addSelected(item)">Add</a>
<a href="#" class="waves-effect waves-light btn" v-if="connected(item.ip)" v-on:click="removeSelected(item)">Remove</a>
</td>
</tr>
</tbody>
</table>
<br/>
<a href="#" v-on:click="connectClick" class="waves-effect waves-light btn" style="width:100%;">Back</a>
</div>
<div class="footer">
<p>Status: {{ connectionState }}</p>
</div>
</div>
<div v-if="securityP" class="main-content">
<p>Password</p>
<a href="#" class="waves-effect waves-light btn" v-on:click="showPassword">Show</a>
<a href="#" class="waves-effect waves-light btn" v-on:click="setPassword">Change</a>
<br/>
<p>SSL Encryption</p>
<button class="waves-effect waves-light btn" style="width: 80%;" v-on:click="toggleSSL"> {{ sslState }} </button>
<div class="footer">
<p>Status: {{ connectionState }}</p>
</div>
</div>
<div v-if="downloadP" class="main-content">
<div class="container" style="max-height: 75%; overflow-y: auto;">
<br/>
<table class="highlight centered">
<thead>
<tr>
<th>Filename</th>
<th>Size</th>
<th></th>
</tr>
</thead>
<tbody>
<tr v-for="item in uiFilesAvailableList">
<td> {{item.filename}} </td>
<td> {{item.fileSize}} </td>
<td>
<a href="#" class="waves-effect waves-light btn" v-on:click="downloadSelected(item)">Save</a>
</td>
</tr>
</tbody>
</table>
</div>
<div class="footer">
<p>Status: {{ connectionState }}</p>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="js/vue.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<script>
window.$ = window.jQuery = require('./jquery.min.js');
const { ipcRenderer } = require('electron');
ipcRenderer.on('sendToRenderer', (event, arg) => {
//console.log("File drop event recieved for file IN HOMESCREEN: ", arg)
handleFileDropEventInRenderer(arg);
});
</script>
<script type="text/javascript" src="./hammer.min.js"></script>
<script type="text/javascript" src="js/materialize.min.js"></script>
</body>
</html>