mirror of
https://github.com/OpenFusionProject/Client.git
synced 2024-11-24 06:11:04 +00:00
Compare commits
No commits in common. "1eee35b230a918ae79e616fe78e5d430e928375d" and "4503c9268ed26f1ffdec40f655e07a0ad91e7377" have entirely different histories.
1eee35b230
...
4503c9268e
@ -59,18 +59,12 @@ body {
|
||||
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
}
|
||||
|
||||
#of-about-button-div {
|
||||
#of-versionnumberdiv {
|
||||
position: fixed;
|
||||
bottom: 4px;
|
||||
right: 8px;
|
||||
}
|
||||
|
||||
#of-config-button-div {
|
||||
position: fixed;
|
||||
bottom: 4px;
|
||||
left: 8px;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-image: url("../../assets/img/btn-primary-bg.png");
|
||||
background-repeat: repeat;
|
||||
|
@ -11,7 +11,7 @@ var configPath = path.join(userData, "config.json");
|
||||
var serversPath = path.join(userData, "servers.json");
|
||||
var versionsPath = path.join(userData, "versions.json");
|
||||
var cacheRoot = path.join(userData, "/../../LocalLow/Unity/Web Player/Cache");
|
||||
var offlineRootDefault = path.join(cacheRoot, "../OfflineCache");
|
||||
var offlineRootDefault = path.join(cacheRoot, "Offline");
|
||||
var offlineRoot = offlineRootDefault;
|
||||
|
||||
var cdnString = "http://cdn.dexlabs.systems/ff/big";
|
||||
@ -78,6 +78,7 @@ function getAppVersion() {
|
||||
|
||||
function setAppVersionText() {
|
||||
$("#of-aboutversionnumber").text("Version " + getAppVersion());
|
||||
$("#of-versionnumber").text("v" + getAppVersion());
|
||||
}
|
||||
|
||||
function validateServerSave(modalName) {
|
||||
@ -328,22 +329,13 @@ function editConfig() {
|
||||
function validateCacheLocation() {
|
||||
var input = document.getElementById("editconfig-offlinecachelocation");
|
||||
var button = document.getElementById("editconfig-savebutton");
|
||||
var parent = path.join(input.value, "/..");
|
||||
|
||||
input.classList.remove("invalidinput");
|
||||
button.removeAttribute("disabled");
|
||||
|
||||
// Parent MUST exist and be a directory
|
||||
// If the target exists, check that is also a directory
|
||||
// Also, prevent putting the offline cache inside of
|
||||
// the normal cache folder to prevent shenanigans
|
||||
if (
|
||||
!remotefs.existsSync(parent) ||
|
||||
!remotefs.statSync(parent).isDirectory() ||
|
||||
(remotefs.existsSync(input.value) &&
|
||||
!remotefs.statSync(input.value).isDirectory()) ||
|
||||
path.join(input.value, ".") === path.join(cacheRoot, "/..") ||
|
||||
path.join(input.value, ".").startsWith(path.join(cacheRoot))
|
||||
!remotefs.existsSync(input.value) ||
|
||||
!remotefs.statSync(input.value).isDirectory()
|
||||
) {
|
||||
input.classList.add("invalidinput");
|
||||
button.setAttribute("disabled", "");
|
||||
@ -957,17 +949,6 @@ function prepConnection(address, port) {
|
||||
launchGame();
|
||||
}
|
||||
|
||||
function browseOfflineCache() {
|
||||
var browsePath = dialog.showOpenDialog({ properties: ["openDirectory"] });
|
||||
var offlineCacheInput = document.getElementById(
|
||||
"editconfig-offlinecachelocation"
|
||||
);
|
||||
if (browsePath && offlineCacheInput) {
|
||||
offlineCacheInput.value = browsePath;
|
||||
validateCacheLocation();
|
||||
}
|
||||
}
|
||||
|
||||
// Returns the UUID of the server with the selected background color.
|
||||
// Yes, there are probably better ways to go about this, but it works well enough.
|
||||
function getSelectedServer() {
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||
<assemblyIdentity type="win32" name="OpenFusion.Client" version="1.6.0.0" processorArchitecture="x86" />
|
||||
<assemblyIdentity type="win32" name="OpenFusion.Client" version="1.5.2.0" processorArchitecture="x86" />
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity type="Win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*">
|
||||
|
61
index.html
61
index.html
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
@ -108,6 +108,18 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-4 d-inline-flex justify-content-end">
|
||||
<button
|
||||
class="btn btn-primary mr-1"
|
||||
data-toggle="modal"
|
||||
data-bs-tooltip=""
|
||||
data-placement="bottom"
|
||||
id="of-editconfig-button"
|
||||
type="button"
|
||||
title="Edit Configuration"
|
||||
data-target="#of-editconfigmodal"
|
||||
>
|
||||
<i class="fas fa-cog"></i>
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-primary mr-1"
|
||||
data-toggle="modal"
|
||||
@ -171,7 +183,6 @@
|
||||
data-target="#of-restoreserversmodal"
|
||||
>Reset to Default Servers</a
|
||||
>
|
||||
<br />
|
||||
<a
|
||||
href="#of-restoreversionsmodal"
|
||||
onclick="$('#of-aboutmodal').modal('toggle')"
|
||||
@ -524,22 +535,12 @@
|
||||
/>
|
||||
<label for="editconfig-offlinecachelocation"
|
||||
>Select Offline Cache Location:</label
|
||||
>
|
||||
<div class="form-row">
|
||||
<input
|
||||
class="form-control w-75"
|
||||
><input
|
||||
class="form-control form-row w-75"
|
||||
id="editconfig-offlinecachelocation"
|
||||
type="text"
|
||||
oninput="validateCacheLocation()"
|
||||
/>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-primary mb-2 ml-1"
|
||||
onclick="browseOfflineCache()"
|
||||
>
|
||||
<i class="fas fa-folder"></i>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
@ -667,7 +668,7 @@
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Add Version</h4>
|
||||
<h4 class="modal-title">Add Server</h4>
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
@ -885,33 +886,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="of-config-button-div">
|
||||
<button
|
||||
class="btn btn-primary mr-1"
|
||||
<div id="of-versionnumberdiv">
|
||||
<a
|
||||
id="of-versionnumber"
|
||||
class="text-monospace text-secondary"
|
||||
href="#of-aboutmodal"
|
||||
data-toggle="modal"
|
||||
data-bs-tooltip=""
|
||||
data-placement="right"
|
||||
id="of-editconfig-button"
|
||||
type="button"
|
||||
title="Edit Configuration"
|
||||
data-target="#of-editconfigmodal"
|
||||
>
|
||||
<i class="fas fa-cog"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div id="of-about-button-div">
|
||||
<button
|
||||
class="btn btn-primary mr-1"
|
||||
data-toggle="modal"
|
||||
data-bs-tooltip=""
|
||||
data-placement="left"
|
||||
id="of-about-button"
|
||||
type="button"
|
||||
title="About OpenFusionClient"
|
||||
data-target="#of-aboutmodal"
|
||||
>v0</a
|
||||
>
|
||||
<i class="fas fa-info-circle"></i>
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "OpenFusionClient",
|
||||
"version": "1.6.0",
|
||||
"version": "1.5.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "OpenFusionClient",
|
||||
"version": "1.6.0",
|
||||
"version": "1.5.2",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "OpenFusionClient",
|
||||
"version": "1.6.0",
|
||||
"version": "1.5.2",
|
||||
"description": "OpenFusionClient",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
Loading…
Reference in New Issue
Block a user