minor
This commit is contained in:
parent
c41081089b
commit
7bad376750
|
@ -1,5 +1,8 @@
|
|||
# Changelog
|
||||
|
||||
## 1.24.2
|
||||
* Hotfix to address connectivity issues
|
||||
|
||||
## 1.24.1
|
||||
* Hotfix to address issue with multiple tabs
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ changelog: https://github.com/hearmeneigh/fchat-rising/blob/master/CHANGELOG.md
|
|||
installurl: https://github.com/hearmeneigh/fchat-rising/wiki
|
||||
|
||||
download:
|
||||
version: 1.24.1
|
||||
version: 1.24.2
|
||||
|
||||
url: https://github.com/hearmeneigh/fchat-rising/releases/latest/download/F-Chat-Rising-%PLATFORM_TAIL%
|
||||
|
||||
|
|
|
@ -115,6 +115,7 @@
|
|||
import Axios from 'axios';
|
||||
import * as electron from 'electron';
|
||||
import * as remote from '@electron/remote';
|
||||
import settings from 'electron-settings';
|
||||
import log from 'electron-log'; //tslint:disable-line:match-default-export-name
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
@ -201,7 +202,8 @@
|
|||
// }
|
||||
// >('keytar/build/Release/keytar.node');
|
||||
|
||||
const keyStore = new SecureStore('fchat-rising-accounts');
|
||||
settings.configure({ electron: remote as any });
|
||||
const keyStore = new SecureStore('fchat-rising-accounts', remote, settings);
|
||||
|
||||
// const keyStore = import('keytar');
|
||||
//
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
console.log('CHAT FIRST');
|
||||
/**
|
||||
* @license
|
||||
* MIT License
|
||||
|
@ -37,18 +36,12 @@ console.log('CHAT FIRST');
|
|||
|
||||
import * as electron from 'electron';
|
||||
|
||||
console.log('CHAT GOT HERE');
|
||||
|
||||
import * as remote from '@electron/remote';
|
||||
const webContents = remote.getCurrentWebContents();
|
||||
|
||||
console.log('CHAT GOT HERE 2');
|
||||
|
||||
// tslint:disable-next-line:no-require-imports no-submodule-imports
|
||||
require('@electron/remote/main').enable(webContents);
|
||||
|
||||
console.log('CHAT GOT HERE 3');
|
||||
|
||||
import Axios from 'axios';
|
||||
import {exec, execSync} from 'child_process';
|
||||
import * as path from 'path';
|
||||
|
|
|
@ -12,4 +12,3 @@
|
|||
<script type="text/javascript" src="chat.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
<!-- <div style="color: #ffffff; font-size: 25pt; text-align: center; opacity: 0.4; margin-top: 5em;">Loading F-Chat Rising...</div> -->
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "fchat",
|
||||
"version": "1.24.1",
|
||||
"version": "1.24.2",
|
||||
"author": "The F-List Team and Mister Stallion (Esq.)",
|
||||
"description": "F-List.net Chat Client",
|
||||
"main": "main.js",
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
import * as electronRemote from '@electron/remote';
|
||||
import settings from 'electron-settings';
|
||||
|
||||
export class SecureStore {
|
||||
constructor(protected storeName: string) {
|
||||
constructor(protected storeName: string, protected electronRemote: any, protected settings: any) {
|
||||
}
|
||||
|
||||
private getKey(domain: string, account: string): string {
|
||||
|
@ -10,36 +7,36 @@ export class SecureStore {
|
|||
}
|
||||
|
||||
async setPassword(domain: string, account: string, password: string): Promise<void> {
|
||||
if ((electronRemote as any).safeStorage.isEncryptionAvailable() === false) {
|
||||
if ((this.electronRemote as any).safeStorage.isEncryptionAvailable() === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
const buffer = (electronRemote as any).safeStorage.encryptString(password);
|
||||
const buffer = (this.electronRemote as any).safeStorage.encryptString(password);
|
||||
|
||||
await settings.set(this.getKey(domain, account), buffer.toString('binary'));
|
||||
await this.settings.set(this.getKey(domain, account), buffer.toString('binary'));
|
||||
}
|
||||
|
||||
async deletePassword(domain: string, account: string): Promise<void> {
|
||||
if ((electronRemote as any).safeStorage.isEncryptionAvailable() === false) {
|
||||
if ((this.electronRemote as any).safeStorage.isEncryptionAvailable() === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
await settings.unset(this.getKey(domain, account));
|
||||
await this.settings.unset(this.getKey(domain, account));
|
||||
}
|
||||
|
||||
async getPassword(domain: string, account: string): Promise<string | null> {
|
||||
if ((electronRemote as any).safeStorage.isEncryptionAvailable() === false) {
|
||||
if ((this.electronRemote as any).safeStorage.isEncryptionAvailable() === false) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const pw = await settings.get(this.getKey(domain, account));
|
||||
const pw = await this.settings.get(this.getKey(domain, account));
|
||||
|
||||
if (!pw) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const buffer = Buffer.from(pw.toString(), 'binary');
|
||||
const decrypted = (electronRemote as any).safeStorage.decryptString(buffer);
|
||||
const decrypted = (this.electronRemote as any).safeStorage.decryptString(buffer);
|
||||
|
||||
return decrypted;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "f-list-rising",
|
||||
"version": "1.24.1",
|
||||
"version": "1.24.2",
|
||||
"author": "The F-List Team and and Mister Stallion (Esq.)",
|
||||
"description": "A heavily modded F-Chat 3.0 client for F-List",
|
||||
"license": "MIT",
|
||||
|
|
Loading…
Reference in New Issue