desktop version (100% AI I have 0 idea what I'm doing with electron tf)
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
name: Overlord Desktop Windows Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
paths:
|
||||
- "Overlord-Desktop/**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: Overlord-Desktop
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Get Version
|
||||
run: |
|
||||
$version = (Get-Content package.json | ConvertFrom-Json).version
|
||||
echo "VERSION=$version" >> $env:GITHUB_ENV
|
||||
shell: pwsh
|
||||
|
||||
- name: Build Windows Installer
|
||||
run: npm run build:win
|
||||
|
||||
- name: Upload Build Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: overlord-desktop-${{ env.VERSION }}
|
||||
path: Overlord-Desktop/dist/Overlord Setup.exe
|
||||
|
||||
- name: Delete Existing Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release delete Overlord-Desktop-v${{ env.VERSION }} --yes --cleanup-tag || echo "No existing release/tag to delete"
|
||||
shell: bash
|
||||
|
||||
- name: Create Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release create Overlord-Desktop-v${{ env.VERSION }} "dist/Overlord Setup.exe" \
|
||||
-t "Overlord Desktop v${{ env.VERSION }}" \
|
||||
-n "Automated build release for Overlord Desktop v${{ env.VERSION }}" \
|
||||
--draft=false \
|
||||
--prerelease=false
|
||||
shell: bash
|
||||
@@ -1,6 +1,7 @@
|
||||
# Local notes (never push)
|
||||
TODO-IMPROVEMENTS.md
|
||||
upx-reference.txt
|
||||
Overlord-Desktop-Tauri\*
|
||||
|
||||
# Node/Bun
|
||||
node_modules/
|
||||
|
||||
@@ -505,6 +505,10 @@ func runSession(ctx context.Context, cancel context.CancelFunc, conn *websocket.
|
||||
switch ackType {
|
||||
case "hello_ack":
|
||||
log.Printf("[purgatory] approved, proceeding with session")
|
||||
|
||||
if err := handlers.HandleHelloAck(ackCtx, env, ackEnvelope); err != nil {
|
||||
log.Printf("[purgatory] hello_ack handler error: %v", err)
|
||||
}
|
||||
case "enrollment_status":
|
||||
status, _ := ackEnvelope["status"].(string)
|
||||
log.Printf("[purgatory] server returned status=%s", status)
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
# Overlord Desktop
|
||||
|
||||
A native desktop (fat) client for the Overlord server, built with [Electron](https://electronjs.org). Use this instead of a browser to connect to your Overlord instance.
|
||||
|
||||
## Features
|
||||
|
||||
- Native desktop window with a connection screen
|
||||
- Remembers your last server address across launches
|
||||
- TLS toggle for connecting to HTTPS or HTTP servers
|
||||
- Accepts self-signed certificates
|
||||
- Full keyboard shortcut support (cut/copy/paste)
|
||||
- Cross-platform (macOS, Windows, Linux)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- [Node.js](https://nodejs.org) or [Bun](https://bun.sh) installed
|
||||
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
cd Overlord-Desktop
|
||||
npm install # or: bun install
|
||||
npm start # or: npx electron .
|
||||
```
|
||||
|
||||
This will:
|
||||
1. Show a connect screen where you enter the Overlord server's IP/hostname and port
|
||||
2. Click **Connect** to load the Overlord web UI inside the native window
|
||||
3. Your connection details are saved automatically for next launch
|
||||
|
||||
## Building for Distribution
|
||||
|
||||
```bash
|
||||
# Windows
|
||||
npm run build:win
|
||||
|
||||
# macOS
|
||||
npm run build:mac
|
||||
|
||||
# Linux
|
||||
npm run build:linux
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
On first connect, the app saves your connection to the Electron userData directory:
|
||||
- **Windows:** `%APPDATA%/overlord-desktop/connection.json`
|
||||
- **macOS:** `~/Library/Application Support/overlord-desktop/connection.json`
|
||||
- **Linux:** `~/.config/overlord-desktop/connection.json`
|
||||
|
||||
Defaults:
|
||||
- **Port:** 5173
|
||||
- **TLS:** Enabled
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 135 KiB |
@@ -0,0 +1,14 @@
|
||||
; Custom NSIS include for Overlord Desktop installer
|
||||
|
||||
; Enable DPI awareness so the installer UI renders crisply on high-DPI displays
|
||||
ManifestDPIAware true
|
||||
|
||||
!macro customInstall
|
||||
; Create Start Menu shortcut
|
||||
CreateShortCut "$SMPROGRAMS\Overlord.lnk" "$INSTDIR\Overlord.exe" "" "$INSTDIR\Overlord.exe" 0
|
||||
!macroend
|
||||
|
||||
!macro customUnInstall
|
||||
; Remove Start Menu shortcut
|
||||
Delete "$SMPROGRAMS\Overlord.lnk"
|
||||
!macroend
|
||||
@@ -0,0 +1,119 @@
|
||||
{
|
||||
"lockfileVersion": 1,
|
||||
"configVersion": 1,
|
||||
"workspaces": {
|
||||
"": {
|
||||
"name": "overlord-desktop",
|
||||
"dependencies": {
|
||||
"electrobun": "^1.16.0",
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bun": "latest",
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": "^5.0.0",
|
||||
},
|
||||
},
|
||||
},
|
||||
"packages": {
|
||||
"@babylonjs/core": ["@babylonjs/core@7.54.3", "", {}, "sha512-P5ncXVd8GEUJLhwloP9V0oVwQYIrvZztguVeLlvd5Rx+9aQnenKjpV8auJ6SRsUlAmNZU4pFTKzwF6o2EUfhAw=="],
|
||||
|
||||
"@malept/cross-spawn-promise": ["@malept/cross-spawn-promise@1.1.1", "", { "dependencies": { "cross-spawn": "^7.0.1" } }, "sha512-RTBGWL5FWQcg9orDOCcp4LvItNzUPcyEU9bwaeJX0rJ1IQxzucC48Y0/sQLp/g6t99IQgAlGIaesJS+gTn7tVQ=="],
|
||||
|
||||
"@tootallnate/quickjs-emscripten": ["@tootallnate/quickjs-emscripten@0.23.0", "", {}, "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA=="],
|
||||
|
||||
"@types/bun": ["@types/bun@1.3.11", "", { "dependencies": { "bun-types": "1.3.11" } }, "sha512-5vPne5QvtpjGpsGYXiFyycfpDF2ECyPcTSsFBMa0fraoxiQyMJ3SmuQIGhzPg2WJuWxVBoxWJ2kClYTcw/4fAg=="],
|
||||
|
||||
"@types/node": ["@types/node@25.5.0", "", { "dependencies": { "undici-types": "~7.18.0" } }, "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw=="],
|
||||
|
||||
"agent-base": ["agent-base@7.1.4", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="],
|
||||
|
||||
"ast-types": ["ast-types@0.13.4", "", { "dependencies": { "tslib": "^2.0.1" } }, "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w=="],
|
||||
|
||||
"basic-ftp": ["basic-ftp@5.2.0", "", {}, "sha512-VoMINM2rqJwJgfdHq6RiUudKt2BV+FY5ZFezP/ypmwayk68+NzzAQy4XXLlqsGD4MCzq3DrmNFD/uUmBJuGoXw=="],
|
||||
|
||||
"bun-types": ["bun-types@1.3.11", "", { "dependencies": { "@types/node": "*" } }, "sha512-1KGPpoxQWl9f6wcZh57LvrPIInQMn2TQ7jsgxqpRzg+l0QPOFvJVH7HmvHo/AiPgwXy+/Thf6Ov3EdVn1vOabg=="],
|
||||
|
||||
"cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="],
|
||||
|
||||
"cross-spawn-windows-exe": ["cross-spawn-windows-exe@1.2.0", "", { "dependencies": { "@malept/cross-spawn-promise": "^1.1.0", "is-wsl": "^2.2.0", "which": "^2.0.2" } }, "sha512-mkLtJJcYbDCxEG7Js6eUnUNndWjyUZwJ3H7bErmmtOYU/Zb99DyUkpamuIZE0b3bhmJyZ7D90uS6f+CGxRRjOw=="],
|
||||
|
||||
"data-uri-to-buffer": ["data-uri-to-buffer@6.0.2", "", {}, "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw=="],
|
||||
|
||||
"debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="],
|
||||
|
||||
"degenerator": ["degenerator@5.0.1", "", { "dependencies": { "ast-types": "^0.13.4", "escodegen": "^2.1.0", "esprima": "^4.0.1" } }, "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ=="],
|
||||
|
||||
"electrobun": ["electrobun@1.16.0", "", { "dependencies": { "@babylonjs/core": "^7.45.0", "@types/bun": "^1.3.8", "png-to-ico": "^2.1.8", "proxy-agent": "^6.5.0", "rcedit": "^4.0.1", "three": "^0.165.0" }, "bin": { "electrobun": "bin/electrobun.cjs" } }, "sha512-KO/GQO6vpWACJXizqD8F551xtRAgg83Dcfzmjo+6qqCseobttu9x+HL40n+CBnYTe+kBvFXzwso2ZrPuec78zg=="],
|
||||
|
||||
"escodegen": ["escodegen@2.1.0", "", { "dependencies": { "esprima": "^4.0.1", "estraverse": "^5.2.0", "esutils": "^2.0.2" }, "optionalDependencies": { "source-map": "~0.6.1" }, "bin": { "esgenerate": "bin/esgenerate.js", "escodegen": "bin/escodegen.js" } }, "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w=="],
|
||||
|
||||
"esprima": ["esprima@4.0.1", "", { "bin": { "esparse": "./bin/esparse.js", "esvalidate": "./bin/esvalidate.js" } }, "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="],
|
||||
|
||||
"estraverse": ["estraverse@5.3.0", "", {}, "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA=="],
|
||||
|
||||
"esutils": ["esutils@2.0.3", "", {}, "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="],
|
||||
|
||||
"get-uri": ["get-uri@6.0.5", "", { "dependencies": { "basic-ftp": "^5.0.2", "data-uri-to-buffer": "^6.0.2", "debug": "^4.3.4" } }, "sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg=="],
|
||||
|
||||
"http-proxy-agent": ["http-proxy-agent@7.0.2", "", { "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" } }, "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig=="],
|
||||
|
||||
"https-proxy-agent": ["https-proxy-agent@7.0.6", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "4" } }, "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw=="],
|
||||
|
||||
"ip-address": ["ip-address@10.1.0", "", {}, "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q=="],
|
||||
|
||||
"is-docker": ["is-docker@2.2.1", "", { "bin": { "is-docker": "cli.js" } }, "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ=="],
|
||||
|
||||
"is-wsl": ["is-wsl@2.2.0", "", { "dependencies": { "is-docker": "^2.0.0" } }, "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww=="],
|
||||
|
||||
"isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="],
|
||||
|
||||
"lru-cache": ["lru-cache@7.18.3", "", {}, "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA=="],
|
||||
|
||||
"minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="],
|
||||
|
||||
"ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="],
|
||||
|
||||
"netmask": ["netmask@2.0.2", "", {}, "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg=="],
|
||||
|
||||
"pac-proxy-agent": ["pac-proxy-agent@7.2.0", "", { "dependencies": { "@tootallnate/quickjs-emscripten": "^0.23.0", "agent-base": "^7.1.2", "debug": "^4.3.4", "get-uri": "^6.0.1", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.6", "pac-resolver": "^7.0.1", "socks-proxy-agent": "^8.0.5" } }, "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA=="],
|
||||
|
||||
"pac-resolver": ["pac-resolver@7.0.1", "", { "dependencies": { "degenerator": "^5.0.0", "netmask": "^2.0.2" } }, "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg=="],
|
||||
|
||||
"path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="],
|
||||
|
||||
"png-to-ico": ["png-to-ico@2.1.8", "", { "dependencies": { "@types/node": "^17.0.36", "minimist": "^1.2.6", "pngjs": "^6.0.0" }, "bin": { "png-to-ico": "bin/cli.js" } }, "sha512-Nf+IIn/cZ/DIZVdGveJp86NG5uNib1ZXMiDd/8x32HCTeKSvgpyg6D/6tUBn1QO/zybzoMK0/mc3QRgAyXdv9w=="],
|
||||
|
||||
"pngjs": ["pngjs@6.0.0", "", {}, "sha512-TRzzuFRRmEoSW/p1KVAmiOgPco2Irlah+bGFCeNfJXxxYGwSw7YwAOAcd7X28K/m5bjBWKsC29KyoMfHbypayg=="],
|
||||
|
||||
"proxy-agent": ["proxy-agent@6.5.0", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "^4.3.4", "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.6", "lru-cache": "^7.14.1", "pac-proxy-agent": "^7.1.0", "proxy-from-env": "^1.1.0", "socks-proxy-agent": "^8.0.5" } }, "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A=="],
|
||||
|
||||
"proxy-from-env": ["proxy-from-env@1.1.0", "", {}, "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="],
|
||||
|
||||
"rcedit": ["rcedit@4.0.1", "", { "dependencies": { "cross-spawn-windows-exe": "^1.1.0" } }, "sha512-bZdaQi34krFWhrDn+O53ccBDw0MkAT2Vhu75SqhtvhQu4OPyFM4RoVheyYiVQYdjhUi6EJMVWQ0tR6bCIYVkUg=="],
|
||||
|
||||
"shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="],
|
||||
|
||||
"shebang-regex": ["shebang-regex@3.0.0", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="],
|
||||
|
||||
"smart-buffer": ["smart-buffer@4.2.0", "", {}, "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg=="],
|
||||
|
||||
"socks": ["socks@2.8.7", "", { "dependencies": { "ip-address": "^10.0.1", "smart-buffer": "^4.2.0" } }, "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A=="],
|
||||
|
||||
"socks-proxy-agent": ["socks-proxy-agent@8.0.5", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "^4.3.4", "socks": "^2.8.3" } }, "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw=="],
|
||||
|
||||
"source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="],
|
||||
|
||||
"three": ["three@0.165.0", "", {}, "sha512-cc96IlVYGydeceu0e5xq70H8/yoVT/tXBxV/W8A/U6uOq7DXc4/s1Mkmnu6SqoYGhSRWWYFOhVwvq6V0VtbplA=="],
|
||||
|
||||
"tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||
|
||||
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
|
||||
|
||||
"undici-types": ["undici-types@7.18.2", "", {}, "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w=="],
|
||||
|
||||
"which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="],
|
||||
|
||||
"png-to-ico/@types/node": ["@types/node@17.0.45", "", {}, "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw=="],
|
||||
}
|
||||
}
|
||||
Generated
+4895
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "overlord-desktop",
|
||||
"version": "1.0.0",
|
||||
"description": "Overlord Desktop Client - Fat client for the Overlord server",
|
||||
"author": "K fucking Dot",
|
||||
"main": "src/main.js",
|
||||
"scripts": {
|
||||
"start": "electron .",
|
||||
"build": "electron-builder",
|
||||
"build:win": "electron-builder --win nsis",
|
||||
"build:mac": "electron-builder --mac",
|
||||
"build:linux": "electron-builder --linux"
|
||||
},
|
||||
"devDependencies": {
|
||||
"electron": "^35.0.0",
|
||||
"electron-builder": "^26.0.0"
|
||||
},
|
||||
"build": {
|
||||
"appId": "com.overlord.desktop",
|
||||
"productName": "Overlord",
|
||||
"icon": "build/icon.ico",
|
||||
"files": [
|
||||
"src/**/*"
|
||||
],
|
||||
"win": {
|
||||
"target": "nsis",
|
||||
"icon": "build/icon.ico"
|
||||
},
|
||||
"nsis": {
|
||||
"oneClick": false,
|
||||
"allowToChangeInstallationDirectory": true,
|
||||
"createDesktopShortcut": true,
|
||||
"createStartMenuShortcut": true,
|
||||
"shortcutName": "Overlord",
|
||||
"menuCategory": false,
|
||||
"installerIcon": "build/icon.ico",
|
||||
"uninstallerIcon": "build/icon.ico",
|
||||
"include": "build/installer.nsh",
|
||||
"artifactName": "Overlord Setup.${ext}"
|
||||
},
|
||||
"mac": {
|
||||
"target": "dmg",
|
||||
"icon": "build/icon.ico"
|
||||
},
|
||||
"linux": {
|
||||
"target": "AppImage",
|
||||
"icon": "build/icon.ico"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Overlord – Connect</title>
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
|
||||
crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
<script src="renderer.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Background particles (matches Overlord login aesthetic) -->
|
||||
<div class="particles">
|
||||
<div class="particle"></div>
|
||||
<div class="particle"></div>
|
||||
<div class="particle"></div>
|
||||
<div class="particle"></div>
|
||||
<div class="particle"></div>
|
||||
</div>
|
||||
|
||||
<div class="connect-card">
|
||||
<div class="crown-wrapper">
|
||||
<i class="fa-solid fa-crown crown-icon"></i>
|
||||
</div>
|
||||
<div class="brand">Overlord</div>
|
||||
<h2 class="title">Connect to Server</h2>
|
||||
<p class="subtitle">Enter the address of your Overlord server</p>
|
||||
|
||||
<form id="connect-form">
|
||||
<div class="form-group">
|
||||
<label class="label" for="host">Host / IP Address</label>
|
||||
<div class="input-row">
|
||||
<i class="fa-solid fa-server"></i>
|
||||
<input id="host" name="host" type="text" required
|
||||
placeholder="e.g. 192.168.1.100 or my.server.com"
|
||||
spellcheck="false" autocomplete="off" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="label" for="port">Port</label>
|
||||
<div class="input-row">
|
||||
<i class="fa-solid fa-hashtag"></i>
|
||||
<input id="port" name="port" type="number" required
|
||||
min="1" max="65535" value="5173"
|
||||
placeholder="5173" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group toggle-row">
|
||||
<label class="toggle-label" for="use-tls">
|
||||
<i class="fa-solid fa-lock"></i>
|
||||
Use TLS (HTTPS)
|
||||
</label>
|
||||
<label class="switch">
|
||||
<input id="use-tls" type="checkbox" checked />
|
||||
<span class="slider"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="button primary" id="connect-btn">
|
||||
<span class="btn-text">Connect</span>
|
||||
<i class="fa-solid fa-arrow-right btn-icon"></i>
|
||||
</button>
|
||||
|
||||
<div id="status" class="status" aria-live="polite"></div>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,62 @@
|
||||
const form = document.getElementById("connect-form");
|
||||
const hostInput = document.getElementById("host");
|
||||
const portInput = document.getElementById("port");
|
||||
const tlsCheckbox = document.getElementById("use-tls");
|
||||
const connectBtn = document.getElementById("connect-btn");
|
||||
const statusEl = document.getElementById("status");
|
||||
|
||||
function setStatus(msg, type = "info") {
|
||||
statusEl.className = `status ${type}`;
|
||||
statusEl.innerHTML = msg;
|
||||
}
|
||||
|
||||
// Load saved connection on startup
|
||||
(async () => {
|
||||
try {
|
||||
const saved = await window.overlord.getSavedConnection();
|
||||
if (saved) {
|
||||
hostInput.value = saved.host;
|
||||
portInput.value = String(saved.port);
|
||||
tlsCheckbox.checked = saved.useTLS;
|
||||
}
|
||||
} catch {
|
||||
// first run, no saved data
|
||||
}
|
||||
})();
|
||||
|
||||
form.addEventListener("submit", async (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
const host = hostInput.value.trim();
|
||||
const port = parseInt(portInput.value, 10);
|
||||
const useTLS = tlsCheckbox.checked;
|
||||
|
||||
if (!host) {
|
||||
setStatus("Please enter a host address.", "error");
|
||||
return;
|
||||
}
|
||||
if (isNaN(port) || port < 1 || port > 65535) {
|
||||
setStatus("Port must be between 1 and 65535.", "error");
|
||||
return;
|
||||
}
|
||||
|
||||
connectBtn.disabled = true;
|
||||
connectBtn.querySelector(".btn-text").textContent = "Connecting…";
|
||||
setStatus('<span class="spinner"></span> Connecting…', "info");
|
||||
|
||||
try {
|
||||
const result = await window.overlord.connectToServer({ host, port, useTLS });
|
||||
|
||||
if (result.success) {
|
||||
setStatus("Connected! Loading Overlord…", "ok");
|
||||
} else {
|
||||
setStatus(result.error || "Connection failed.", "error");
|
||||
connectBtn.disabled = false;
|
||||
connectBtn.querySelector(".btn-text").textContent = "Connect";
|
||||
}
|
||||
} catch (err) {
|
||||
setStatus(err?.message || "Connection failed.", "error");
|
||||
connectBtn.disabled = false;
|
||||
connectBtn.querySelector(".btn-text").textContent = "Connect";
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,243 @@
|
||||
/* ---------- Reset & Base ---------- */
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
font-family: 'Inter', system-ui, -apple-system, sans-serif;
|
||||
background: #0a0a12;
|
||||
color: #e4e4ef;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* ---------- Particles (matches Overlord login) ---------- */
|
||||
.particles {
|
||||
position: fixed; inset: 0;
|
||||
pointer-events: none; z-index: 0;
|
||||
}
|
||||
.particle {
|
||||
position: absolute;
|
||||
width: 6px; height: 6px;
|
||||
border-radius: 50%;
|
||||
background: rgba(139, 92, 246, 0.35);
|
||||
animation: float 18s infinite ease-in-out;
|
||||
}
|
||||
.particle:nth-child(1) { top: 12%; left: 18%; animation-delay: 0s; }
|
||||
.particle:nth-child(2) { top: 48%; left: 72%; animation-delay: -4s; width: 8px; height: 8px; }
|
||||
.particle:nth-child(3) { top: 78%; left: 34%; animation-delay: -8s; }
|
||||
.particle:nth-child(4) { top: 22%; left: 82%; animation-delay: -12s; width: 4px; height: 4px; }
|
||||
.particle:nth-child(5) { top: 62%; left: 10%; animation-delay: -16s; }
|
||||
|
||||
@keyframes float {
|
||||
0%, 100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.4; }
|
||||
25% { transform: translateY(-30px) translateX(15px) scale(1.2); opacity: 0.7; }
|
||||
50% { transform: translateY(10px) translateX(-10px) scale(0.9); opacity: 0.5; }
|
||||
75% { transform: translateY(-20px) translateX(20px) scale(1.1); opacity: 0.6; }
|
||||
}
|
||||
|
||||
/* ---------- Card ---------- */
|
||||
.connect-card {
|
||||
position: relative; z-index: 1;
|
||||
max-width: 420px;
|
||||
margin: 0 auto;
|
||||
margin-top: clamp(60px, 15vh, 160px);
|
||||
padding: 40px 36px 32px;
|
||||
background: rgba(18, 18, 30, 0.92);
|
||||
border: 1px solid rgba(139, 92, 246, 0.18);
|
||||
border-radius: 18px;
|
||||
backdrop-filter: blur(16px);
|
||||
box-shadow: 0 8px 40px rgba(0, 0, 0, 0.55);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.crown-wrapper {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.crown-icon {
|
||||
font-size: 2.2rem;
|
||||
color: #a78bfa;
|
||||
filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5));
|
||||
}
|
||||
|
||||
.brand {
|
||||
font-size: 1.6rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 2px;
|
||||
background: linear-gradient(135deg, #a78bfa, #818cf8);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 1.15rem;
|
||||
font-weight: 600;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 0.82rem;
|
||||
color: #9393ad;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
/* ---------- Form ---------- */
|
||||
.form-group {
|
||||
text-align: left;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.label {
|
||||
display: block;
|
||||
font-size: 0.78rem;
|
||||
font-weight: 600;
|
||||
color: #a3a3c2;
|
||||
margin-bottom: 6px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.input-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
background: rgba(30, 30, 50, 0.7);
|
||||
border: 1px solid rgba(139, 92, 246, 0.15);
|
||||
border-radius: 10px;
|
||||
padding: 0 14px;
|
||||
transition: border-color 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
.input-row:focus-within {
|
||||
border-color: #8b5cf6;
|
||||
box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
|
||||
}
|
||||
.input-row i {
|
||||
color: #7c7c9e;
|
||||
font-size: 0.9rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.input-row input {
|
||||
flex: 1;
|
||||
background: transparent;
|
||||
border: none;
|
||||
outline: none;
|
||||
color: #e4e4ef;
|
||||
font-size: 0.92rem;
|
||||
padding: 12px 0;
|
||||
font-family: inherit;
|
||||
}
|
||||
.input-row input::placeholder {
|
||||
color: #5e5e7a;
|
||||
}
|
||||
|
||||
/* number input spinner removal */
|
||||
.input-row input[type=number]::-webkit-inner-spin-button,
|
||||
.input-row input[type=number]::-webkit-outer-spin-button {
|
||||
-webkit-appearance: none; margin: 0;
|
||||
}
|
||||
.input-row input[type=number] { -moz-appearance: textfield; }
|
||||
|
||||
/* ---------- Toggle ---------- */
|
||||
.toggle-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.toggle-label {
|
||||
font-size: 0.88rem;
|
||||
font-weight: 500;
|
||||
color: #c4c4d8;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.toggle-label i { color: #7c7c9e; }
|
||||
|
||||
.switch {
|
||||
position: relative;
|
||||
width: 44px; height: 24px;
|
||||
}
|
||||
.switch input { opacity: 0; width: 0; height: 0; }
|
||||
.slider {
|
||||
position: absolute; inset: 0;
|
||||
background: #2a2a3e;
|
||||
border-radius: 24px;
|
||||
cursor: pointer;
|
||||
transition: background 0.25s;
|
||||
}
|
||||
.slider::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 18px; height: 18px;
|
||||
left: 3px; bottom: 3px;
|
||||
background: #7c7c9e;
|
||||
border-radius: 50%;
|
||||
transition: transform 0.25s, background 0.25s;
|
||||
}
|
||||
.switch input:checked + .slider {
|
||||
background: rgba(139, 92, 246, 0.35);
|
||||
}
|
||||
.switch input:checked + .slider::before {
|
||||
transform: translateX(20px);
|
||||
background: #a78bfa;
|
||||
}
|
||||
|
||||
/* ---------- Button ---------- */
|
||||
.button.primary {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
margin-top: 24px;
|
||||
padding: 13px 0;
|
||||
border: none;
|
||||
border-radius: 10px;
|
||||
font-size: 0.95rem;
|
||||
font-weight: 600;
|
||||
font-family: inherit;
|
||||
cursor: pointer;
|
||||
color: #fff;
|
||||
background: linear-gradient(135deg, #7c3aed, #6366f1);
|
||||
box-shadow: 0 4px 18px rgba(124, 58, 237, 0.35);
|
||||
transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
|
||||
}
|
||||
.button.primary:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 6px 24px rgba(124, 58, 237, 0.50);
|
||||
}
|
||||
.button.primary:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
.button.primary:disabled {
|
||||
opacity: 0.6;
|
||||
cursor: not-allowed;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.btn-icon { font-size: 0.85rem; }
|
||||
|
||||
/* ---------- Status ---------- */
|
||||
.status {
|
||||
margin-top: 14px;
|
||||
min-height: 20px;
|
||||
font-size: 0.82rem;
|
||||
text-align: center;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
.status.error { color: #f87171; }
|
||||
.status.info { color: #a78bfa; }
|
||||
.status.ok { color: #34d399; }
|
||||
|
||||
/* ---------- Spinner ---------- */
|
||||
.spinner {
|
||||
display: inline-block;
|
||||
width: 16px; height: 16px;
|
||||
border: 2px solid rgba(255,255,255,0.3);
|
||||
border-top-color: #fff;
|
||||
border-radius: 50%;
|
||||
animation: spin 0.6s linear infinite;
|
||||
vertical-align: middle;
|
||||
margin-right: 6px;
|
||||
}
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 135 KiB |
@@ -0,0 +1,93 @@
|
||||
const { app, BrowserWindow, ipcMain } = require("electron");
|
||||
const path = require("path");
|
||||
const fs = require("fs");
|
||||
|
||||
// ── Persistence ──────────────────────────────────────────────
|
||||
app.setAppUserModelId("com.overlord.desktop");
|
||||
|
||||
const CONFIG_DIR = path.join(app.getPath("userData"), "overlord-desktop");
|
||||
const CONFIG_FILE = path.join(CONFIG_DIR, "connection.json");
|
||||
|
||||
function loadSavedConnection() {
|
||||
try {
|
||||
if (fs.existsSync(CONFIG_FILE)) {
|
||||
const raw = JSON.parse(fs.readFileSync(CONFIG_FILE, "utf-8"));
|
||||
if (raw && typeof raw.host === "string" && typeof raw.port === "number") {
|
||||
return {
|
||||
host: raw.host,
|
||||
port: raw.port,
|
||||
useTLS: raw.useTLS !== false,
|
||||
};
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
// ignore corrupt config
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function saveConnection(conn) {
|
||||
fs.mkdirSync(CONFIG_DIR, { recursive: true });
|
||||
fs.writeFileSync(CONFIG_FILE, JSON.stringify(conn, null, 2));
|
||||
}
|
||||
|
||||
// ── Window ───────────────────────────────────────────────────
|
||||
let win;
|
||||
let serverBaseUrl = null; // e.g. "https://1.2.3.4:5173"
|
||||
|
||||
function createWindow() {
|
||||
win = new BrowserWindow({
|
||||
width: 1280,
|
||||
height: 800,
|
||||
title: "Overlord",
|
||||
icon: path.join(__dirname, "icon.ico"),
|
||||
webPreferences: {
|
||||
preload: path.join(__dirname, "preload.js"),
|
||||
contextIsolation: true,
|
||||
nodeIntegration: false,
|
||||
},
|
||||
});
|
||||
|
||||
win.loadFile(path.join(__dirname, "connect", "index.html"));
|
||||
|
||||
// Allow self-signed certs on the target Overlord server
|
||||
win.webContents.session.setCertificateVerifyProc((_req, cb) => cb(0));
|
||||
}
|
||||
|
||||
app.whenReady().then(createWindow);
|
||||
|
||||
app.on("window-all-closed", () => {
|
||||
app.quit();
|
||||
});
|
||||
|
||||
app.on("activate", () => {
|
||||
if (BrowserWindow.getAllWindows().length === 0) createWindow();
|
||||
});
|
||||
|
||||
// ── IPC handlers ─────────────────────────────────────────────
|
||||
ipcMain.handle("get-saved-connection", () => {
|
||||
return loadSavedConnection();
|
||||
});
|
||||
|
||||
ipcMain.handle("connect-to-server", (_event, { host, port, useTLS }) => {
|
||||
if (!host || host.trim().length === 0) {
|
||||
return { success: false, error: "Host is required" };
|
||||
}
|
||||
if (port < 1 || port > 65535) {
|
||||
return { success: false, error: "Port must be between 1 and 65535" };
|
||||
}
|
||||
|
||||
const protocol = useTLS ? "https" : "http";
|
||||
const url = `${protocol}://${host.trim()}:${port}`;
|
||||
|
||||
saveConnection({ host: host.trim(), port, useTLS });
|
||||
serverBaseUrl = url;
|
||||
win.loadURL(url);
|
||||
|
||||
return { success: true };
|
||||
});
|
||||
|
||||
ipcMain.handle("go-back-to-connect", () => {
|
||||
serverBaseUrl = null;
|
||||
win.loadFile(path.join(__dirname, "connect", "index.html"));
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
const { contextBridge, ipcRenderer } = require("electron");
|
||||
|
||||
contextBridge.exposeInMainWorld("overlord", {
|
||||
getSavedConnection: () => ipcRenderer.invoke("get-saved-connection"),
|
||||
connectToServer: (opts) => ipcRenderer.invoke("connect-to-server", opts),
|
||||
goBackToConnect: () => ipcRenderer.invoke("go-back-to-connect"),
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
@echo off
|
||||
echo === Building Overlord Desktop ===
|
||||
cd /d "%~dp0Overlord-Desktop"
|
||||
call npm install
|
||||
call npm run build:win
|
||||
echo === Done ===
|
||||
pause
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
echo "=== Building Overlord Desktop ==="
|
||||
cd "$(dirname "$0")/Overlord-Desktop"
|
||||
npm install
|
||||
npm run build
|
||||
echo "=== Done ==="
|
||||
Reference in New Issue
Block a user