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

not work

parent df47d167
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
download bin from CI download bin from CI
``` ```
npx electron-rebuild
npm start npm start
npm run start:electron npm run start:electron
``` ```
......
...@@ -266,6 +266,6 @@ table.expansions tr:last-child td:last-child{ ...@@ -266,6 +266,6 @@ table.expansions tr:last-child td:last-child{
margin-top: .5rem; margin-top: .5rem;
} }
#right .btn-sm { #right .btn-sm, #local .btn-sm {
margin-right: 4px; margin-right: 4px;
} }
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
margin-right: -5px; margin-right: -5px;
margin-left: 0px; margin-left: 0px;
} }
.small-gutters > .col, .small-gutters > [class*="col-"] { .small-gutters > .col, .small-gutters > [class*="col-"] {
padding-right: 5px; padding-right: 5px;
padding-left: 0px; padding-left: 0px;
...@@ -242,15 +243,19 @@ form { ...@@ -242,15 +243,19 @@ form {
#game-list td.users { #game-list td.users {
max-width: 95px; max-width: 95px;
} }
#game-list td.extra { #game-list td.extra {
max-width: 185px; max-width: 185px;
} }
#game-replay-watch td.title { #game-replay-watch td.title {
max-width: 360px; max-width: 360px;
} }
#game-replay-watch td.users { #game-replay-watch td.users {
max-width: 90px; max-width: 90px;
} }
#game-replay-watch td.extra { #game-replay-watch td.extra {
max-width: 120px; max-width: 120px;
} }
...@@ -281,9 +286,11 @@ form { ...@@ -281,9 +286,11 @@ form {
#watch-filter { #watch-filter {
display: inline-block; display: inline-block;
} }
#watch-filter .dropdown-item { #watch-filter .dropdown-item {
font-size: .875rem; font-size: .875rem;
} }
#watch-filter .form-check-input { #watch-filter .form-check-input {
margin-left: inherit; margin-left: inherit;
} }
...@@ -294,3 +301,7 @@ form { ...@@ -294,3 +301,7 @@ form {
bottom: .75rem; bottom: .75rem;
width: 500px; width: 500px;
} }
.btn-sm {
margin-right: 4px;
}
...@@ -27,13 +27,19 @@ ...@@ -27,13 +27,19 @@
<div class="col-sm-8 input-group input-group-sm"> <div class="col-sm-8 input-group input-group-sm">
<label i18n class="input-group-text" id="basic-addon1">卡组</label> <label i18n class="input-group-text" id="basic-addon1">卡组</label>
<select class="form-select form-select-sm" id="exampleSelect1" name="deck" [(ngModel)]="current_deck"> <select class="form-select form-select-sm" id="exampleSelect1" name="deck" [(ngModel)]="current_deck">
<optgroup *ngFor="let group of deckGroup()" [label]="group[0]"> <option *ngFor="let deck of group[1]" [value]="group[0] + '/' + deck">{{deck}}</option>
<ng-container *ngFor="let group of deckGroup()">
<ng-container *ngIf="group[0] == '.'; else #x">
</ng-container>
<ng-template #elseBlock>Content to render when condition is false.</ng-template>
<optgroup [label]="group[0]"></optgroup>
<option *ngFor="let deck of group[1]" [value]="group[0] + '/' + deck">{{deck}}</option> <option *ngFor="let deck of group[1]" [value]="group[0] + '/' + deck">{{deck}}</option>
</optgroup> </ng-container>
</select> </select>
<span class="input-group-btn"> <span class="input-group-btn">
<button id="edit_deck_button" i18n [disabled]="!appsService.allReady(app)" class="btn btn-secondary btn-sm" (click)="edit_deck(current_deck)">编辑</button> <button id="edit_deck_button" i18n [disabled]="!appsService.allReady(app)" class="btn btn-secondary btn-sm" (click)="edit_deck(current_deck)">编辑</button>
</span> </span>
</div> </div>
</div> </div>
......
...@@ -137,7 +137,7 @@ export class YGOProComponent implements OnInit, OnDestroy { ...@@ -137,7 +137,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
@Output() @Output()
points: EventEmitter<any> = new EventEmitter(); points: EventEmitter<any> = new EventEmitter();
decks: string[] = []; decks: string[] = [];
decks_grouped: [string, string[]][]; decks_grouped: Record<string, string[]>;
replays: string[] = []; replays: string[] = [];
current_deck: string; current_deck: string;
system_conf?: string; system_conf?: string;
...@@ -468,7 +468,7 @@ export class YGOProComponent implements OnInit, OnDestroy { ...@@ -468,7 +468,7 @@ export class YGOProComponent implements OnInit, OnDestroy {
async refresh(init?: boolean) { async refresh(init?: boolean) {
this.decks = await this.get_decks(); this.decks = await this.get_decks();
this.decks_grouped = this.deckGroup(); this.decks_grouped = _.mapValues(_.groupBy(this.decks, (p) => path.dirname(p)), (g) => g.map((p) => path.basename(p, '.ydk')))
if (this.lastDeckFormat) { if (this.lastDeckFormat) {
const systemConfString = await this.load_system_conf(); const systemConfString = await this.load_system_conf();
...@@ -520,15 +520,6 @@ export class YGOProComponent implements OnInit, OnDestroy { ...@@ -520,15 +520,6 @@ export class YGOProComponent implements OnInit, OnDestroy {
} }
} }
deckGroup(): [string, string[]][] {
return Object.entries(
_.mapValues(
_.groupBy(this.decks, (p) => path.dirname(p)),
(g) => g.map((p) => path.basename(p, '.ydk'))
)
);
}
async get_replays(): Promise<string[]> { async get_replays(): Promise<string[]> {
try { try {
let files: string[] = await fs.readdir(this.app.ygoproReplayPath!); let files: string[] = await fs.readdir(this.app.ygoproReplayPath!);
......
...@@ -8,8 +8,7 @@ ...@@ -8,8 +8,7 @@
<body> <body>
<mycard> <mycard>
<!--<div id="loading">MyCard <span id="version"></span> Loading...</div>--> <!--<div id="loading">MyCard <span id="version"></span> Loading...</div>-->
<div id='loading-bar'> <header class='navbar navbar-toggleable-md navbar-light' id='navbar'>
<span class='navbar-brand'>MyCard</span>
<i class='fa fa-times close' i18n='' i18n-title='' title='关闭' onclick='window.close()'></i> <i class='fa fa-times close' i18n='' i18n-title='' title='关闭' onclick='window.close()'></i>
</div> </div>
......
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
@import "~bootstrap/scss/bootstrap"; @import "~bootstrap/scss/bootstrap";
@import "~@fortawesome/fontawesome-free/css/all"; @import "~@fortawesome/fontawesome-free/css/all";
.btn-sm { //.btn-sm {
line-height: 1.25; // line-height: 1.25;
} //}
html, body { html, body {
height: 100%; height: 100%;
......
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