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

修复界面

parent 24d10e06
......@@ -26,7 +26,7 @@
<div id="network" *ngIf="currentApp.network && currentApp.network.protocol == 'maotama'">
<div class="input-group">
<input *ngIf="appsService.connections.get(currentApp)" [value]="appsService.connections.get(currentApp).address || 'Loading...'" readonly type="text" class="form-control" title="address">
<div class="input-group-btn">
<div class="input-group-btn" style="flex-direction: row">
<button i18n *ngIf="!appsService.connections.get(currentApp)" [disabled]="!appsService.allReady(currentApp)" (click)="appsService.network(currentApp, currentApp.network.servers[0])" type="button" class="btn btn-secondary">联机</button>
<button i18n *ngIf="appsService.connections.get(currentApp)" (click)="copy(appsService.connections.get(currentApp).address)" [disabled]="!appsService.connections.get(currentApp).address" type="button" class="btn btn-secondary">复制</button>
<button type="button" class="btn btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" style="height: 38px;"></button>
......@@ -88,10 +88,10 @@
<div class="modal-dialog" role="document">
<form id="install-form" class="modal-content" (ngSubmit)="install(currentApp,installOption,referencesInstall)" #theForm="ngForm">
<div class="modal-header">
<h5 i18n class="modal-title" id="myModalLabel">安装 {{currentApp.name}}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span>&times;</span>
</button>
<h4 i18n class="modal-title" id="myModalLabel">安装 {{currentApp.name}}</h4>
</div>
<div class="modal-body">
<p i18n>即将开始安装 {{currentApp.name}}</p>
......@@ -132,10 +132,10 @@
<div class="modal-dialog" role="document">
<form id="import-form" class="modal-content" (ngSubmit)="importGame(currentApp,installOption,referencesInstall)" #theForm="ngForm">
<div class="modal-header">
<h5 i18n class="modal-title">导入 {{currentApp.name}}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span>&times;</span>
</button>
<h4 i18n class="modal-title">导入 {{currentApp.name}}</h4>
</div>
<div class="modal-body">
<p i18n>选择主程序 {{currentApp.actions.get('main').execute}}</p>
......
......@@ -14,31 +14,22 @@
flex-shrink: 0;
}
#apps {
/*background-color: darkslategray;*/
width: 280px;
flex-shrink: 0;
overflow-y: auto;
background-color: #f5f5f5;
border-right: 1px solid #eee;
}
a {
display: block;
padding: 10px 20px 10px 20px;
}
/*a {*/
/*display: block;*/
/*padding: 10px 20px 10px 20px;*/
/*}*/
a:focus, a:hover {
text-decoration: none;
}
/*a:focus, a:hover {*/
/*text-decoration: none;*/
/*}*/
.active {
background-color: #428bca;
}
/*.active {*/
/*background-color: #428bca;*/
/*}*/
.active > a {
color: #fff;
}
/*.active > a {*/
/*color: #fff;*/
/*}*/
span {
margin-left: 8px;
......@@ -111,4 +102,35 @@ span {
color: #0275d8;
font-weight: bold;
float: right;
}
.sidebar {
width: 240px;
flex-shrink: 0;
overflow-y: auto;
background-color: #f5f5f5;
border-right: 1px solid #eee;
padding-top: 10px;
}
/* Sidebar navigation */
.sidebar {
padding-left: 0;
padding-right: 0;
}
.sidebar .nav {
margin-bottom: 20px;
}
.sidebar .nav-item {
width: 100%;
}
.sidebar .nav-item + .nav-item {
margin-left: 0;
}
.sidebar .nav-link {
border-radius: 0;
}
\ No newline at end of file
<!-- Begin page content -->
<div id="main">
<div id="apps" *ngIf="apps">
<nav id="apps" *ngIf="apps" class="bg-faded sidebar">
<span i18n *ngIf="grouped_apps.installed">已安装</span>
<ul *ngIf="grouped_apps.installed" class="nav nav-sidebar">
<li *ngFor="let app of grouped_apps.installed" [class.active]="app===currentApp">
<i *ngIf="!app.isReady() && !app.status.total" class="spin fa fa-circle-o-notch fa-spin fa-fw"></i>
<div *ngIf="!app.isReady() && app.status.total" class="progress">
<div class="pie" [class.second-half]="app.status.progress/app.status.total>0.5">
<div class="left-side half-circle" [style.transform]="'rotate('+(app.status.progress/app.status.total).toString()+'turn)'"></div>
<div class="right-side half-circle"></div>
<ul *ngIf="grouped_apps.installed" class="nav nav-pills flex-column">
<li *ngFor="let app of grouped_apps.installed" class="nav-item">
<a (click)="chooseApp(app)" class="nav-link" [class.active]="app===currentApp" href="#">{{app.name}}<i
*ngIf="!app.isReady() && !app.status.total" class="spin fa fa-circle-o-notch fa-spin fa-fw"></i>
<div *ngIf="!app.isReady() && app.status.total" class="progress">
<div class="pie" [class.second-half]="app.status.progress/app.status.total>0.5">
<div class="left-side half-circle"
[style.transform]="'rotate('+(app.status.progress/app.status.total).toString()+'turn)'"></div>
<div class="right-side half-circle"></div>
</div>
<div class="shadow"></div>
</div>
<div class="shadow"></div>
</div>
<a (click)="chooseApp(app)" href="#">{{app.name}}</a>
</a>
</li>
</ul>
<span i18n *ngIf="grouped_apps.recommend">推荐</span>
<ul *ngIf="grouped_apps.recommend" class="nav nav-sidebar">
<li *ngFor="let app of grouped_apps.recommend" [class.active]="app===currentApp">
<a (click)="chooseApp(app)" href="#">{{app.name}}</a>
<ul *ngIf="grouped_apps.recommend" class="nav nav-pills flex-column">
<li *ngFor="let app of grouped_apps.recommend" class="nav-item">
<a (click)="chooseApp(app)" href="#" class="nav-link" [class.active]="app===currentApp">{{app.name}}</a>
</li>
</ul>
<span i18n *ngIf="grouped_apps.mysterious">迷之物体</span>
<ul *ngIf="grouped_apps.mysterious" class="nav nav-sidebar">
<li *ngFor="let app of grouped_apps.mysterious" [class.active]="app===currentApp">
<a (click)="chooseApp(app)" href="#">{{app.name}}</a>
<progress *ngIf="app.status.status === 'downloading'"
class="progress progress-striped progress-animated"
value="{{app.status.progress}}"
max="{{app.status.total}}"></progress>
<ul *ngIf="grouped_apps.mysterious" class="nav nav-pills flex-column">
<li *ngFor="let app of grouped_apps.mysterious" class="nav-item">
<a (click)="chooseApp(app)" href="#" class="nav-link" [class.active]="app===currentApp">{{app.name}}</a>
</li>
</ul>
<span i18n *ngIf="grouped_apps.touhou">东方 Project</span>
<ul *ngIf="grouped_apps.touhou" class="nav nav-sidebar">
<li *ngFor="let app of grouped_apps.touhou" [class.active]="app===currentApp">
<a (click)="chooseApp(app)" href="#">{{app.name}}</a>
<progress *ngIf="app.status.status === 'downloading'"
class="progress progress-striped progress-animated"
value="{{app.status.progress}}"
max="{{app.status.total}}"></progress>
<ul *ngIf="grouped_apps.touhou" class="nav nav-pills flex-column">
<li *ngFor="let app of grouped_apps.touhou" class="nav-item">
<a (click)="chooseApp(app)" href="#" class="nav-link" [class.active]="app===currentApp">{{app.name}}</a>
</li>
</ul>
<span i18n *ngIf="grouped_apps.touhou_pc98">东方旧作</span>
<ul *ngIf="grouped_apps.touhou_pc98" class="nav nav-sidebar">
<li *ngFor="let app of grouped_apps.touhou_pc98" [class.active]="app===currentApp">
<a (click)="chooseApp(app)" href="#">{{app.name}}</a>
<ul *ngIf="grouped_apps.touhou_pc98" class="nav nav-pills flex-column">
<li *ngFor="let app of grouped_apps.touhou_pc98" class="nav-item">
<a (click)="chooseApp(app)" href="#" class="nav-link" [class.active]="app===currentApp">{{app.name}}</a>
</li>
</ul>
<span i18n *ngIf="grouped_apps.runtime_installed">已安装的运行库</span>
<ul *ngIf="grouped_apps.runtime_installed" class="nav nav-sidebar">
<li *ngFor="let app of grouped_apps.runtime_installed" [class.active]="app===currentApp">
<a (click)="chooseApp(app)" href="#">{{app.name}}</a>
<ul *ngIf="grouped_apps.runtime_installed" class="nav nav-pills flex-column">
<li *ngFor="let app of grouped_apps.runtime_installed" class="nav-item">
<a (click)="chooseApp(app)" href="#" class="nav-link" [class.active]="app===currentApp">{{app.name}}</a>
</li>
</ul>
</div>
</nav>
<app-detail *ngIf="currentApp" [currentApp]="currentApp"></app-detail>
<roster></roster>
</div>
<webview *ngIf="currentApp" #candy id="candy" [src]="candy_url" (new-window)="openExternal($event.url)" nodeintegration></webview>
<webview *ngIf="currentApp" #candy id="candy" [src]="candy_url" (new-window)="openExternal($event.url)"
nodeintegration></webview>
<nav id="navbar" class="navbar navbar-dark bg-inverse">
<nav id="navbar" class="navbar navbar-toggleable-md navbar-inverse bg-inverse">
<a class="navbar-brand" href="#">MyCard</a>
<ul class="nav navbar-nav">
<ul class="navbar-nav mr-auto">
<li *ngIf="!loginService.logged_in" class="nav-item active">
<a i18n class="nav-link" href="#">登录</a>
</li>
......@@ -19,7 +19,7 @@
<!--<a i18n (click)="currentPage='about'" class="nav-link" href="#">关于</a>-->
<!--</li>-->
</ul>
<div class="navbar-right">
<div id="navbar-right">
<div id="update-status">
<i #error [hidden]="update_status != 'error'" (click)="update_retry()" class="fa fa-exclamation-circle" data-toggle="tooltip" title="更新出错,点击重试"></i>
<i #checking_for_update [hidden]="update_status != 'checking-for-update'" class="fa fa-spinner fa-pulse fa-spin" data-toggle="tooltip" title="正在检查更新"></i>
......@@ -51,10 +51,10 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 i18n class="modal-title" id="myModalLabel">MyCard 设置</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 i18n class="modal-title" id="myModalLabel">MyCard 设置</h4>
</div>
<form (submit)="submit()">
<div class="modal-body">
......@@ -77,4 +77,4 @@
</form>
</div>
</div>
</div>
\ No newline at end of file
</div>
......@@ -83,4 +83,8 @@
dl {
margin-bottom: 0;
}
.modal-dialog {
max-width: 600px;
}
\ No newline at end of file
<form class="form-inline actions">
<div class="form-group">
<label i18n for="exampleSelect1">卡组</label>
<select class="form-control" id="exampleSelect1" name="deck" [(ngModel)]="current_deck">
<label i18n for="exampleSelect1" class="mr-sm-2">卡组</label>
<select class="form-control mr-sm-2" id="exampleSelect1" name="deck" [(ngModel)]="current_deck">
<option *ngFor="let deck of decks" [ngValue]="deck">{{deck}}</option>
</select>
</div>
<button i18n [disabled]="!appsService.allReady(app)" type="submit" class="btn btn-secondary" (click)="edit_deck(current_deck)">编辑</button>
<button i18n [disabled]="!appsService.allReady(app)" type="submit" (click)="delete_deck(current_deck)" class="btn btn-secondary">删除</button>
<button i18n [disabled]="!appsService.allReady(app)" type="submit" (click)="refresh()" class="btn btn-secondary">刷新</button>
<button i18n [disabled]="!appsService.allReady(app)" type="submit" class="btn btn-secondary mr-sm-2"
(click)="edit_deck(current_deck)">编辑
</button>
<button i18n [disabled]="!appsService.allReady(app)" type="submit" (click)="delete_deck(current_deck)"
class="btn btn-secondary mr-sm-2">删除
</button>
<button i18n [disabled]="!appsService.allReady(app)" type="submit" (click)="refresh()"
class="btn btn-secondary mr-sm-2">刷新
</button>
</form>
<div class="actions">
......@@ -23,31 +29,31 @@
<div class="actions">
<h2 i18n>排位成绩</h2>
<!--{"exp":1839,"exp_rank":"9","pt":2207.2901,"arena_rank":"30","win":"703","lose":"568","draw":5,"all":"1276","ratio":"55.09"}-->
<dl *ngIf="points" class="row">
<dt i18n class="col-xs-2">D.P 排名</dt>
<dd class="col-xs-1">{{points.arena_rank}}</dd>
<dt i18n class="col-xs-2">D.P 胜率</dt>
<dd class="col-xs-1">{{points.athletic_wl_ratio}}%</dd>
<dt i18n class="col-xs-2">胜场</dt>
<dd class="col-xs-1">{{points.athletic_win}}</dd>
<dt i18n class="col-xs-2">负场</dt>
<dd class="col-xs-1">{{points.athletic_lose}}</dd>
<dt i18n class="col-xs-2">平局</dt>
<dd class="col-xs-1">{{points.athletic_draw}}</dd>
<dt i18n class="col-xs-2">总场</dt>
<dd class="col-xs-1">{{points.athletic_all}}</dd>
<dt i18n class="col-xs-2">EXP 排名</dt>
<dd class="col-xs-1">{{points.exp_rank}}</dd>
<dt i18n class="col-xs-2">EXP</dt>
<dd class="col-xs-1">{{points.exp}}</dd>
<dt i18n class="col-xs-2">胜场</dt>
<dd class="col-xs-1">{{points.entertain_win}}</dd>
<dt i18n class="col-xs-2">负场</dt>
<dd class="col-xs-1">{{points.entertain_lose}}</dd>
<dt i18n class="col-xs-2">平局</dt>
<dd class="col-xs-1">{{points.entertain_draw}}</dd>
<dt i18n class="col-xs-2">总场</dt>
<dd class="col-xs-1">{{points.entertain_all}}</dd>
<dl *ngIf="points" class="row col-3">
<dt i18n class="col-8">D.P 排名</dt>
<dd class="col-4">{{points.arena_rank}}</dd>
<dt i18n class="col-8">D.P 胜率</dt>
<dd class="col-4">{{points.athletic_wl_ratio}}%</dd>
<dt i18n class="col-8">胜场</dt>
<dd class="col-4">{{points.athletic_win}}</dd>
<dt i18n class="col-8">负场</dt>
<dd class="col-4">{{points.athletic_lose}}</dd>
<dt i18n class="col-8">平局</dt>
<dd class="col-4">{{points.athletic_draw}}</dd>
<dt i18n class="col-8">总场</dt>
<dd class="col-4">{{points.athletic_all}}</dd>
<dt i18n class="col-8">EXP 排名</dt>
<dd class="col-4">{{points.exp_rank}}</dd>
<dt i18n class="col-8">EXP</dt>
<dd class="col-4">{{points.exp}}</dd>
<dt i18n class="col-8">胜场</dt>
<dd class="col-4">{{points.entertain_win}}</dd>
<dt i18n class="col-8">负场</dt>
<dd class="col-4">{{points.entertain_lose}}</dd>
<dt i18n class="col-8">平局</dt>
<dd class="col-4">{{points.entertain_draw}}</dd>
<dt i18n class="col-8">总场</dt>
<dd class="col-4">{{points.entertain_all}}</dd>
</dl>
<a i18n href="https://mycard.moe/ygopro/arena/" target="_blank">更多资料</a>
</div>
......@@ -56,10 +62,10 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 i18n class="modal-title">单人模式</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 i18n class="modal-title" id="myModalLabel1">单人模式</h4>
</div>
<div class="modal-body">
<label i18n>选择对手</label>
......@@ -78,10 +84,10 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" i18n id="myModalLabel">创建房间</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" i18n id="myModalLabel">创建房间</h4>
</div>
<form id="game-create" (submit)="create_room(room)">
<div class="modal-body">
......@@ -160,10 +166,14 @@
</div>
</div>-->
</div>
<div class="modal-footer">
<button i18n type="button" class="btn btn-secondary float-left" data-dismiss="modal" data-toggle="modal" data-target="#game-list-modal">查看房间</button>
<button i18n type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
<button i18n type="submit" class="btn btn-primary">创建</button>
<div class="modal-footer justify-content-between">
<button i18n type="button" class="btn btn-secondary" data-dismiss="modal" data-toggle="modal"
data-target="#game-list-modal">查看房间
</button>
<div>
<button i18n type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
<button i18n type="submit" class="btn btn-primary">创建</button>
</div>
</div>
</form>
</div>
......@@ -203,8 +213,10 @@
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<div class="modal-footer">
<button i18n type="button" class="btn btn-secondary float-left" data-dismiss="modal" data-toggle="modal" data-target="#game-create-modal">创建房间</button>
<div class="modal-footer justify-content-between">
<button i18n type="button" class="btn btn-secondary" data-dismiss="modal" data-toggle="modal"
data-target="#game-create-modal">创建房间
</button>
<button i18n type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
</div>
</div>
......
......@@ -116,7 +116,7 @@ export class YGOProComponent implements OnInit {
default_options: Options = {
mode: 1,
rule: 0,
rule: this.settingsService.getLocale().startsWith('zh') ? 0 : 1,
start_lp: 8000,
start_hand: 5,
draw_count: 1,
......@@ -229,7 +229,11 @@ export class YGOProComponent implements OnInit {
async refresh() {
let decks = await this.get_decks();
this.decks = decks;
if (!(this.decks.includes(this.current_deck))) {
let system_conf = await this.load_system_conf();
if (this.decks.includes(system_conf.lastdeck)) {
this.current_deck = system_conf.lastdeck;
} else {
this.current_deck = decks[0];
}
// https://mycard.moe/ygopro/api/user?username=ozxdno
......
{
"name": "mycard",
"version": "3.0.12",
"version": "3.0.13",
"description": "mycard",
"keywords": [],
"author": "zh99998 <zh99998@gmail.com>",
......
......@@ -36,11 +36,7 @@ mycard {
-webkit-app-region: no-drag;
}
#navbar .navbar-right {
float: right
}
#navbar .navbar-right > div, #user > .item {
#navbar-right > div, #user > .item {
float: left;
margin: 0 0.5rem;
}
......
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