Skip to content

Commit d12057c

Browse files
committed
New Thunderstore UI
- Update Electron to v31
1 parent afc6b91 commit d12057c

34 files changed

+2029
-1782
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ jobs:
1717
os: windows-latest
1818
platform: win
1919
- kind: mac
20-
os: macos-11
20+
os: macos-14
2121
platform: osx
2222
steps:
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
2424

2525
- name: Set up Node
26-
uses: actions/setup-node@v3
26+
uses: actions/setup-node@v4
2727
with:
2828
# The talk on the street says this might be a good version for building.
29-
node-version: 14.20.1
29+
node-version: 20.16.0
3030
cache: yarn
3131

3232
- name: Install Yarn dependencies
@@ -46,6 +46,11 @@ jobs:
4646
# DEBUG: electron-builder
4747
with:
4848
run: yarn build-${{ matrix.platform }} --publish=never
49+
- name: Upload Artifacts
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: r2modman-${{ matrix.platform }}
53+
path: dist/electron/Packaged
4954

5055
- if: steps.build.outputs.stderr != ''
5156
name: Log stderr

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
uses: actions/setup-node@v4
2525
with:
2626
# The talk on the street says this might be a good version for building.
27-
node-version: 14.20.1
27+
node-version: 20.16.0
2828
cache: yarn
2929

3030
- name: Install Yarn dependencies

.github/workflows/test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: Build
1+
name: Test
22

33
on: [push]
44

55
jobs:
6-
build:
6+
test:
77
name: Test on ${{ matrix.platform }}
88
runs-on: ${{ matrix.os }}
99
strategy:
@@ -17,16 +17,16 @@ jobs:
1717
os: windows-latest
1818
platform: win
1919
- kind: mac
20-
os: macos-11
20+
os: macos-14
2121
platform: osx
2222
steps:
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
2424

2525
- name: Set up Node
26-
uses: actions/setup-node@v3
26+
uses: actions/setup-node@v4
2727
with:
2828
# The talk on the street says this might be a good version for building.
29-
node-version: 14.20.1
29+
node-version: 20.16.0
3030
cache: yarn
3131

3232
- name: Install Yarn dependencies

