mirror of
https://github.com/rhysd/Mstdn.git
synced 2025-01-20 19:52:10 +01:00
tslint
This commit is contained in:
parent
7038f356db
commit
ba8fd685bb
@ -3,7 +3,7 @@ import {app, BrowserWindow, globalShortcut, Tray, shell} from 'electron';
|
||||
import windowState = require('electron-window-state');
|
||||
import * as menubar from 'menubar';
|
||||
import log from './log';
|
||||
import {Config, Account} from './config'
|
||||
import {Config, Account} from './config';
|
||||
|
||||
const IS_DEBUG = process.env.NODE_ENV === 'development';
|
||||
const IS_DARWIN = process.platform === 'darwin';
|
||||
@ -44,7 +44,7 @@ function trayIcon(color: string) {
|
||||
}@2x.png`);
|
||||
}
|
||||
|
||||
export default function startApp (config: Config) {
|
||||
export default function startApp(config: Config) {
|
||||
return (config.normal_window ? startNormalWindow : startMenuBar)(config)
|
||||
.then(win => new App(win, config));
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ function showDyingDialog(title: string, detail: 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';
|
||||
shell.openItem(file);
|
||||
showDyingDialog(title, detail);
|
||||
@ -101,7 +101,7 @@ export default function loadConfig(): Promise<Config> {
|
||||
}
|
||||
} catch (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);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -25,7 +25,7 @@ const ShortcutActions = {
|
||||
'scroll-up': () => {
|
||||
scrollable().scrollTop -= window.innerHeight / 3;
|
||||
},
|
||||
} as {[action: string]: () => void}
|
||||
} as {[action: string]: () => void};
|
||||
|
||||
function setupKeybinds(keybinds: {[key: string]: string}, host: string) {
|
||||
for (const key in keybinds) {
|
||||
|
@ -3,7 +3,7 @@ import r from './require';
|
||||
const electron = r('electron');
|
||||
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[]) => {
|
||||
log.debug('IPC: Received from:', channel, args);
|
||||
callback(...args);
|
||||
|
Loading…
x
Reference in New Issue
Block a user