This repository has been archived by the owner on Dec 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
167 lines (157 loc) · 6.96 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<title>VTT Desktop Client</title>
<script src="https://kit.fontawesome.com/d9351ab632.js" crossorigin="anonymous"></script>
<!-- <link rel="stylesheet" href="src/style.css">-->
</head>
<body>
<script>
function toggleConfigureGame(e) {
e.target.closest('.game-item').querySelector('.user-configuration').classList.toggle('hidden');
}
function toggleConfigureApp() {
document.querySelector('.app-configuration').classList.toggle('hidden2');
}
function toggleHelp() {
document.querySelector('.help').classList.toggle('hidden2');
}
function toggleExportConfig() {
(async () => {
let config = await window.api.localAppConfig();
let code = document.getElementById("export-text");
let text = JSON.stringify(config, null, 4);
let txt = document.createTextNode(text);
code.appendChild(txt);
})();
document.querySelector('.config-export').classList.toggle('hidden2');
}
function copyText() {
navigator.clipboard.writeText(text);
}
</script>
<div class="content">
<div class="button-controls">
<button onclick="toggleConfigureApp()"><i class="fa-solid fa-gear"></i></button>
<button onclick="toggleHelp()"><i class="fa-solid fa-question-circle"></i></button>
<button onclick="toggleExportConfig()"><i class="fa-solid fa-file-export"></i></button>
</div>
<div class="update-available hidden2">
<a id="download-new" href="https://github.com/theripper93/fvtt-player-client/releases/latest" target="">Update Available!</a><span id="current-version"></span> → <span id="latest-version"></span>
</div>
<section class="menu-container">
<div class="help hidden2">
<table>
<tr>
<th>Control</th>
<th>Action</th>
</tr>
<tr>
<td><kbd>Ctrl</kbd> + <kbd>R</kbd> or <kbd>F5</kbd></td>
<td>Reload</td>
</tr>
<tr>
<td><kbd>Ctrl</kbd> + <kbd>⇧Shift</kbd> + <kbd>R</kbd> or <kbd>Ctrl</kbd> + <kbd>F5</kbd></td>
<td>Hard Reload</td>
</tr>
<tr>
<td><kbd>Ctrl</kbd> + <kbd>+</kbd> or <kbd>Ctrl</kbd> + <kbd>⇧Shift</kbd> + <kbd>+</kbd></td>
<td>Zoom In</td>
</tr>
<tr>
<td><kbd>Ctrl</kbd> + <kbd>-</kbd></td>
<td>Zoom Out</td>
</tr>
<tr>
<td><kbd>Ctrl</kbd> + <kbd>0</kbd></td>
<td>Reset Zoom</td>
</tr>
<tr>
<td><kbd>F11</kbd></td>
<td>Fullscreen</td>
</tr>
<tr>
<td><kbd>Ctrl</kbd> + <kbd>⇧Shift</kbd> + <kbd>I</kbd> or <kbd>F12</kbd></td>
<td>Developer Console</td>
</tr>
</table>
</div>
<div class="app-configuration hidden2">
<div class="background-color-field field">
<label for="background-color">Background Color</label>
<input type="color" id="background-color">
</div>
<div class="text-color-field field">
<label for="text-color">Text Color</label>
<input type="color" id="text-color" class="no-text">
</div>
<div class="accent-color-field field">
<label for="accent-color">Accent Color</label>
<input type="color" id="accent-color" class="no-text">
</div>
<div class="background-image-field">
<input type="text" placeholder="Background Image" id="background-image" value="">
</div>
<div class="cache-path-field">
<input type="text" placeholder="Cache Path" id="cache-path" value="">
</div>
<div class="cache-path-field field">
<label for="clear-cache-on-close">Clear Cache on close</label>
<input id="clear-cache-on-close" class="no-text" type="checkbox">
</div>
<div class="insecure-ssl-field field">
<label for="clear-cache-on-close">Ignore Certificate errors</label>
<input class="no-text" id="insecure-ssl" type="checkbox">
</div>
<div class="button-group">
<button id="clear-cache">Clear Cache</button>
<button id="save-app-config">Save</button>
</div>
</div>
<div class="config-export hidden2">
<h3>Put this in your <code>config.json</code> file to include it installation-wide:</h3>
<pre><code id="export-text"></code></pre>
<button onclick="copyText()">Copy</button>
<button onclick="toggleExportConfig()">Close</button>
</div>
</section>
<ul id="game-list">
<template id="game-item-template">
<li class="game-item">
<div class="game-title-bar">
<button class="game-button"><a>GameName</a></button>
<button class="configure-game" onclick="toggleConfigureGame(event)"><i
class="fa-solid fa-gear"></i></button>
</div>
<div class="user-configuration hidden">
<div class="user-name-field">
<input type="text" placeholder="User Name" id="user-name" value="">
</div>
<div class="user-password-field">
<input type="password" placeholder="Password" id="user-password" value="">
</div>
<div class="admin-password-field">
<input type="password" placeholder="Admin Password" id="admin-password" value="">
</div>
<div class="button-group">
<button id="save-user-data">Save</button>
<button id="delete-game">Delete</button>
</div>
</div>
</li>
</template>
</ul>
<div id="add-game-wrapper">
<input type="text" name="" id="game-name" placeholder="Name">
<input type="text" name="" id="game-url" placeholder="URL">
<button id="add-game">Add Game</button>
</div>
<div id="info">Node.js <span id="node-version"></span>,
Chromium <span id="chrome-version"></span>,
Electron <span id="electron-version"></span></div>
</div>
<script type="module" src="/src/renderer.ts"></script>
</body>
</html>