package.json

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"build-osx": "quasar build --mode electron -T mac",
1616
"publish": "quasar build --mode electron --publish always",
1717
"publish-win": "quasar build --mode electron -T win32 --publish always",
18-
"publish-linux": "quasar build --mode electron -T linux --publish always",
18+
"publish-linux": "quasar build --mode electron -T linux --publish always",
1919
"test:unit": "jest --updateSnapshot",
2020
"test:unit:ci": "jest --ci",
2121
"test:unit:coverage": "jest --coverage",
@@ -39,23 +39,19 @@
3939
"bulma-switch": "^2.0.0",
4040
"core-js": "^3.6.5",
4141
"dexie": "^3.2.7",
42-
"dot-prop": "^5.2.0",
4342
"electron-updater": "4.2.5",
4443
"elliptic": "^6.5.4",
4544
"floating-vue": "^1.0.0-beta.19",
4645
"fs-extra": "^8.1.0",
4746
"glob-parent": "^6.0.2",
48-
"highlight.js": "^10.4.1",
4947
"lodash.debounce": "^4.0.8",
50-
"moment": "^2.29.1",
51-
"node-ipc": "^9.1.1",
52-
"quasar": "^1.14.7",
48+
"moment": "^2.30.1",
49+
"node-gyp": "^10.2.0",
50+
"node-ipc": "^12.0.0",
51+
"quasar": "^1.22.10",
5352
"quill": "^1.3.7",
5453
"sanitize-filename": "^1.6.3",
55-
"serialize-javascript": "^3.1.0",
5654
"tar": "^6.1.11",
57-
"trim-newlines": "^4.0.2",
58-
"unzipper": "^0.10.5",
5955
"vue-class-component": "^7.2.2",
6056
"vue-i18n": "^8.0.0",
6157
"vue-property-decorator": "^8.3.0",
@@ -65,50 +61,48 @@
6561
"devDependencies": {
6662
"@babel/core": "^7.4.0",
6763
"@babel/preset-typescript": "^7.14.5",
68-
"@quasar/app": "^2.0.9",
64+
"@quasar/app": "^2.4.4",
6965
"@quasar/quasar-app-extension-testing": "^1.0.3",
7066
"@quasar/quasar-app-extension-testing-unit-jest": "^2.2.2",
7167
"@quasar/quasar-app-extension-typescript": "^1.0.2",
7268
"@types/adm-zip": "^0.4.34",
7369
"@types/async-lock": "^1.1.2",
7470
"@types/chai": "^4.2.11",
71+
"@types/electron": "^1.6.10",
7572
"@types/fs-extra": "^8.0.1",
7673
"@types/lodash.debounce": "^4.0.7",
74+
"@types/mocha": "^10.0.7",
7775
"@types/node": "^12.12.12",
7876
"@types/quill": "^2.0.3",
7977
"@types/sinon": "^10.0.2",
80-
"@types/unzipper": "^0.10.1",
8178
"@types/yaml": "^1.2.0",
8279
"@typescript-eslint/eslint-plugin": "^1.12.0",
8380
"@typescript-eslint/parser": "^1.12.0",
8481
"@vue/eslint-config-airbnb": "^4.0.0",
8582
"@vue/test-utils": "^1.2.1",
86-
"babel-core": "^7.0.0-beta.3",
8783
"babel-eslint": "^10.0.1",
8884
"babel-jest": "^27.0.2",
8985
"chai": "^4.2.0",
9086
"devtron": "^1.4.0",
91-
"electron": "^11.1.1",
92-
"electron-builder": "22.10.5",
87+
"electron": "31.3.1",
88+
"electron-builder": "24.13.3",
9389
"electron-debug": "^3.0.1",
94-
"electron-devtools-installer": "^3.0.0",
95-
"electron-packager": "14.1.1",
90+
"electron-devtools-installer": "^3.2.0",
91+
"electron-packager": "17.1.2",
9692
"eslint": "^6.8.0",
9793
"eslint-config-prettier": "^6.0.0",
9894
"eslint-loader": "^2.1.1",
9995
"eslint-plugin-jest": "^24.1.0",
10096
"eslint-plugin-vue": "^5.0.0",
101-
"identity-obj-proxy": "^3.0.0",
10297
"majestic": "^1.2.24",
103-
"minimist": "^1.2.2",
98+
"minimist": "^1.2.8",
10499
"mocha": "^8.0.1",
105-
"mock-require": "^3.0.3",
106-
"node-sass": "^4.13.1",
100+
"sass": "^1.77.8",
107101
"sass-loader": "^10.2.1",
108102
"sinon": "^11.1.1",
109103
"ts-node": "^8.10.2",
110-
"typescript": "^4.5.5",
111-
"vue-jest": "^3.0.0",
104+
"typescript": "^5.5.4",
105+
"vue-jest": "^3.0.7",
112106
"wallaby-vue-compiler": "^1.0.3"
113107
},
114108
"browserslist": [
@@ -122,9 +116,13 @@
122116
"last 10 iOS versions",
123117
"last 5 Opera versions"
124118
],
119+
"resolutions": {
120+
"deasync": "0.1.30"
121+
},
125122
"engines": {
126-
"node": ">= 10.18.1",
123+
"node": ">= 18",
127124
"npm": ">= 6.13.4",
128125
"yarn": ">= 1.21.1"
129-
}
126+
},
127+
"packageManager": "[email protected]"
130128
}

