Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2cf64b556f | |||
| 55ac9a4596 | |||
| ec7adaafe3 | |||
| b1c702a033 | |||
| 6e9ef636b6 | |||
| 2cc6ac4667 | |||
| 9f705147b6 | |||
| 3529772cf7 | |||
| b6619e2ea4 |
+37
-18
@@ -1,31 +1,50 @@
|
|||||||
name: Build & release
|
on:
|
||||||
|
push:
|
||||||
on: push
|
tags:
|
||||||
|
- "*"
|
||||||
|
branches:
|
||||||
|
- "**"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
build-and-release:
|
||||||
|
name: Build App
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, ubuntu-latest, windows-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out Git repository
|
- name: Checkout
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Node.js, NPM and Yarn
|
- name: Checkout assets
|
||||||
uses: actions/setup-node@v1
|
run: git -c submodule."assets".update=checkout submodule update --init assets
|
||||||
|
|
||||||
|
- name: Install pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
with:
|
with:
|
||||||
node-version: 10
|
run_install: false
|
||||||
|
|
||||||
- name: Build/release Electron app
|
- name: Install Node.js
|
||||||
uses: samuelmeuli/action-electron-builder@v1
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
# GitHub token, automatically provided to the action
|
node-version: 22
|
||||||
# (No need to define this secret in the repo settings)
|
cache: "pnpm"
|
||||||
github_token: ${{ secrets.github_token }}
|
|
||||||
|
|
||||||
# If the commit is tagged with a version (e.g. "v1.0.0"),
|
- name: Install dependencies
|
||||||
# release the app after building
|
run: pnpm install
|
||||||
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
|
||||||
|
- name: Build or Publish
|
||||||
|
run: |
|
||||||
|
if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then
|
||||||
|
pnpm run publish
|
||||||
|
else
|
||||||
|
pnpm run make
|
||||||
|
fi
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
Vendored
-2
@@ -1,9 +1,7 @@
|
|||||||
{
|
{
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"files.exclude": {
|
"files.exclude": {
|
||||||
"**/.vite": true,
|
|
||||||
"**/node_modules": true,
|
"**/node_modules": true,
|
||||||
"**/pnpm-lock.yaml": true,
|
|
||||||
"**/tsconfig.json": false
|
"**/tsconfig.json": false
|
||||||
},
|
},
|
||||||
"editor.detectIndentation": false,
|
"editor.detectIndentation": false,
|
||||||
|
|||||||
+1
-1
Submodule assets updated: 3a0d29a0e7...628eb2f825
+20
-13
@@ -9,7 +9,8 @@ import { VitePlugin } from "@electron-forge/plugin-vite";
|
|||||||
import { PublisherGithub } from "@electron-forge/publisher-github";
|
import { PublisherGithub } from "@electron-forge/publisher-github";
|
||||||
import type { ForgeConfig } from "@electron-forge/shared-types";
|
import type { ForgeConfig } from "@electron-forge/shared-types";
|
||||||
import { FuseV1Options, FuseVersion } from "@electron/fuses";
|
import { FuseV1Options, FuseVersion } from "@electron/fuses";
|
||||||
import { globSync } from "node:fs";
|
|
||||||
|
// import { globSync } from "node:fs";
|
||||||
|
|
||||||
const STRINGS = {
|
const STRINGS = {
|
||||||
author: "Revolt Platforms LTD",
|
author: "Revolt Platforms LTD",
|
||||||
@@ -26,21 +27,31 @@ const config: ForgeConfig = {
|
|||||||
name: STRINGS.name,
|
name: STRINGS.name,
|
||||||
executableName: STRINGS.execName,
|
executableName: STRINGS.execName,
|
||||||
icon: `${ASSET_DIR}/icon`,
|
icon: `${ASSET_DIR}/icon`,
|
||||||
extraResource: [
|
// extraResource: [
|
||||||
// include all the asset files
|
// // include all the asset files
|
||||||
...globSync(ASSET_DIR + "/**/*"),
|
// ...globSync(ASSET_DIR + "/**/*"),
|
||||||
],
|
// ],
|
||||||
},
|
},
|
||||||
rebuildConfig: {},
|
rebuildConfig: {},
|
||||||
makers: [
|
makers: [
|
||||||
new MakerAppX({}),
|
new MakerAppX({
|
||||||
|
packageExecutable: `app\\${STRINGS.execName}.exe`,
|
||||||
|
publisher: "CN=B040CC7E-0016-4AF5-957F-F8977A6CFA3B",
|
||||||
|
}),
|
||||||
new MakerSquirrel({
|
new MakerSquirrel({
|
||||||
name: STRINGS.name,
|
name: STRINGS.name,
|
||||||
authors: STRINGS.author,
|
authors: STRINGS.author,
|
||||||
iconUrl: `${ASSET_DIR}/icon.ico`,
|
// todo: hoist this
|
||||||
|
iconUrl: `https://stoat.chat/app/assets/icon-DUSNE-Pb.ico`,
|
||||||
|
// todo: loadingGif
|
||||||
|
setupIcon: `${ASSET_DIR}/icon.ico`,
|
||||||
description: STRINGS.description,
|
description: STRINGS.description,
|
||||||
|
exe: `${STRINGS.execName}.exe`,
|
||||||
|
setupExe: `${STRINGS.execName}-setup.exe`,
|
||||||
|
copyright: "Copyright (C) 2025 Revolt Platforms LTD",
|
||||||
}),
|
}),
|
||||||
new MakerZIP({}),
|
new MakerZIP({}),
|
||||||
|
...[
|
||||||
new MakerFlatpak({
|
new MakerFlatpak({
|
||||||
options: {
|
options: {
|
||||||
id: "chat.stoat.stoat-desktop",
|
id: "chat.stoat.stoat-desktop",
|
||||||
@@ -99,6 +110,7 @@ const config: ForgeConfig = {
|
|||||||
"files"
|
"files"
|
||||||
> */
|
> */
|
||||||
}),
|
}),
|
||||||
|
].slice(0, 0), // disable Flatpak build
|
||||||
new MakerDeb({
|
new MakerDeb({
|
||||||
options: {
|
options: {
|
||||||
productName: STRINGS.name,
|
productName: STRINGS.name,
|
||||||
@@ -125,12 +137,7 @@ const config: ForgeConfig = {
|
|||||||
target: "preload",
|
target: "preload",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
renderer: [
|
renderer: [],
|
||||||
{
|
|
||||||
name: "main_window",
|
|
||||||
config: "vite.renderer.config.ts",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}),
|
}),
|
||||||
// Fuses are used to enable/disable various Electron functionality
|
// Fuses are used to enable/disable various Electron functionality
|
||||||
// at package time, before code signing the application
|
// at package time, before code signing the application
|
||||||
|
|||||||
+7
-4
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "stoat-desktop",
|
"name": "stoat-desktop",
|
||||||
"productName": "stoat-desktop",
|
"productName": "stoat-desktop",
|
||||||
"version": "1.1.0",
|
"version": "1.1.7",
|
||||||
"main": ".vite/build/main.js",
|
"main": ".vite/build/main.js",
|
||||||
"repo": "stoatchat/desktop",
|
"repository": "stoatchat/desktop",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "electron-forge start",
|
"start": "electron-forge start",
|
||||||
"package": "electron-forge package",
|
"package": "electron-forge package",
|
||||||
@@ -48,9 +48,12 @@
|
|||||||
"@electron-forge/maker-appx": "^7.9.0",
|
"@electron-forge/maker-appx": "^7.9.0",
|
||||||
"@homebridge/dbus-native": "^0.7.2",
|
"@homebridge/dbus-native": "^0.7.2",
|
||||||
"auto-launch": "^5.0.6",
|
"auto-launch": "^5.0.6",
|
||||||
|
"bufferutil": "^4.0.9",
|
||||||
"discord-rpc": "^4.0.1",
|
"discord-rpc": "^4.0.1",
|
||||||
"electron-squirrel-startup": "^1.0.1",
|
"electron-squirrel-startup": "^1.0.1",
|
||||||
"electron-store": "^10.1.0",
|
"electron-store": "^10.1.0",
|
||||||
"update-electron-app": "^3.1.1"
|
"update-electron-app": "^3.1.1",
|
||||||
}
|
"utf-8-validate": "^6.0.5"
|
||||||
|
},
|
||||||
|
"packageManager": "pnpm@10.18.1+sha512.77a884a165cbba2d8d1c19e3b4880eee6d2fcabd0d879121e282196b80042351d5eb3ca0935fa599da1dc51265cc68816ad2bddd2a2de5ea9fdf92adbec7cd34"
|
||||||
}
|
}
|
||||||
Generated
+35
-4
@@ -17,9 +17,12 @@ importers:
|
|||||||
auto-launch:
|
auto-launch:
|
||||||
specifier: ^5.0.6
|
specifier: ^5.0.6
|
||||||
version: 5.0.6
|
version: 5.0.6
|
||||||
|
bufferutil:
|
||||||
|
specifier: ^4.0.9
|
||||||
|
version: 4.0.9
|
||||||
discord-rpc:
|
discord-rpc:
|
||||||
specifier: ^4.0.1
|
specifier: ^4.0.1
|
||||||
version: 4.0.1(encoding@0.1.13)
|
version: 4.0.1(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@6.0.5)
|
||||||
electron-squirrel-startup:
|
electron-squirrel-startup:
|
||||||
specifier: ^1.0.1
|
specifier: ^1.0.1
|
||||||
version: 1.0.1
|
version: 1.0.1
|
||||||
@@ -29,6 +32,9 @@ importers:
|
|||||||
update-electron-app:
|
update-electron-app:
|
||||||
specifier: ^3.1.1
|
specifier: ^3.1.1
|
||||||
version: 3.1.1
|
version: 3.1.1
|
||||||
|
utf-8-validate:
|
||||||
|
specifier: ^6.0.5
|
||||||
|
version: 6.0.5
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@electron-forge/cli':
|
'@electron-forge/cli':
|
||||||
specifier: ^7.9.0
|
specifier: ^7.9.0
|
||||||
@@ -1082,6 +1088,10 @@ packages:
|
|||||||
buffer@5.7.1:
|
buffer@5.7.1:
|
||||||
resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==}
|
resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==}
|
||||||
|
|
||||||
|
bufferutil@4.0.9:
|
||||||
|
resolution: {integrity: sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw==}
|
||||||
|
engines: {node: '>=6.14.2'}
|
||||||
|
|
||||||
cacache@16.1.3:
|
cacache@16.1.3:
|
||||||
resolution: {integrity: sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==}
|
resolution: {integrity: sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==}
|
||||||
engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
|
engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
|
||||||
@@ -2282,6 +2292,10 @@ packages:
|
|||||||
encoding:
|
encoding:
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
|
node-gyp-build@4.8.4:
|
||||||
|
resolution: {integrity: sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==}
|
||||||
|
hasBin: true
|
||||||
|
|
||||||
nopt@6.0.0:
|
nopt@6.0.0:
|
||||||
resolution: {integrity: sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==}
|
resolution: {integrity: sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==}
|
||||||
engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
|
engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0}
|
||||||
@@ -3002,6 +3016,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-PCKbdWw85JsYMvmCv5GH3kXmM66rCd9m1hBEDutPNv94b/pqCMT4NtcKyeWYvLFiE8b+ha1Jdl8XAaUdPn5QTg==}
|
resolution: {integrity: sha512-PCKbdWw85JsYMvmCv5GH3kXmM66rCd9m1hBEDutPNv94b/pqCMT4NtcKyeWYvLFiE8b+ha1Jdl8XAaUdPn5QTg==}
|
||||||
engines: {node: '>=8'}
|
engines: {node: '>=8'}
|
||||||
|
|
||||||
|
utf-8-validate@6.0.5:
|
||||||
|
resolution: {integrity: sha512-EYZR+OpIXp9Y1eG1iueg8KRsY8TuT8VNgnanZ0uA3STqhHQTLwbl+WX76/9X5OY12yQubymBpaBSmMPkSTQcKA==}
|
||||||
|
engines: {node: '>=6.14.2'}
|
||||||
|
|
||||||
util-deprecate@1.0.2:
|
util-deprecate@1.0.2:
|
||||||
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
|
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
|
||||||
|
|
||||||
@@ -4411,6 +4429,10 @@ snapshots:
|
|||||||
base64-js: 1.5.1
|
base64-js: 1.5.1
|
||||||
ieee754: 1.2.1
|
ieee754: 1.2.1
|
||||||
|
|
||||||
|
bufferutil@4.0.9:
|
||||||
|
dependencies:
|
||||||
|
node-gyp-build: 4.8.4
|
||||||
|
|
||||||
cacache@16.1.3:
|
cacache@16.1.3:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@npmcli/fs': 2.1.2
|
'@npmcli/fs': 2.1.2
|
||||||
@@ -4662,10 +4684,10 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
path-type: 4.0.0
|
path-type: 4.0.0
|
||||||
|
|
||||||
discord-rpc@4.0.1(encoding@0.1.13):
|
discord-rpc@4.0.1(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@6.0.5):
|
||||||
dependencies:
|
dependencies:
|
||||||
node-fetch: 2.7.0(encoding@0.1.13)
|
node-fetch: 2.7.0(encoding@0.1.13)
|
||||||
ws: 7.5.10
|
ws: 7.5.10(bufferutil@4.0.9)(utf-8-validate@6.0.5)
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
register-scheme: https://codeload.github.com/devsnek/node-register-scheme/tar.gz/e7cc9a63a1f512565da44cb57316d9fb10750e17
|
register-scheme: https://codeload.github.com/devsnek/node-register-scheme/tar.gz/e7cc9a63a1f512565da44cb57316d9fb10750e17
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
@@ -5861,6 +5883,8 @@ snapshots:
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
encoding: 0.1.13
|
encoding: 0.1.13
|
||||||
|
|
||||||
|
node-gyp-build@4.8.4: {}
|
||||||
|
|
||||||
nopt@6.0.0:
|
nopt@6.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
abbrev: 1.1.1
|
abbrev: 1.1.1
|
||||||
@@ -6644,6 +6668,10 @@ snapshots:
|
|||||||
execa: 1.0.0
|
execa: 1.0.0
|
||||||
mem: 4.3.0
|
mem: 4.3.0
|
||||||
|
|
||||||
|
utf-8-validate@6.0.5:
|
||||||
|
dependencies:
|
||||||
|
node-gyp-build: 4.8.4
|
||||||
|
|
||||||
util-deprecate@1.0.2: {}
|
util-deprecate@1.0.2: {}
|
||||||
|
|
||||||
validate-npm-package-license@3.0.4:
|
validate-npm-package-license@3.0.4:
|
||||||
@@ -6746,7 +6774,10 @@ snapshots:
|
|||||||
|
|
||||||
wrappy@1.0.2: {}
|
wrappy@1.0.2: {}
|
||||||
|
|
||||||
ws@7.5.10: {}
|
ws@7.5.10(bufferutil@4.0.9)(utf-8-validate@6.0.5):
|
||||||
|
optionalDependencies:
|
||||||
|
bufferutil: 4.0.9
|
||||||
|
utf-8-validate: 6.0.5
|
||||||
|
|
||||||
xml2js@0.6.2:
|
xml2js@0.6.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
|
nodeLinker: hoisted
|
||||||
|
|
||||||
onlyBuiltDependencies:
|
onlyBuiltDependencies:
|
||||||
- electron
|
- electron
|
||||||
- electron-winstaller
|
- electron-winstaller
|
||||||
- esbuild
|
- esbuild
|
||||||
|
- register-scheme
|
||||||
|
|||||||
+1
-1
@@ -26,7 +26,7 @@ const acquiredLock = app.requestSingleInstanceLock();
|
|||||||
|
|
||||||
if (acquiredLock) {
|
if (acquiredLock) {
|
||||||
// start auto update logic
|
// start auto update logic
|
||||||
// todo: updateElectronApp();
|
updateElectronApp();
|
||||||
|
|
||||||
// create and configure the app when electron is ready
|
// create and configure the app when electron is ready
|
||||||
app.on("ready", () => {
|
app.on("ready", () => {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import dbus from "@homebridge/dbus-native";
|
import dbus from "@homebridge/dbus-native";
|
||||||
import { resolve } from "node:path";
|
|
||||||
|
|
||||||
import { NativeImage, app, nativeImage } from "electron";
|
import { NativeImage, app, nativeImage } from "electron";
|
||||||
|
|
||||||
@@ -19,8 +18,10 @@ export async function setBadgeCount(count: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!nativeIcons[count])
|
if (!nativeIcons[count])
|
||||||
nativeIcons[count] = nativeImage.createFromPath(
|
nativeIcons[count] = nativeImage.createFromDataURL(
|
||||||
resolve(process.resourcesPath, `${Math.min(count, 10)}.ico`),
|
await import(
|
||||||
|
`../../assets/desktop/badges/${Math.min(count, 10)}.ico?asset`
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
mainWindow.setOverlayIcon(
|
mainWindow.setOverlayIcon(
|
||||||
|
|||||||
+2
-5
@@ -1,7 +1,6 @@
|
|||||||
import { resolve } from "node:path";
|
|
||||||
|
|
||||||
import { Menu, Tray, nativeImage } from "electron";
|
import { Menu, Tray, nativeImage } from "electron";
|
||||||
|
|
||||||
|
import trayIconAsset from "../../assets/desktop/icon.png?asset";
|
||||||
import { version } from "../../package.json";
|
import { version } from "../../package.json";
|
||||||
|
|
||||||
import { mainWindow, quitApp } from "./window";
|
import { mainWindow, quitApp } from "./window";
|
||||||
@@ -10,9 +9,7 @@ import { mainWindow, quitApp } from "./window";
|
|||||||
let tray: Tray = null;
|
let tray: Tray = null;
|
||||||
|
|
||||||
// load the tray icon
|
// load the tray icon
|
||||||
const trayIcon = nativeImage.createFromPath(
|
const trayIcon = nativeImage.createFromDataURL(trayIconAsset);
|
||||||
resolve(process.resourcesPath, "icon.png"),
|
|
||||||
);
|
|
||||||
|
|
||||||
// trayIcon.setTemplateImage(true);
|
// trayIcon.setTemplateImage(true);
|
||||||
|
|
||||||
|
|||||||
+8
-11
@@ -1,4 +1,4 @@
|
|||||||
import { join, resolve } from "node:path";
|
import { join } from "node:path";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
BrowserWindow,
|
BrowserWindow,
|
||||||
@@ -9,7 +9,8 @@ import {
|
|||||||
nativeImage,
|
nativeImage,
|
||||||
} from "electron";
|
} from "electron";
|
||||||
|
|
||||||
import { setBadgeCount } from "./badges";
|
import windowIconAsset from "../../assets/desktop/icon.png?asset";
|
||||||
|
|
||||||
import { config } from "./config";
|
import { config } from "./config";
|
||||||
import { updateTrayMenu } from "./tray";
|
import { updateTrayMenu } from "./tray";
|
||||||
|
|
||||||
@@ -20,18 +21,14 @@ export let mainWindow: BrowserWindow;
|
|||||||
export const BUILD_URL = new URL(
|
export const BUILD_URL = new URL(
|
||||||
app.commandLine.hasSwitch("force-server")
|
app.commandLine.hasSwitch("force-server")
|
||||||
? app.commandLine.getSwitchValue("force-server")
|
? app.commandLine.getSwitchValue("force-server")
|
||||||
: (MAIN_WINDOW_VITE_DEV_SERVER_URL ?? "https://beta.revolt.chat"),
|
: /*MAIN_WINDOW_VITE_DEV_SERVER_URL ??*/ "https://beta.revolt.chat",
|
||||||
);
|
);
|
||||||
|
|
||||||
// internal window state
|
// internal window state
|
||||||
let shouldQuit = false;
|
let shouldQuit = false;
|
||||||
|
|
||||||
// load the window icon
|
// load the window icon
|
||||||
const windowIcon = nativeImage.createFromPath(
|
const windowIcon = nativeImage.createFromDataURL(windowIconAsset);
|
||||||
resolve(process.resourcesPath, "icon.png"),
|
|
||||||
);
|
|
||||||
|
|
||||||
console.info(resolve(process.resourcesPath, "icon.png"));
|
|
||||||
|
|
||||||
// windowIcon.setTemplateImage(true);
|
// windowIcon.setTemplateImage(true);
|
||||||
|
|
||||||
@@ -43,7 +40,7 @@ export function createMainWindow() {
|
|||||||
mainWindow = new BrowserWindow({
|
mainWindow = new BrowserWindow({
|
||||||
minWidth: 300,
|
minWidth: 300,
|
||||||
minHeight: 300,
|
minHeight: 300,
|
||||||
width: 800,
|
width: 1100,
|
||||||
height: 600,
|
height: 600,
|
||||||
backgroundColor: "#191919",
|
backgroundColor: "#191919",
|
||||||
frame: !config.customFrame,
|
frame: !config.customFrame,
|
||||||
@@ -156,8 +153,8 @@ export function createMainWindow() {
|
|||||||
|
|
||||||
// mainWindow.webContents.openDevTools();
|
// mainWindow.webContents.openDevTools();
|
||||||
|
|
||||||
let i = 0;
|
// let i = 0;
|
||||||
setInterval(() => setBadgeCount((++i % 30) + 1), 1000);
|
// setInterval(() => setBadgeCount((++i % 30) + 1), 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+2
-1
@@ -10,6 +10,7 @@
|
|||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"resolveJsonModule": true
|
"resolveJsonModule": true,
|
||||||
|
"types": ["electron-vite/node"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user