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

not work

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