Skip to content

Commit

Permalink
(v3.0.0-beta.3) Change launcher icon
Browse files Browse the repository at this point in the history
* Change launcher icon
* Add highlight to filtered versions
* Added Hidden badge to hidden versions
* Bump mantine to 5.1.1
  • Loading branch information
Nadwey committed Aug 9, 2022
1 parent 0d5b101 commit 5496f4f
Show file tree
Hide file tree
Showing 11 changed files with 128 additions and 104 deletions.
120 changes: 60 additions & 60 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "se3-launcher",
"description": "Launcher for Space Eternity 3",
"version": "3.0.0-beta.2",
"version": "3.0.0-beta.3",
"private": true,
"homepage": "./",
"main": "src/main/index.js",
Expand All @@ -21,6 +21,9 @@
"react-dom": "^18.2.0",
"wait-on": "^6.0.1"
},
"repository": {
"url": "https://github.com/Space-Eternity-3/SE3-Launcher"
},
"scripts": {
"start": "concurrently --kill-others \"cross-env BROWSER=none react-app-rewired start\" \"electron .\"",
"react-build": "react-app-rewired build",
Expand Down Expand Up @@ -48,9 +51,9 @@
]
},
"dependencies": {
"@mantine/core": "^5.1.0",
"@mantine/modals": "^5.1.0",
"@mantine/notifications": "^5.1.0",
"@mantine/core": "^5.1.1",
"@mantine/modals": "^5.1.1",
"@mantine/notifications": "^5.1.1",
"appdata-path": "^1.0.0",
"axios": "^0.27.2",
"custom-electron-titlebar": "^4.1.0",
Expand All @@ -66,7 +69,7 @@
"build": {
"productName": "SE3 Launcher",
"extends": null,
"icon": "../resources/ikona.ico",
"icon": "../resources/icon.ico",
"files": [
"**/*",
"!.github/",
Expand All @@ -92,7 +95,7 @@
"oneClick": false,
"perMachine": false,
"allowToChangeInstallationDirectory": true,
"installerIcon": "resources/ikona.ico",
"installerIcon": "resources/icon.ico",
"deleteAppDataOnUninstall": true,
"installerSidebar": "../resources/Sidebar.bmp",
"differentialPackage": false
Expand Down
Binary file modified public/ikona.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/icon.ico
Binary file not shown.
Binary file added resources/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed resources/ikona.ico
Binary file not shown.
Binary file removed resources/ikona.png
Binary file not shown.
2 changes: 1 addition & 1 deletion src/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async function createWindow() {
height: 600,
minWidth: 750,
minHeight: 500,
icon: path.join(__dirname, "resources", "ikona.ico"),
icon: path.join(__dirname, "resources", "icon.ico"),
webPreferences: {
preload: require.resolve("../preload/preload.js"),
backgroundThrottling: false,
Expand Down
64 changes: 35 additions & 29 deletions src/renderer/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,39 +268,45 @@ export default function App() {
<Tabs.Tab value="versions">Versions</Tabs.Tab>
<Tabs.Tab value="launcher">Launcher</Tabs.Tab>
</Tabs.List>

<Tabs.Panel value="home">
<HomePage openVersionSelector={openVersionSelector} versions={versions} playButtonText={playButtonText} />
</Tabs.Panel>
<Tabs.Panel style={{
height: "calc(100% - 45px)",
marginTop: "45px",
}} value="versions">
<Autocomplete
style={{
width: "calc(100% - 20px)",
margin: "5px 10px 0",
}}
value={versionFilter}
onChange={setVersionFilter}
placeholder="Version filter"
data={["Alpha", "Beta", "Gamma", "Release", "DEV"]}
/>
<div className={styles.versionsContainer}>
{installedVersions
.filter((version) => version.name.includes(versionFilter))
.map((version) => <InstalledVersion key={version.tag} version={version} uninstallVersion={uninstallVersion} />)
.reverse()}
</div>
<VersionSelector
onCancel={() => {
setVersionSelectorShown(false);
}}
onInstall={onInstall}
shown={versionSelectorShown}
versions={versionsSelectorVersions}
/>
<button onClick={showVersionSelector} className={styles.addButton} />

<Tabs.Panel
style={{
height: "calc(100% - 45px)",
marginTop: "45px",
}}
value="versions"
>
<Autocomplete
style={{
width: "calc(100% - 20px)",
margin: "5px 10px 0",
}}
value={versionFilter}
onChange={setVersionFilter}
placeholder="Version filter"
data={["Alpha", "Beta", "Gamma", "Release", "DEV"]}
/>
<div className={styles.versionsContainer}>
{installedVersions
.filter((version) => version.name.includes(versionFilter))
.map((version) => <InstalledVersion versionFilter={versionFilter} key={version.tag} version={version} uninstallVersion={uninstallVersion} />)
.reverse()}
</div>
<VersionSelector
onCancel={() => {
setVersionSelectorShown(false);
}}
onInstall={onInstall}
shown={versionSelectorShown}
versions={versionsSelectorVersions}
/>
<button onClick={showVersionSelector} className={styles.addButton} />
</Tabs.Panel>

<Tabs.Panel value="launcher">
<div
style={{
Expand Down
18 changes: 15 additions & 3 deletions src/renderer/InstalledVersion.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Button } from "@mantine/core";
import { Badge, Button, Highlight } from "@mantine/core";
import { RunVersion } from "./SE3Api/versionsApi";
import styles from "./styles/InstalledVersion.module.css";

export default function InstalledVersion({ version, uninstallVersion }) {
export default function InstalledVersion({ version, uninstallVersion, versionFilter }) {
return (
<div
style={{
Expand All @@ -17,7 +17,19 @@ export default function InstalledVersion({ version, uninstallVersion }) {
}}
className={styles.title}
>
{version.name}
<Highlight
style={{
display: "inline",
}}
highlight={versionFilter}
>
{version.name}
</Highlight>
{version.hidden && (
<Badge color="red" size="lg" style={{ float: "right", marginTop: "7px" }}>
Hidden
</Badge>
)}
</span>
<div className={styles.buttons}>
<Button
Expand Down
Loading

0 comments on commit 5496f4f

Please sign in to comment.