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
9
Issues
9
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
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
MyCard
mycard
Commits
ccbeb15b
Commit
ccbeb15b
authored
Jul 28, 2022
by
Syntax_J
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: format code & tweak style
parent
4ceb09eb
Pipeline
#15008
canceled with stages
in 33 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
25 deletions
+22
-25
package-lock.json
package-lock.json
+0
-1
src/app/ygopro/ygopro.component.css
src/app/ygopro/ygopro.component.css
+0
-4
src/app/ygopro/ygopro.component.html
src/app/ygopro/ygopro.component.html
+5
-3
src/app/ygopro/ygopro.component.ts
src/app/ygopro/ygopro.component.ts
+17
-17
No files found.
package-lock.json
View file @
ccbeb15b
...
...
@@ -5,7 +5,6 @@
"requires": true,
"packages": {
"": {
"name": "mycard",
"version": "3.1.0",
"dependencies": {
"@electron/remote": "^2.0.1",
src/app/ygopro/ygopro.component.css
View file @
ccbeb15b
...
...
@@ -305,7 +305,3 @@ form {
.btn-sm
{
margin-right
:
4px
;
}
#title-filter-username
{
margin-left
:
6px
;
}
src/app/ygopro/ygopro.component.html
View file @
ccbeb15b
...
...
@@ -287,9 +287,11 @@
</div>
</th>
<th
class=
"title"
>
<div
class=
"d-flex"
>
<span
i18n
class=
"align-self-end"
>
游戏标题
</span>
<input
i18n-placeholder
type=
"text"
class=
"col-sm-6 form-control form-control-sm"
id=
"title-filter-username"
placeholder=
"支持玩家名称搜索房间"
[(ngModel)]=
"replay_rooms_filter.username"
(ngModelChange)=
"title_username_change_handler($event)"
/>
<div
class=
"row"
>
<span
i18n
class=
"col-auto align-self-end"
>
游戏标题
</span>
<div
class=
"col-sm-6"
>
<input
i18n-placeholder
type=
"text"
class=
"form-control form-control-sm"
id=
"title-filter-username"
placeholder=
"支持玩家名称搜索房间"
[(ngModel)]=
"replay_rooms_filter.username"
(ngModelChange)=
"titleUsernameChangeHandler($event)"
/>
</div>
</div>
</th>
<th
i18n
class=
"users"
>
玩家
</th>
...
...
src/app/ygopro/ygopro.component.ts
View file @
ccbeb15b
...
...
@@ -231,7 +231,7 @@ export class YGOProComponent implements OnInit, OnDestroy, AfterViewInit, OnChan
match_interval
:
Timer
|
undefined
;
join_password
:
string
;
host_password
=
(
this
.
loginService
.
user
.
external_id
^
0x54321
).
toString
();
title
_username_change_handler
=
_
.
debounce
(
this
.
title_username_c
hange
,
500
);
title
UsernameChangeHandler
=
_
.
debounce
(
this
.
titleUsernameC
hange
,
500
);
@
ViewChild
(
'
gameListModal
'
)
gameListModal
:
ElementRef
<
HTMLElement
>
;
...
...
@@ -331,31 +331,31 @@ export class YGOProComponent implements OnInit, OnDestroy, AfterViewInit, OnChan
return
a_priority
-
b_priority
;
});
if
(
this
.
replay_rooms_filter
.
username
.
length
>
0
)
{
this
.
handle
_filter_u
sername
();
this
.
handle
FilterU
sername
();
}
}
handle
_filter_u
sername
()
{
const
filter
_usern
ame
=
this
.
replay_rooms_filter
.
username
.
toLowerCase
().
trim
();
if
(
filter
_usern
ame
===
''
)
return
;
let
username
_filter_r
ooms
:
Room
[]
=
[];
handle
FilterU
sername
()
{
const
filter
UserN
ame
=
this
.
replay_rooms_filter
.
username
.
toLowerCase
().
trim
();
if
(
filter
UserN
ame
===
''
)
return
;
let
username
FilterR
ooms
:
Room
[]
=
[];
this
.
replay_rooms_show
.
forEach
(
room
=>
{
const
[
user
_a
,
user_b
]
=
room
.
users
!
;
const
user
_a_name
=
(
user_a
&&
user_
a
.
username
.
toLowerCase
())
||
''
;
const
user
_b_name
=
(
user_b
&&
user_b
.
username
.
toLowerCase
())
||
''
;
if
(
user
_a_name
!==
''
||
user_b_n
ame
!==
''
)
{
const
targetStr
=
`
${
user
_a_name
}
/
${
user_b_n
ame
}
`
;
if
(
targetStr
.
includes
(
filter
_usern
ame
))
{
username
_filter_r
ooms
.
push
(
room
);
const
[
user
Alpha
,
userBeta
]
=
room
.
users
!
;
const
user
AlphaName
=
(
userAlpha
&&
userAlph
a
.
username
.
toLowerCase
())
||
''
;
const
user
BetaName
=
(
userBeta
&&
userBeta
.
username
.
toLowerCase
())
||
''
;
if
(
user
AlphaName
!==
''
||
userBetaN
ame
!==
''
)
{
const
targetStr
=
`
${
user
AlphaName
}
/
${
userBetaN
ame
}
`
;
if
(
targetStr
.
includes
(
filter
UserN
ame
))
{
username
FilterR
ooms
.
push
(
room
);
}
}
});
this
.
replay_rooms_show
=
username
_filter_r
ooms
;
this
.
replay_rooms_show
=
username
FilterR
ooms
;
}
title
_username_change
(
input_v
alue
:
string
)
{
if
(
input
_v
alue
.
length
)
{
this
.
handle
_filter_u
sername
();
title
UsernameChange
(
inputV
alue
:
string
)
{
if
(
input
V
alue
.
length
)
{
this
.
handle
FilterU
sername
();
}
else
{
this
.
refresh_replay_rooms
();
}
...
...
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