second attempt at localized player
This commit is contained in:
parent
f0d2298142
commit
1984ee585f
8 changed files with 88 additions and 1998 deletions
electron
|
@ -2,7 +2,6 @@
|
|||
/* eslint space-before-function-paren:0 */
|
||||
// Module imports
|
||||
import '@babel/polyfill';
|
||||
import keytar from 'keytar';
|
||||
import SemVer from 'semver';
|
||||
import https from 'https';
|
||||
import { app, dialog, ipcMain, session, shell } from 'electron';
|
||||
|
@ -319,32 +318,6 @@ ipcMain.on('version-info-requested', () => {
|
|||
requestLatestRelease();
|
||||
});
|
||||
|
||||
// In a few months, we can remove the keytar dependency and below calls once
|
||||
// enough users have moved over to cookies
|
||||
ipcMain.on('get-auth-token', event => {
|
||||
keytar.getPassword('LBRY', 'auth_token').then(token => {
|
||||
event.sender.send('auth-token-response', token ? token.toString().trim() : null);
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on('delete-auth-token', (event, password) => {
|
||||
keytar.deletePassword('LBRY', 'auth_token', password).then(res => {
|
||||
event.sender.send('delete-auth-token-response', res);
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on('get-password', event => {
|
||||
keytar.getPassword('LBRY', 'wallet_password').then(password => {
|
||||
event.sender.send('get-password-response', password ? password.toString() : null);
|
||||
});
|
||||
});
|
||||
|
||||
ipcMain.on('delete-password', event => {
|
||||
keytar.deletePassword('LBRY', 'wallet_password').then(res => {
|
||||
event.sender.send('delete-password-response', res);
|
||||
});
|
||||
});
|
||||
|
||||
process.on('uncaughtException', error => {
|
||||
console.log(error);
|
||||
dialog.showErrorBox('Error Encountered', `Caught error: ${error}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue