Upgraded all dependencies
This commit is contained in:
		
							parent
							
								
									814eb5faec
								
							
						
					
					
						commit
						9879195a41
					
				@ -146,6 +146,16 @@ import {InlineDisplayMode} from '../interfaces';
 | 
			
		||||
            });
 | 
			
		||||
            core.connection.onEvent('connecting', async() => {
 | 
			
		||||
                this.connecting = true;
 | 
			
		||||
 | 
			
		||||
                if(process.env.NODE_ENV !== 'production') {
 | 
			
		||||
                    log.debug(
 | 
			
		||||
                      {
 | 
			
		||||
                        type: 'connection.connecting',
 | 
			
		||||
                        character: core.characters.ownCharacter?.name
 | 
			
		||||
                      }
 | 
			
		||||
                    );
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                profileApiInit({
 | 
			
		||||
                    defaultCharacter: this.defaultCharacter, animateEicons: core.state.settings.animatedEicons, fuzzyDates: true,
 | 
			
		||||
                    inlineDisplayMode: InlineDisplayMode.DISPLAY_ALL
 | 
			
		||||
@ -153,6 +163,15 @@ import {InlineDisplayMode} from '../interfaces';
 | 
			
		||||
                if(core.state.settings.notifications) await core.notifications.requestPermission();
 | 
			
		||||
            });
 | 
			
		||||
            core.connection.onEvent('connected', () => {
 | 
			
		||||
                if(process.env.NODE_ENV !== 'production') {
 | 
			
		||||
                    log.debug(
 | 
			
		||||
                      {
 | 
			
		||||
                        type: 'connection.connected',
 | 
			
		||||
                        character: core.characters.ownCharacter?.name
 | 
			
		||||
                      }
 | 
			
		||||
                    );
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                (<Modal>this.$refs['reconnecting']).hide();
 | 
			
		||||
                this.error = '';
 | 
			
		||||
                this.connecting = false;
 | 
			
		||||
@ -164,7 +183,6 @@ import {InlineDisplayMode} from '../interfaces';
 | 
			
		||||
                document.title = (hasNew ? '💬 ' : '') + l(core.connection.isOpen ? 'title.connected' : 'title', core.connection.character);
 | 
			
		||||
            });
 | 
			
		||||
            core.connection.onError((e) => {
 | 
			
		||||
 | 
			
		||||
                if(process.env.NODE_ENV !== 'production') {
 | 
			
		||||
                    log.debug(
 | 
			
		||||
                      {
 | 
			
		||||
@ -193,7 +211,11 @@ import {InlineDisplayMode} from '../interfaces';
 | 
			
		||||
 | 
			
		||||
        async connect(): Promise<void> {
 | 
			
		||||
            this.connecting = true;
 | 
			
		||||
 | 
			
		||||
            // skipping await
 | 
			
		||||
            // tslint:disable-next-line: no-floating-promises
 | 
			
		||||
            await core.notifications.initSounds(['attention', 'login', 'logout', 'modalert', 'newnote']);
 | 
			
		||||
 | 
			
		||||
            core.connection.connect(this.selectedCharacter.name);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -74,7 +74,7 @@
 | 
			
		||||
    import Zip from './zip';
 | 
			
		||||
 | 
			
		||||
    function formatDate(this: void, date: Date): string {
 | 
			
		||||
        return format(date, 'YYYY-MM-DD');
 | 
			
		||||
        return format(date, 'yyyy-MM-DD');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    function getLogs(messages: ReadonlyArray<Conversation.Message>): string {
 | 
			
		||||
 | 
			
		||||
@ -1,3 +1,5 @@
 | 
			
		||||
// import path from 'path';
 | 
			
		||||
 | 
			
		||||
import core from './core';
 | 
			
		||||
import {Conversation, Notifications as Interface} from './interfaces';
 | 
			
		||||
 | 
			
		||||
@ -28,7 +30,9 @@ export default class Notifications implements Interface {
 | 
			
		||||
 | 
			
		||||
    getOptions(conversation: Conversation, body: string, icon: string):
 | 
			
		||||
        NotificationOptions & {badge: string, silent: boolean, renotify: boolean} {
 | 
			
		||||
        const badge = <string>require(`./assets/ic_notification.png`); //tslint:disable-line:no-require-imports
 | 
			
		||||
 | 
			
		||||
        const badge = <string>require(`./assets/ic_notification.png`).default; //tslint:disable-line:no-require-imports no-unsafe-any
 | 
			
		||||
 | 
			
		||||
        return {
 | 
			
		||||
            body, icon: core.state.settings.showAvatars ? icon : undefined, badge, silent: true,  data: {key: conversation.key},
 | 
			
		||||
            tag: conversation.key, renotify: true
 | 
			
		||||
@ -55,13 +59,13 @@ export default class Notifications implements Interface {
 | 
			
		||||
            for(const name in codecs) {
 | 
			
		||||
                const src = document.createElement('source');
 | 
			
		||||
                src.type = `audio/${name}`;
 | 
			
		||||
                //tslint:disable-next-line:no-require-imports
 | 
			
		||||
                src.src = <string>require(`./assets/${sound}.${codecs[name]}`);
 | 
			
		||||
                src.src = <string>require(`./assets/${sound}.${codecs[name]}`).default; // tslint:disable-line: no-unsafe-any
 | 
			
		||||
                audio.appendChild(src);
 | 
			
		||||
            }
 | 
			
		||||
            document.body.appendChild(audio);
 | 
			
		||||
            audio.volume = 0;
 | 
			
		||||
            audio.muted = true;
 | 
			
		||||
 | 
			
		||||
            const promise = audio.play();
 | 
			
		||||
            if(promise instanceof Promise)
 | 
			
		||||
                promises.push(promise.catch((e) => console.error(e)));
 | 
			
		||||
 | 
			
		||||
@ -4,7 +4,7 @@
 | 
			
		||||
 | 
			
		||||
<script lang="ts">
 | 
			
		||||
    import {Component, Hook, Prop, Watch} from '@f-list/vue-ts';
 | 
			
		||||
    import {distanceInWordsToNow, format} from 'date-fns';
 | 
			
		||||
    import {formatDistanceToNow, format} from 'date-fns';
 | 
			
		||||
    import Vue from 'vue';
 | 
			
		||||
    import {settings} from '../site/utils';
 | 
			
		||||
 | 
			
		||||
@ -21,8 +21,8 @@
 | 
			
		||||
            if(this.time === null || this.time === 0)
 | 
			
		||||
                return;
 | 
			
		||||
            const date = isNaN(+this.time) ? new Date(`${this.time}+00:00`) : new Date(+this.time * 1000);
 | 
			
		||||
            const absolute = format(date, 'YYYY-MM-DD HH:mm');
 | 
			
		||||
            const relative = distanceInWordsToNow(date, {addSuffix: true});
 | 
			
		||||
            const absolute = format(date, 'yyyy-MM-DD HH:mm');
 | 
			
		||||
            const relative = formatDistanceToNow(date, {addSuffix: true});
 | 
			
		||||
            if(settings.fuzzyDates) {
 | 
			
		||||
                this.primary = relative;
 | 
			
		||||
                this.secondary = absolute;
 | 
			
		||||
 | 
			
		||||
@ -203,6 +203,7 @@
 | 
			
		||||
            this.loggingIn = true;
 | 
			
		||||
            try {
 | 
			
		||||
                if(!this.saveLogin) await keyStore.deletePassword(this.settings.account);
 | 
			
		||||
 | 
			
		||||
                const data = <{ticket?: string, error: string, characters: {[key: string]: number}, default_character: number}>
 | 
			
		||||
                    (await Axios.post('https://www.f-list.net/json/getApiTicket.php', qs.stringify({
 | 
			
		||||
                        account: this.settings.account, password: this.password, no_friends: true, no_bookmarks: true,
 | 
			
		||||
 | 
			
		||||
@ -68,7 +68,8 @@
 | 
			
		||||
        tray: Electron.Tray
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    const trayIcon = path.join(__dirname, <string>require('./build/tray.png')); //tslint:disable-line:no-require-imports
 | 
			
		||||
    //tslint:disable-next-line:no-require-imports no-unsafe-any
 | 
			
		||||
    const trayIcon = path.join(__dirname, <string>require('./build/tray.png').default);
 | 
			
		||||
 | 
			
		||||
    @Component
 | 
			
		||||
    export default class Window extends Vue {
 | 
			
		||||
 | 
			
		||||
@ -51,6 +51,7 @@ import MenuItemConstructorOptions = Electron.MenuItemConstructorOptions;
 | 
			
		||||
import * as _ from 'lodash';
 | 
			
		||||
import DownloadItem = Electron.DownloadItem;
 | 
			
		||||
 | 
			
		||||
//tslint:disable-next-line:no-require-imports
 | 
			
		||||
const pck = require('./package.json');
 | 
			
		||||
 | 
			
		||||
// Module to control application life.
 | 
			
		||||
@ -287,7 +288,8 @@ function createWindow(): Electron.BrowserWindow | undefined {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function showPatchNotes(): void {
 | 
			
		||||
    electron.shell.openExternal('https://github.com/mrstallion/fchat-rising/blob/master/CHANGELOG.md'); //tslint:disable-line:no-floating-promises
 | 
			
		||||
    //tslint:disable-next-line: no-floating-promises
 | 
			
		||||
    electron.shell.openExternal('https://github.com/mrstallion/fchat-rising/blob/master/CHANGELOG.md');
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -317,6 +319,7 @@ function onReady(): void {
 | 
			
		||||
    //   }
 | 
			
		||||
    // );
 | 
			
		||||
 | 
			
		||||
    //tslint:disable-next-line: no-unsafe-any
 | 
			
		||||
    const updaterUrl = `https://update.electronjs.org/mrstallion/fchat-rising/${process.platform}-${process.arch}/${pck.version}`;
 | 
			
		||||
    if((process.env.NODE_ENV === 'production') && (process.platform !== 'darwin')) {
 | 
			
		||||
        electron.autoUpdater.setFeedURL({url: updaterUrl + (settings.beta ? '?channel=beta' : ''), serverType: 'json'});
 | 
			
		||||
@ -540,8 +543,10 @@ function onReady(): void {
 | 
			
		||||
        if(index !== -1) characters.splice(index, 1);
 | 
			
		||||
    });
 | 
			
		||||
    const emptyBadge = electron.nativeImage.createEmpty();
 | 
			
		||||
    //tslint:disable-next-line:no-require-imports
 | 
			
		||||
    const badge = electron.nativeImage.createFromPath(path.join(__dirname, <string>require('./build/badge.png')));
 | 
			
		||||
 | 
			
		||||
    //tslint:disable-next-line:no-require-imports no-unsafe-any
 | 
			
		||||
    const badge = electron.nativeImage.createFromPath(path.join(__dirname, <string>require('./build/badge.png').default));
 | 
			
		||||
 | 
			
		||||
    electron.ipcMain.on('has-new', (e: Event & {sender: Electron.WebContents}, hasNew: boolean) => {
 | 
			
		||||
        if(process.platform === 'darwin') app.dock.setBadge(hasNew ? '!' : '');
 | 
			
		||||
        const window = electron.BrowserWindow.fromWebContents(e.sender) as BrowserWindow | undefined;
 | 
			
		||||
 | 
			
		||||
@ -99,9 +99,15 @@ const mainConfig = {
 | 
			
		||||
        }),
 | 
			
		||||
        new VueLoaderPlugin(),
 | 
			
		||||
        new CopyPlugin(
 | 
			
		||||
            [
 | 
			
		||||
                { from: path.resolve(__dirname, '..', 'chat', 'preview', 'assets', '**/*'), to: path.join('preview', 'assets'), context: path.resolve(__dirname, '..', 'chat', 'preview', 'assets') }
 | 
			
		||||
            ]
 | 
			
		||||
            {
 | 
			
		||||
                patterns: [
 | 
			
		||||
                    {
 | 
			
		||||
                        from: path.resolve(__dirname, '..', 'chat', 'preview', 'assets', '**/*'),
 | 
			
		||||
                        to: path.join('preview', 'assets'),
 | 
			
		||||
                        context: path.resolve(__dirname, '..', 'chat', 'preview', 'assets')
 | 
			
		||||
                    }
 | 
			
		||||
                ]
 | 
			
		||||
            }
 | 
			
		||||
        )
 | 
			
		||||
    ],
 | 
			
		||||
    resolve: {
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										65
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										65
									
								
								package.json
									
									
									
									
									
								
							@ -8,53 +8,54 @@
 | 
			
		||||
    "@f-list/fork-ts-checker-webpack-plugin": "^3.1.1",
 | 
			
		||||
    "@f-list/vue-ts": "^1.0.3",
 | 
			
		||||
    "@fortawesome/fontawesome-free": "^5.13.1",
 | 
			
		||||
    "@types/bluebird": "^3.5.30",
 | 
			
		||||
    "@types/lodash": "^4.14.134",
 | 
			
		||||
    "@types/node-fetch": "^2.5.5",
 | 
			
		||||
    "@types/qs": "^6.9.1",
 | 
			
		||||
    "@types/sortablejs": "^1.10.2",
 | 
			
		||||
    "@vue/devtools": "^5.1.0",
 | 
			
		||||
    "axios": "^0.19.0",
 | 
			
		||||
    "@types/bluebird": "^3.5.32",
 | 
			
		||||
    "@types/lodash": "^4.14.157",
 | 
			
		||||
    "@types/node": "^12.12.47",
 | 
			
		||||
    "@types/node-fetch": "^2.5.7",
 | 
			
		||||
    "@types/qs": "^6.9.3",
 | 
			
		||||
    "@types/sortablejs": "^1.10.4",
 | 
			
		||||
    "@vue/devtools": "^5.3.3",
 | 
			
		||||
    "axios": "^0.19.2",
 | 
			
		||||
    "bootstrap": "^4.5.0",
 | 
			
		||||
    "copy-webpack-plugin": "^5.1.1",
 | 
			
		||||
    "css-loader": "^3.0.0",
 | 
			
		||||
    "date-fns": "^1.30.1",
 | 
			
		||||
    "electron": "^9.0.0-beta.14",
 | 
			
		||||
    "electron-log": "^4.1.1",
 | 
			
		||||
    "electron-packager": "^14.2.1",
 | 
			
		||||
    "electron-rebuild": "^1.10.1",
 | 
			
		||||
    "extract-loader": "^3.1.0",
 | 
			
		||||
    "file-loader": "^4.0.0",
 | 
			
		||||
    "copy-webpack-plugin": "^6.0.2",
 | 
			
		||||
    "css-loader": "^3.6.0",
 | 
			
		||||
    "date-fns": "^2.14.0",
 | 
			
		||||
    "electron": "^9.0.5",
 | 
			
		||||
    "electron-log": "^4.2.2",
 | 
			
		||||
    "electron-packager": "^15.0.0",
 | 
			
		||||
    "electron-rebuild": "^1.11.0",
 | 
			
		||||
    "extract-loader": "^5.1.0",
 | 
			
		||||
    "file-loader": "^6.0.0",
 | 
			
		||||
    "lodash": "^4.17.15",
 | 
			
		||||
    "node-sass": "^4.14.1",
 | 
			
		||||
    "optimize-css-assets-webpack-plugin": "^5.0.1",
 | 
			
		||||
    "qs": "^6.9.1",
 | 
			
		||||
    "optimize-css-assets-webpack-plugin": "^5.0.3",
 | 
			
		||||
    "qs": "^6.9.4",
 | 
			
		||||
    "raven-js": "^3.27.2",
 | 
			
		||||
    "raw-loader": "^4.0.0",
 | 
			
		||||
    "sass-loader": "^7.1.0",
 | 
			
		||||
    "raw-loader": "^4.0.1",
 | 
			
		||||
    "sass-loader": "^8.0.2",
 | 
			
		||||
    "sortablejs": "^1.10.2",
 | 
			
		||||
    "style-loader": "^0.23.1",
 | 
			
		||||
    "style-loader": "^1.2.1",
 | 
			
		||||
    "throat": "^5.0.0",
 | 
			
		||||
    "ts-loader": "^6.0.3",
 | 
			
		||||
    "tslib": "^1.10.0",
 | 
			
		||||
    "tslint": "^5.17.0",
 | 
			
		||||
    "typescript": "^3.5.2",
 | 
			
		||||
    "vue": "^2.6.8",
 | 
			
		||||
    "vue-loader": "^15.7.0",
 | 
			
		||||
    "vue-template-compiler": "^2.6.8",
 | 
			
		||||
    "webpack": "^4.35.0"
 | 
			
		||||
    "ts-loader": "^7.0.5",
 | 
			
		||||
    "tslib": "^2.0.0",
 | 
			
		||||
    "tslint": "^6.1.2",
 | 
			
		||||
    "typescript": "^3.9.5",
 | 
			
		||||
    "vue": "^2.6.11",
 | 
			
		||||
    "vue-loader": "^15.9.3",
 | 
			
		||||
    "vue-template-compiler": "^2.6.11",
 | 
			
		||||
    "webpack": "^4.43.0"
 | 
			
		||||
  },
 | 
			
		||||
  "dependencies": {
 | 
			
		||||
    "@cliqz/adblocker-electron": "^1.13.0",
 | 
			
		||||
    "@cliqz/adblocker-electron": "^1.16.0",
 | 
			
		||||
    "bluebird": "^3.7.2",
 | 
			
		||||
    "jquery": "^3.4.1",
 | 
			
		||||
    "jquery": "^3.5.1",
 | 
			
		||||
    "keytar": "^5.4.0",
 | 
			
		||||
    "node-fetch": "^2.6.0"
 | 
			
		||||
  },
 | 
			
		||||
  "optionalDependencies": {
 | 
			
		||||
    "appdmg": "^0.6.0",
 | 
			
		||||
    "electron-squirrel-startup": "^1.0.0",
 | 
			
		||||
    "electron-winstaller": "^3.0.4"
 | 
			
		||||
    "electron-winstaller": "^4.0.0"
 | 
			
		||||
  },
 | 
			
		||||
  "scripts": {
 | 
			
		||||
    "postinstall": "electron-rebuild --prebuild-tag-prefix=ignoreprebuilds -f -o keytar"
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user