Compare commits
10 commits
897d706983
...
74c941e5b8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
74c941e5b8 | ||
|
|
00c7572cd0 | ||
|
|
d1bf862a6c | ||
|
|
9a5ecbb22c | ||
|
|
b57faa2c59 | ||
|
|
c1e4d4ee91 | ||
|
|
ffe17ec2c5 | ||
|
|
63b9ea818a | ||
|
|
58ccb63d23 | ||
|
|
8284117e76 |
12 changed files with 100 additions and 34 deletions
13
.github/workflows/release-webhook.yml
vendored
13
.github/workflows/release-webhook.yml
vendored
|
|
@ -1,3 +1,6 @@
|
|||
# DO NOT EDIT DIRECTLY IN REPOSITORY
|
||||
# Managed in Terraform templates
|
||||
|
||||
name: Release Webhook
|
||||
|
||||
on:
|
||||
|
|
@ -12,8 +15,12 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Send release notification webhook
|
||||
env:
|
||||
TAG_NAME: ${{ github.event.release.tag_name }}
|
||||
REPOSITORY: ${{ github.repository }}
|
||||
WEBHOOK_URL: ${{ secrets.STOAT_WEBHOOK_UPDATES_URL }}
|
||||
run: |
|
||||
RELEASE_URL="https://github.com/${{ github.repository }}/releases/tag/${{ github.event.release.tag_name }}"
|
||||
curl -X POST "${{ secrets.STOAT_WEBHOOK_UPDATES_URL }}" \
|
||||
RELEASE_URL="https://github.com/${REPOSITORY}/releases/tag/${TAG_NAME}"
|
||||
curl -X POST "$WEBHOOK_URL" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"content\": \"$RELEASE_URL\"}"
|
||||
-d "{\"content\": \"$RELEASE_URL\"}"
|
||||
5
.github/workflows/validate-pr-title.yml
vendored
5
.github/workflows/validate-pr-title.yml
vendored
|
|
@ -1,3 +1,6 @@
|
|||
# DO NOT EDIT DIRECTLY IN REPOSITORY
|
||||
# Managed in Terraform templates
|
||||
|
||||
name: "Lint PR"
|
||||
|
||||
on:
|
||||
|
|
@ -15,6 +18,6 @@ jobs:
|
|||
permissions:
|
||||
pull-requests: read
|
||||
steps:
|
||||
- uses: amannn/action-semantic-pull-request@v6
|
||||
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
".": "1.2.0"
|
||||
".": "1.3.0"
|
||||
}
|
||||
22
CHANGELOG.md
22
CHANGELOG.md
|
|
@ -1,5 +1,27 @@
|
|||
# Changelog
|
||||
|
||||
## [1.3.0](https://github.com/stoatchat/for-desktop/compare/v1.2.0...v1.3.0) (2026-02-18)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* minimise-to-tray-on-startup ([#126](https://github.com/stoatchat/for-desktop/issues/126)) ([8284117](https://github.com/stoatchat/for-desktop/commit/8284117e76c0fcff4091de3ef623014e4594a593))
|
||||
* Reload/Refresh shortcut ([#119](https://github.com/stoatchat/for-desktop/issues/119)) ([2e99b19](https://github.com/stoatchat/for-desktop/commit/2e99b19353fbd45d9fdf1d148bae3a8a19c788ed))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Add common zoom-reset shortcut. ([#112](https://github.com/stoatchat/for-desktop/issues/112)) ([def29f9](https://github.com/stoatchat/for-desktop/commit/def29f9b3c1205944aab58beb8000815d41633b5))
|
||||
* allow CTRL+"+" to also zoom in. ([#108](https://github.com/stoatchat/for-desktop/issues/108)) ([2b962c5](https://github.com/stoatchat/for-desktop/commit/2b962c5d066787601223368ee7dcc1e46a345b8a))
|
||||
* App-maximized-2nd-monitor ([897d706](https://github.com/stoatchat/for-desktop/commit/897d706983a347938a2fb42ba8e58e40794bba13))
|
||||
* don't re-enable abutostart ([63b9ea8](https://github.com/stoatchat/for-desktop/commit/63b9ea818a9f32ca8535948e18752726c0f50a12))
|
||||
* firstLaunch = false after initial setup ([#131](https://github.com/stoatchat/for-desktop/issues/131)) ([63b9ea8](https://github.com/stoatchat/for-desktop/commit/63b9ea818a9f32ca8535948e18752726c0f50a12))
|
||||
* flatpak icons not building correctly and wayland support ([#132](https://github.com/stoatchat/for-desktop/issues/132)) ([ffe17ec](https://github.com/stoatchat/for-desktop/commit/ffe17ec2c54fca6967435b8a4ada7fa8d4da7b33))
|
||||
* replace default dialog with notification ([#98](https://github.com/stoatchat/for-desktop/issues/98)) ([7d2f296](https://github.com/stoatchat/for-desktop/commit/7d2f296ca72bbd7ad694c66a917d47067f883fc5))
|
||||
* toggle window visibility on tray click instead of always showing ([#103](https://github.com/stoatchat/for-desktop/issues/103)) ([742a95f](https://github.com/stoatchat/for-desktop/commit/742a95f3cb820c5b5398c815b7b45017b6b06053))
|
||||
* try to restore maximised windows to correct display ([#92](https://github.com/stoatchat/for-desktop/issues/92)) ([897d706](https://github.com/stoatchat/for-desktop/commit/897d706983a347938a2fb42ba8e58e40794bba13))
|
||||
* use template icon for macOS tray, use higher res icons for other platforms ([#130](https://github.com/stoatchat/for-desktop/issues/130)) ([58ccb63](https://github.com/stoatchat/for-desktop/commit/58ccb63d23541a03e05a48a37a98f883a2ba0d3f))
|
||||
|
||||
## [1.2.0](https://github.com/stoatchat/for-desktop/compare/v1.1.12...v1.2.0) (2026-02-14)
|
||||
|
||||
|
||||
|
|
|
|||
2
assets
2
assets
|
|
@ -1 +1 @@
|
|||
Subproject commit f106946659af67ad4f008588ac51570029b2fd47
|
||||
Subproject commit bd432f2298901a8566a092636eef0c35a3a80fbc
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<caption>Main window</caption>
|
||||
<image>screenshot.png</image>
|
||||
<image>https://raw.githubusercontent.com/stoatchat/for-desktop/b57faa2c59865fea15a879c9a9304271067d0020/screenshot.png</image>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<releases>
|
||||
|
|
|
|||
|
|
@ -59,7 +59,14 @@ if (!process.env.PLATFORM) {
|
|||
productName: STRINGS.name,
|
||||
productDescription: STRINGS.description,
|
||||
runtimeVersion: "25.08",
|
||||
icon: `${ASSET_DIR}/icon.png`,
|
||||
icon: {
|
||||
"16x16": `${ASSET_DIR}/hicolor/16x16.png`,
|
||||
"32x32": `${ASSET_DIR}/hicolor/32x32.png`,
|
||||
"64x64": `${ASSET_DIR}/hicolor/64x64.png`,
|
||||
"128x128": `${ASSET_DIR}/hicolor/128x128.png`,
|
||||
"256x256": `${ASSET_DIR}/hicolor/256x256.png`,
|
||||
"512x512": `${ASSET_DIR}/hicolor/512x512.png`,
|
||||
} as unknown,
|
||||
categories: ["Network"],
|
||||
modules: [
|
||||
// use the latest zypak -- Electron sandboxing for Flatpak
|
||||
|
|
@ -77,7 +84,7 @@ if (!process.env.PLATFORM) {
|
|||
finishArgs: [
|
||||
// default arguments found by running
|
||||
// DEBUG=electron-installer-flatpak* pnpm make
|
||||
"--socket=x11",
|
||||
"--socket=fallback-x11",
|
||||
"--share=ipc",
|
||||
"--device=dri",
|
||||
"--socket=pulseaudio",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "stoat-desktop",
|
||||
"productName": "stoat-desktop",
|
||||
"version": "1.2.0",
|
||||
"version": "1.3.0",
|
||||
"main": ".vite/build/main.js",
|
||||
"repository": "stoatchat/desktop",
|
||||
"scripts": {
|
||||
|
|
|
|||
22
src/main.ts
22
src/main.ts
|
|
@ -1,6 +1,6 @@
|
|||
import { IUpdateInfo, updateElectronApp } from "update-electron-app";
|
||||
|
||||
import { BrowserWindow, app, shell, Notification } from "electron";
|
||||
import { BrowserWindow, Notification, app, shell } from "electron";
|
||||
import started from "electron-squirrel-startup";
|
||||
|
||||
import { autoLaunch } from "./native/autoLaunch";
|
||||
|
|
@ -26,29 +26,31 @@ const acquiredLock = app.requestSingleInstanceLock();
|
|||
|
||||
const onNotifyUser = (_info: IUpdateInfo) => {
|
||||
const notification = new Notification({
|
||||
title: 'Update Available',
|
||||
body: 'Restart the app to install the update.',
|
||||
silent: true
|
||||
})
|
||||
title: "Update Available",
|
||||
body: "Restart the app to install the update.",
|
||||
silent: true,
|
||||
});
|
||||
|
||||
notification.show()
|
||||
}
|
||||
notification.show();
|
||||
};
|
||||
|
||||
if (acquiredLock) {
|
||||
// start auto update logic
|
||||
updateElectronApp({onNotifyUser})
|
||||
updateElectronApp({ onNotifyUser });
|
||||
|
||||
// create and configure the app when electron is ready
|
||||
app.on("ready", () => {
|
||||
// create window and application contexts
|
||||
createMainWindow();
|
||||
|
||||
// enable auto start on Windows and MacOS
|
||||
if (config.firstLaunch) {
|
||||
if (process.platform === "win32" || process.platform === "darwin") {
|
||||
autoLaunch.enable();
|
||||
}
|
||||
config.firstLaunch = false;
|
||||
}
|
||||
|
||||
// create window and application contexts
|
||||
createMainWindow();
|
||||
initTray();
|
||||
initDiscordRpc();
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@ const schema = {
|
|||
minimiseToTray: {
|
||||
type: "boolean",
|
||||
} as JSONSchema.Boolean,
|
||||
startMinimisedToTray: {
|
||||
type: "boolean",
|
||||
} as JSONSchema.Boolean,
|
||||
spellchecker: {
|
||||
type: "boolean",
|
||||
} as JSONSchema.Boolean,
|
||||
|
|
@ -29,16 +32,16 @@ const schema = {
|
|||
type: "object",
|
||||
properties: {
|
||||
x: {
|
||||
type: 'number'
|
||||
type: "number",
|
||||
} as JSONSchema.Number,
|
||||
y: {
|
||||
type: 'number'
|
||||
type: "number",
|
||||
} as JSONSchema.Number,
|
||||
width: {
|
||||
type: 'number'
|
||||
type: "number",
|
||||
} as JSONSchema.Number,
|
||||
height: {
|
||||
type: 'number'
|
||||
type: "number",
|
||||
} as JSONSchema.Number,
|
||||
isMaximised: {
|
||||
type: "boolean",
|
||||
|
|
@ -53,6 +56,7 @@ const store = new Store({
|
|||
firstLaunch: true,
|
||||
customFrame: true,
|
||||
minimiseToTray: true,
|
||||
startMinimisedToTray: false,
|
||||
spellchecker: true,
|
||||
hardwareAcceleration: true,
|
||||
discordRpc: true,
|
||||
|
|
@ -75,6 +79,7 @@ class Config {
|
|||
firstLaunch: this.firstLaunch,
|
||||
customFrame: this.customFrame,
|
||||
minimiseToTray: this.minimiseToTray,
|
||||
startMinimisedToTray: this.startMinimisedToTray,
|
||||
spellchecker: this.spellchecker,
|
||||
hardwareAcceleration: this.hardwareAcceleration,
|
||||
discordRpc: this.discordRpc,
|
||||
|
|
@ -123,6 +128,21 @@ class Config {
|
|||
this.sync();
|
||||
}
|
||||
|
||||
get startMinimisedToTray() {
|
||||
return (store as never as { get(k: string): boolean }).get(
|
||||
"startMinimisedToTray",
|
||||
);
|
||||
}
|
||||
|
||||
set startMinimisedToTray(value: boolean) {
|
||||
(store as never as { set(k: string, value: boolean): void }).set(
|
||||
"startMinimisedToTray",
|
||||
value,
|
||||
);
|
||||
|
||||
this.sync();
|
||||
}
|
||||
|
||||
get spellchecker() {
|
||||
return (store as never as { get(k: string): boolean }).get("spellchecker");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { Menu, Tray, nativeImage } from "electron";
|
||||
|
||||
import trayIconAsset from "../../assets/desktop/icon.png?asset";
|
||||
import macOsTrayIconAsset from "../../assets/desktop/iconTemplate.png?asset";
|
||||
import { version } from "../../package.json";
|
||||
|
||||
import { mainWindow, quitApp } from "./window";
|
||||
|
|
@ -10,17 +11,16 @@ let tray: Tray = null;
|
|||
|
||||
// Create and resize tray icon for macOS
|
||||
function createTrayIcon() {
|
||||
const image = nativeImage.createFromDataURL(trayIconAsset);
|
||||
const resized = image.resize({ width: 20, height: 20 });
|
||||
|
||||
// Mark as template image so it adapts to dark/light mode
|
||||
resized.setTemplateImage(true);
|
||||
|
||||
return resized;
|
||||
if (process.platform === "darwin") {
|
||||
const image = nativeImage.createFromDataURL(macOsTrayIconAsset);
|
||||
const resized = image.resize({ width: 20, height: 20 });
|
||||
resized.setTemplateImage(true);
|
||||
return resized;
|
||||
} else {
|
||||
return nativeImage.createFromDataURL(trayIconAsset);
|
||||
}
|
||||
}
|
||||
|
||||
// trayIcon.setTemplateImage(true);
|
||||
|
||||
export function initTray() {
|
||||
const trayIcon = createTrayIcon();
|
||||
tray = new Tray(trayIcon);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ export let mainWindow: BrowserWindow;
|
|||
export const BUILD_URL = new URL(
|
||||
app.commandLine.hasSwitch("force-server")
|
||||
? app.commandLine.getSwitchValue("force-server")
|
||||
: /*MAIN_WINDOW_VITE_DEV_SERVER_URL ??*/ "https://beta.revolt.chat",
|
||||
: /*MAIN_WINDOW_VITE_DEV_SERVER_URL ??*/ "https://stoat.chat/app",
|
||||
);
|
||||
|
||||
// internal window state
|
||||
|
|
@ -36,6 +36,10 @@ const windowIcon = nativeImage.createFromDataURL(windowIconAsset);
|
|||
* Create the main application window
|
||||
*/
|
||||
export function createMainWindow() {
|
||||
// (CLI arg --hidden or config)
|
||||
const startHidden =
|
||||
app.commandLine.hasSwitch("hidden") || config.startMinimisedToTray;
|
||||
|
||||
// create the window
|
||||
mainWindow = new BrowserWindow({
|
||||
minWidth: 300,
|
||||
|
|
@ -45,6 +49,7 @@ export function createMainWindow() {
|
|||
backgroundColor: "#191919",
|
||||
frame: !config.customFrame,
|
||||
icon: windowIcon,
|
||||
show: !startHidden,
|
||||
webPreferences: {
|
||||
// relative to `.vite/build`
|
||||
preload: join(__dirname, "preload.js"),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue