Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mycard Mobile
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
GaiaXalter
Mycard Mobile
Commits
59e22a37
Commit
59e22a37
authored
Aug 05, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use sapi
parent
be640af5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
12 deletions
+12
-12
.travis.yml
.travis.yml
+1
-1
ngsw-config.json
ngsw-config.json
+2
-2
src/app/lobby/lobby.component.ts
src/app/lobby/lobby.component.ts
+2
-2
src/app/match-dialog/match-dialog.component.ts
src/app/match-dialog/match-dialog.component.ts
+2
-2
src/app/storage.service.ts
src/app/storage.service.ts
+1
-1
src/app/ygopro.service.ts
src/app/ygopro.service.ts
+4
-4
No files found.
.travis.yml
View file @
59e22a37
...
...
@@ -16,5 +16,5 @@ deploy:
endpoint
:
https://minio.mycard.moe:9000
notifications
:
webhooks
:
urls
:
https://
api.mycard.moe
/notify/travis
urls
:
https://
sapi.moecube.com:444
/notify/travis
on_cancel
:
never
ngsw-config.json
View file @
59e22a37
...
...
@@ -21,10 +21,10 @@
{
"name"
:
"api-freshness"
,
"urls"
:
[
"https://
api.mycard.moe
/apps.json"
,
"https://
sapi.moecube.com:444
/apps.json"
,
"https://ygobbs.com/top/quarterly.json"
,
"https://mycard.moe/ygopro/api/history"
,
"https://
api.mycard.moe
/ygopro/arena/user"
"https://
sapi.moecube.com:444
/ygopro/arena/user"
],
"cacheConfig"
:
{
"maxSize"
:
100
,
...
...
src/app/lobby/lobby.component.ts
View file @
59e22a37
...
...
@@ -28,7 +28,7 @@ export class LobbyComponent {
suggestion
=
this
.
searchControl
.
valueChanges
.
pipe
(
distinctUntilChanged
(),
filter
(
name
=>
name
),
switchMap
(
name
=>
this
.
http
.
get
<
{
value
:
string
}[]
>
(
`https://
api.mycard.moe
/ygopro/suggest/
${
name
}
`
)),
switchMap
(
name
=>
this
.
http
.
get
<
{
value
:
string
}[]
>
(
`https://
sapi.moecube.com:444
/ygopro/suggest/
${
name
}
`
)),
map
(
data
=>
data
.
map
(
item
=>
item
.
value
))
);
...
...
@@ -43,7 +43,7 @@ export class LobbyComponent {
public
storage
:
StorageService
,
private
dialog
:
MatDialog
)
{
const
arena_url
=
new
URL
(
'
https://
mycard.moe
/ygopro/arena
'
);
const
arena_url
=
new
URL
(
'
https://
sapi.moecube.com:444
/ygopro/arena
'
);
arena_url
.
searchParams
.
set
(
'
sso
'
,
login
.
token
);
this
.
arena_url
=
arena_url
.
toString
();
...
...
src/app/match-dialog/match-dialog.component.ts
View file @
59e22a37
...
...
@@ -17,7 +17,7 @@ const offset = new Date().getTimezoneOffset() * 60 * second;
})
export
class
MatchDialogComponent
implements
OnInit
,
OnDestroy
{
expect_wait
=
this
.
http
.
get
(
'
https://
api.mycard.moe
/ygopro/match/stats/
'
+
this
.
arena
)
.
get
(
'
https://
sapi.moecube.com:444
/ygopro/match/stats/
'
+
this
.
arena
)
.
pipe
(
map
((
data
:
number
)
=>
data
*
second
+
offset
));
actual_wait
=
timer
(
0
,
second
).
pipe
(
map
(
timestamp
=>
timestamp
*
second
+
offset
));
...
...
@@ -32,7 +32,7 @@ export class MatchDialogComponent implements OnInit, OnDestroy {
ngOnInit
()
{
this
.
matching
=
this
.
http
.
post
<
MatchResponse
>
(
'
https://
api.mycard.moe
/ygopro/match
'
,
null
,
{
.
post
<
MatchResponse
>
(
'
https://
sapi.moecube.com:444
/ygopro/match
'
,
null
,
{
headers
:
{
Authorization
:
'
Basic
'
+
Buffer
.
from
(
this
.
login
.
user
.
username
+
'
:
'
+
this
.
login
.
user
.
external_id
).
toString
(
'
base64
'
)
},
...
...
src/app/storage.service.ts
View file @
59e22a37
...
...
@@ -27,7 +27,7 @@ type Stats = DirectoryStats | FileStats;
export
class
StorageService
{
app_id
=
'
ygopro
'
;
client
=
webdav
(
'
https://
api.mycard.moe
/storage/
'
,
this
.
login
.
user
.
username
,
this
.
login
.
user
.
external_id
.
toString
());
client
=
webdav
(
'
https://
sapi.moecube.com:444
/storage/
'
,
this
.
login
.
user
.
username
,
this
.
login
.
user
.
external_id
.
toString
());
working
=
new
BehaviorSubject
(
false
);
constructor
(
private
login
:
LoginService
)
{}
...
...
src/app/ygopro.service.ts
View file @
59e22a37
...
...
@@ -141,7 +141,7 @@ export class YGOProService {
{
id
:
'
tiramisu-athletic
'
,
url
:
'
wss://tiramisu.mycard.moe:8923
'
,
address
:
'
tiramisu.
mycard.moe
'
,
address
:
'
tiramisu.
sapi.moecube.com:444
'
,
port
:
8911
,
custom
:
false
,
replay
:
true
...
...
@@ -149,7 +149,7 @@ export class YGOProService {
];
constructor
(
private
login
:
LoginService
,
private
http
:
HttpClient
,
private
dialog
:
MatDialog
,
private
storage
:
StorageService
)
{
const
app
=
this
.
http
.
get
<
App
[]
>
(
'
https://
api.mycard.moe
/apps.json
'
).
pipe
(
map
(
apps
=>
apps
.
find
(
_app
=>
_app
.
id
===
'
ygopro
'
)
!
),
publishLast
(),
refCount
());
const
app
=
this
.
http
.
get
<
App
[]
>
(
'
https://
sapi.moecube.com:444
/apps.json
'
).
pipe
(
map
(
apps
=>
apps
.
find
(
_app
=>
_app
.
id
===
'
ygopro
'
)
!
),
publishLast
(),
refCount
());
this
.
news
=
app
.
pipe
(
map
(
_app
=>
...
...
@@ -190,7 +190,7 @@ export class YGOProService {
refresh
.
pipe
(
mergeMap
(()
=>
this
.
http
.
get
<
Points
>
(
'
https://
api.mycard.moe
/ygopro/arena/user
'
,
{
params
:
{
username
:
this
.
login
.
user
.
username
}
})
this
.
http
.
get
<
Points
>
(
'
https://
sapi.moecube.com:444
/ygopro/arena/user
'
,
{
params
:
{
username
:
this
.
login
.
user
.
username
}
})
)
)
.
subscribe
(
this
.
points
);
...
...
@@ -198,7 +198,7 @@ export class YGOProService {
refresh
.
pipe
(
mergeMap
(()
=>
this
.
http
.
get
<
{
data
:
any
[]
}
>
(
'
https://
api.mycard.moe
/ygopro/arena/history
'
,
{
this
.
http
.
get
<
{
data
:
any
[]
}
>
(
'
https://
sapi.moecube.com:444
/ygopro/arena/history
'
,
{
params
:
{
username
:
this
.
login
.
user
.
username
,
type
:
'
0
'
,
page_num
:
'
1
'
}
})
),
...
...
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