GrassClipper/resources/index.html

354 lines
14 KiB
HTML
Raw Normal View History

2022-04-19 23:54:36 +00:00
<!DOCTYPE html>
2022-04-19 23:33:59 +00:00
<html>
2022-04-19 23:54:36 +00:00
<head>
<link rel="stylesheet" type="text/css" href="style/index.css" />
2022-04-28 04:17:22 +00:00
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
2022-04-20 01:12:56 +00:00
<script src="js/neutralino.js"></script>
2022-05-08 02:44:07 +00:00
<script src="js/init.js"></script>
2022-04-21 01:16:36 +00:00
<script src="js/windowDrag.js"></script>
<script src="js/hoverEvt.js"></script>
<script src="js/helpers.js"></script>
2022-04-20 01:12:56 +00:00
<script src="js/index.js"></script>
2022-05-08 03:49:45 +00:00
<script src="js/debug.js"></script>
2022-05-02 02:09:10 +00:00
<script src="js/gcdownloader.js"></script>
<script src="js/onLoad.js"></script>
2022-05-04 04:06:01 +00:00
<script src="js/alerts.js"></script>
<script src="js/options.js"></script>
2022-04-27 03:17:29 +00:00
<script src="js/login.js"></script>
2022-04-27 05:15:06 +00:00
<script src="js/authAlert.js"></script>
<script src="js/translation.js"></script>
2022-04-19 23:54:36 +00:00
</head>
<body>
2022-05-04 04:06:01 +00:00
<!-- Alert Box -->
<div id="alert">
<span id="alertText">This is a test alert</span>
</div>
2022-05-06 01:16:15 +00:00
<!-- Misc dialog -->
<div id="miscDialog" style="display: none">
<span id="dialogTitle">Dialog!</span>
<span id="dialogContent">This is dialog content!</span>
<div id="dialogBtns">
<button class="altBtn" id="dialogButtonAffirm">OK</button>
<button class="altBtn" id="dialogButtonNeg">NO</button>
</div>
</div>
2022-04-27 00:29:34 +00:00
<!-- First time setup -->
<div id="firstTimeNotice" style="display: none">
2022-04-22 00:05:00 +00:00
<span>
</span>
<div id="firstTimeBtns">
<button class="playBtn" id="firstTimeInstallBtn" onclick="runInstallScript()">Install</button>
<button class="altBtn" id="firstTimeDenyBtn" onclick="closeFirstTimePopup()">No thanks</button>
2022-04-22 00:05:00 +00:00
</div>
</div>
2022-04-27 00:29:34 +00:00
2022-04-27 00:55:16 +00:00
<!-- Login popup -->
2022-04-27 01:34:20 +00:00
<div id="loginPanel" style="display: none;">
2022-04-27 00:55:16 +00:00
<div id="loginPopupTitle">
<span>
2022-04-27 03:17:29 +00:00
<span id="loginSectionTitle" class="selectedTitle" onclick="setLoginSection()">Login</span>
<span id="registerSectionTitle" onclick="setRegisterSection()">Register</span>
2022-04-27 00:55:16 +00:00
</span>
2022-04-27 01:34:20 +00:00
<div id="loginPopupCloseBtn" onclick="closeLogin()">
2022-04-27 00:55:16 +00:00
<img src="icons/close.svg" />
</div>
</div>
2022-04-27 03:17:29 +00:00
<!-- Login section -->
<div id="loginPopupContentBody" class="authBody">
2022-04-27 00:55:16 +00:00
<div id="loginPopupContentBodyText">
2022-04-27 01:34:20 +00:00
<span id="loggingInTo">
2022-04-27 21:28:58 +00:00
<span id="loggingInToIndicator">Logging in to </span><span id="loginPopupServer"></span>
2022-04-27 00:55:16 +00:00
</span>
</div>
2022-04-27 03:17:29 +00:00
<div id="loginPopupContentBodyInputs" class="authInputs">
2022-04-27 00:55:16 +00:00
<div id="loginPopupContentBodyInputsUsername">
2022-04-27 21:28:58 +00:00
<span id="loginUsernameIndicator">
2022-04-27 00:55:16 +00:00
Username:
</span>
<input type="text" id="loginUsername" />
</div>
<div id="loginPopupContentBodyInputsPassword">
2022-04-27 21:28:58 +00:00
<span id="loginPasswordIndicator">
2022-04-27 00:55:16 +00:00
Password:
</span>
2022-04-27 03:17:29 +00:00
<input type="password" id="loginPassword" onsubmit="login()" />
2022-04-27 00:55:16 +00:00
</div>
</div>
<div id="loginPopupContentBodyBtns">
<button class="playBtn" id="loginPopupContentBodyBtnLogin" onclick="login()">Login</button>
<button class="altBtn" id="loginPopupContentBodyBtnRegister" onclick="setRegisterSection(true)">Register</button>
2022-04-27 00:55:16 +00:00
</div>
2022-04-27 01:34:20 +00:00
<div>
<button class="altBtn" id="noLoginBtn" onclick="(() => { launchPrivate(); closeLogin()})()">
Launch without Authentication
</button>
</div>
2022-04-27 05:15:06 +00:00
<!-- Alert element for any problems that arise -->
<div id="loginAlert" style="display: none">
<img src="icons/alert.svg" />
<span id="loginAlertText"></span>
</div>
2022-04-27 00:55:16 +00:00
</div>
2022-04-27 03:17:29 +00:00
<!-- Register section -->
<div id="registerPopupContentBody" style="display: none" class="authBody">
<div id="registerPopupContentBodyText">
<span id="registeringTo">
2022-04-27 21:28:58 +00:00
<span id="registeringToIndicator">Registering for </span><span id="registerPopupServer"></span>
2022-04-27 03:17:29 +00:00
</span>
</div>
<div id="registerPopupContentBodyInputs" class="authInputs">
<div id="registerPopupContentBodyInputsUsername">
2022-04-27 21:28:58 +00:00
<span id="registerUsernameIndicator">
2022-04-27 03:17:29 +00:00
Username:
</span>
<input type="text" id="registerUsername" />
</div>
<div id="registerPopupContentBodyInputsPassword">
2022-04-27 21:28:58 +00:00
<span id="registerPasswordIndicator">
2022-04-27 03:17:29 +00:00
Password:
</span>
<input type="password" id="registerPassword" />
</div>
<div id="registerPopupContentBodyInputsPasswordConfirm">
2022-04-27 21:28:58 +00:00
<span id="registerConfirmIndicator">
2022-04-27 03:17:29 +00:00
Confirm Password:
</span>
<input type="password" id="registerPasswordConfirm" />
</div>
</div>
<div id="registerPopupContentBodyBtns">
<button class="playBtn" id="registerPopupContentBodyBtnRegister" onclick="register()">Register</button>
</div>
2022-04-27 05:15:06 +00:00
<!-- Alert element for any problems that arise -->
<div id="registerAlert" style="display: none">
<img src="icons/alert.svg" />
<span id="registerAlertText"></span>
</div>
2022-04-27 03:17:29 +00:00
</div>
2022-04-27 00:55:16 +00:00
</div>
2022-05-02 05:56:15 +00:00
<div id="downloadPanel" style="display: none;">
<div id="downloadTitleBar">
2022-05-02 05:59:11 +00:00
<span id="downloadTitle">Downloads</span>
<div id="downloadClose" onclick="closeDownloads()">
<img src="icons/close.svg" />
</div>
2022-05-02 05:56:15 +00:00
</div>
<div id="downloadPanelInner">
2022-05-02 06:15:04 +00:00
<div class="downloadTitle", id="grassclipperTitle">
GrassClipper
</div>
2022-05-02 05:56:15 +00:00
<div class="downloadRow">
<div class="downloadSection">
<span class="downloadLabel" id="installerTitle">Installer</span>
<button class="smolBtn" onclick="runInstallScript()" id="proxyInstall">Install</button>
</div>
<span class="downloadSubtitle" id="installerSubtitle">
Installs proxy and other tools. Required for Grasscutter servers.
</span>
</div>
2022-05-02 06:40:11 +00:00
<div class="downloadTitle", id="grasscutterTitle">
2022-05-02 06:15:04 +00:00
Grasscutter
</div>
2022-05-02 06:02:43 +00:00
<div class="downloadRow">
<div class="downloadSection">
2022-05-02 06:09:20 +00:00
<span class="downloadLabel" id="downloadStable">Download Grasscutter Stable Build</span>
2022-05-02 06:02:43 +00:00
<button class="smolBtn" onclick="downloadGC('stable')" id="stableInstall">Download</button>
</div>
<span class="downloadSubtitle" id="stableSubtitle">
Install Grasscutter stable branch. This build usually has less bugs, but also less features.
</span>
</div>
<div class="downloadRow">
<div class="downloadSection">
2022-05-02 06:09:20 +00:00
<span class="downloadLabel" id="downloadDev">Download Grasscutter Development Build</span>
2022-05-02 06:02:43 +00:00
<button class="smolBtn" onclick="downloadGC('development')" id="devInstall">Download</button>
</div>
<span class="downloadSubtitle" id="devSubtitle">
Install Grasscutter development branch. This build sometimes has bugs, and is frequently updated. Use at your own risk.
</span>
</div>
2022-05-02 06:09:20 +00:00
<div class="downloadRow">
<div class="downloadSection">
<span class="downloadLabel" id="downloadResources">Download Grasscutter Resources</span>
2022-05-08 00:15:54 +00:00
<button class="smolBtn" onclick="downloadResources()" id="resourceInstall">Download</button>
2022-05-02 06:09:20 +00:00
</div>
2022-05-03 08:26:26 +00:00
<span class="downloadSubtitle" id="resourceSubtitle">
2022-05-02 06:09:20 +00:00
Downloads Grasscutter resources into the currently set Grasscutter folder. This should be done unless you plan on getting resources externally.
</span>
</div>
2022-05-08 03:08:55 +00:00
<div class="downloadRow">
<div class="downloadSection">
<span class="downloadLabel" id="downloadData">Download Data Files</span>
2022-05-08 03:13:54 +00:00
<button class="smolBtn" onclick="downloadDataFiles()" id="dataInstall">Download</button>
2022-05-08 03:08:55 +00:00
</div>
2022-05-08 03:13:54 +00:00
<span class="downloadSubtitle" id="dataSubtitle">
Downloads Grasscutter data files, such as keys, spawns, and other vital files.
2022-05-08 03:08:55 +00:00
</span>
</div>
2022-05-02 05:56:15 +00:00
</div>
</div>
2022-04-27 00:29:34 +00:00
<!-- Setting panel -->
2022-04-21 22:33:14 +00:00
<div id="settingsPanel" style="display: none;">
2022-04-23 05:17:26 +00:00
<div id="settingsTitleBar">
<span id="fullSettingsTitle">Settings</span>
<div id="settingsClose">
<img src="icons/close.svg" onclick="closeSettings()" />
</div>
2022-04-21 22:33:14 +00:00
</div>
2022-04-21 21:53:53 +00:00
<div id="settingsPanelInner">
<div class="settingTitle", id="scriptsTitle">
2022-04-21 21:53:53 +00:00
<span>Scripts</span>
</div>
<div class="settingsRow">
2022-04-22 00:35:50 +00:00
<div class="settingSection">
<span class="settingLabel" id="killswitchTitle">Kill Switch</span>
2022-04-22 00:35:50 +00:00
<input type="checkbox" id="killswitchOption" onchange="toggleKillSwitch()" />
</div>
<span class="settingSubtitle" id="killswitchSubtitle">
2022-04-21 22:15:52 +00:00
Only for those very paranoid about bans. Kills the game process *and your internet* if something happens to the proxy.
2022-04-21 21:57:03 +00:00
</span>
2022-04-21 21:53:53 +00:00
</div>
2022-04-22 00:35:50 +00:00
<div class="settingsRow">
<div class="settingSection">
<span class="settingLabel" id="proxyTitle">Install Proxy Server</span>
<button class="smolBtn" onclick="runInstallScript()" id="proxyInstall">Install</button>
2022-04-22 00:35:50 +00:00
</div>
<span class="settingSubtitle" id="proxySubtitle">
2022-04-22 00:35:50 +00:00
Install the proxy server via the install script.
</span>
</div>
2022-04-22 21:18:56 +00:00
<div class="settingsRow">
<div class="settingSection">
<span class="settingLabel" id="updateTitle">Update</span>
2022-04-22 21:42:16 +00:00
<button class="smolBtn disabled" onclick="updateResources()" id="updateBtn" disabled>Update</button>
2022-04-22 21:18:56 +00:00
</div>
2022-04-22 21:42:16 +00:00
<span class="settingSubtitle" id="updateSubtitle">
2022-04-22 22:03:37 +00:00
Auto updating is temporarily disabled. Check GitHub for the newest release.
2022-04-22 21:18:56 +00:00
</span>
</div>
2022-04-23 02:14:40 +00:00
<div class="settingsRow">
<div class="settingSection">
<span class="settingLabel", id="serverLaunchTitle">Enable Server Launcher</span>
2022-04-23 02:14:40 +00:00
<input type="checkbox" id="serverLaunchOption" onchange="toggleServerLaunchSection()" />
</div>
<span class="settingSubtitle" id="serverSubtitle">
Enable to server launcher tile for launcher a local Grasscutter instance.
</span>
</div>
<div class="settingsRow">
<div class="settingSection">
<span class="settingLabel", id="languageTitle">Language</span>
<select id="languageSelect" onchange="handleLanguageChange(this)">
</select>
</div>
<span class="settingSubtitle" id="languageSubtitle">
Select your language!
</span>
</div>
2022-04-24 23:17:23 +00:00
<div class="settingsRow">
<div class="settingSection">
<span class="settingLabel", id="httpsTitle">Use HTTPS</span>
<input type="checkbox" id="httpsOption" onchange="toggleHttps()" />
</select>
</div>
<span class="settingSubtitle" id="httpsSubtitle">
Choose between using HTTPS or HTTP.
</span>
</div>
2022-05-08 03:13:54 +00:00
<div class="settingsRow">
<div class="settingSection">
<span class="settingLabel", id="debugTitle">Debugging</span>
<input type="checkbox" id="debugOption" onchange="toggleDebugging()" />
</select>
</div>
</div>
2022-04-21 21:53:53 +00:00
</div>
</div>
2022-04-27 00:29:34 +00:00
<!-- Top bar (title, version, setting btn, close btn, etc.) -->
2022-04-21 00:41:49 +00:00
<div id="controlBar">
2022-04-21 01:16:36 +00:00
<span id="titleSection">
GrassClipper
2022-05-05 04:42:07 +00:00
<span id="version">0.0.0</span>
2022-04-21 01:16:36 +00:00
</span>
2022-04-30 07:57:58 +00:00
<div id="refreshBtn" onclick="window.location.reload()">
<img src="icons/refresh.svg" />
</div>
2022-05-02 05:56:15 +00:00
<div id="downloadBtn" onclick="openDownloads()">
<img src="icons/download.svg" />
</div>
2022-04-21 10:51:58 +00:00
<div id="settingsBtn" onclick="openSettings()">
<img src="icons/cog.svg" />
</div>
2022-04-21 00:44:17 +00:00
<div id="minBtn" onclick="minimizeWin()">
2022-04-21 00:41:49 +00:00
<img src="icons/min.svg" alt="Minimize" />
</div>
2022-04-21 00:44:17 +00:00
<div id="closeBtn" onclick="closeWin()">
2022-04-21 00:41:49 +00:00
<img src="icons/close.svg" />
</div>
</div>
2022-05-02 05:56:15 +00:00
<!-- Main content -->
2022-04-22 22:34:24 +00:00
<div id="panelContainer">
2022-04-27 00:29:34 +00:00
<!-- Official play btn -->
2022-04-22 22:34:24 +00:00
<div id="firstPanel">
<button class="playBtn" id="playOfficial" onclick="launchOfficial()">Play Official</button>
2022-04-19 23:54:36 +00:00
</div>
2022-04-27 00:29:34 +00:00
<!-- Grasscutter play btn -->
2022-04-22 22:34:24 +00:00
<div id="secondPanel">
2022-04-21 06:04:20 +00:00
<div id="ipList" style="display: none;"></div>
2022-04-21 00:06:35 +00:00
<div id="secondControlContainer">
2022-04-27 00:29:34 +00:00
<!-- ip/server input -->
2022-04-21 05:26:25 +00:00
<div id="serverInput">
2022-04-21 05:43:32 +00:00
<input type="text" id="ip" placeholder="IP Address" oninput="handleFavoriteInput()"/>
2022-04-24 07:32:17 +00:00
<input type="text" id="port" placeholder="Port" oninput="handleFavoriteInput()"/>
2022-04-21 05:43:32 +00:00
<img src="icons/star_empty.svg" id="star" onclick="setFavorite()" />
2022-04-21 06:04:20 +00:00
<img src="icons/list.svg" id="star" onclick="handleFavoriteList()" />
2022-04-21 05:26:25 +00:00
</div>
2022-04-27 01:34:20 +00:00
<button class="playBtn" id="playPrivate" onclick="openLogin()">Play Private</button>
2022-04-21 00:06:35 +00:00
</div>
2022-04-20 00:07:56 +00:00
</div>
2022-04-27 00:29:34 +00:00
<!-- Grasscutter server launcher -->
2022-04-23 02:14:40 +00:00
<div id="thirdPanel" style="display: none;">
2022-04-23 03:01:57 +00:00
<button class="playBtn" id="serverLaunch" onclick="launchLocalServer()">Launch Local Server</button>
2022-04-22 22:34:24 +00:00
</div>
2022-04-20 00:07:56 +00:00
</div>
2022-04-27 00:29:34 +00:00
<!-- Bottom section (folder setting btns and such) -->
2022-04-20 00:07:56 +00:00
<div id="bottomBar">
<div class="bottomSection">
2022-04-23 02:30:44 +00:00
<div>
2022-04-26 09:05:58 +00:00
<div>
<button class="smolBtn" onclick="setGameExe()" id="gameExeSet">Set game folder</button>
<img src="icons/folder.svg" class="openFolderIcon" onclick="openGameFolder()"/>
2022-04-26 09:05:58 +00:00
</div>
<span id="gamePath" style="margin-top: 4px;"></span>
2022-04-23 02:30:44 +00:00
</div>
<div style="display: none;">
2022-04-26 09:05:58 +00:00
<div>
<button class="smolBtn" onclick="setGrasscutterFolder()" id="grasscutterFileSet">Set "Grasscutter" .jar file</button>
<img src="icons/folder.svg" class="openFolderIcon" onclick="openGrasscutterFolder()"/>
2022-04-26 09:05:58 +00:00
</div>
2022-04-23 02:30:44 +00:00
<span id="serverPath" style="margin-top: 4px;"></span>
</div>
2022-04-19 23:54:36 +00:00
</div>
</div>
2022-04-30 08:56:00 +00:00
<!-- Download notification -->
<div id="downloadNotif" onclick="openLatestDownload()">
<img src="icons/alert.svg" />
<span id="updateNotifText">
A new update is available! Newest version:
</span><span id="newestVersion"></span>
</div>
2022-04-19 23:54:36 +00:00
</body>
2022-04-19 23:33:59 +00:00
</html>