Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b765e84151 | |||
| 8910dcba92 | |||
| 127d1430a9 | |||
| 3bf697d1a9 | |||
| a162219668 | |||
| dad885aa1d | |||
| 7b9918f43b |
@@ -0,0 +1,19 @@
|
|||||||
|
name: Release Webhook
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release-webhook:
|
||||||
|
name: Send Release Webhook
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Send release notification webhook
|
||||||
|
run: |
|
||||||
|
RELEASE_URL="https://github.com/${{ github.repository }}/releases/tag/${{ github.event.release.tag_name }}"
|
||||||
|
curl -X POST "${{ secrets.STOAT_WEBHOOK_UPDATES_URL }}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{\"content\": \"$RELEASE_URL\"}"
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
".": "1.1.12"
|
".": "1.2.0"
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,18 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [1.2.0](https://github.com/stoatchat/for-desktop/compare/v1.1.12...v1.2.0) (2026-02-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* new branding ([#87](https://github.com/stoatchat/for-desktop/issues/87)) ([8910dcb](https://github.com/stoatchat/for-desktop/commit/8910dcba923b55df789c0541b59a6a6321a28768))
|
||||||
|
* persist and restore window size and position ([#74](https://github.com/stoatchat/for-desktop/issues/74)) ([3bf697d](https://github.com/stoatchat/for-desktop/commit/3bf697d1a9aba739b6954c8469223f51093497cc))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* App Autostart ([#68](https://github.com/stoatchat/for-desktop/issues/68)) ([127d143](https://github.com/stoatchat/for-desktop/commit/127d1430a9c630e0429c9cc50d57ee316a63ebe5))
|
||||||
|
|
||||||
## [1.1.12](https://github.com/stoatchat/for-desktop/compare/v1.1.11...v1.1.12) (2025-12-29)
|
## [1.1.12](https://github.com/stoatchat/for-desktop/compare/v1.1.11...v1.1.12) (2025-12-29)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
Submodule assets updated: 4c6419a274...f106946659
+2
-3
@@ -1,12 +1,11 @@
|
|||||||
{
|
{
|
||||||
"name": "stoat-desktop",
|
"name": "stoat-desktop",
|
||||||
"productName": "stoat-desktop",
|
"productName": "stoat-desktop",
|
||||||
"version": "1.1.12",
|
"version": "1.2.0",
|
||||||
"main": ".vite/build/main.js",
|
"main": ".vite/build/main.js",
|
||||||
"repository": "stoatchat/desktop",
|
"repository": "stoatchat/desktop",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "./start.sh",
|
"start": "electron-forge start",
|
||||||
"start:forge": "electron-forge start",
|
|
||||||
"package": "electron-forge package",
|
"package": "electron-forge package",
|
||||||
"make": "electron-forge make",
|
"make": "electron-forge make",
|
||||||
"publish": "electron-forge publish",
|
"publish": "electron-forge publish",
|
||||||
|
|||||||
Vendored
+4
@@ -6,6 +6,10 @@ declare type DesktopConfig = {
|
|||||||
hardwareAcceleration: boolean;
|
hardwareAcceleration: boolean;
|
||||||
discordRpc: boolean;
|
discordRpc: boolean;
|
||||||
windowState: {
|
windowState: {
|
||||||
|
x: number;
|
||||||
|
y: number;
|
||||||
|
width: number;
|
||||||
|
height: number;
|
||||||
isMaximised: boolean;
|
isMaximised: boolean;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
+16
-12
@@ -8,16 +8,20 @@ export const autoLaunch = new AutoLaunch({
|
|||||||
name: "Stoat",
|
name: "Stoat",
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcMain.on("isAutostart?", () =>
|
ipcMain.handle("getAutostart", async () => {
|
||||||
autoLaunch
|
const enabled = await autoLaunch.isEnabled();
|
||||||
.isEnabled()
|
return enabled;
|
||||||
.then((enabled) => mainWindow.webContents.send("isAutostart", enabled)),
|
});
|
||||||
);
|
|
||||||
|
ipcMain.handle("setAutostart", async (_event, state: boolean) => {
|
||||||
ipcMain.on("setAutostart", (_event, state: boolean) => {
|
if (state) {
|
||||||
if (state) {
|
await autoLaunch.enable();
|
||||||
autoLaunch.enable();
|
console.log("Received new configuration autoStart: true");
|
||||||
} else {
|
} else {
|
||||||
autoLaunch.disable();
|
await autoLaunch.disable();
|
||||||
}
|
console.log("Received new configuration autoStart: false");
|
||||||
|
}
|
||||||
|
|
||||||
|
const enabled = await autoLaunch.isEnabled();
|
||||||
|
return enabled;
|
||||||
});
|
});
|
||||||
|
|||||||
+16
-12
@@ -28,18 +28,18 @@ const schema = {
|
|||||||
windowState: {
|
windowState: {
|
||||||
type: "object",
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
// x: {
|
x: {
|
||||||
// type: 'number'
|
type: 'number'
|
||||||
// } as JSONSchema.Number,
|
} as JSONSchema.Number,
|
||||||
// y: {
|
y: {
|
||||||
// type: 'number'
|
type: 'number'
|
||||||
// } as JSONSchema.Number,
|
} as JSONSchema.Number,
|
||||||
// width: {
|
width: {
|
||||||
// type: 'number'
|
type: 'number'
|
||||||
// } as JSONSchema.Number,
|
} as JSONSchema.Number,
|
||||||
// height: {
|
height: {
|
||||||
// type: 'number'
|
type: 'number'
|
||||||
// } as JSONSchema.Number,
|
} as JSONSchema.Number,
|
||||||
isMaximised: {
|
isMaximised: {
|
||||||
type: "boolean",
|
type: "boolean",
|
||||||
} as JSONSchema.Boolean,
|
} as JSONSchema.Boolean,
|
||||||
@@ -57,6 +57,10 @@ const store = new Store({
|
|||||||
hardwareAcceleration: true,
|
hardwareAcceleration: true,
|
||||||
discordRpc: true,
|
discordRpc: true,
|
||||||
windowState: {
|
windowState: {
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
width: 0,
|
||||||
|
height: 0,
|
||||||
isMaximised: false,
|
isMaximised: false,
|
||||||
},
|
},
|
||||||
} as DesktopConfig,
|
} as DesktopConfig,
|
||||||
|
|||||||
@@ -62,6 +62,16 @@ export function createMainWindow() {
|
|||||||
mainWindow.maximize();
|
mainWindow.maximize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// restore last position if it was moved previously
|
||||||
|
if(config.windowState.x > 0 || config.windowState.y > 0) {
|
||||||
|
mainWindow.setPosition(config.windowState.x ?? 0, config.windowState.y ?? 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// restore last size if it was resized previously
|
||||||
|
if(config.windowState.width > 0 && config.windowState.height > 0) {
|
||||||
|
mainWindow.setSize(config.windowState.width ?? 1280, config.windowState.height ?? 720);
|
||||||
|
}
|
||||||
|
|
||||||
// load the entrypoint
|
// load the entrypoint
|
||||||
mainWindow.loadURL(BUILD_URL.toString());
|
mainWindow.loadURL(BUILD_URL.toString());
|
||||||
|
|
||||||
@@ -80,12 +90,18 @@ export function createMainWindow() {
|
|||||||
// keep track of window state
|
// keep track of window state
|
||||||
function generateState() {
|
function generateState() {
|
||||||
config.windowState = {
|
config.windowState = {
|
||||||
|
x: mainWindow.getPosition()[0],
|
||||||
|
y: mainWindow.getPosition()[1],
|
||||||
|
width: mainWindow.getSize()[0],
|
||||||
|
height: mainWindow.getSize()[1],
|
||||||
isMaximised: mainWindow.isMaximized(),
|
isMaximised: mainWindow.isMaximized(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
mainWindow.on("maximize", generateState);
|
mainWindow.on("maximize", generateState);
|
||||||
mainWindow.on("unmaximize", generateState);
|
mainWindow.on("unmaximize", generateState);
|
||||||
|
mainWindow.on("moved", generateState);
|
||||||
|
mainWindow.on("resized", generateState);
|
||||||
|
|
||||||
// rebind zoom controls to be more sensible
|
// rebind zoom controls to be more sensible
|
||||||
mainWindow.webContents.on("before-input-event", (event, input) => {
|
mainWindow.webContents.on("before-input-event", (event, input) => {
|
||||||
|
|||||||
+2
-3
@@ -8,10 +8,9 @@ contextBridge.exposeInMainWorld("desktopConfig", {
|
|||||||
get: () => config,
|
get: () => config,
|
||||||
set: (config: DesktopConfig) => ipcRenderer.send("config", config),
|
set: (config: DesktopConfig) => ipcRenderer.send("config", config),
|
||||||
getAutostart() {
|
getAutostart() {
|
||||||
ipcRenderer.send("isAutostart?");
|
return ipcRenderer.invoke("getAutostart") as Promise<boolean>;
|
||||||
return new Promise((resolve) => ipcRenderer.once("isAutostart", resolve));
|
|
||||||
},
|
},
|
||||||
setAutostart(value: boolean) {
|
setAutostart(value: boolean) {
|
||||||
ipcRenderer.send("setAutostart", value);
|
return ipcRenderer.invoke("setAutostart", value) as Promise<boolean>;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Check if we're on NixOS and set up electron path if needed
|
|
||||||
if [ -f /etc/NIXOS ] || [ -n "$NIX_STORE" ]; then
|
|
||||||
# We're on NixOS, need to find the electron path
|
|
||||||
# Try to find electron in nix store matching our version requirement
|
|
||||||
REQUIRED_VERSION=$(grep '"electron"' package.json | sed -E 's/.*"electron"[[:space:]]*:[[:space:]]*"([0-9]+)\..*/\1/')
|
|
||||||
|
|
||||||
# Search for electron in nix store
|
|
||||||
ELECTRON_PATH=$(ls -d /nix/store/*electron-${REQUIRED_VERSION}* 2>/dev/null | grep -v -E '(unwrapped|\.drv$)' | head -1)
|
|
||||||
|
|
||||||
if [ -n "$ELECTRON_PATH" ] && [ -d "$ELECTRON_PATH/bin" ]; then
|
|
||||||
export ELECTRON_OVERRIDE_DIST_PATH="$ELECTRON_PATH/bin"
|
|
||||||
echo "NixOS detected: Using electron from $ELECTRON_PATH/bin"
|
|
||||||
else
|
|
||||||
echo "Warning: Could not find electron ${REQUIRED_VERSION} in nix store"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Run electron-forge directly to avoid recursion
|
|
||||||
exec npx electron-forge start "$@"
|
|
||||||
Reference in New Issue
Block a user