Upgraded to Electron 10; upgraded dependencies

This commit is contained in:
Mr. Stallion 2020-10-04 13:14:12 -05:00
parent 3f2d3bfcb1
commit cf4acbae4d
13 changed files with 1030 additions and 633 deletions

3
.ncurc.json Normal file
View File

@ -0,0 +1,3 @@
{
"reject": "keytar,@types/node,@f-list/fork-ts-checker-webpack-plugin,@f-list/vue-ts,typescript"
}

View File

@ -61,7 +61,7 @@ This repository contains a heavily customized version of the mainline F-Chat 3.0
* Message search matches character names * Message search matches character names
* PM list shows characters' online status as a colored icon * PM list shows characters' online status as a colored icon
* Technical Details for Nerds * Technical Details for Nerds
* Upgraded to Electron 9.x * Upgraded to Electron 10.x
* Replaced `node-spellchecker` with the built-in spellchecker that ships with Electron 8+ * Replaced `node-spellchecker` with the built-in spellchecker that ships with Electron 8+
* Multi-language support for spell checking (Windows only language is autodetected on MacOS) * Multi-language support for spell checking (Windows only language is autodetected on MacOS)

View File

@ -56,7 +56,7 @@
readonly classes?: string; readonly classes?: string;
@Prop @Prop
readonly value?: string | undefined; readonly value?: string | undefined = undefined;
@Prop @Prop
readonly disabled?: boolean; readonly disabled?: boolean;

View File

@ -210,7 +210,7 @@
this.scoreWatcher this.scoreWatcher
); );
delete this.scoreWatcher; this.scoreWatcher = null;
} }
} }

View File

@ -84,7 +84,7 @@ export default class UserView extends Vue {
if (this.scoreWatcher) { if (this.scoreWatcher) {
EventBus.$off('character-score', this.scoreWatcher); EventBus.$off('character-score', this.scoreWatcher);
delete this.scoreWatcher; this.scoreWatcher = null;
} }
} }
}; };

View File

@ -244,7 +244,7 @@ export class ImageDomMutator {
// tslint:disable-next-line no-any // tslint:disable-next-line no-any
(u.query as any).enterAgree = 1; (u.query as any).enterAgree = 1;
delete u.search; u.search = null;
return urlHelper.format(u); return urlHelper.format(u);
} }

View File

@ -38,9 +38,9 @@
@Prop({default: () => ((filter: RegExp, value: string) => filter.test(value))}) @Prop({default: () => ((filter: RegExp, value: string) => filter.test(value))})
readonly filterFunc!: (filter: RegExp, value: object) => boolean; readonly filterFunc!: (filter: RegExp, value: object) => boolean;
@Prop @Prop
readonly multiple?: true; readonly multiple?: true = undefined;
@Prop @Prop
readonly value?: object | object[]; readonly value?: object | object[] = undefined;
@Prop @Prop
readonly title?: string; readonly title?: string;
filter = ''; filter = '';

View File

@ -234,7 +234,17 @@
const tray = new electron.remote.Tray(trayIcon); const tray = new electron.remote.Tray(trayIcon);
tray.setToolTip(l('title')); tray.setToolTip(l('title'));
tray.on('click', (_e) => this.trayClicked(tab)); tray.on('click', (_e) => this.trayClicked(tab));
const view = new electron.remote.BrowserView({webPreferences: {webviewTag: true, nodeIntegration: true, spellcheck: true}});
const view = new electron.remote.BrowserView(
{
webPreferences: {
webviewTag: true,
nodeIntegration: true,
spellcheck: true,
enableRemoteModule: true
}
}
);
// tab devtools // tab devtools
// view.webContents.openDevTools(); // view.webContents.openDevTools();

View File

