Commit 1ac4df29 authored by 神楽坂玲奈's avatar 神楽坂玲奈

微调

parent a297980c
/* 安装、导入 modal */ /* 安装、导入 modal */
:host {
display: flex;
}
.dependency { .dependency {
margin-right: 0.8em; margin-right: 0.8em;
......
...@@ -87,8 +87,6 @@ export class CubeActionsComponent implements OnInit, OnChanges { ...@@ -87,8 +87,6 @@ export class CubeActionsComponent implements OnInit, OnChanges {
} }
} }
// https://plus.google.com/+%E7%A5%9E%E6%A5%BD%E5%9D%82%E7%8E%B2%E5%A5%88/posts/1ngiNvqhM7C
this.ref.detectChanges();
} }
get libraries(): string[] { get libraries(): string[] {
......
:host { :host {
position: relative; position: relative;
display: block;
} }
.moreinfo { .moreinfo {
......
:host {
display: flex;
}
.panel { .panel {
display: flex; display: flex;
border: 1px solid #eceeef; border: 1px solid #eceeef;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
} }
.panel { .panel {
display: flex; /*display: flex;*/
border: 1px solid #eceeef; border: 1px solid #eceeef;
border-radius: 6px; border-radius: 6px;
background: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .7);
......
<ng-container *ngIf="currentCube"> <ng-container *ngIf="currentCube">
<cube-actions [currentCube]="currentCube" class="panel"></cube-actions> <cube-actions [currentCube]="currentCube" class="panel"></cube-actions>
<cube-arena *ngIf="currentCube.useArena()" [currentCube]="currentCube" class="panel"></cube-arena> <cube-arena *ngIf="currentCube.useArena()" [currentCube]="currentCube" class="panel"></cube-arena>
<cube-description *ngIf="currentCube.useDescription()" [currentCube]="currentCube" class="d-flex"></cube-description> <cube-description *ngIf="currentCube.useDescription()" [currentCube]="currentCube"></cube-description>
<cube-news *ngIf="currentCube.useNews()" [currentCube]="currentCube" class="panel"></cube-news> <cube-news *ngIf="currentCube.useNews()" [currentCube]="currentCube" class="panel"></cube-news>
<cube-expansions *ngIf="currentCube.useExpansions()" [currentCube]="currentCube" class="panel"></cube-expansions> <cube-expansions *ngIf="useExpansions()" [currentCube]="currentCube" class="panel"></cube-expansions>
<!-- 设计未定,暂不封装 --> <!-- 设计未定,暂不封装 -->
......
...@@ -75,8 +75,6 @@ export class CubeDetailComponent implements OnInit, OnChanges { ...@@ -75,8 +75,6 @@ export class CubeDetailComponent implements OnInit, OnChanges {
this.el.nativeElement.style.background = 'white'; this.el.nativeElement.style.background = 'white';
} }
// 我不知道这里出现了什么问题,按理说点击鼠标造成的事件,应当是能自动检测的,不知道这里为什么不行
this.ref.detectChanges();
// let top = await this.http.get('https://ygobbs.com/top.json').map(response => response.json()).toPromise(); // let top = await this.http.get('https://ygobbs.com/top.json').map(response => response.json()).toPromise();
// console.log(top.topic_list.topics); // console.log(top.topic_list.topics);
}); });
...@@ -104,6 +102,10 @@ export class CubeDetailComponent implements OnInit, OnChanges { ...@@ -104,6 +102,10 @@ export class CubeDetailComponent implements OnInit, OnChanges {
} }
} }
useExpansions(): boolean {
return this.currentCube.useExpansions() && this.cubesService.findChildren(this.currentCube).length > 0;
}
updateInstallOption(app: Cube) { updateInstallOption(app: Cube) {
this.installOption = new InstallOption(app); this.installOption = new InstallOption(app);
this.installOption.installLibrary = this.settingsService.getDefaultLibrary().path; this.installOption.installLibrary = this.settingsService.getDefaultLibrary().path;
......
:host {
display: block;
}
p { p {
margin-bottom: 0; margin-bottom: 0;
} }
......
<h2 i18n>新闻</h2> <h2 i18n>新闻</h2>
<div id="news" *ngFor="let item of news"> <div id="news" *ngFor="let item of currentCube.news">
<h3><a class="title" [href]="item.url" target="_blank">{{item.title}}</a></h3> <h3><a class="title" [href]="item.url" target="_blank">{{item.title}}</a></h3>
<span>{{item.updated_at | date:'shortDate'}}</span> <span>{{item.updated_at | date:'shortDate'}}</span>
<p>{{item.text}}</p> <p>{{item.text}}</p>
......
...@@ -65,7 +65,7 @@ export class LobbyComponent implements OnInit { ...@@ -65,7 +65,7 @@ export class LobbyComponent implements OnInit {
if (!this.settingsService.getLocale().startsWith('zh')) { if (!this.settingsService.getLocale().startsWith('zh')) {
this.apps.get('ygopro')!.conference = 'ygopro-international'; this.apps.get('ygopro')!.conference = 'ygopro-international';
} }
this.ref.detectChanges(); // this.ref.detectChanges();
let url = new URL('wss://api.moecube.com:3100'); let url = new URL('wss://api.moecube.com:3100');
let params: URLSearchParams = url['searchParams']; let params: URLSearchParams = url['searchParams'];
......
...@@ -292,7 +292,7 @@ export class YGOProComponent implements OnInit, OnDestroy { ...@@ -292,7 +292,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
case 'delete': case 'delete':
this.rooms.splice(this.rooms.findIndex(room => room.server === server && room.id === message.data), 1); this.rooms.splice(this.rooms.findIndex(room => room.server === server && room.id === message.data), 1);
} }
this.ref.detectChanges(); // this.ref.detectChanges();
}; };
return connection; return connection;
}); });
...@@ -335,7 +335,7 @@ export class YGOProComponent implements OnInit, OnDestroy { ...@@ -335,7 +335,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
); );
} }
this.refresh_replay_rooms(); this.refresh_replay_rooms();
this.ref.detectChanges(); // this.ref.detectChanges();
}; };
return connection; return connection;
}); });
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<link rel="stylesheet" href="styles.css"> <link rel="stylesheet" href="styles.css">
<!-- Polyfill(s) for older browsers --> <!-- Polyfill(s) for older browsers -->
<script src="node_modules/core-js/client/shim.min.js"></script> <script src="node_modules/reflect-metadata/Reflect.js"></script>
<script src="node_modules/zone.js/dist/zone.js"></script> <script src="node_modules/zone.js/dist/zone.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script> <script src="node_modules/systemjs/dist/system.src.js"></script>
......
...@@ -75,7 +75,8 @@ ...@@ -75,7 +75,8 @@
'jquery': 'npm:jquery/dist/jquery.min.js', 'jquery': 'npm:jquery/dist/jquery.min.js',
'tether': 'npm:tether/dist/js/tether.min.js', 'tether': 'npm:tether/dist/js/tether.min.js',
'bootstrap': 'npm:bootstrap/dist/js/bootstrap.min.js', 'bootstrap': 'npm:bootstrap/dist/js/bootstrap.min.js',
'reconnecting-websocket': 'npm:reconnecting-websocket/dist/index.js' 'reconnecting-websocket': 'npm:reconnecting-websocket/dist/index.js',
'reflect-metadata': 'npm:reflect-metadata/Reflect.js'
}, },
// packages tells the System loader how to load when no filename and/or no extension // packages tells the System loader how to load when no filename and/or no extension
packages: { packages: {
......
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