Skip to content

Commit a64f482

Browse files
committed
New thunderstore UI
- Update Electron to v31
1 parent 447b733 commit a64f482

35 files changed

+1953
-1667
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: 19 additions & 15 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",
@@ -48,8 +48,9 @@
4848
"highlight.js": "^10.4.1",
4949
"lodash.debounce": "^4.0.8",
5050
"moment": "^2.29.1",
51+
"node-gyp": "^10.2.0",
5152
"node-ipc": "^9.1.1",
52-
"quasar": "^1.14.7",
53+
"quasar": "^1.22.10",
5354
"quill": "^1.3.7",
5455
"sanitize-filename": "^1.6.3",
5556
"serialize-javascript": "^3.1.0",
@@ -65,15 +66,17 @@
6566
"devDependencies": {
6667
"@babel/core": "^7.4.0",
6768
"@babel/preset-typescript": "^7.14.5",
68-
"@quasar/app": "^2.0.9",
69+
"@quasar/app": "^2.4.4",
6970
"@quasar/quasar-app-extension-testing": "^1.0.3",
7071
"@quasar/quasar-app-extension-testing-unit-jest": "^2.2.2",
7172
"@quasar/quasar-app-extension-typescript": "^1.0.2",
7273
"@types/adm-zip": "^0.4.34",
7374
"@types/async-lock": "^1.1.2",
7475
"@types/chai": "^4.2.11",
76+
"@types/electron": "^1.6.10",
7577
"@types/fs-extra": "^8.0.1",
7678
"@types/lodash.debounce": "^4.0.7",
79+
"@types/mocha": "^10.0.7",
7780
"@types/node": "^12.12.12",
7881
"@types/quill": "^2.0.3",
7982
"@types/sinon": "^10.0.2",
@@ -83,32 +86,29 @@
8386
"@typescript-eslint/parser": "^1.12.0",
8487
"@vue/eslint-config-airbnb": "^4.0.0",
8588
"@vue/test-utils": "^1.2.1",
86-
"babel-core": "^7.0.0-beta.3",
8789
"babel-eslint": "^10.0.1",
8890
"babel-jest": "^27.0.2",
8991
"chai": "^4.2.0",
9092
"devtron": "^1.4.0",
91-
"electron": "^11.1.1",
92-
"electron-builder": "22.10.5",
93+
"electron": "31.3.1",
94+
"electron-builder": "24.13.3",
9395
"electron-debug": "^3.0.1",
94-
"electron-devtools-installer": "^3.0.0",
95-
"electron-packager": "14.1.1",
96+
"electron-devtools-installer": "^3.2.0",
97+
"electron-packager": "17.1.2",
9698
"eslint": "^6.8.0",
9799
"eslint-config-prettier": "^6.0.0",
98100
"eslint-loader": "^2.1.1",
99101
"eslint-plugin-jest": "^24.1.0",
100102
"eslint-plugin-vue": "^5.0.0",
101-
"identity-obj-proxy": "^3.0.0",
102103
"majestic": "^1.2.24",
103-
"minimist": "^1.2.2",
104+
"minimist": "^1.2.8",
104105
"mocha": "^8.0.1",
105-
"mock-require": "^3.0.3",
106-
"node-sass": "^4.13.1",
106+
"sass": "^1.77.8",
107107
"sass-loader": "^10.2.1",
108108
"sinon": "^11.1.1",
109109
"ts-node": "^8.10.2",
110-
"typescript": "^4.5.5",
111-
"vue-jest": "^3.0.0",
110+
"typescript": "^5.5.4",
111+
"vue-jest": "^3.0.7",
112112
"wallaby-vue-compiler": "^1.0.3"
113113
},
114114
"browserslist": [
@@ -122,9 +122,13 @@
122122
"last 10 iOS versions",
123123
"last 5 Opera versions"
124124
],
125+
"resolutions": {
126+
"deasync": "0.1.30"
127+
},
125128
"engines": {
126129
"node": ">= 10.18.1",
127130
"npm": ">= 6.13.4",
128131
"yarn": ">= 1.21.1"
129-
}
132+
},
133+
"packageManager": "[email protected]"
130134
}

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: 5 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,8 @@ 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
5146
});
5247

5348
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-

src/App.vue

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
<template>
22
<div>
3+
<div class="titlebar">
4+
<div class="titlebar_start">
5+
<p class="titlebar_title">{{ appName }}</p>
6+
<p class="titlebar_version">{{ appVersion }}</p>
7+
</div>
8+
<div class="titlebar_buttons">
9+
<div class="btn" @click="() => ipcRenderer.send('window-minimize')">
10+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8.47 8.47">
11+
<path
12+
d="M 0.71464503,4.235 H 7.7550979" stroke="currentColor" fill="currentColor" stroke-linecap="round" stroke-width="1.59"/>
13+
</svg>
14+
</div>
15+
<div class="btn" @click="() => ipcRenderer.send('window-maximize')">
16+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8.47 8.47">
17+
<path
18+
d="M 0.70215499,0.70215499 H 7.767847 V 7.7678511 H 0.70215499 Z" stroke="currentColor" fill="none" stroke-linecap="round" stroke-width="1.59" />
19+
</svg>
20+
</div>
21+
<div class="closebutton btn" @click="() => ipcRenderer.send('window-close')">
22+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8.47 8.47">
23+
<path d="m7.67.794-6.88 6.88m0-6.88 6.88 6.88" stroke="currentColor" fill="currentColor" stroke-linecap="round" stroke-width="1.59" />
24+
</svg>
25+
</div>
26+
</div>
27+
</div>
328
<router-view v-if="visible"/>
429
<ErrorModal />
530
</div>
@@ -53,7 +78,8 @@ import ErrorModal from './components/modals/ErrorModal.vue';
5378
}
5479
})
5580
export default class App extends mixins(UtilityMixin) {
56-
private visible: boolean = false;
81+
public visible: boolean = false;
82+
readonly ipcRenderer = ipcRenderer;
5783
5884
async created() {
5985
// Load settings using the default game before the actual game is selected.
@@ -123,5 +149,13 @@ export default class App extends mixins(UtilityMixin) {
123149
BindLoaderImpl.bind();
124150
}
125151
152+
get appName(): string {
153+
return ManagerInformation.APP_NAME;
154+
}
155+
156+
get appVersion(): string {
157+
return ManagerInformation.VERSION.toString();
158+
}
159+
126160
}
127161
</script>

src/components/buttons/DonateButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<Link :url="mod.getDonationLink()"
2+
<Link :url="mod?.getDonationLink()"
33
:target="'external'"
44
class="card-footer-item"
55
v-tooltip.left="{content: 'Donate to the mod author', distance: 0}">

0 commit comments

Comments
 (0)