Commit 79f3cb7d authored by 神楽坂玲奈's avatar 神楽坂玲奈

reboot

Signed-off-by: 神楽坂玲奈's avatarzh99998 <zh99998@gmail.com>
parent eb17e967
{
"vsicons.presets.angular": true
}
\ No newline at end of file
import {Component, OnInit, Input, ChangeDetectorRef, OnChanges, SimpleChanges, ElementRef} from '@angular/core';
import {AppsService} from './apps.service';
import {InstallOption} from './install-option';
import {SettingsService} from './settings.sevices';
import {App} from './app';
import {DownloadService} from './download.service';
import {clipboard, remote} from 'electron';
import { ChangeDetectorRef, Component, ElementRef, Input, OnChanges, OnInit, SimpleChanges } from '@angular/core';
import { AppsService } from './apps.service';
import { InstallOption } from './install-option';
import { SettingsService } from './settings.sevices';
import { App } from './app';
import { DownloadService } from './download.service';
import { clipboard, remote } from 'electron';
import * as path from 'path';
import * as fs from 'fs';
import * as $ from 'jquery';
import {Points} from './ygopro.component';
import {Http, URLSearchParams} from '@angular/http';
import {LoginService} from './login.service';
import { Points } from './ygopro.component';
import { Http } from '@angular/http';
import { LoginService } from './login.service';
declare const Notification: any;
......@@ -253,7 +253,7 @@ export class AppDetailComponent implements OnInit, OnChanges {
let extname = path.extname(filename).slice(1);
// let remote = require('electron').remote
let filePaths = await new Promise((resolve, reject) => {
let filePaths = await new Promise<string[]>((resolve, reject) => {
remote.dialog.showOpenDialog({
filters: [{name: filename, extensions: [extname]}],
properties: ['openFile']
......
import {AppLocal} from './app-local';
import { AppLocal } from './app-local';
export enum Category {
game,
......@@ -10,6 +10,7 @@ export enum Category {
expansion,
module
}
// export type CategoryString = 'game' | 'music' | 'book' | 'runtime' | 'emulator' | 'language' | 'expansion' | 'module'
// export enum DownloadStatus{
// downloading,
......@@ -55,7 +56,7 @@ export class App {
description: string; // i18n
author: string; // English Only
homepage: string;
developers: {name: string, url: string}[];
developers: { name: string, url: string }[];
released_at: Date;
category: Category;
parent?: App;
......@@ -64,7 +65,7 @@ export class App {
references: Map<string, App>;
dependencies: Map<string, App>;
locales: string[];
news: {title: string, url: string, image: string, updated_at: Date}[];
news: { title: string, url: string, image: string, updated_at: Date }[];
network: any;
tags: string[];
version: string;
......@@ -78,7 +79,7 @@ export class App {
cover: string;
background: string;
price: {[currency: string]: string};
price: { [currency: string]: string };
key?: string;
static downloadUrl(app: App, platform: string, locale: string): string {
......@@ -168,7 +169,7 @@ export class App {
this.released_at = app.released_at;
this.author = app.author;
this.homepage = app.homepage;
this.category = Category[app.category as string];
this.category = Category[<string>app.category];
this.actions = app.actions;
this.dependencies = app.dependencies;
this.parent = app.parent;
......
import {ApplicationRef, EventEmitter, Injectable, NgZone} from '@angular/core';
import {Http, URLSearchParams} from '@angular/http';
import { ApplicationRef, EventEmitter, Injectable, NgZone } from '@angular/core';
import { Http } from '@angular/http';
import * as crypto from 'crypto';
import {Action, App, AppStatus} from './app';
import {SettingsService} from './settings.sevices';
import { Action, App, AppStatus } from './app';
import { SettingsService } from './settings.sevices';
import * as fs from 'fs';
import {createReadStream, createWriteStream} from 'fs';
import { createReadStream, createWriteStream } from 'fs';
import * as path from 'path';
import * as child_process from 'child_process';
import {ChildProcess} from 'child_process';
import {remote} from 'electron';
import { ChildProcess } from 'child_process';
import { remote } from 'electron';
import 'rxjs/Rx';
import * as readline from 'readline';
import {AppLocal} from './app-local';
import { AppLocal } from './app-local';
import * as glob from 'glob';
import * as ini from 'ini';
import {DownloadService, DownloadStatus} from './download.service';
import {InstallOption} from './install-option';
import {ComparableSet} from './shared/ComparableSet';
import {Observable, Observer} from 'rxjs/Rx';
import {LoginService} from './login.service';
import { DownloadService, DownloadStatus } from './download.service';
import { InstallOption } from './install-option';
import { ComparableSet } from './shared/ComparableSet';
import { Observable, Observer } from 'rxjs/Rx';
import { LoginService } from './login.service';
import Timer = NodeJS.Timer;
import ReadableStream = NodeJS.ReadableStream;
const sudo = require('electron-sudo');
......
/**
* Created by zh99998 on 16/9/2.
*/
import {Component, OnInit, ChangeDetectorRef, ElementRef, ViewChild} from '@angular/core';
import {AppsService} from './apps.service';
import {LoginService} from './login.service';
import {App, Category} from './app';
import {shell} from 'electron';
import {SettingsService} from './settings.sevices';
import {URLSearchParams} from '@angular/http';
import { ChangeDetectorRef, Component, ElementRef, OnInit, ViewChild } from '@angular/core';
import { AppsService } from './apps.service';
import { LoginService } from './login.service';
import { App, Category } from './app';
import { shell } from 'electron';
import { SettingsService } from './settings.sevices';
const ReconnectingWebSocket = require('reconnecting-websocket');
// import 'typeahead.js';
......@@ -60,7 +59,7 @@ export class LobbyComponent implements OnInit {
this.ref.detectChanges();
let url = new URL('wss://api.moecube.com:3100');
let params: URLSearchParams = url['searchParams'];
let params: URLSearchParams = url.searchParams;
params.set('user_id', this.loginService.user.email);
this.messages = new ReconnectingWebSocket(url);
this.messages.onmessage = async(event) => {
......
/**
* Created by zh99998 on 16/9/2.
*/
import {Component} from '@angular/core';
import {LoginService} from './login.service';
import { Component } from '@angular/core';
import { LoginService } from './login.service';
import * as crypto from 'crypto';
import {shell} from 'electron';
declare const URLSearchParams: any;
import { shell } from 'electron';
@Component({
moduleId: module.id,
......@@ -51,6 +48,9 @@ export class LoginComponent {
return;
}
let token = new URL(return_url)['searchParams'].get('sso');
if (!token) {
return;
}
let user = this.toObject(new URLSearchParams(Buffer.from(token, 'base64').toString()));
this.loginService.login(user);
}
......
......@@ -2,29 +2,29 @@
* Created by zh99998 on 16/9/2.
*/
import {
Component,
OnInit,
ChangeDetectorRef,
Input,
Component,
ElementRef,
EventEmitter,
Output,
Input,
OnDestroy,
ViewChild,
ElementRef
OnInit,
Output,
ViewChild
} from '@angular/core';
import * as fs from 'fs';
import * as path from 'path';
import * as child_process from 'child_process';
import {remote, shell} from 'electron';
import { remote, shell } from 'electron';
import * as ini from 'ini';
import {EncodeOptions} from 'ini';
import {LoginService} from './login.service';
import {App} from './app';
import {Http, Headers, URLSearchParams} from '@angular/http';
import { EncodeOptions } from 'ini';
import { LoginService } from './login.service';
import { App } from './app';
import { Headers, Http } from '@angular/http';
import 'rxjs/Rx';
import {ISubscription} from 'rxjs/Subscription';
import {AppsService} from './apps.service';
import {SettingsService} from './settings.sevices';
import { ISubscription } from 'rxjs/Subscription';
import { AppsService } from './apps.service';
import { SettingsService } from './settings.sevices';
import * as $ from 'jquery';
import Timer = NodeJS.Timer;
import WillNavigateEvent = Electron.WebViewElement.WillNavigateEvent;
......
......@@ -8,11 +8,10 @@
"experimentalDecorators": true,
"lib": [
"es2017",
"dom"
"dom.iterable"
],
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"strictNullChecks": true,
"strict": true,
"skipLibCheck": true
},
"exclude": [
......
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