Updated dependencies

This commit is contained in:
Mr. Stallion 2020-10-24 15:47:50 -05:00
parent 594109244c
commit c2c08a9b82
7 changed files with 731 additions and 1127 deletions

View File

@ -31,7 +31,8 @@ export default class Notifications implements Interface {
getOptions(conversation: Conversation, body: string, icon: string): getOptions(conversation: Conversation, body: string, icon: string):
NotificationOptions & {badge: string, silent: boolean, renotify: boolean} { NotificationOptions & {badge: string, silent: boolean, renotify: boolean} {
const badge = <string>require(`./assets/ic_notification.png`).default; //tslint:disable-line:no-require-imports no-unsafe-any //tslint:disable-next-line:no-require-imports no-unsafe-any
const badge = <string>require(`./assets/ic_notification.png`).default;
return { return {
body, icon: core.state.settings.showAvatars ? icon : undefined, badge, silent: true, data: {key: conversation.key}, body, icon: core.state.settings.showAvatars ? icon : undefined, badge, silent: true, data: {key: conversation.key},

View File

@ -69,8 +69,11 @@
tray: Electron.Tray tray: Electron.Tray
} }
// console.log(require('./build/tray.png').default);
//tslint:disable-next-line:no-require-imports no-unsafe-any //tslint:disable-next-line:no-require-imports no-unsafe-any
const trayIcon = path.join(__dirname, <string>require('./build/tray.png').default); const trayIcon = path.join(__dirname, <string>require('./build/tray.png').default);
//path.join(__dirname, <string>require('./build/tray.png').default);
@Component @Component
export default class Window extends Vue { export default class Window extends Vue {

View File

@ -602,8 +602,10 @@ function onReady(): void {
const emptyBadge = electron.nativeImage.createEmpty(); const emptyBadge = electron.nativeImage.createEmpty();
//tslint:disable-next-line:no-require-imports no-unsafe-any const badge = electron.nativeImage.createFromPath(
const badge = electron.nativeImage.createFromPath(path.join(__dirname, <string>require('./build/badge.png').default)); //tslint:disable-next-line:no-require-imports no-unsafe-any
path.join(__dirname, <string>require('./build/badge.png').default)
);
electron.ipcMain.on('has-new', (e: Event & {sender: Electron.WebContents}, hasNew: boolean) => { electron.ipcMain.on('has-new', (e: Event & {sender: Electron.WebContents}, hasNew: boolean) => {
if(process.platform === 'darwin') app.dock.setBadge(hasNew ? '!' : ''); if(process.platform === 'darwin') app.dock.setBadge(hasNew ? '!' : '');

View File

@ -24,8 +24,8 @@ const mainConfig = {
transpileOnly: true transpileOnly: true
} }
}, },
{test: path.join(__dirname, 'package.json'), loader: 'file-loader?name=package.json', type: 'javascript/auto'}, {test: path.join(__dirname, 'package.json'), loader: 'file-loader', options: {name: 'package.json'}, type: 'javascript/auto'},
{test: /\.(png|html)$/, loader: 'file-loader?name=[name].[ext]'}, {test: /\.(png|html)$/, loader: 'file-loader', options: {name: '[name].[ext]'}},
{test: /\.raw\.js$/, loader: 'raw-loader'} {test: /\.raw\.js$/, loader: 'raw-loader'}
] ]
}, },
@ -50,6 +50,7 @@ const mainConfig = {
}, },
output: { output: {
path: __dirname + '/app', path: __dirname + '/app',
publicPath: './',
filename: '[name].js' filename: '[name].js'
}, },
context: __dirname, context: __dirname,
@ -79,10 +80,25 @@ const mainConfig = {
{test: /\.(woff2?)$/, loader: 'file-loader'}, {test: /\.(woff2?)$/, loader: 'file-loader'},
{test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: 'file-loader'}, {test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: 'file-loader'},
{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', options: {name: 'sounds/[name].[ext]'}},
{test: /\.(png|html)$/, loader: 'file-loader?name=[name].[ext]'}, {test: /\.(png|html)$/, loader: 'file-loader', options: {name: '[name].[ext]'}},
{test: /\.vue\.scss/, loader: ['vue-style-loader', {loader: 'css-loader', options: {esModule: false}},'sass-loader']}, {
{test: /\.vue\.css/, loader: ['vue-style-loader', {loader: 'css-loader', options: {esModule: false}}]}, test: /\.vue\.scss/,
// loader: ['vue-style-loader', {loader: 'css-loader', options: {esModule: false}},'sass-loader']
use: [
'vue-style-loader',
{loader: 'css-loader', options: {esModule: false}},
'sass-loader'
]
},
{
test: /\.vue\.css/,
// loader: ['vue-style-loader', {loader: 'css-loader', options: {esModule: false}}]
use: [
'vue-style-loader',
{loader: 'css-loader', options: {esModule: false}}
]
},
{test: /\.raw\.js$/, loader: 'raw-loader'} {test: /\.raw\.js$/, loader: 'raw-loader'}
] ]
}, },
@ -112,7 +128,7 @@ const mainConfig = {
], ],
resolve: { resolve: {
extensions: ['.ts', '.js', '.vue', '.css'], extensions: ['.ts', '.js', '.vue', '.css'],
alias: {qs: 'querystring'} // alias: {qs: 'querystring'}
}, },
optimization: { optimization: {
splitChunks: {chunks: 'all', minChunks: 2, name: 'common'} splitChunks: {chunks: 'all', minChunks: 2, name: 'common'}
@ -126,11 +142,35 @@ 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', {loader: 'css-loader', options: {esModule: false}}, 'sass-loader']});
rendererConfig.module.rules.unshift(
{
test: absPath,
use: [
{loader: 'file-loader', options: {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', {loader: 'css-loader', options: {esModule: false}}, 'sass-loader']});
rendererConfig.module.rules.unshift(
{
test: faPath,
use: [
{loader: 'file-loader', options: {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';
@ -141,5 +181,6 @@ module.exports = function(mode) {
mainConfig.devtool = 'inline-source-map'; mainConfig.devtool = 'inline-source-map';
rendererConfig.devtool = 'inline-source-map'; rendererConfig.devtool = 'inline-source-map';
} }
return [mainConfig, rendererConfig]; return [mainConfig, rendererConfig];
}; };

View File

@ -4,6 +4,8 @@ import * as _ from 'lodash';
import { Character, CharacterInfotag } from '../interfaces'; import { Character, CharacterInfotag } from '../interfaces';
import log from 'electron-log'; //tslint:disable-line:match-default-export-name import log from 'electron-log'; //tslint:disable-line:match-default-export-name
// tslint:disable-next-line ban-ts-ignore
// @ts-ignore
import anyAscii from 'any-ascii'; import anyAscii from 'any-ascii';

View File

@ -19,12 +19,12 @@
"axios": "^0.21.0", "axios": "^0.21.0",
"bootstrap": "^4.5.3", "bootstrap": "^4.5.3",
"copy-webpack-plugin": "^6.2.1", "copy-webpack-plugin": "^6.2.1",
"css-loader": "^4.3.0", "css-loader": "^5.0.0",
"date-fns": "^2.16.1", "date-fns": "^2.16.1",
"electron": "^10.1.5", "electron": "^10.1.5",
"electron-log": "^4.2.4", "electron-log": "^4.2.4",
"electron-packager": "^15.1.0", "electron-packager": "^15.1.0",
"electron-rebuild": "^1.11.0", "electron-rebuild": "^2.3.2",
"extract-loader": "^5.1.0", "extract-loader": "^5.1.0",
"file-loader": "^6.1.1", "file-loader": "^6.1.1",
"lodash": "^4.17.20", "lodash": "^4.17.20",
@ -35,7 +35,7 @@
"raw-loader": "^4.0.2", "raw-loader": "^4.0.2",
"sass-loader": "^10.0.4", "sass-loader": "^10.0.4",
"sortablejs": "^1.12.0", "sortablejs": "^1.12.0",
"style-loader": "^1.3.0", "style-loader": "^2.0.0",
"throat": "^5.0.0", "throat": "^5.0.0",
"ts-loader": "^8.0.7", "ts-loader": "^8.0.7",
"tslib": "^2.0.3", "tslib": "^2.0.3",
@ -44,7 +44,7 @@
"vue": "^2.6.12", "vue": "^2.6.12",
"vue-loader": "^15.9.3", "vue-loader": "^15.9.3",
"vue-template-compiler": "^2.6.12", "vue-template-compiler": "^2.6.12",
"webpack": "^4.44.2" "webpack": "^5.2.0"
}, },
"dependencies": { "dependencies": {
"@cliqz/adblocker-electron": "^1.18.3", "@cliqz/adblocker-electron": "^1.18.3",

1777
yarn.lock

File diff suppressed because it is too large Load Diff