diff --git a/astro.config.mjs b/astro.config.mjs index 31bc33f..4208e72 100755 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,2 +1,10 @@ import { defineConfig } from 'astro/config' -export default defineConfig({srcDir: './astro',outDir: './app'}) \ No newline at end of file +export default defineConfig({ + srcDir: './astro', + outDir: './app', + compressHTML: true, + server: { + host: false, + port: 1567 + } +}) \ No newline at end of file diff --git a/electron/mainwindow.js b/electron/mainwindow.js index 32dd8cb..7f2cf44 100644 --- a/electron/mainwindow.js +++ b/electron/mainwindow.js @@ -1,7 +1,6 @@ const {BrowserWindow} = require('electron') -const glasstron = require('glasstron-clarity') // By SudoVanilla const path = require('path') -const {TitlebarRespect} = require('electron-titlebar-respect') // By SudoVanilla +const {TitlebarRespect} = require('electron-titlebar-respect') let AppMenu = require('./menu') let Notification = require('./notifications') @@ -11,18 +10,19 @@ TitlebarRespect({}) module.exports = { Create: function() { - mainWindow = new glasstron.BrowserWindow({ - title: process.env.Name, + mainWindow = new BrowserWindow({ + title: process.env.Name, // Edit this in .env minWidth: 400, minHeight: 400, width: 1200, height: 800, autoHideMenuBar: true, show: false, - blur: true, - frame: global.frame, - titleBarStyle: global.titleBarStyle, - icon: global.AppIcon, + frame: global.frame, // Controlled by Electron Titlebar Respect + titleBarStyle: global.titleBarStyle, // Controlled by Electron Titlebar Respect + icon: global.AppIcon, // Found in ./platform.js + vibrancy: 'sidebar', + transparent: true, trafficLightPosition: { x: 25, y: 25 }, // Position of Traffic Light buttons on macOS titleBarOverlay: { // Background and Height of Windows titlebar buttons color: '#232323', // Background @@ -36,7 +36,7 @@ module.exports = { // Load Content if (process.env.NODE_ENV === "development") { - mainWindow.loadURL('http://localhost:3000') // Use a URL in development mode + mainWindow.loadURL('http://localhost:1567') // Use a URL in development mode } else if (process.env.NODE_ENV === 'production') { mainWindow.loadFile('app/index.html') // Do NOT use a URL in production mode, as that can create a security risk for your users who will use this app } diff --git a/package.json b/package.json index ee2908a..bb55639 100755 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "", "main": "./electron/index.js", "scripts": { - "start": "concurrently \"astro dev\" \"wait-on http://localhost:3000 && NODE_ENV=development electron .\"", + "start": "concurrently \"astro dev\" \"wait-on http://localhost:1567 && NODE_ENV=development electron .\"", "build": "astro build && NODE_ENV=production node ./build/prepare-production.js && electron-builder build --config ./build/electron-builder.yml" }, "author": "SudoVanilla", @@ -20,10 +20,9 @@ "bugsplat-node": "^3.0.0", "dotenv": "^16.0.3", "electron-titlebar-respect": "^1.1.1", - "glasstron-clarity": "^0.1.26", "pushy-electron": "^1.0.11", "replace": "^1.2.2", "sass": "^1.60.0", "wait-on": "^7.0.1" } -} +} \ No newline at end of file