Electron 9

This commit is contained in:
Mr. Stallion 2020-04-09 18:06:48 -05:00
parent c8625b3085
commit 3ce7bd0905
7 changed files with 505 additions and 416 deletions

View File

@ -100,8 +100,10 @@
<script lang="ts">
import {Component, Hook} from '@f-list/vue-ts';
//tslint:disable-next-line:no-require-imports
import Sortable = require('sortablejs');
import * as SortableBase from 'sortablejs';
const Sortable = (SortableBase as any).Sortable;
import Vue from 'vue';
import {Keys} from '../keys';
import ChannelList from './ChannelList.vue';
@ -157,7 +159,7 @@
Sortable.create(<HTMLElement>this.$refs['privateConversations'], {
animation: 50,
fallbackTolerance: 5,
onEnd: async(e) => {
onEnd: async(e: any) => {
if(e.oldIndex === e.newIndex) return;
return core.conversations.privateConversations[e.oldIndex!].sort(e.newIndex!);
}
@ -165,7 +167,7 @@
Sortable.create(<HTMLElement>this.$refs['channelConversations'], {
animation: 50,
fallbackTolerance: 5,
onEnd: async(e) => {
onEnd: async(e: any) => {
if(e.oldIndex === e.newIndex) return;
return core.conversations.channelConversations[e.oldIndex!].sort(e.newIndex!);
}

View File

@ -26,7 +26,14 @@ export class ExternalImagePreviewHelper extends ImagePreviewHelper {
// } else {
// tslint:disable-next-line:no-floating-promises
webview.loadURL('about:blank');
webview.stop();
webview.loadURL('about:blank')
.catch(
(err: any) => {
console.warn('webview.loadURL() in hide()', err);
}
);
//}
@ -92,6 +99,11 @@ export class ExternalImagePreviewHelper extends ImagePreviewHelper {
return webview.loadURL(finalUrl);
}
)
.catch(
(err: any) => {
console.warn('webview.loadURL() in show()', err);
}
);
// }

View File

@ -34,7 +34,9 @@
</template>
<script lang="ts">
import Sortable = require('sortablejs'); //tslint:disable-line:no-require-imports
import * as SortableBase from 'sortablejs';
const Sortable = (SortableBase as any).Sortable;
import * as _ from 'lodash';
import {Component, Hook} from '@f-list/vue-ts';
@ -143,9 +145,11 @@
document.addEventListener('click', () => this.activeTab!.view.webContents.focus());
window.addEventListener('focus', () => this.activeTab!.view.webContents.focus());
console.log('SORTABLE', Sortable);
Sortable.create(<HTMLElement>this.$refs['tabs'], {
animation: 50,
onEnd: (e) => {
onEnd: (e: any) => {
if(e.oldIndex === e.newIndex) return;
const tab = this.tabs.splice(e.oldIndex!, 1)[0];
this.tabs.splice(e.newIndex!, 0, tab);

View File

@ -247,6 +247,8 @@ function createWindow(): Electron.BrowserWindow | undefined {
);
console.log('GOT HERE');
// tslint:disable-next-line:no-floating-promises
window.loadFile(
path.join(__dirname, 'window.html'),

View File

@ -5,23 +5,23 @@
"description": "F-List Exported",
"license": "MIT",
"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",
"@fortawesome/fontawesome-free": "^5.9.0",
"@types/lodash": "^4.14.134",
"@types/node-fetch": "^2.5.5",
"@types/qs": "^6.9.1",
"@types/sortablejs": "^1.7.2",
"@types/sortablejs": "^1.10.2",
"@vue/devtools": "^5.1.0",
"axios": "^0.19.0",
"bootstrap": "^4.3.1",
"copy-webpack-plugin": "^5.1.1",
"css-loader": "^3.0.0",
"date-fns": "^1.30.1",
"electron": "^8.2.0",
"electron-log": "^3.0.1",
"electron-packager": "^14.0.0",
"electron-rebuild": "^1.8.4",
"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",
"lodash": "^4.17.11",
@ -31,7 +31,7 @@
"raven-js": "^3.27.2",
"raw-loader": "^4.0.0",
"sass-loader": "^7.1.0",
"sortablejs": "~1.9.0",
"sortablejs": "^1.10.2",
"style-loader": "^0.23.1",
"throat": "^5.0.0",
"ts-loader": "^6.0.3",
@ -46,7 +46,7 @@
"dependencies": {
"@cliqz/adblocker-electron": "^1.13.0",
"jquery": "^3.4.1",
"keytar": "^4.10.0",
"keytar": "^5.4.0",
"node-fetch": "^2.6.0"
},
"optionalDependencies": {
@ -55,6 +55,6 @@
"electron-winstaller": "^3.0.4"
},
"scripts": {
"postinstall": "electron-rebuild -fo keytar"
"postinstall": "electron-rebuild --prebuild-tag-prefix=ignoreprebuilds -f -o keytar"
}
}

View File

@ -98,7 +98,6 @@ This repository contains a heavily customized version of the mainline F-Chat 3.0
* Bug? Reconnection doesn't restore status message
* Bug? Reconnection doesn't cancel advertisement timers, although they look like they're cancelled
* Bug? [color] acts weird
* Feature? Update to Electonr 9 and fix IPCs
# F-List Exported

868
yarn.lock

File diff suppressed because it is too large Load Diff