aboutsummaryrefslogtreecommitdiff
path: root/src/app/index.html
blob: 2305e4c35d04d506ada2bd921196449cb55fb73b (plain)
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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<html>
	<head>
		<meta name="viewport" content="width=device-width,initial-scale=1.0">
		<link rel="stylesheet" href="fonts/import.css">
		<link rel="stylesheet" href="main.css">
		<meta charset="utf-8">
	</head>
	<body>
		<div id="bgHolder"></div>
		<div id="toasts"></div>

		<div id="winbtns">
			<div id="settings" onclick="Settings.toggle(true)"></div>
			<div id="minimize" onclick="ipcRenderer.send('minimize')"></div>
			<div id="close" onclick="ipcRenderer.send('exit')"></div>
		</div>

		<div id="dragUI">
			<div id="dragitems">
				<div id="icon"></div>
				<div id="text">%%gui.mods.dragdrop%%</div>
			</div>
		</div>

		<div id="overlay" onclick="Browser.toggle(false);Settings.toggle(false)"></div>
		<div class="popup" id="options">
			<div class="misc">
				<div style="width:100%"></div>
				<button id="apply" onclick="Settings.toggle(false);Settings.apply()">
					<img src="icons/apply.png">
					%%gui.settings.save%%
				</button>
				<button id="close" onclick="Settings.toggle(false);Settings.load()">
					<img src="icons/close.png">
					%%gui.settings.discard%%
				</button>
			</div>
			<div class="options">
				<h2>%%gui.settings.title.ns%%</h2>
				<div class="option" name="nsargs">
					<div class="text">
						%%gui.settings.nsargs.title%%
						<div class="desc">
							%%gui.settings.nsargs.desc%%
						</div>
					</div>
					<div class="actions">
						<input>
					</div>
				</div>
				<h2>%%gui.settings.title.language%%</h2>
				<div class="option" name="autolang">
					<div class="text">
						%%gui.settings.autolang.title%%
						<div class="desc">
							%%gui.settings.autolang.desc%%
						</div>
					</div>
					<div class="actions">
						<button class="switch off"></button>
					</div>
				</div>
				<div class="option" name="forcedlang">
					<div class="text">
						%%gui.settings.forcedlang.title%%
						<div class="desc">
							%%gui.settings.forcedlang.desc%%
						</div>
					</div>
					<div class="actions">
						<select onchange="Settings.switch(document.querySelector(`.option[name='autolang'] button`), false)">
							<option></option>
						</select>
					</div>
				</div>
				<h2>%%gui.settings.title.updates%%</h2>
				<div class="option" name="autoupdate">
					<div class="text">
						%%gui.settings.autoupdate.title%%
						<div class="desc">
							%%gui.settings.autoupdate.desc%%
						</div>
					</div>
					<div class="actions">
						<button class="switch on"></button>
					</div>
				</div>
				<div class="option" name="nsupdate">
					<div class="text">
						%%gui.settings.nsupdate.title%%
						<div class="desc">
							%%gui.settings.nsupdate.desc%%
						</div>
					</div>
					<div class="actions">
						<button class="switch on"></button>
					</div>
				</div>
				<div class="option" name="excludes" type="array">
					<div class="text">
						%%gui.settings.excludes.title%%
						<div class="desc">
							%%gui.settings.excludes.desc%%
						</div>
					</div>
					<div class="actions">
						<input type="text">
					</div>
				</div>
			</div>
		</div>

		<div class="popup" id="browser">
			<div class="overlay" id="filters">
				<div class="checks">
					<div class="check checked" value="Mods">%%gui.browser.filter.mods%%</div>
					<div class="check checked" value="Skins">%%gui.browser.filter.skins%%</div>
					<div class="check checked" value="Client-side">%%gui.browser.filter.client%%</div>
					<div class="check" value="Server-side">%%gui.browser.filter.server%%</div>
				</div>
			</div>

			<div class="misc">
				<input id="search" placeholder="%%gui.browser.search%%">
				<button id="filter" onclick="Browser.filters.toggle()">
					<img src="icons/filter.png">
				</button>
				<button id="close" onclick="Browser.toggle(false)">
					<img src="icons/close.png">
				</button>
			</div>
			<div id="browserEntries">
				<div class="loading">%%gui.browser.loading%%</div>
			</div>
		</div>
		<div class="popup small" id="preview">
			<div class="misc fixed vertical">
				<button id="close" onclick="Preview.hide()">
					<img src="icons/close.png">
				</button>
				<button id="external" onclick="">
					<img src="icons/external.png">
				</button>
			</div>
			<webview></webview>
		</div>
		
		<nav class="gamesContainer">
			<button id="vpBtn" onclick="page(0)"></button>
			<button id="nsBtn" onclick="page(1)"></button>
			<button id="tfBtn" onclick="page(2)"></button>
		</nav>

		<div class="mainContainer">
			<div id="vpContent" class="contentContainer">
				<ul class="contentMenu">
					<li id="vpMainBtn" active onclick="showVpSection('main')">%%viper.menu.main%%</li>
					<li id="vpReleaseBtn" onclick="showVpSection('release')">%%viper.menu.release%%</li>
					<li id="vpInfoBtn" onclick="showVpSection('info')">%%viper.menu.info%%</li>
				</ul>
				<div class="contentBody">
					<div id="vpMain" class="section">
						<img src="icons/viper.png"/>
						<div class="inline" style="margin-top: 20px;">
							<div id="vpversion"></div> |
							<a id="setpath" href="#" onclick="setpath()">%%gui.setpath%%</a>
						</div>
					</div>
					<div id="vpReleaseNotes" class="hidden section"></div>
					<div id="vpInfo" class="hidden section">
						<h2>%%viper.menu.info.links%%</h2>
						<ul>
							<li>%%viper.info.discord%% <a href="https://northstar.tf/discord">northstar.tf/discord</a></li>
							<li>%%viper.info.issues%% <a href="https://github.com/0neGal/viper/issues">github.com/0neGal/viper/issues</a></li>
						</ul>
						<h2>%%viper.menu.info.credits%%</h2>
						<ul>
							<li>Viper Logo: Imply#9781</li>
							<li>Viper Background: <a href="https://www.reddit.com/r/titanfall/comments/fwuh2x/take_to_the_skies">Uber Panzerhund</a></li>
							<li>Titanfall+Northstar Logo: <a href="https://www.steamgriddb.com/logo/47851">Aftonstjarma</a></li>
						</ul>
					</div>
				</div>
			</div>

			<div id="nsContent" class="contentContainer">
				<ul class="contentMenu">
					<li id="nsMainBtn" active onclick="showNsSection('main')">%%ns.menu.main%%</li>
					<li id="nsModsBtn" onclick="showNsSection('mods')">%%ns.menu.mods%%</li>
					<li id="nsReleaseBtn" onclick="showNsSection('release')">%%ns.menu.release%%</li>
				</ul>
				<div class="contentBody">
					<div id="nsMain" class="section">
						<div class="img"><img src="../assets/ns.png"></div>
						<div class="playBtnContainer">
							<button id="playNsBtn" class="playBtn" onclick="launch()">%%gui.launch%%</button>
							<div class="inline">
								<div id="nsversion"></div>
								<a id="update" href="#" onclick="update()">(%%gui.update.check%%)</a>
								<div id="serverstatus" class="checking"></div>
							</div>
						</div>
					</div>
					<div id="nsMods" class="hidden section">
						<div id="modsdiv">
						</div>
						<div class="line">
							<div class="text" id="modcount">%%gui.mods%%</div>
							<div class="buttons modbtns">
								<button id="removemod" onclick="selected().remove()">%%gui.mods.remove%%</button>
								<button id="removeall" onclick="selected(true).remove()">%%gui.mods.removeall%%</button>
								<button id="togglemod" onclick="selected().toggle()">%%gui.mods.toggle%%</button>
								<button id="toggleall" onclick="selected(true).toggle(true)">%%gui.mods.toggleall%%</button>
								<button id="installmod" onclick="installmod()">%%gui.mods.install%%</button>
								<button id="findmod" onclick="Browser.toggle(true)">%%gui.mods.find%%</button>
							</div>
						</div>
					</div>
					<div id="nsRelease" class="hidden section"></div>
				</div>
			</div>

			<div id="tfContent" class="contentContainer">
				<ul class="contentMenu"><li style="opacity:0.0">filler</li></ul>
				<div class="contentBody">
					<div class="section">
						<div class="img"><img src="../assets/vanilla.png"></div>
						<div class="playBtnContainer">
							<button class="playBtn" onclick="launchVanilla()">%%gui.launch%%</button>
							<div id="tf2Version"></div>
						</div>
					</div>
				</div>
			</div>
		</div>

		<script src="lang.js"></script>
		<script src="main.js"></script>
		<script src="toast.js"></script>
		<script src="browser.js"></script>
		<script src="settings.js"></script>
		<script src="launcher.js"></script>
	</body>
<