Commit 4660d50d authored by 神楽坂玲奈's avatar 神楽坂玲奈

游戏信息

parent f19ab53e
......@@ -50,36 +50,14 @@
</div>
<!--<div class="d-flex">-->
<!--<div class="panel" id="game_info">-->
<!--<p>-->
<!--《东方红魔乡 ~ the Embodiment of Scarlet Devil.》(东方红魔郷 ~ the Embodiment of Scarlet Devil.)是由同人组织上海爱丽丝幻乐团所制作的纵弹幕射击游戏,于2002年6月10日发布体验版,2002年8月11日(Comic Market62)正式发售,9月27日在各同人商店开始了委托贩卖。该作是东方Project的第6作,也是东方Project在Windows平台上的第一作。 </p>-->
<!--<div id="tags">-->
<!--<div class="btn btn-xs btn-danger" style="padding:3px 10px; margin:2px">弹幕</div>-->
<!--<div class="btn btn-xs btn-danger" style="padding:3px 10px; margin:2px">射击</div>-->
<!--<div class="btn btn-xs btn-danger" style="padding:3px 10px; margin:2px">单机</div>-->
<!--</div>-->
<!--</div>-->
<!--<div class="panel" id="game_info_2">-->
<!--<dl>-->
<!--<dt>开发</dt>-->
<!--<dd>上海爱丽丝幻乐团</dd>-->
<!--<dt>出版</dt>-->
<!--<dd>上海爱丽丝幻乐团</dd>-->
<!--<dt>发行日期</dt>-->
<!--<dd>2002年8月11日</dd>-->
<!--</dl>-->
<!--</div>-->
<!--</div>-->
<!--<div class="d-flex">--><!--<div class="panel" id="game_info">--><!--<p>--><!--《东方红魔乡 ~ the Embodiment of Scarlet Devil.》(东方红魔郷 ~ the Embodiment of Scarlet Devil.)是由同人组织上海爱丽丝幻乐团所制作的纵弹幕射击游戏,于2002年6月10日发布体验版,2002年8月11日(Comic Market62)正式发售,9月27日在各同人商店开始了委托贩卖。该作是东方Project的第6作,也是东方Project在Windows平台上的第一作。 </p>--><!--<div id="tags">--><!--<div class="btn btn-xs btn-danger" style="padding:3px 10px; margin:2px">弹幕</div>--><!--<div class="btn btn-xs btn-danger" style="padding:3px 10px; margin:2px">射击</div>--><!--<div class="btn btn-xs btn-danger" style="padding:3px 10px; margin:2px">单机</div>--><!--</div>--><!--</div>--><!--<div class="panel" id="game_info_2">--><!--<dl>--><!--<dt>开发</dt>--><!--<dd>上海爱丽丝幻乐团</dd>--><!--<dt>出版</dt>--><!--<dd>上海爱丽丝幻乐团</dd>--><!--<dt>发行日期</dt>--><!--<dd>2002年8月11日</dd>--><!--</dl>--><!--</div>--><!--</div>-->
<div class="d-flex">
<div class="panel" id="game_info">
<p>
《东方红魔乡 ~ the Embodiment of Scarlet Devil.》(东方红魔郷 ~ the Embodiment of Scarlet Devil.)是由同人组织上海爱丽丝幻乐团所制作的纵弹幕射击游戏,于2002年6月10日发布体验版,2002年8月11日(Comic Market62)正式发售,9月27日在各同人商店开始了委托贩卖。该作是东方Project的第6作,也是东方Project在Windows平台上的第一作。 </p>
<div id="tags">
<div class="btn btn-xs btn-danger" style="padding:3px 10px; margin:2px">弹幕</div>
<div class="btn btn-xs btn-danger" style="padding:3px 10px; margin:2px">射击</div>
<div class="btn btn-xs btn-danger" style="padding:3px 10px; margin:2px">单机</div>
<div id="tags" *ngIf="currentApp.tags">
<div *ngFor="let tag of currentApp.tags" class="btn btn-xs btn-danger" style="padding:3px 10px; margin:2px">{{tags[tag] || tag}}</div>
</div>
</div>
<div class="panel" id="game_info_2">
......@@ -144,7 +122,7 @@
<h2 i18n>新闻</h2>
<div id="news" *ngFor="let item of news">
<h3>{{item.title}}</h3>
<span>2017-01-18</span>
<span>{{item.updated_at | date:'shortDate'}}</span>
<p>{{item.text}}</p>
<a i18n *ngIf="item.url" [href]="item.url" target="_blank">了解更多</a>
</div>
......
......@@ -40,9 +40,25 @@ export class AppDetailComponent implements OnInit, OnChanges {
points: Points;
tags: {};
constructor(private appsService: AppsService, private settingsService: SettingsService,
private downloadService: DownloadService, private ref: ChangeDetectorRef, private el: ElementRef,
private http: Http) {
this.tags = this.settingsService.getLocale().startsWith('zh') ? {
'recommend': '推荐',
'mysterious': '迷之物体',
'touhou': '东方 Project',
'touhou-pc98': '东方旧作',
'language': '语言包'
} : {
'recommend': 'Recommended',
'mysterious': 'Something',
'touhou': 'Touhou Project',
'touhou-pc98': 'Touhou old series',
'language': 'Language Pack'
};
}
async ngOnChanges(changes: SimpleChanges) {
......
......@@ -55,6 +55,8 @@ export class App {
description: string; // i18n
author: string; // English Only
homepage: string;
developers: {name: string, url: string}[];
released_at: Date;
category: Category;
parent?: App;
......@@ -62,7 +64,7 @@ export class App {
references: Map<string, App>;
dependencies: Map<string, App>;
locales: string[];
news: {title: string, url: string, image: string}[];
news: {title: string, url: string, image: string, updated_at: Date}[];
network: any;
tags: string[];
version: string;
......@@ -154,6 +156,8 @@ export class App {
this.id = app.id;
this.name = app.name;
this.description = app.description;
this.developers = app.developers;
this.released_at = app.released_at;
this.author = app.author;
this.homepage = app.homepage;
this.category = Category[app.category as string];
......
......@@ -239,13 +239,9 @@ export class AppsService {
}
// 去除无关语言
for (let key of ['name', 'description', 'news']) {
for (let key of ['name', 'description', 'news', 'developers', 'publishers']) {
if (app[key]) {
let value = app[key][locale];
if (!value) {
value = app[key]['zh-CN'];
}
app[key] = value;
app[key] = app[key][locale] || app[key]['zh-CN'] || Object.values(app[key])[0];
}
}
......@@ -259,6 +255,17 @@ export class AppsService {
}
}
}
// 时间
if (app.released_at) {
app.released_at = new Date(app.released_at);
}
if (app.news) {
for (let item of app.news) {
item.updated_at = new Date(item.updated_at);
}
}
apps.set(item.id, app);
}
......@@ -418,7 +425,7 @@ export class AppsService {
});
}
async verifyFiles (app: App, checksumFiles: Map<string, string>, callback: () => void): Promise<Map<string, string>> {
async verifyFiles(app: App, checksumFiles: Map<string, string>, callback: () => void): Promise<Map<string, string>> {
let result = new Map<string, string>();
for (let [file, checksum] of checksumFiles) {
let filePath = path.join(app.local!.path, file);
......@@ -662,7 +669,7 @@ export class AppsService {
}
await this.doInstall(task);
};
const addDownloadTask = async (_app: App, dir: string): Promise<{app: App, files: string[]} > => {
const addDownloadTask = async(_app: App, dir: string): Promise<{app: App, files: string[]} > => {
let locale = this.settingsService.getLocale();
if (!['zh-CN', 'en-US', 'ja-JP'].includes(locale)) {
locale = 'en-US';
......@@ -1147,7 +1154,7 @@ export class AppsService {
}
}
async getChecksumFile (app: App): Promise<Map<string, string> > {
async getChecksumFile(app: App): Promise<Map<string, string> > {
let locale = this.settingsService.getLocale();
if (!['zh-CN', 'en-US', 'ja-JP'].includes(locale)) {
......
<div id="candy"></div>
\ No newline at end of file
<div id="candy"></div>
<roster [roster]="roster" (chat)="chat($event)"></roster>
\ No newline at end of file
......@@ -219,6 +219,7 @@ export class CandyComponent implements OnInit, OnChanges {
jid: string;
password: string;
nickname: string;
roster: any[] = [];
constructor(private loginService: LoginService, private settingsService: SettingsService, private element: ElementRef) {
}
......@@ -280,13 +281,21 @@ export class CandyComponent implements OnInit, OnChanges {
Candy.Core.connect(this.jid, this.password, this.nickname);
// $(Candy).on('candy:core.chat.connection', (event: any, args: any) => {
// if (args.status === Strophe.Status.CONNECTED) {
// Candy.Core.Action.Jabber.Roster();
// Candy.Core.getConnection().send($iq({type: 'get'}).c('vCard', {xmlns: 'vcard-temp'}).tree());
// }
// });
$(Candy).on('candy:core:roster:loaded', (event: JQueryEventObject, data: any) => {
this.roster = Object.values(data.roster.getAll());
});
$(Candy).on('candy:core:roster:fetched', (event: JQueryEventObject, data: any) => {
this.roster = Object.values(data.roster.getAll());
});
$(Candy).on('candy:core:roster:removed', (event: JQueryEventObject, data: any) => {
this.roster = Object.values(Candy.Core.getRoster().getAll());
});
$(Candy).on('candy:core:roster:added', (event: JQueryEventObject, data: any) => {
this.roster = Object.values(Candy.Core.getRoster().getAll());
});
$(Candy).on('candy:core:roster:updated', (event: JQueryEventObject, data: any) => {
this.roster = Object.values(Candy.Core.getRoster().getAll());
});
}
ngOnChanges(changes: SimpleChanges): void {
......@@ -310,6 +319,10 @@ export class CandyComponent implements OnInit, OnChanges {
}
}
chat(jid: string) {
console.log(jid);
}
// ngOnDestroy () {
// if (Candy.Core.getConnection()) {
// Candy.Core.disconnect();
......
......@@ -76,7 +76,7 @@
<div id="right">
<div id="main">
<app-detail class="scroll" *ngIf="currentApp" [currentApp]="currentApp"></app-detail>
<roster class="scroll"></roster>
<!--<roster class="scroll"></roster>-->
</div>
<div id="candy-wrapper" class="resize-wrapper resize-top">
......
#friend_list>ul>li>div>p{
font-size:12px;
padding:3px 5px;
margin:0;
cursor:default;
:host {
position: fixed;
top: 0;
right: 0;
background: white;
}
#friend_list>ul>li>img{
border-radius:25.5px;
}
#friend_list > ul > li > div > p {
font-size: 12px;
padding: 3px 5px;
margin: 0;
cursor: default;
}
#friend_list>ul>li{
padding:3px;
list-style-type:none;
position:relative;
#friend_list > ul > li > img {
border-radius: 25.5px;
}
#friend_list>ul>li:hover{
padding:3px;
list-style-type:none;
position:relative;
background:#aaa;
#friend_list > ul > li {
padding: 3px;
list-style-type: none;
position: relative;
}
#friend_list>ul>li>i{
position:absolute;
top:38px;
left:38px;
#friend_list > ul > li:hover {
padding: 3px;
list-style-type: none;
position: relative;
background: #aaa;
}
#friend_list>ul{
padding:0;
#friend_list > ul > li > i {
position: absolute;
top: 38px;
left: 38px;
}
.fl{float:left;}
#friend_list > ul {
padding: 0;
}
#friend_list i{font-size:10px;}
.fl {
float: left;
}
.red{color:red;}
#friend_list i {
font-size: 10px;
}
.red {
color: red;
}
.green_light {
color: #8f8;
}
.red_light {
color: #f88;
}
.grey {
color: grey;
}
.green_light{color:#8f8;}
.red_light{color:#f88;}
.grey{color:grey;}
.blue_light{color:#88f;}
\ No newline at end of file
.blue_light {
color: #88f;
}
\ No newline at end of file
<!--<link href="roster.component.css" type="text/css" rel="stylesheet">-->
<!--<link rel="stylesheet" href="../node_modules/font-awesome/css/font-awesome.min.css">-->
<!--<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">-->
<!--<script src="../node_modules/core-js/client/shim.min.js"></script>-->
<!--<link href="roster.component.css" type="text/css" rel="stylesheet">--><!--<link rel="stylesheet" href="../node_modules/font-awesome/css/font-awesome.min.css">--><!--<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">--><!--<script src="../node_modules/core-js/client/shim.min.js"></script>-->
<!--<script src="../node_modules/zone.js/dist/zone.js"></script>-->
<!--<script src="../node_modules/reflect-metadata/Reflect.js"></script>-->
<!--<script src="../node_modules/systemjs/dist/system.src.js"></script>-->
<!--<script src="../node_modules/zone.js/dist/zone.js"></script>--><!--<script src="../node_modules/reflect-metadata/Reflect.js"></script>--><!--<script src="../node_modules/systemjs/dist/system.src.js"></script>-->
<!--<script src="../systemjs.config.js"></script>-->
<div >
<div class="input-group" id="friend_search">
<div class="input-group ">
<i class="fa fa-search input-group-addon search" id="basic-addon1"></i>
<input type="text" class="form-control" aria-label="Amount (to the nearest dollar)">
<!--<span class="input-group-addon">+</span>-->
<button type="button" class="input-group-addon btn btn-sm btn-primary blue_light">+</button>
</div>
</div>
<!--<div>-->
<!--<div class="input-group" id="friend_search">-->
<!--<div class="input-group ">-->
<!--<i class="fa fa-search input-group-addon search" id="basic-addon1"></i>-->
<!--<input type="text" class="form-control" aria-label="Amount (to the nearest dollar)">-->
<!--&lt;!&ndash;<span class="input-group-addon">+</span>&ndash;&gt;-->
<!--<button type="button" class="input-group-addon btn btn-sm btn-primary blue_light">+</button>-->
<!--</div>-->
<!--</div>-->
<div id="friend_list">
<ul>
<li>
<img class="fl" src="https://ygobbs.com//letter_avatar_proxy/v2/letter/q/cdc98d/45.png">
<i class="fa fa-circle green_light"></i>
<div class="fl">
<p>我叫什么名来着</p>
<p>发呆ing</p>
</div>
<div style="clear: both"></div>
</li>
<!--<div id="friend_list">-->
<!--<ul>-->
<!--<li *ngFor="let contact of roster">-->
<!--<img class="fl" src="https://ygobbs.com//letter_avatar_proxy/v2/letter/q/cdc98d/45.png">-->
<!--<i class="fa fa-circle green_light"></i>-->
<!--<div class="fl">-->
<!--<p>{{contact.getName()}}</p>-->
<!--<p *ngIf="contact.getSubscription() != 'both'">等待确认</p>-->
<!--<p *ngIf="contact.getSubscription() == 'both'">{{contact.getStatus()}}</p>-->
<li>
<img class="fl" src="https://ygobbs.com/user_avatar/ygobbs.com/sky%E7%A5%9E%E6%99%BA/45/16501_1.png">
<i class="fa fa-play-circle red_light"></i>
<div class="fl">
<p>我叫什么名来着</p>
<p class="red">东方妖妖梦</p>
</div>
<div style="clear: both"></div>
</li>
<!--</div>-->
<!--<div style="clear: both"></div>-->
<!--</li>-->
<!--<li>-->
<!--<img class="fl" src="https://ygobbs.com//letter_avatar_proxy/v2/letter/q/cdc98d/45.png">-->
<!--<i class="fa fa-circle green_light"></i>-->
<!--<div class="fl">-->
<!--<p>我叫什么名来着</p>-->
<!--<p>发呆ing</p>-->
<!--</div>-->
<!--<div style="clear: both"></div>-->
<!--</li>-->
<li>
<img class="fl" src="https://ygobbs.com/user_avatar/ygobbs.com/%E6%98%9F%E5%85%89pokeboy/45/10237_1.png">
<i class="fa fa-question-circle blue_light"></i>
<div class="fl">
<p>我叫什么名来着</p>
<p>发呆ing</p>
</div>
<div style="clear: both"></div>
</li>
<!--<li>-->
<!--<img class="fl" src="https://ygobbs.com/user_avatar/ygobbs.com/sky%E7%A5%9E%E6%99%BA/45/16501_1.png">-->
<!--<i class="fa fa-play-circle red_light"></i>-->
<!--<div class="fl">-->
<!--<p>我叫什么名来着</p>-->
<!--<p class="red">东方妖妖梦</p>-->
<!--</div>-->
<!--<div style="clear: both"></div>-->
<!--</li>-->
<li>
<img class="fl" src="https://ygobbs.com//user_avatar/ygobbs.com/%E7%B1%B3%E7%B1%B3%E7%B1%B3%E5%BE%B7%E6%8B%89%E4%BB%80/45/17187_1.png">
<i class="fa fa-clock-o grey"></i>
<div class="fl">
<p>我叫什么名来着</p>
<p>发呆ing</p>
</div>
<div style="clear: both"></div>
</li>
</ul>
</div>
</div>
<!--<li>-->
<!--<img class="fl" src="https://ygobbs.com/user_avatar/ygobbs.com/%E6%98%9F%E5%85%89pokeboy/45/10237_1.png">-->
<!--<i class="fa fa-question-circle blue_light"></i>-->
<!--<div class="fl">-->
<!--<p>我叫什么名来着</p>-->
<!--<p>发呆ing</p>-->
<!--</div>-->
<!--<div style="clear: both"></div>-->
<!--</li>-->
<!--<li>-->
<!--<img class="fl" src="https://ygobbs.com//user_avatar/ygobbs.com/%E7%B1%B3%E7%B1%B3%E7%B1%B3%E5%BE%B7%E6%8B%89%E4%BB%80/45/17187_1.png">-->
<!--<i class="fa fa-clock-o grey"></i>-->
<!--<div class="fl">-->
<!--<p>我叫什么名来着</p>-->
<!--<p>发呆ing</p>-->
<!--</div>-->
<!--<div style="clear: both"></div>-->
<!--</li>-->
<!--</ul>-->
<!--</div>-->
<!--</div>-->
/**
* Created by zh99998 on 16/9/2.
*/
import {Component} from '@angular/core';
import {Component, Input, EventEmitter, Output, OnInit, OnChanges} from '@angular/core';
@Component({
moduleId: module.id,
selector: 'roster',
templateUrl: 'roster.component.html',
styleUrls: ['roster.component.css'],
})
export class RosterComponent {
export class RosterComponent implements OnInit, OnChanges {
@Input()
roster: any;
@Output()
chat = new EventEmitter<string>();
ngOnInit() {
console.log(this.roster);
}
ngOnChanges() {
console.log(this.roster);
}
}
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