diff --git a/app/electron/main.js b/app/electron/main.js
index 60a8137..dce99bf 100644
--- a/app/electron/main.js
+++ b/app/electron/main.js
@@ -61,9 +61,9 @@ async function createWindow() {
title: "OpenGOAL Launcher",
webPreferences: {
devTools: isDev,
- nodeIntegration: false,
- nodeIntegrationInWorker: false,
- nodeIntegrationInSubFrames: false,
+ nodeIntegration: true,
+ // nodeIntegrationInWorker: false,
+ // nodeIntegrationInSubFrames: false,
contextIsolation: true,
enableRemoteModule: false,
additionalArguments: [`storePath:${app.getPath("userData")}`],
diff --git a/app/src/components/GettingStarted.js b/app/src/components/GettingStarted.js
new file mode 100644
index 0000000..772c266
--- /dev/null
+++ b/app/src/components/GettingStarted.js
@@ -0,0 +1,35 @@
+import { Button, Text, Progress, VStack, Divider } from "@chakra-ui/react";
+import React, { useEffect, useState } from "react";
+const { receive, send } = window.api;
+
+function GettingStarted() {
+ const [status, setStatus] = useState('Awaiting Jak ISO File');
+
+ function handleClick() {
+ send('getISO');
+ }
+
+ useEffect(() => {
+ receive('status', newStatus => {
+ console.log(newStatus);
+ setStatus(newStatus);
+ });
+ }, [])
+
+
+ return (
+
+ {status === 'Awaiting Jak ISO File' ?
+ <>
+ Please select your Jak and Daxter ISO below
+
+
+ > : null
+ }
+
+ {status ? Status: {status} : null}
+
+ );
+}
+
+export default GettingStarted;
\ No newline at end of file
diff --git a/app/src/components/Header.js b/app/src/components/Header.js
new file mode 100644
index 0000000..4e4b00e
--- /dev/null
+++ b/app/src/components/Header.js
@@ -0,0 +1,13 @@
+import React from "react";
+import { Heading, Img } from "@chakra-ui/react";
+const logo = require('../assets/images/header-logo.png');
+
+function Header() {
+ return (
+
+
+
+ );
+}
+
+export default Header;
\ No newline at end of file
diff --git a/app/src/components/Home.js b/app/src/components/Home.js
new file mode 100644
index 0000000..d262e5c
--- /dev/null
+++ b/app/src/components/Home.js
@@ -0,0 +1,17 @@
+import React from "react";
+import { VStack, Button } from '@chakra-ui/react';
+const { send } = window.api;
+
+function handleLaunch() {
+ send('launch');
+}
+
+function Home() {
+ return (
+
+
+
+ );
+}
+
+export default Home;
\ No newline at end of file
diff --git a/app/src/components/ImportantLinks.js b/app/src/components/ImportantLinks.js
new file mode 100644
index 0000000..e58e37f
--- /dev/null
+++ b/app/src/components/ImportantLinks.js
@@ -0,0 +1,29 @@
+import { Button, VStack } from "@chakra-ui/react";
+import React from "react";
+const data = require('../assets/data/links.json');
+
+function Feature({ title, link }) {
+ return (
+
+ )
+}
+
+function ImportantLinks() {
+ return (
+
+ {data.map((item, index) => (
+
+ ))}
+
+ )
+}
+
+export default ImportantLinks;
\ No newline at end of file
diff --git a/app/src/components/Landing.js b/app/src/components/Landing.js
new file mode 100644
index 0000000..ae36140
--- /dev/null
+++ b/app/src/components/Landing.js
@@ -0,0 +1,37 @@
+import React from "react";
+import { Flex, Tabs, TabList, TabPanels, TabPanel, Tab } from "@chakra-ui/react";
+import Home from "./Home";
+import GettingStarted from "./GettingStarted";
+// import ImportantLinks from "./ImportantLinks";
+// import Settings from "./Settings";
+
+function Landing() {
+ return (
+
+
+
+ Home
+ Getting Started
+ Links
+ Settings
+
+
+
+
+
+
+
+
+ {/*
+
+
+
+
+ */}
+
+
+
+ );
+}
+
+export default Landing;
\ No newline at end of file
diff --git a/app/src/components/Settings.js b/app/src/components/Settings.js
new file mode 100644
index 0000000..7ef3617
--- /dev/null
+++ b/app/src/components/Settings.js
@@ -0,0 +1,26 @@
+import React from "react";
+import { Button, VStack } from '@chakra-ui/react';
+import { ColorModeSwitcher } from '../ColorModeSwitcher';
+const { invoke } = window.api;
+
+async function handleCheckUpdates() {
+ try {
+ let response = await invoke('checkUpdates');
+ console.log(response);
+ } catch (err) {
+ console.log(err);
+ }
+}
+
+function Settings() {
+ return (
+
+
+
+ {/* */}
+ {/* */}
+
+ );
+}
+
+export default Settings;
\ No newline at end of file
diff --git a/app/src/components/subitem/subitem.jsx b/app/src/components/subitem/subitem.jsx
index 370b922..16cfd22 100644
--- a/app/src/components/subitem/subitem.jsx
+++ b/app/src/components/subitem/subitem.jsx
@@ -12,7 +12,7 @@ class SubItem extends React.Component {
componentDidMount() {
// Set up binding in code whenever the context menu item
// of id "alert" is selected
- window.api.contextMenu.onReceive("softAlert", function(args) {
+ window.api.contextMenu.onReceive("softAlert", function (args) {
console.log(`This alert was brought to you by secure-electron-context-menu by ${args.attributes.name}`);
// Note - we have access to the "params" object as defined here: https://www.electronjs.org/docs/api/web-contents#event-context-menu
@@ -22,14 +22,14 @@ class SubItem extends React.Component {
render() {
return (
-
-
- ID ({this.props.id}): Try right-clicking me for a custom context menu
+
+
+ ID ({this.props.id}): Try right-clicking me for a custom context menu
+
-
);
}
}
diff --git a/app/src/core/nav.jsx b/app/src/core/nav.jsx
index 8e416b6..49ded15 100644
--- a/app/src/core/nav.jsx
+++ b/app/src/core/nav.jsx
@@ -1,252 +1,250 @@
-import React from "react";
-import ROUTES from "Constants/routes";
-import {
- validateLicenseRequest,
- validateLicenseResponse,
-} from "secure-electron-license-keys";
+// import React from "react";
+// import ROUTES from "Constants/routes";
+// import {
+// validateLicenseRequest,
+// validateLicenseResponse,
+// } from "secure-electron-license-keys";
-class Nav extends React.Component {
- constructor(props) {
- super(props);
+// class Nav extends React.Component {
+// constructor(props) {
+// super(props);
- this.history = props.history;
- this.state = {
- mobileMenuActive: false,
- licenseModalActive: false,
+// this.history = props.history;
+// this.state = {
+// mobileMenuActive: false,
+// licenseModalActive: false,
- // license-specific
- licenseValid: false,
- allowedMajorVersions: "",
- allowedMinorVersions: "",
- appVersion: "",
- licenseExpiry: "",
- };
+// // license-specific
+// licenseValid: false,
+// allowedMajorVersions: "",
+// allowedMinorVersions: "",
+// appVersion: "",
+// licenseExpiry: "",
+// };
- this.toggleMenu = this.toggleMenu.bind(this);
- this.toggleLicenseModal = this.toggleLicenseModal.bind(this);
- this.navigate = this.navigate.bind(this);
- }
+// this.toggleMenu = this.toggleMenu.bind(this);
+// this.toggleLicenseModal = this.toggleLicenseModal.bind(this);
+// this.navigate = this.navigate.bind(this);
+// }
- componentWillUnmount() {
- window.api.licenseKeys.clearRendererBindings();
- }
+// componentWillUnmount() {
+// window.api.licenseKeys.clearRendererBindings();
+// }
- componentDidMount() {
- // Set up binding to listen when the license key is
- // validated by the main process
- const _ = this;
+// componentDidMount() {
+// // Set up binding to listen when the license key is
+// // validated by the main process
+// const _ = this;
- window.api.licenseKeys.onReceive(validateLicenseResponse, function (data) {
- // If the license key/data is valid
- if (data.success) {
- // Here you would compare data.appVersion to
- // data.major, data.minor and data.patch to
- // ensure that the user's version of the app
- // matches their license
- _.setState({
- licenseValid: true,
- allowedMajorVersions: data.major,
- allowedMinorVersions: data.minor,
- allowedPatchVersions: data.patch,
- appVersion: data.appVersion,
- licenseExpiry: data.expire,
- });
- } else {
- _.setState({
- licenseValid: false,
- });
- }
- });
- }
+// window.api.licenseKeys.onReceive(validateLicenseResponse, function (data) {
+// // If the license key/data is valid
+// if (data.success) {
+// // Here you would compare data.appVersion to
+// // data.major, data.minor and data.patch to
+// // ensure that the user's version of the app
+// // matches their license
+// _.setState({
+// licenseValid: true,
+// allowedMajorVersions: data.major,
+// allowedMinorVersions: data.minor,
+// allowedPatchVersions: data.patch,
+// appVersion: data.appVersion,
+// licenseExpiry: data.expire,
+// });
+// } else {
+// _.setState({
+// licenseValid: false,
+// });
+// }
+// });
+// }
- toggleMenu(event) {
- this.setState({
- mobileMenuActive: !this.state.mobileMenuActive,
- });
- }
+// toggleMenu(event) {
+// this.setState({
+// mobileMenuActive: !this.state.mobileMenuActive,
+// });
+// }
- toggleLicenseModal(event) {
- const previous = this.state.licenseModalActive;
+// toggleLicenseModal(event) {
+// const previous = this.state.licenseModalActive;
- // Only send license request if the modal
- // is not already open
- if (!previous) {
- window.api.licenseKeys.send(validateLicenseRequest);
- }
+// // Only send license request if the modal
+// // is not already open
+// if (!previous) {
+// window.api.licenseKeys.send(validateLicenseRequest);
+// }
- this.setState({
- licenseModalActive: !this.state.licenseModalActive,
- });
- }
+// this.setState({
+// licenseModalActive: !this.state.licenseModalActive,
+// });
+// }
- // Using a custom method to navigate because we
- // need to close the mobile menu if we navigate to
- // another page
- navigate(url) {
- this.setState(
- {
- mobileMenuActive: false,
- },
- function () {
- this.history.push(url);
- }
- );
- }
+// // Using a custom method to navigate because we
+// // need to close the mobile menu if we navigate to
+// // another page
+// navigate(url) {
+// this.setState(
+// {
+// mobileMenuActive: false,
+// },
+// function () {
+// this.history.push(url);
+// }
+// );
+// }
- renderLicenseModal() {
- return (
-
-
-
- {this.state.licenseValid ? (
-
- The license key for this product has been validated and the
- following versions of this app are allowed for your use:
-
- Major versions:{" "}
- {this.state.allowedMajorVersions}
- Minor versions:{" "}
- {this.state.allowedMinorVersions}
- Patch versions:{" "}
- {this.state.allowedPatchVersions}
- Expires on:{" "}
- {!this.state.licenseExpiry
- ? "never!"
- : this.state.licenseExpiry}{" "}
-
(
-
- App version:
- {` v${this.state.appVersion.major}.${this.state.appVersion.minor}.${this.state.appVersion.patch}`}
-
- )
-
-
-
- ) : (
-
-
The license key is not valid.
-
- If you'd like to create a license key, follow these steps:
-
- -
- Install this package globally (
- npm i secure-electron-license-keys-cli -g).
-
- -
- Run secure-electron-license-keys-cli.
-
- -
- Copy public.key and{" "}
- license.data into the root folder
- of this app.
-
- -
- Re-run this app (ie. npm run dev).
-
- -
- If you'd like to further customize your license keys, copy
- this link into your browser:{" "}
-
- https://github.com/reZach/secure-electron-license-keys-cli
-
- .
-
-
-
-
- )}
-
-
-
- );
- }
+// renderLicenseModal() {
+// return (
+//
+//
+//
+// {this.state.licenseValid ? (
+//
+// The license key for this product has been validated and the
+// following versions of this app are allowed for your use:
+//
+// Major versions:{" "}
+// {this.state.allowedMajorVersions}
+// Minor versions:{" "}
+// {this.state.allowedMinorVersions}
+// Patch versions:{" "}
+// {this.state.allowedPatchVersions}
+// Expires on:{" "}
+// {!this.state.licenseExpiry
+// ? "never!"
+// : this.state.licenseExpiry}{" "}
+//
(
+//
+// App version:
+// {` v${this.state.appVersion.major}.${this.state.appVersion.minor}.${this.state.appVersion.patch}`}
+//
+// )
+//
+//
+//
+// ) : (
+//
+//
The license key is not valid.
+//
+// If you'd like to create a license key, follow these steps:
+//
+// -
+// Install this package globally (
+// npm i secure-electron-license-keys-cli -g).
+//
+// -
+// Run secure-electron-license-keys-cli.
+//
+// -
+// Copy public.key and{" "}
+// license.data into the root folder
+// of this app.
+//
+// -
+// Re-run this app (ie. npm run dev).
+//
+// -
+// If you'd like to further customize your license keys, copy
+// this link into your browser:{" "}
+//
+// https://github.com/reZach/secure-electron-license-keys-cli
+//
+// .
+//
+//
+//
+//
+// )}
+//
+//
+//
+// );
+// }
- render() {
- return (
-
+// );
+// }
+// }
-export default Nav;
+// export default Nav;
diff --git a/app/src/core/root.css b/app/src/core/root.css
deleted file mode 100644
index 3d58e38..0000000
--- a/app/src/core/root.css
+++ /dev/null
@@ -1,12 +0,0 @@
-html {
- height: 100%;
-}
-
-body {
- margin: 0px;
- height: -webkit-fill-available;
-}
-
-#target {
- height: -webkit-fill-available;
-}
\ No newline at end of file
diff --git a/app/src/core/root.jsx b/app/src/core/root.js
similarity index 84%
rename from app/src/core/root.jsx
rename to app/src/core/root.js
index ed40a77..c464ffa 100644
--- a/app/src/core/root.jsx
+++ b/app/src/core/root.js
@@ -3,7 +3,6 @@ import { ConnectedRouter } from "connected-react-router";
import { Provider } from "react-redux";
import Routes from "Core/routes";
import Nav from "./nav";
-import "./root.css";
class Root extends React.Component {
render() {
@@ -13,8 +12,8 @@ class Root extends React.Component {
-
-
+ {/* */}
+
diff --git a/app/src/core/routes.jsx b/app/src/core/routes.jsx
index d6012bc..f09e923 100644
--- a/app/src/core/routes.jsx
+++ b/app/src/core/routes.jsx
@@ -25,19 +25,17 @@ const ContextMenu = loadable(() =>
import(/* webpackChunkName: "ContextMenuChunk" */ "Pages/contextmenu/contextmenu")
);
-class Routes extends React.Component {
- render() {
- return (
-
-
-
-
-
-
-
-
- );
- }
+function Routes() {
+ return (
+
+
+
+
+
+
+
+
+ );
}
export default Routes;
diff --git a/app/src/index.html b/app/src/index.html
index b147fc4..b78623d 100644
--- a/app/src/index.html
+++ b/app/src/index.html
@@ -3,7 +3,8 @@
-
+
+
OpenGOAL Launcher
diff --git a/app/src/index.jsx b/app/src/index.jsx
index 494d4fd..01ff841 100644
--- a/app/src/index.jsx
+++ b/app/src/index.jsx
@@ -4,15 +4,11 @@ import i18n from "I18n/i18n.config";
import { I18nextProvider } from "react-i18next";
import Root from "Core/root";
import store, { history } from "Redux/store/store";
-import "bulma/css/bulma.css";
-import { ChakraProvider } from '@chakra-ui/react';
ReactDOM.render(
-
-
-
+
,
document.getElementById("target")
diff --git a/app/src/pages/welcome/welcome.js b/app/src/pages/welcome/welcome.js
new file mode 100644
index 0000000..eea47c4
--- /dev/null
+++ b/app/src/pages/welcome/welcome.js
@@ -0,0 +1,37 @@
+import React from "react";
+// import ROUTES from "Constants/routes";
+// import { Link } from "react-router-dom";
+import { Flex, Tabs, TabList, TabPanels, TabPanel, Tab } from "@chakra-ui/react";
+import Home from "../../components/Home";
+import GettingStarted from "../../components/GettingStarted";
+
+function Welcome() {
+ return (
+
+
+
+ Home
+ Getting Started
+ Links
+ Settings
+
+
+
+
+
+
+
+
+ {/*
+
+
+
+
+ */}
+
+
+
+ )
+}
+
+export default Welcome;
diff --git a/app/src/pages/welcome/welcome.jsx b/app/src/pages/welcome/welcome.jsx
deleted file mode 100644
index 2847cf8..0000000
--- a/app/src/pages/welcome/welcome.jsx
+++ /dev/null
@@ -1,39 +0,0 @@
-import React from "react";
-import ROUTES from "Constants/routes";
-import { Link } from "react-router-dom";
-
-class Welcome extends React.Component {
- render() {
- return (
-
-
-
-
-
-
- Thank you for trying out the secure-electron-template!
-
-
- Please navigate to view the features of this template.
-
-
-
-
-
-
-
-
Samples
-
- Using the Electron store.
- Changing locales.
- Undo/redoing actions.
- Custom context menu.
-
-
-
-
- );
- }
-}
-
-export default Welcome;
diff --git a/package-lock.json b/package-lock.json
index c1d8bb6..10b1e3e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5121,11 +5121,6 @@
"sax": "^1.2.4"
}
},
- "bulma": {
- "version": "0.9.3",
- "resolved": "https://registry.npmjs.org/bulma/-/bulma-0.9.3.tgz",
- "integrity": "sha512-0d7GNW1PY4ud8TWxdNcP6Cc8Bu7MxcntD/RRLGWuiw/s0a9P+XlH/6QoOIrmbj6o8WWJzJYhytiu9nFjTszk1g=="
- },
"bytes": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
diff --git a/package.json b/package.json
index ef4fa4e..db87b50 100644
--- a/package.json
+++ b/package.json
@@ -116,7 +116,6 @@
"@emotion/styled": "^11.6.0",
"@loadable/component": "^5.15.2",
"@reduxjs/toolkit": "^1.7.1",
- "bulma": "^0.9.3",
"connected-react-router": "^6.9.2",
"easy-redux-undo": "^1.0.5",
"electron-devtools-installer": "^3.2.0",