Commit 3a77c9fc authored by 神楽坂玲奈's avatar 神楽坂玲奈

lobby

parent 6ec19f15
......@@ -27,7 +27,7 @@
<br>
<h2 *ngIf="news">新闻</h2>
<h2 *ngIf="news.length">新闻</h2>
<div id="news" *ngFor="let item of news">
<h3>{{item.title}}</h3>
......@@ -35,7 +35,7 @@
<a *ngIf="item.url" [href]="item.url">了解更多</a>
</div>
<div *ngIf="friends">
<!--<div *ngIf="friends">
<h2>好友</h2>
<p>好友信息</p>
<br>
......@@ -45,9 +45,9 @@
<h2>成就</h2>
<p>成就信息</p>
<br>
</div>
</div>-->
<div *ngIf="mods">
<div *ngIf="mods && mods.length">
<h2>Mods</h2>
<table class="table table-striped">
<thead class="thead-inverse">
......
<span *ngIf="grouped_apps.installed">已安装</span>
<span *ngIf="grouped_apps.installed.length">已安装</span>
<ul *ngIf="grouped_apps.installed" class="nav nav-sidebar">
<li *ngFor="let app of grouped_apps.installed" [class.active]="app===appsService.currentApp">
<a (click)="chooseApp(app)" href="#">{{app.name[app.locales[0]]}}</a>
</li>
</ul>
<span *ngIf="grouped_apps.yugioh">游戏王</span>
<span *ngIf="grouped_apps.yugioh.length">游戏王</span>
<ul *ngIf="grouped_apps.yugioh" class="nav nav-sidebar">
<li *ngFor="let app of grouped_apps.yugioh" [class.active]="app===appsService.currentApp">
<a (click)="chooseApp(app)" href="#">{{app.name[app.locales[0]]}}</a>
</li>
</ul>
<span *ngIf="grouped_apps.touhou">东方 Project</span>
<span *ngIf="grouped_apps.touhou.length">东方 Project</span>
<ul *ngIf="grouped_apps.touhou" class="nav nav-sidebar">
<li *ngFor="let app of grouped_apps.touhou" [class.active]="app===appsService.currentApp">
<a (click)="chooseApp(app)" href="#">{{app.name[app.locales[0]]}}</a>
</li>
</ul>
<span *ngIf="grouped_apps.touhou_pc98">东方旧作</span>
<span *ngIf="grouped_apps.touhou_pc98.length">东方旧作</span>
<ul *ngIf="grouped_apps.touhou_pc98" class="nav nav-sidebar">
<li *ngFor="let app of grouped_apps.touhou_pc98" [class.active]="app===appsService.currentApp">
<a (click)="chooseApp(app)" href="#">{{app.name[app.locales[0]]}}</a>
......
......@@ -5,5 +5,5 @@
<roster></roster>
</div>
<webview id="candy"
src="./candy/index.html?jid=zh99998@mycard.moe&password=&nickname=zh99998测试&autojoin=ygopro_china_north@conference.mycard.moe"
[src]="candy_url"
nodeintegration></webview>
\ No newline at end of file
......@@ -3,12 +3,22 @@
*/
import {Component} from "@angular/core";
import {AppsService} from "./apps.service";
import {LoginService} from "./login.service";
@Component({
selector: 'lobby',
templateUrl: 'app/lobby.component.html',
styleUrls: ['app/lobby.component.css'],
})
export class LobbyComponent {
constructor(private appsService: AppsService) {
constructor(private appsService: AppsService, private loginService: LoginService) {
}
get candy_url() {
if (this.loginService.user) {
return './candy/index.html?jid=' + this.loginService.user.username + '@mycard.moe&password=' + this.loginService.user.external_id + '&nickname=' + this.loginService.user.username + '&autojoin=ygopro_china_north@conference.mycard.moe'
} else {
return null
}
}
}
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { MyCard } from './mycard.module';
import {enableProdMode} from '@angular/core';
enableProdMode();
//enableProdMode();
platformBrowserDynamic().bootstrapModule(MyCard);
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