quasar.conf.js

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -118,63 +118,6 @@ module.exports = configure(function(/* ctx */) {
118118
// https://quasar.dev/options/animations
119119
animations: [],
120120

121-
// https://quasar.dev/quasar-cli/developing-ssr/configuring-ssr
122-
ssr: {
123-
pwa: false
124-
},
125-
126-
// https://quasar.dev/quasar-cli/developing-pwa/configuring-pwa
127-
pwa: {
128-
workboxPluginMode: 'GenerateSW', // 'GenerateSW' or 'InjectManifest'
129-
workboxOptions: {}, // only for GenerateSW
130-
manifest: {
131-
name: `r2modmanPlus`,
132-
short_name: `r2modmanPlus`,
133-
description: `A simple and easy to use Risk of Rain 2 mod manager`,
134-
display: 'standalone',
135-
orientation: 'portrait',
136-
background_color: '#ffffff',
137-
theme_color: '#027be3',
138-
icons: [
139-
{
140-
src: 'icons/icon-128x128.png',
141-
sizes: '128x128',
142-
type: 'image/png'
143-
},
144-
{
145-
src: 'icons/icon-192x192.png',
146-
sizes: '192x192',
147-
type: 'image/png'
148-
},
149-
{
150-
src: 'icons/icon-256x256.png',
151-
sizes: '256x256',
152-
type: 'image/png'
153-
},
154-
{
155-
src: 'icons/icon-384x384.png',
156-
sizes: '384x384',
157-
type: 'image/png'
158-
},
159-
{
160-
src: 'icons/icon-512x512.png',
161-
sizes: '512x512',
162-
type: 'image/png'
163-
}
164-
]
165-
}
166-
},
167-
168-
// Full list of options: https://quasar.dev/quasar-cli/developing-cordova-apps/configuring-cordova
169-
cordova: {
170-
// noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
171-
},
172-
173-
// Full list of options: https://quasar.dev/quasar-cli/developing-capacitor-apps/configuring-capacitor
174-
capacitor: {
175-
hideSplashscreen: true
176-
},
177-
178121
// Full list of options: https://quasar.dev/quasar-cli/developing-electron-apps/configuring-electron
179122
electron: {
180123
bundler: 'builder', // 'packager' or 'builder'

src-electron/main-process/electron-main.dev.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,6 @@ app.whenReady().then(() => {
1717

1818
// Install vuejs devtools
1919
installExtension(VUEJS_DEVTOOLS)
20-
.then(name => {
21-
console.log(`Added Extension: ${name}`)
22-
// get main window
23-
const win = BrowserWindow.getFocusedWindow()
24-
if (win) {
25-
win.webContents.on('did-frame-finish-load', () => {
26-
win.webContents.once('devtools-opened', () => {
27-
win.webContents.focus()
28-
})
29-
// open electron debug
30-
console.log('Opening dev tools')
31-
win.webContents.openDevTools()
32-
})
33-
}
34-
})
35-
.catch(err => {
36-
console.log('An error occurred: ', err)
37-
})
3820
}, 250)
3921
})
4022

src-electron/main-process/electron-main.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { app, BrowserWindow, ipcMain, nativeTheme, protocol } from 'electron';
1+
import { app, BrowserWindow, ipcMain, protocol } from 'electron';
22
import Listeners from './ipcListeners';
33
import Persist from './window-state-persist';
44
import path from 'path';
@@ -7,13 +7,6 @@ import * as fs from 'fs';
77

88
app.allowRendererProcessReuse = true;
99

10-
try {
11-
if (process.platform === 'win32' && nativeTheme.shouldUseDarkColors === true) {
12-
require('fs').unlinkSync(path.join(app.getPath('userData'), 'DevTools Extensions'));
13-
}
14-
} catch (_) {
15-
}
16-
1710
/**
1811
* Set `__statics` path to static files in production;
1912
* The reason we are setting it here is that the path needs to be evaluated at runtime
@@ -30,7 +23,6 @@ function createWindow() {
3023
/**
3124
* Initial window options
3225
*/
33-
3426
const windowSize = Persist.getSize(app, {
3527
defaultWidth: 1200,
3628
defaultHeight: 700
@@ -39,6 +31,8 @@ function createWindow() {
3931
mainWindow = new BrowserWindow({
4032
width: windowSize.width,
4133
height: windowSize.height,
34+
minWidth: 1200,
35+
minHeight: 700,
4236
useContentSize: true,
4337
webPreferences: {
4438
nodeIntegration: true,
@@ -47,7 +41,13 @@ function createWindow() {
4741
contextIsolation: false,
4842
},
4943
icon: path.join(__dirname, 'icon.png'),
50-
autoHideMenuBar: process.env.PROD
44+
autoHideMenuBar: process.env.PROD,
45+
frame: false,
46+
show: false
47+
});
48+
49+
mainWindow.once('ready-to-show', () => {
50+
mainWindow.show();
5151
});
5252

5353
if (windowSize.maximized) {

src-electron/main-process/ipcListeners.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,19 @@ ipcMain.on('get-appData-directory', ()=>{
3434
browserWindow.webContents.send('receive-appData-directory', app.getPath('appData'));
3535
});
3636

37+
ipcMain.on('window-minimize', () => {
38+
browserWindow.minimize();
39+
})
40+
ipcMain.on('window-maximize', () => {
41+
if(browserWindow.isMaximized())
42+
browserWindow.unmaximize();
43+
else
44+
browserWindow.maximize();
45+
})
46+
ipcMain.on('window-close', () => {
47+
browserWindow.close();
48+
})
49+
3750
ipcMain.on('get-is-portable', ()=>{
3851
let isPortable = false;
3952
switch(process.platform){
@@ -68,4 +81,3 @@ ipcMain.on('show-open-dialog', (arg, fileOpts) => {
6881
browserWindow.webContents.send('receive-open-dialog', r);
6982
});
7083
});
71-

0 commit comments

Comments
 (0)