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
a6591636
Commit
a6591636
authored
Dec 06, 2016
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
5020a190
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
app/ygopro.component.ts
app/ygopro.component.ts
+7
-7
appveyor.yml
appveyor.yml
+2
-2
No files found.
app/ygopro.component.ts
View file @
a6591636
...
@@ -123,14 +123,14 @@ export class YGOProComponent implements OnInit {
...
@@ -123,14 +123,14 @@ export class YGOProComponent implements OnInit {
}
}
ngOnInit
()
{
ngOnInit
()
{
this
.
system_conf
=
path
.
join
(
(
<
AppLocal
>
this
.
app
.
local
)
.
path
,
'
system.conf
'
);
this
.
system_conf
=
path
.
join
(
this
.
app
.
local
!
.
path
,
'
system.conf
'
);
this
.
refresh
();
this
.
refresh
();
let
modal
=
$
(
'
#game-list-modal
'
);
let
modal
=
$
(
'
#game-list-modal
'
);
modal
.
on
(
'
show.bs.modal
'
,
()
=>
{
modal
.
on
(
'
show.bs.modal
'
,
()
=>
{
this
.
connections
=
this
.
servers
.
map
((
server
)
=>
{
this
.
connections
=
this
.
servers
.
map
((
server
)
=>
{
let
connection
=
new
WebSocket
(
<
string
>
server
.
url
);
let
connection
=
new
WebSocket
(
server
.
url
!
);
connection
.
onclose
=
()
=>
{
connection
.
onclose
=
()
=>
{
this
.
rooms
=
this
.
rooms
.
filter
(
room
=>
room
.
server
!=
server
)
this
.
rooms
=
this
.
rooms
.
filter
(
room
=>
room
.
server
!=
server
)
};
};
...
@@ -174,7 +174,7 @@ export class YGOProComponent implements OnInit {
...
@@ -174,7 +174,7 @@ export class YGOProComponent implements OnInit {
get_decks
():
Promise
<
string
[]
>
{
get_decks
():
Promise
<
string
[]
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
fs
.
readdir
(
path
.
join
(
(
<
AppLocal
>
this
.
app
.
local
)
.
path
,
'
deck
'
),
(
error
,
files
)
=>
{
fs
.
readdir
(
path
.
join
(
this
.
app
.
local
!
.
path
,
'
deck
'
),
(
error
,
files
)
=>
{
if
(
error
)
{
if
(
error
)
{
resolve
([])
resolve
([])
}
else
{
}
else
{
...
@@ -196,7 +196,7 @@ export class YGOProComponent implements OnInit {
...
@@ -196,7 +196,7 @@ export class YGOProComponent implements OnInit {
}
}
async
delete_deck
(
deck
:
string
)
{
async
delete_deck
(
deck
:
string
)
{
await
new
Promise
(
resolve
=>
fs
.
unlink
(
path
.
join
(
(
<
AppLocal
>
this
.
app
.
local
)
.
path
,
'
deck
'
,
deck
+
'
.ydk
'
),
resolve
));
await
new
Promise
(
resolve
=>
fs
.
unlink
(
path
.
join
(
this
.
app
.
local
!
.
path
,
'
deck
'
,
deck
+
'
.ydk
'
),
resolve
));
return
this
.
refresh
()
return
this
.
refresh
()
}
}
...
@@ -297,7 +297,7 @@ export class YGOProComponent implements OnInit {
...
@@ -297,7 +297,7 @@ export class YGOProComponent implements OnInit {
options_buffer
.
writeUInt16LE
(
options_buffer
.
readUInt16LE
(
i
)
^
secret
,
i
)
options_buffer
.
writeUInt16LE
(
options_buffer
.
readUInt16LE
(
i
)
^
secret
,
i
)
}
}
let
password
=
options_buffer
.
toString
(
'
base64
'
)
+
(
<
string
>
options
.
title
).
replace
(
/
\s
/
,
String
.
fromCharCode
(
0xFEFF
));
let
password
=
options_buffer
.
toString
(
'
base64
'
)
+
(
options
.
title
!
).
replace
(
/
\s
/
,
String
.
fromCharCode
(
0xFEFF
));
let
room_id
=
crypto
.
createHash
(
'
md5
'
).
update
(
password
+
this
.
loginService
.
user
.
username
).
digest
(
'
base64
'
).
slice
(
0
,
10
).
replace
(
'
+
'
,
'
-
'
).
replace
(
'
/
'
,
'
_
'
);
let
room_id
=
crypto
.
createHash
(
'
md5
'
).
update
(
password
+
this
.
loginService
.
user
.
username
).
digest
(
'
base64
'
).
slice
(
0
,
10
).
replace
(
'
+
'
,
'
-
'
).
replace
(
'
/
'
,
'
_
'
);
this
.
join
(
password
,
this
.
servers
[
0
]);
this
.
join
(
password
,
this
.
servers
[
0
]);
...
@@ -320,7 +320,7 @@ export class YGOProComponent implements OnInit {
...
@@ -320,7 +320,7 @@ export class YGOProComponent implements OnInit {
let
password
=
options_buffer
.
toString
(
'
base64
'
)
+
room
.
id
;
let
password
=
options_buffer
.
toString
(
'
base64
'
)
+
room
.
id
;
this
.
join
(
password
,
<
Server
>
room
.
server
);
this
.
join
(
password
,
room
.
server
!
);
}
}
matching
:
ISubscription
|
null
;
matching
:
ISubscription
|
null
;
...
@@ -350,7 +350,7 @@ export class YGOProComponent implements OnInit {
...
@@ -350,7 +350,7 @@ export class YGOProComponent implements OnInit {
}
}
cancel_match
()
{
cancel_match
()
{
(
<
ISubscription
>
this
.
matching
)
.
unsubscribe
();
this
.
matching
!
.
unsubscribe
();
this
.
matching
=
null
;
this
.
matching
=
null
;
this
.
matching_arena
=
null
;
this
.
matching_arena
=
null
;
}
}
...
...
appveyor.yml
View file @
a6591636
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