1
0
mirror of https://github.com/rhysd/Mstdn.git synced 2025-01-21 20:52:11 +01:00
This commit is contained in:
rhysd 2017-04-16 12:44:53 +09:00
parent 7038f356db
commit ba8fd685bb
4 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,7 @@ import {app, BrowserWindow, globalShortcut, Tray, shell} from 'electron';
import windowState = require('electron-window-state'); import windowState = require('electron-window-state');
import * as menubar from 'menubar'; import * as menubar from 'menubar';
import log from './log'; import log from './log';
import {Config, Account} from './config' import {Config, Account} from './config';
const IS_DEBUG = process.env.NODE_ENV === 'development'; const IS_DEBUG = process.env.NODE_ENV === 'development';
const IS_DARWIN = process.platform === 'darwin'; const IS_DARWIN = process.platform === 'darwin';

View File

@ -59,7 +59,7 @@ function showDyingDialog(title: string, detail: string) {
} }
function recommendConfigAndDie(file: string) { function recommendConfigAndDie(file: string) {
const title = 'Please write configuration in JSON' const title = 'Please write configuration in JSON';
const detail = 'You need to write up name and host in first item of accounts. Restart this app after writing up them. Please see README for more detail: https://github.com/rhysd/Mstdn#readme'; const detail = 'You need to write up name and host in first item of accounts. Restart this app after writing up them. Please see README for more detail: https://github.com/rhysd/Mstdn#readme';
shell.openItem(file); shell.openItem(file);
showDyingDialog(title, detail); showDyingDialog(title, detail);
@ -101,7 +101,7 @@ export default function loadConfig(): Promise<Config> {
} }
} catch (e) { } catch (e) {
log.debug('Error on loading JSON file', e); log.debug('Error on loading JSON file', e);
showDyingDialog('Error on loading JSON file', e.message) showDyingDialog('Error on loading JSON file', e.message);
} }
}); });
}); });

View File

@ -25,7 +25,7 @@ const ShortcutActions = {
'scroll-up': () => { 'scroll-up': () => {
scrollable().scrollTop -= window.innerHeight / 3; scrollable().scrollTop -= window.innerHeight / 3;
}, },
} as {[action: string]: () => void} } as {[action: string]: () => void};
function setupKeybinds(keybinds: {[key: string]: string}, host: string) { function setupKeybinds(keybinds: {[key: string]: string}, host: string) {
for (const key in keybinds) { for (const key in keybinds) {

View File

@ -3,7 +3,7 @@ import r from './require';
const electron = r('electron'); const electron = r('electron');
const ipc = electron.ipcRenderer; const ipc = electron.ipcRenderer;
export function on(channel: IpcChannel, callback: Function) { export function on(channel: IpcChannel, callback: (...args: any[]) => void) {
ipc.on(channel, (...args: any[]) => { ipc.on(channel, (...args: any[]) => {
log.debug('IPC: Received from:', channel, args); log.debug('IPC: Received from:', channel, args);
callback(...args); callback(...args);