12 Commits

10 changed files with 111 additions and 84 deletions

View File

@@ -1,4 +1,4 @@
const appName = "EZPPLauncher";
const appVersion = "2.0.0";
const appVersion = "2.1.0";
module.exports = { appName, appVersion };

10
main.js
View File

@@ -2,6 +2,16 @@
const { app, BrowserWindow, Menu, ipcMain, dialog, shell } = require(
"electron",
);
/* const unhandled = require("electron-unhandled");
unhandled({
logger: console.error,
showDialog: true,
reportButton: () => {
shell.openExternal("https://ez-pp.farm/discord");
},
}); */
const path = require("path");
const serve = require("electron-serve");
const loadURL = serve({ directory: "public" });

66
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "ezpplauncher-next",
"version": "2.0.0",
"version": "2.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "ezpplauncher-next",
"version": "2.0.0",
"version": "2.1.0",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
@@ -18,6 +18,7 @@
"custom-electron-titlebar": "^4.2.7",
"discord-auto-rpc": "^1.0.17",
"electron-serve": "^1.1.0",
"electron-unhandled": "^4.0.1",
"fkill": "^7.2.1",
"get-window-by-name": "^2.0.0",
"regedit-rs": "^1.0.2",
@@ -3720,6 +3721,14 @@
"node": ">= 10.0.0"
}
},
"node_modules/electron-is-dev": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/electron-is-dev/-/electron-is-dev-2.0.0.tgz",
"integrity": "sha512-3X99K852Yoqu9AcW50qz3ibYBWY79/pBhlMCab8ToEWS48R0T9tyxRiQhwylE7zQdXrMnx2JKqUJyMPmt5FBqA==",
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/electron-publish": {
"version": "24.8.1",
"resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-24.8.1.tgz",
@@ -3787,6 +3796,46 @@
"integrity": "sha512-f7/be56VjRRQk+Ric6PmIrEtPcIqsn3tElyAu9Sh6egha2VLJ82qwkcOdcnT06W+Pb6RUulV1ckzrGbKzVcTHg==",
"dev": true
},
"node_modules/electron-unhandled": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/electron-unhandled/-/electron-unhandled-4.0.1.tgz",
"integrity": "sha512-6BsLnBg+i96eUnbaIFZyYdyfNX3f80/Nlfqy34YEMxXT9JP3ddNsNnUeiOF8ezN4+et4t4D37gjghKTP0V3jyw==",
"dependencies": {
"clean-stack": "^2.1.0",
"electron-is-dev": "^2.0.0",
"ensure-error": "^2.0.0",
"lodash.debounce": "^4.0.8",
"serialize-error": "^8.1.0"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/electron-unhandled/node_modules/serialize-error": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-8.1.0.tgz",
"integrity": "sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ==",
"dependencies": {
"type-fest": "^0.20.2"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/electron-unhandled/node_modules/type-fest": {
"version": "0.20.2",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
"integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/electron/node_modules/@types/node": {
"version": "18.19.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.6.tgz",
@@ -3818,6 +3867,14 @@
"once": "^1.4.0"
}
},
"node_modules/ensure-error": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/ensure-error/-/ensure-error-2.1.0.tgz",
"integrity": "sha512-+BMSJHw9gxiJAAp2ZR1E0TNcL09dD3lOvkl7WVm4+Y6xnes/pMetP/TzCHiDduh8ihNDjbGfuYxl7l4PA1xZ8A==",
"engines": {
"node": ">=8"
}
},
"node_modules/entities": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz",
@@ -5266,6 +5323,11 @@
"integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==",
"dev": true
},
"node_modules/lodash.debounce": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
"integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow=="
},
"node_modules/lodash.memoize": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",

View File

@@ -1,6 +1,6 @@
{
"name": "ezpplauncher-next",
"version": "2.0.0",
"version": "2.1.1",
"description": "EZPPLauncher rewritten with Svelte.",
"private": false,
"license": "MIT",
@@ -45,6 +45,7 @@
"custom-electron-titlebar": "^4.2.7",
"discord-auto-rpc": "^1.0.17",
"electron-serve": "^1.1.0",
"electron-unhandled": "^4.0.1",
"fkill": "^7.2.1",
"get-window-by-name": "^2.0.0",
"regedit-rs": "^1.0.2",

View File

@@ -1,63 +1,15 @@
html, body {
position: relative;
width: 100%;
height: 100%;
html,
body {
position: relative;
width: 100%;
height: 100%;
}
body {
color: #333;
margin: 0;
padding: 8px;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
a {
color: rgb(0,100,200);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:visited {
color: rgb(0,80,160);
}
label {
display: block;
}
input, button, select, textarea {
font-family: inherit;
font-size: inherit;
-webkit-padding: 0.4em 0;
padding: 0.4em;
margin: 0 0 0.5em 0;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 2px;
}
input:disabled {
color: #ccc;
}
button {
color: #333;
background-color: #f4f4f4;
outline: none;
}
button:disabled {
color: #999;
}
button:not(:disabled):active {
background-color: #ddd;
}
button:focus {
border-color: #666;
color: #333;
margin: 0;
padding: 8px;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

View File

@@ -83,7 +83,6 @@
});
window.addEventListener("alert", (e) => {
console.log((e as CustomEvent).detail);
const toastMessage = (e as CustomEvent).detail;
switch (toastMessage.type) {
case "success": {
@@ -124,7 +123,7 @@
<div class="flex flex-row items-center animate-fadeIn opacity-0">
{#if $currentPage == Page.Settings}
<Button
class="dark:active:!bg-gray-900 !ring-0 w-10 h-10 mr-1 rounded-lg animate-sideIn opacity-0 active:scale-95 transition-transform duration-75"
class="!ring-0 w-10 h-10 mr-1 rounded-lg animate-sideIn opacity-0 active:scale-95 transition-transform duration-75"
color="light"
on:click={() => {
currentPage.set(Page.Launch);
@@ -174,7 +173,7 @@
</span>
</DropdownHeader>
<DropdownItem
class="flex flex-row gap-2 border-0 dark:!bg-gray-700 dark:active:!bg-gray-900 dark:hover:!bg-gray-800 transition-colors"
class="flex flex-row gap-2 border-0 transition-colors"
on:click={() => {
if (!$launching) currentPage.set(Page.Settings);
}}
@@ -185,7 +184,7 @@
<DropdownDivider />
{#if loggedIn}
<DropdownItem
class="flex flex-row gap-2 border-0 dark:!bg-gray-700 dark:active:!bg-gray-900 dark:hover:!bg-gray-800 transition-colors"
class="flex flex-row gap-2 border-0 transition-colors"
on:click={() => {
if (!$launching) logout();
}}
@@ -197,7 +196,7 @@
</DropdownItem>
{:else}
<DropdownItem
class="flex flex-row gap-2 border-0 dark:!bg-gray-700 dark:active:!bg-gray-900 dark:hover:!bg-gray-800 transition-colors"
class="flex flex-row gap-2 border-0 transition-colors"
on:click={() => {
if (!$launching) currentPage.set(Page.Login);
}}

View File

@@ -6,7 +6,15 @@
* {
font-family: "Prompt";
-webkit-user-select: none !important;
-khtml-user-select: none !important;
-moz-user-select: none !important;
-o-user-select: none !important;
user-select: none !important;
-webkit-user-drag: none !important;
-khtml-user-drag: none !important;
-moz-user-drag: none !important;
-o-user-drag: none !important;
user-drag: none !important;
}
html .cet-titlebar {

View File

@@ -16,7 +16,9 @@
const launch = () => {
launching.set(true);
const patching = $patch;
window.dispatchEvent(new CustomEvent("launch", { detail: { patch: patching } }));;
window.dispatchEvent(
new CustomEvent("launch", { detail: { patch: patching } })
);
};
</script>
@@ -29,7 +31,7 @@
<Button
color="light"
size="xl"
class="dark:active:!bg-gray-900 {$launching
class="{$launching
? ''
: 'active:scale-95 '}transition-transform duration-75"
disabled={$launching}

View File

@@ -59,7 +59,7 @@
{
loading: "Logging in...",
success: "Successfully logged in!",
error: "Failed to login.",
error: "Invalid Username or Password!",
},
{
position: "bottom-center",
@@ -80,7 +80,6 @@
const resultData = customEvent.detail;
const isGuest = "guest" in resultData;
const wasSuccessful = "user" in resultData;
console.log(resultData);
if (isGuest) {
currentPage.set(Page.Launch);
res();
@@ -170,6 +169,7 @@
type="text"
placeholder="Username"
size="md"
class="animate-sideIn"
disabled={loading}
bind:value={username}
/>
@@ -177,6 +177,7 @@
type={showPassword ? "text" : "password"}
placeholder="Password"
size="md"
class="animate-lsideIn"
disabled={loading}
bind:value={password}
>
@@ -198,7 +199,7 @@
>
<div class="flex flex-col justify-center items-center gap-2 mt-1">
<Button
class="dark:active:!bg-gray-900 active:scale-95 transition-transform duration-75"
class="active:scale-95 transition-transform duration-75"
color="light"
disabled={loading}
on:click={processLogin}

View File

@@ -63,21 +63,13 @@
value={folderPath}
readonly
/>
<Button
color="light"
class="dark:active:!bg-gray-900"
on:click={detectFolderPath}
>
<Button color="light" on:click={detectFolderPath}>
<FileSearchSolid
size="sm"
class="dark:text-gray-300 text-gray-500 outline-none border-none select-none pointer-events-none"
/>
</Button>
<Button
color="light"
class="dark:active:!bg-gray-900 active:!rounded-lg"
on:click={setFolderPath}
>
<Button color="light" class="active:!rounded-lg" on:click={setFolderPath}>
<FolderSolid
size="sm"
class="dark:text-gray-300 text-gray-500 outline-none border-none select-none pointer-events-none"