Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
syntax_j
mycard
Commits
5e48de4d
Commit
5e48de4d
authored
Sep 21, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v3-refactor3' into v3.1-refresh-ygopro
parents
4966752b
5b96a05c
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
122 additions
and
64 deletions
+122
-64
src/app/shared/app.ts
src/app/shared/app.ts
+10
-7
src/app/ygopro/ygopro.component.html
src/app/ygopro/ygopro.component.html
+8
-11
src/app/ygopro/ygopro.component.ts
src/app/ygopro/ygopro.component.ts
+104
-46
No files found.
src/app/shared/app.ts
View file @
5e48de4d
...
...
@@ -4,6 +4,7 @@ import ini from 'ini';
import
fs
from
'
fs
'
;
import
child_process
from
'
child_process
'
;
import
Mustache
from
'
mustache
'
;
import
_
from
'
lodash-es
'
;
export
enum
Category
{
game
,
...
...
@@ -68,7 +69,9 @@ export class AppStatus {
export
interface
YGOProDistroData
{
deckPath
:
string
;
replayPath
:
string
;
systemConf
:
string
;
systemConf
?:
string
;
lastDeckFormat
?:
string
;
lastCategoryFormat
?:
string
;
}
export
class
App
{
...
...
@@ -366,24 +369,24 @@ export class App {
return
this
.
data
.
ygopro
||
undefined
;
}
get
ygoproDeckPath
(
):
string
|
undefined
{
const
distroData
=
this
.
ygoproDistroData
;
ygoproDeckPath
(
_distroData
:
YGOProDistroData
):
string
|
undefined
{
const
distroData
=
_distroData
||
this
.
ygoproDistroData
;
if
(
!
distroData
)
{
return
;
}
return
path
.
join
(
this
.
local
!
.
path
,
distroData
.
deckPath
);
}
get
ygoproReplayPath
(
):
string
|
undefined
{
const
distroData
=
this
.
ygoproDistroData
;
ygoproReplayPath
(
_distroData
:
YGOProDistroData
):
string
|
undefined
{
const
distroData
=
_distroData
||
this
.
ygoproDistroData
;
if
(
!
distroData
||
!
distroData
.
replayPath
)
{
return
;
}
return
path
.
join
(
this
.
local
!
.
path
,
distroData
.
replayPath
);
}
get
systemConfPath
(
):
string
|
undefined
{
const
distroData
=
this
.
ygoproDistroData
;
systemConfPath
(
_distroData
:
YGOProDistroData
):
string
|
undefined
{
const
distroData
=
_distroData
||
this
.
ygoproDistroData
;
if
(
!
distroData
||
!
distroData
.
systemConf
)
{
return
;
}
...
...
src/app/ygopro/ygopro.component.html
View file @
5e48de4d
...
...
@@ -26,17 +26,14 @@
</div>
<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"
>
<option
*ngFor=
"let deck of decks_grouped['.']"
[value]=
"deck"
>
{{deck}}
</option>
<ng-container
*ngFor=
"let group of decks_grouped | keyvalue"
>
<optgroup
*ngIf=
"group.key !== '.'"
[label]=
'group.key'
>
<option
*ngFor=
"let deck of group.value"
[value]=
"group.key + '/' + deck"
>
{{deck}}
</option>
</optgroup>
</ng-container>
<select
class=
"form-select form-select-sm"
id=
"exampleSelect1"
name=
"deck"
[(ngModel)]=
"currentDeckSymbol"
(change)=
"onDeckChange()"
>
<optgroup
*ngFor=
"let group of decks_grouped"
[label]=
"group[0] === '.' ? '未分类卡组' : group[0]"
>
<option
*ngFor=
"let deck of group[1]"
[value]=
"deck.symbol"
>
{{deck.deck}}
</option>
</optgroup>
</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(
)"
>
编辑
</button>
</span>
</div>
</div>
...
...
@@ -124,10 +121,10 @@
<small
i18n
class=
"form-text text-muted"
>
最多 12 个字
</small>
</ng-container>
<ng-template
#private
>
<label
*ngIf=
"room.private"
for=
"game-create-
title
"
><i
class=
"fa fa-key"
aria-hidden=
"true"
></i>
<label
*ngIf=
"room.private"
for=
"game-create-
password
"
><i
class=
"fa fa-key"
aria-hidden=
"true"
></i>
<span
i18n
>
房间密码
</span></label>
<div
class=
"input-group input-group-sm"
>
<input
type=
"text"
maxlength=
"12"
class=
"form-control"
id=
"game-create-
title
"
name=
"title"
[(ngModel)]=
"host_password"
readonly
>
<input
type=
"text"
maxlength=
"12"
class=
"form-control"
id=
"game-create-
password
"
name=
"title"
[(ngModel)]=
"host_password"
readonly
>
<span
i18n-title
id=
"copy-wrapper"
class=
"input-group-btn"
data-bs-toggle=
"tooltip"
title=
"房间密码已复制到剪贴板"
>
<button
i18n-title
class=
"btn btn-secondary fa fa-clipboard"
type=
"button"
title=
"复制"
(click)=
"copy(host_password, $event)"
></button>
</span>
...
...
src/app/ygopro/ygopro.component.ts
View file @
5e48de4d
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment