diff --git a/README.md b/README.md
index c6839c0..61ba36c 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,10 @@
Minecraft analytics and anti/PieRay helper.
+## Launcher
+
+![Launcher](images/launcher.png?raw=true "Launcher")
+
## Analytics
![Analytics](images/analytics.png?raw=true "Analytics")
diff --git a/images/1024fg.png b/images/1024fg.png
new file mode 100644
index 0000000..474314d
Binary files /dev/null and b/images/1024fg.png differ
diff --git a/images/icons/blackstone.png b/images/icons/blackstone.png
new file mode 100644
index 0000000..a289d99
Binary files /dev/null and b/images/icons/blackstone.png differ
diff --git a/images/icons/deepslate.png b/images/icons/deepslate.png
new file mode 100644
index 0000000..e866e04
Binary files /dev/null and b/images/icons/deepslate.png differ
diff --git a/images/launcher.png b/images/launcher.png
new file mode 100644
index 0000000..09f1fee
Binary files /dev/null and b/images/launcher.png differ
diff --git a/src/components/App.tsx b/src/components/App.tsx
index 076bac6..7f1d91e 100644
--- a/src/components/App.tsx
+++ b/src/components/App.tsx
@@ -9,10 +9,12 @@ import {
TabPanel,
TabPanels,
Box,
- useColorModeValue,
Avatar,
Spacer,
Tooltip,
+ ColorModeProvider,
+ ThemeProvider,
+ extendTheme,
} from '@chakra-ui/react'
import React from 'react'
import { Analytics } from './Analytics'
@@ -20,34 +22,58 @@ import { Launcher } from './Launcher'
import { PieRayHelper } from './PieRayHelper'
import { Waypoints } from './Waypoints'
-function App() {
+const theme = extendTheme({})
+
+export function ThemedApp(props: { children: React.ReactNode }) {
+ return (
+
+
+
+ {props.children}
+
+
+
+ )
+}
+
+export function App() {
const [selectedTab, setSelectedTab] = React.useState(2)
return (
setSelectedTab(index)}
+ style={{ backgroundColor: 'rgba(0, 0, 0, 0.4)' }}
>
-
+
- }
+ variant="ghost"
+ icon={}
/>
- Analytics
- Anti/PieRay
- Launcher
- Strongholds
- Waypoints
+ Analytics
+ Anti/PieRay
+ Launcher
+ Strongholds
+ Waypoints
-
)
}
-
-export default App
diff --git a/src/components/Launcher.tsx b/src/components/Launcher.tsx
index 35166ef..d62dc77 100644
--- a/src/components/Launcher.tsx
+++ b/src/components/Launcher.tsx
@@ -21,6 +21,7 @@ import {
Select,
Spacer,
Spinner,
+ Text,
Tooltip,
} from '@chakra-ui/react'
import { AddIcon, EditIcon } from '@chakra-ui/icons'
@@ -32,6 +33,7 @@ import { v4 as uuidv4 } from 'uuid'
import {
findVersionManifest,
GameInstall,
+ getGameInstallIsHacked,
getGameInstalModLoaderName,
ModLoaderName,
MojangVersionManifests,
@@ -386,8 +388,8 @@ export function Launcher() {
}
@@ -400,10 +402,26 @@ export function Launcher() {
/>
- {install.name +
- (install.versionManifest.id !== install.name
- ? `: ${install.versionManifest.id}`
- : '')}
+
+
+ {install.name +
+ (install.versionManifest.id !== install.name
+ ? `: ${install.versionManifest.id}`
+ : '')}
+
+
+
+ {getGameInstalModLoaderName(install) ===
+ ModLoaderName.Fabric ? (
+ getGameInstallIsHacked(install) ? (
+ [Hacked]
+ ) : (
+ [Fabric, Allowed mods]
+ )
+ ) : (
+ [Vanilla]
+ )}
+
{install.uuid}
diff --git a/src/constants.ts b/src/constants.ts
index 81cb612..903a1ae 100644
--- a/src/constants.ts
+++ b/src/constants.ts
@@ -270,6 +270,9 @@ export const getGameInstalModLoaderName = (
return ModLoaderName.None
}
+export const getGameInstallIsHacked = (gameInstall: Partial) =>
+ gameInstall?.mods?.some((x) => x.includes('meteor-client'))
+
export const setGameInstallModLoaderName = (
gameInstall: Partial,
modLoaderName: string
diff --git a/src/index.html b/src/index.html
index 79c3769..4a8dcf1 100644
--- a/src/index.html
+++ b/src/index.html
@@ -1,11 +1,11 @@
-
+
🏰 Empire Utils
-
-
+
+
diff --git a/src/index.tsx b/src/index.tsx
index 8f10b67..40475e2 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -1,8 +1,8 @@
-import { ChakraProvider } from '@chakra-ui/react'
+import { ChakraProvider, extendTheme } from '@chakra-ui/react'
import React from 'react'
import ReactDOM from 'react-dom/client'
import './index.css'
-import App from './components/App'
+import { App, ThemedApp } from './components/App'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
const docRoot = document.getElementById('root')
@@ -15,7 +15,9 @@ root.render(
-
+
+
+
diff --git a/src/main.ts b/src/main.ts
index e100617..4abeb32 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -4,6 +4,8 @@ import {
clipboard,
dialog,
ipcMain,
+ net,
+ protocol,
session,
shell,
} from 'electron'
@@ -12,7 +14,7 @@ import isDev from 'electron-is-dev'
import log from 'electron-log/main'
import './index.css'
-import { CHANNELS, GameInstall, LAUNCH_CHANNEL, STORE_KEYS } from './constants'
+import { CHANNELS, GameInstall, LAUNCH_CHANNEL } from './constants'
import { AuthProvider } from './msal/AuthProvider'
import { newStore, removeGameInstall, updateGameInstall } from './store'
import {
@@ -82,11 +84,14 @@ app.on('ready', () => {
responseHeaders: {
...details.responseHeaders,
'Content-Security-Policy': [
- "default-src 'self' 'unsafe-eval'; connect-src 'self' https://launchermeta.mojang.com https://meta.fabricmc.net; img-src 'self' https:; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline';",
+ "default-src 'self' 'unsafe-eval'; connect-src 'self' https://launchermeta.mojang.com https://meta.fabricmc.net; img-src 'self' https: app-file:; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline';",
],
},
})
})
+ protocol.handle('app-file', async (request) =>
+ net.fetch(request.url.replace(`app-file://`, `file://${app.getAppPath()}/`))
+ )
ipcMain.handle(CHANNELS.electronStoreGet, (_event, key: string) =>
store.get(key)
)