@ -179,7 +179,7 @@ function createWindow(): Electron.BrowserWindow | undefined {
const lastState = windowState.getSavedWindowState(); const lastState = windowState.getSavedWindowState();
const windowProperties: Electron.BrowserWindowConstructorOptions & {maximized: boolean} = { const windowProperties: Electron.BrowserWindowConstructorOptions & {maximized: boolean} = {
...lastState, center: lastState.x === undefined, show: false, ...lastState, center: lastState.x === undefined, show: false,
webPreferences: { webviewTag: true, nodeIntegration: true, spellcheck: true } webPreferences: { webviewTag: true, nodeIntegration: true, spellcheck: true, enableRemoteModule: true }
}; };
if(process.platform === 'darwin') { if(process.platform === 'darwin') {

View File

@ -81,8 +81,8 @@ const mainConfig = {
{test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: 'file-loader'}, {test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: 'file-loader'},
{test: /\.(wav|mp3|ogg)$/, loader: 'file-loader?name=sounds/[name].[ext]'}, {test: /\.(wav|mp3|ogg)$/, loader: 'file-loader?name=sounds/[name].[ext]'},
{test: /\.(png|html)$/, loader: 'file-loader?name=[name].[ext]'}, {test: /\.(png|html)$/, loader: 'file-loader?name=[name].[ext]'},
{test: /\.vue\.scss/, loader: ['vue-style-loader','css-loader','sass-loader']}, {test: /\.vue\.scss/, loader: ['vue-style-loader', {loader: 'css-loader', options: {esModule: false}},'sass-loader']},
{test: /\.vue\.css/, loader: ['vue-style-loader','css-loader']}, {test: /\.vue\.css/, loader: ['vue-style-loader', {loader: 'css-loader', options: {esModule: false}}]},
{test: /\.raw\.js$/, loader: 'raw-loader'} {test: /\.raw\.js$/, loader: 'raw-loader'}
] ]
}, },
@ -126,11 +126,11 @@ module.exports = function(mode) {
if(!theme.endsWith('.scss')) continue; if(!theme.endsWith('.scss')) continue;
const absPath = path.join(themesDir, theme); const absPath = path.join(themesDir, theme);
rendererConfig.entry.chat.push(absPath); rendererConfig.entry.chat.push(absPath);
rendererConfig.module.rules.unshift({test: absPath, loader: ['file-loader?name=themes/[name].css', 'extract-loader', 'css-loader', 'sass-loader']}); rendererConfig.module.rules.unshift({test: absPath, loader: ['file-loader?name=themes/[name].css', 'extract-loader', {loader: 'css-loader', options: {esModule: false}}, 'sass-loader']});
} }
const faPath = path.join(themesDir, '../../fa.scss'); const faPath = path.join(themesDir, '../../fa.scss');
rendererConfig.entry.chat.push(faPath); rendererConfig.entry.chat.push(faPath);
rendererConfig.module.rules.unshift({test: faPath, loader: ['file-loader?name=fa.css', 'extract-loader', 'css-loader', 'sass-loader']}); rendererConfig.module.rules.unshift({test: faPath, loader: ['file-loader?name=fa.css', 'extract-loader', {loader: 'css-loader', options: {esModule: false}}, 'sass-loader']});
if(mode === 'production') { if(mode === 'production') {
process.env.NODE_ENV = 'production'; process.env.NODE_ENV = 'production';
mainConfig.devtool = rendererConfig.devtool = 'source-map'; mainConfig.devtool = rendererConfig.devtool = 'source-map';

View File

@ -131,7 +131,10 @@ export default class Connection implements Interfaces.Connection {
this.reconnectTimer = undefined; this.reconnectTimer = undefined;
this.cleanClose = true; this.cleanClose = true;
if(this.socket !== undefined) this.socket.close(); if(this.socket !== undefined) this.socket.close();
if(!keepState) this.character = '';
if(!keepState) {
this.character = '';
}
} }

View File

@ -7,46 +7,46 @@
"devDependencies": { "devDependencies": {
"@f-list/fork-ts-checker-webpack-plugin": "^3.1.1", "@f-list/fork-ts-checker-webpack-plugin": "^3.1.1",
"@f-list/vue-ts": "^1.0.3", "@f-list/vue-ts": "^1.0.3",
"@fortawesome/fontawesome-free": "^5.13.1", "@fortawesome/fontawesome-free": "^5.15.0",
"@types/bluebird": "^3.5.32", "@types/bluebird": "^3.5.32",
"@types/lodash": "^4.14.157", "@types/lodash": "^4.14.161",
"@types/node": "^12.12.47", "@types/node": "^12.12.47",
"@types/node-fetch": "^2.5.7", "@types/node-fetch": "^2.5.7",
"@types/qs": "^6.9.3", "@types/qs": "^6.9.5",
"@types/sortablejs": "^1.10.4", "@types/sortablejs": "^1.10.6",
"@vue/devtools": "^5.3.3", "@vue/devtools": "^5.3.3",
"axios": "^0.19.2", "axios": "^0.20.0",
"bootstrap": "^4.5.0", "bootstrap": "^4.5.2",
"copy-webpack-plugin": "^6.0.2", "copy-webpack-plugin": "^6.2.0",
"css-loader": "^3.6.0", "css-loader": "^4.3.0",
"date-fns": "^2.14.0", "date-fns": "^2.16.1",
"electron": "^9.0.5", "electron": "^10.1.3",
"electron-log": "^4.2.2", "electron-log": "^4.2.4",
"electron-packager": "^15.0.0", "electron-packager": "^15.1.0",
"electron-rebuild": "^1.11.0", "electron-rebuild": "^2.2.0",
"extract-loader": "^5.1.0", "extract-loader": "^5.1.0",
"file-loader": "^6.0.0", "file-loader": "^6.1.0",
"lodash": "^4.17.15", "lodash": "^4.17.20",
"node-sass": "^4.14.1", "node-sass": "^4.14.1",
"optimize-css-assets-webpack-plugin": "^5.0.3", "optimize-css-assets-webpack-plugin": "^5.0.4",
"qs": "^6.9.4", "qs": "^6.9.4",
"raven-js": "^3.27.2", "raven-js": "^3.27.2",
"raw-loader": "^4.0.1", "raw-loader": "^4.0.1",
"sass-loader": "^8.0.2", "sass-loader": "^10.0.2",
"sortablejs": "^1.10.2", "sortablejs": "^1.12.0",
"style-loader": "^1.2.1", "style-loader": "^1.3.0",
"throat": "^5.0.0", "throat": "^5.0.0",
"ts-loader": "^7.0.5", "ts-loader": "^8.0.4",
"tslib": "^2.0.0", "tslib": "^2.0.1",
"tslint": "^6.1.2", "tslint": "^6.1.3",
"typescript": "^3.9.5", "typescript": "^3.9.7",
"vue": "^2.6.11", "vue": "^2.6.12",
"vue-loader": "^15.9.3", "vue-loader": "^15.9.3",
"vue-template-compiler": "^2.6.11", "vue-template-compiler": "^2.6.12",
"webpack": "^4.43.0" "webpack": "^4.44.2"
}, },
"dependencies": { "dependencies": {
"@cliqz/adblocker-electron": "^1.16.1", "@cliqz/adblocker-electron": "^1.18.3",
"bluebird": "^3.7.2", "bluebird": "^3.7.2",
"jquery": "^3.5.1", "jquery": "^3.5.1",
"keytar": "^5.4.0", "keytar": "^5.4.0",
@ -55,7 +55,7 @@
"optionalDependencies": { "optionalDependencies": {
"appdmg": "^0.6.0", "appdmg": "^0.6.0",
"electron-squirrel-startup": "^1.0.0", "electron-squirrel-startup": "^1.0.0",
"electron-winstaller": "^4.0.0" "electron-winstaller": "^4.0.1"
}, },
"scripts": { "scripts": {
"postinstall": "electron-rebuild --prebuild-tag-prefix=ignoreprebuilds -f -o keytar" "postinstall": "electron-rebuild --prebuild-tag-prefix=ignoreprebuilds -f -o keytar"

1561
yarn.lock

File diff suppressed because it is too large Load Diff