aboutsummaryrefslogtreecommitdiff
path: root/src/app/index.html
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2024-06-08 18:02:48 +0200
committer0neGal <mail@0negal.com>2024-06-08 18:02:48 +0200
commitdbd8c6b152acc1188d2edd288488aa2da8f6310b (patch)
treeef5a1752e845a274c889ee18207c3a25e8290b23 /src/app/index.html
parent3904a4492f72ef9a9fd531c0b81f3711541c97e0 (diff)
downloadViper-dbd8c6b152acc1188d2edd288488aa2da8f6310b.tar.gz
Viper-dbd8c6b152acc1188d2edd288488aa2da8f6310b.zip
initial commit to better modularize frontend
Far from done, but this pretty much splits everything inside `src/app/main.js` into separate files.
Diffstat (limited to 'src/app/index.html')
-rw-r--r--src/app/index.html42
1 files changed, 20 insertions, 22 deletions
diff --git a/src/app/index.html b/src/app/index.html
index 016b708..87a1029 100644
--- a/src/app/index.html
+++ b/src/app/index.html
@@ -12,7 +12,7 @@
<div id="toasts"></div>
<div id="winbtns">
- <div id="settings" tooltip="%%tooltip.settings%%" tooltip-position="horizontal" onclick="Settings.toggle()">
+ <div id="settings" tooltip="%%tooltip.settings%%" tooltip-position="horizontal" onclick="settings.popup.toggle()">
<img src="icons/settings.png">
</div>
<div id="minimize" tooltip="%%tooltip.minimize%%" tooltip-position="horizontal" onclick="ipcRenderer.send('minimize')">
@@ -34,11 +34,11 @@
<div class="popup" id="options">
<div class="misc">
<input class="search" placeholder="%%gui.search%%">
- <button id="apply" onclick="Settings.apply();Settings.toggle(false)">
+ <button id="apply" onclick="settings.popup.apply();settings.popup.toggle(false)">
<img src="icons/apply.png">
%%gui.settings.save%%
</button>
- <button id="close" onclick="Settings.toggle(false);Settings.load()">
+ <button id="close" onclick="settings.popup.toggle(false);settings.popup.load()">
<img src="icons/close.png">
%%gui.settings.discard%%
</button>
@@ -91,7 +91,7 @@
</div>
</div>
<div class="actions">
- <select onchange="Settings.switch(document.querySelector(`.option[name='autolang'] button`), false)">
+ <select onchange="settings.popup.switch(document.querySelector(`.option[name='autolang'] button`), false)">
<option></option>
</select>
</div>
@@ -147,9 +147,9 @@
</div>
</div>
<div class="actions">
- <button onclick="delete_request_cache()">%%gui.settings.updatebuttons.buttons.reset_cached_api_requests%%</button>
- <button onclick="force_update_ns()" class="disable-when-installing">%%gui.settings.updatebuttons.buttons.force_northstar_reinstall%%</button>
- <button onclick="delete_install_cache()" class="disable-when-installing">%%gui.settings.updatebuttons.buttons.force_delete_install_cache%%</button>
+ <button onclick="request.delete_cache()">%%gui.settings.updatebuttons.buttons.reset_cached_api_requests%%</button>
+ <button onclick="update.ns(true)" class="disable-when-installing">%%gui.settings.updatebuttons.buttons.force_northstar_reinstall%%</button>
+ <button onclick="update.delete_cache()" class="disable-when-installing">%%gui.settings.updatebuttons.buttons.force_delete_install_cache%%</button>
</div>
</div>
</details>
@@ -181,12 +181,12 @@
</div>
</div>
<div class="actions">
- <button onclick="relaunch()">%%gui.settings.miscbuttons.buttons.restart_viper%%</button>
- <button onclick="reset_config()">%%gui.settings.miscbuttons.buttons.reset_config%%</button>
- <button onclick="open_gamepath()">%%gui.settings.miscbuttons.buttons.open_gamepath%%</button>
- <button onclick="kill_game()">%%gui.settings.miscbuttons.buttons.force_quit_game%%</button>
- <button onclick="kill_origin()">%%gui.settings.miscbuttons.buttons.force_quit_origin%%</button>
- <button onclick="setpath()" class="disable-when-installing">%%gui.settings.miscbuttons.buttons.change_gamepath%%</button>
+ <button onclick="process.relaunch()">%%gui.settings.miscbuttons.buttons.restart_viper%%</button>
+ <button onclick="settings.reset()">%%gui.settings.miscbuttons.buttons.reset_config%%</button>
+ <button onclick="gamepath.open()">%%gui.settings.miscbuttons.buttons.open_gamepath%%</button>
+ <button onclick="kill('game')">%%gui.settings.miscbuttons.buttons.force_quit_game%%</button>
+ <button onclick="kill('origin')">%%gui.settings.miscbuttons.buttons.force_quit_origin%%</button>
+ <button onclick="gamepath.set()" class="disable-when-installing">%%gui.settings.miscbuttons.buttons.change_gamepath%%</button>
</div>
</div>
</details>
@@ -247,7 +247,7 @@
<img src="icons/viper.png"/>
<div class="inline" style="margin-top: 20px;">
<div id="vpversion"></div> |
- <a id="setpath" href="#" onclick="setpath()" class="disable-when-installing">%%gui.setpath%%</a>
+ <a id="setpath" href="#" onclick="gamepath.set()" class="disable-when-installing">%%gui.setpath%%</a>
</div>
</div>
<div id="vpReleaseNotes" class="hidden section"></div>
@@ -277,10 +277,10 @@
<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>
+ <button id="playNsBtn" class="playBtn" onclick="launch('northstar')">%%gui.launch%%</button>
<div class="inline">
<div id="nsversion"></div>
- <a id="update" href="#" onclick="updateNorthstar()" class="disable-when-installing">(%%gui.update.check%%)</a>
+ <a id="update" href="#" onclick="update.ns()" class="disable-when-installing">(%%gui.update.check%%)</a>
<div id="serverstatus" class="checking"></div>
</div>
</div>
@@ -298,7 +298,7 @@
<img src="icons/toggles.png">
%%gui.mods.toggle_all%%
</button>
- <button id="installmod" class="bg-blue" onclick="installmod()">
+ <button id="installmod" class="bg-blue" onclick="mods.install_prompt()">
<img src="icons/downloads.png">
%%gui.mods.install%%
</button>
@@ -320,10 +320,11 @@
<div class="section">
<div class="img"><img src="../assets/vanilla.png"></div>
<div class="playBtnContainer">
- <button class="playBtn" onclick="launchVanilla()">%%gui.launch%%</button>
+ <button class="playBtn" onclick="launch('vanilla')">%%gui.launch%%</button>
<div class="inline">
<div id="tf2Version"></div>
- <a id="tfquit" style="display: none" href="#" onclick="kill_game()">(%%ns.menu.force_quit%%)</a>
+ <a id="tfquit" style="display: none"
+ href="#" onclick="kill('game')">(%%ns.menu.force_quit%%)</a>
</div>
</div>
</div>
@@ -331,16 +332,13 @@
</div>
</div>
- <script src="lang.js"></script>
<script src="main.js"></script>
<script src="js/misc.js"></script>
<script src="js/mods.js"></script>
<script src="js/toast.js"></script>
- <script src="js/events.js"></script>
<script src="js/popups.js"></script>
<script src="js/tooltip.js"></script>
<script src="js/browser.js"></script>
- <script src="js/settings.js"></script>
<script src="js/launcher.js"></script>
</body>
</html>