Commit c260dc60 authored by 神楽坂玲奈's avatar 神楽坂玲奈

reformat code

parent b884a9ec
......@@ -9,13 +9,8 @@
width: 20rem;
}
.news-block {
padding: 0;
}
progress {
margin: 0;
margin-top: 2px;
margin: 2px 0 0;
}
.carousel-inner img {
......
......@@ -20,8 +20,7 @@ export class AppDetailComponent implements OnInit {
platform = process.platform;
installConfig: InstallConfig;
constructor(private appsService: AppsService, private settingsService: SettingsService,
private downloadService: DownloadService) {
constructor(private appsService: AppsService, private settingsService: SettingsService, private downloadService: DownloadService) {
}
ngOnInit() {
......
......@@ -36,10 +36,6 @@ nav.darwin {
/*margin-bottom: 60px;*/
}
.nav-right {
float: right;
}
#avatar {
display: block;
float: left;
......
......@@ -24,11 +24,6 @@
border-radius: 50%;
}
#game-list-modal .players {
padding-top: .5rem;
padding-bottom: .5rem;
}
#game-list-modal .close {
position: absolute;
top: 15px;
......
'use strict';
const electron = require('electron')
const electron = require('electron');
// Module to control application life.
const app = electron.app
const app = electron.app;
// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow
const BrowserWindow = electron.BrowserWindow;
const child_process = require('child_process');
const path = require('path');
......@@ -76,11 +76,15 @@ function handleSquirrelEvent() {
app.quit();
return true;
}
};
}
function handleElevate() {
if (process.argv[1] == '-e') {
app.dock.hide();
const os = require('os');
const readline = require('readline');
process.send = (message, sendHandle, options, callback)=> process.stdout.write(JSON.stringify(message) + os.EOL, callback);
process.stdin.on('end', ()=> process.emit('disconnect'));
readline.createInterface({input: process.stdin}).on('line', (line) => process.emit('message', JSON.parse(line)));
require("./" + process.argv[2]);
return true;
}
......@@ -110,7 +114,7 @@ const aria2c = createAria2c();
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let mainWindow
let mainWindow;
function createWindow() {
// Create the browser window.
......@@ -119,13 +123,13 @@ function createWindow() {
height: 640,
frame: process.platform == 'darwin',
titleBarStyle: process.platform == 'darwin' ? 'hidden' : null
})
});
// and load the index.html of the app.
mainWindow.loadURL(`file://${__dirname}/index.html`)
mainWindow.loadURL(`file://${__dirname}/index.html`);
// Open the DevTools.
mainWindow.webContents.openDevTools()
mainWindow.webContents.openDevTools();
// Emitted when the window is closed.
mainWindow.on('closed', function () {
......@@ -139,12 +143,12 @@ function createWindow() {
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', createWindow)
app.on('ready', createWindow);
// Quit when all windows are closed.
app.on('window-all-closed', function () {
app.quit()
})
});
app.on('activate', function () {
// On OS X it's common to re-create a window in the app when the
......@@ -152,7 +156,7 @@ app.on('activate', function () {
if (mainWindow === null) {
createWindow()
}
})
});
// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and require them here.
......@@ -162,4 +166,4 @@ app.on('quit', ()=> {
if (process.platform != 'win32') {
aria2c.kill()
}
})
\ No newline at end of file
});
\ No newline at end of file
const os = require('os');
const readline = require('readline');
process.send = (message, sendHandle, options, callback)=> {
process.stdout.write(JSON.stringify(message) + os.EOL);
if (callback) {
callback()
}
};
process.stdin.on('end', ()=> {
process.emit('disconnect')
});
readline.createInterface({input: process.stdin}).on('line', (line) => {
process.emit('message', JSON.parse(line))
});
const raw = require("raw-socket");
let socket = raw.createSocket({protocol: raw.Protocol.UDP});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment