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
44d0ba96
Commit
44d0ba96
authored
Aug 25, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optional system conf
parent
ed16c36b
Pipeline
#5016
failed with stages
in 3 minutes and 9 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
13 deletions
+30
-13
app/app-detail.component.ts
app/app-detail.component.ts
+4
-2
app/lobby.component.html
app/lobby.component.html
+10
-1
app/lobby.component.ts
app/lobby.component.ts
+10
-8
app/ygopro.component.ts
app/ygopro.component.ts
+6
-2
No files found.
app/app-detail.component.ts
View file @
44d0ba96
...
...
@@ -55,13 +55,15 @@ export class AppDetailComponent implements OnInit, OnChanges {
'
mysterious
'
:
'
迷之物体
'
,
'
touhou
'
:
'
东方 Project
'
,
'
touhou_pc98
'
:
'
东方旧作
'
,
'
language
'
:
'
语言包
'
'
language
'
:
'
语言包
'
,
'
ygopro
'
:
'
YGOPro
'
}
:
{
'
recommend
'
:
'
Recommended
'
,
'
mysterious
'
:
'
Something
'
,
'
touhou
'
:
'
Touhou Project
'
,
'
touhou_pc98
'
:
'
Touhou old series
'
,
'
language
'
:
'
Language Pack
'
'
language
'
:
'
Language Pack
'
,
'
ygopro
'
:
'
YGOPro
'
};
}
...
...
app/lobby.component.html
View file @
44d0ba96
...
...
@@ -42,6 +42,15 @@
</a>
</li>
</ul>
<span
i18n
*ngIf=
"grouped_apps.ygopro"
>
YGOPro 各发行版
</span>
<ul
*ngIf=
"grouped_apps.recommend"
class=
"nav nav-pills flex-column"
>
<li
*ngFor=
"let app of grouped_apps.ygopro"
class=
"nav-item"
>
<a
(click)=
"$event.preventDefault(); chooseApp(app)"
[href]=
"'https://mycard.moe/' + app.id"
class=
"nav-link"
[class.active]=
"app===currentApp"
>
<img
*ngIf=
"app.icon"
class=
"icon"
[src]=
"app.icon"
>
{{app.name}}
</a>
</li>
</ul>
<span
i18n
*ngIf=
"grouped_apps.mysterious"
>
迷之物体
</span>
<ul
*ngIf=
"grouped_apps.mysterious"
class=
"nav nav-pills flex-column"
>
<li
*ngFor=
"let app of grouped_apps.mysterious"
class=
"nav-item"
>
...
...
@@ -95,4 +104,4 @@
</div>
</div>
<div
id=
"right-shadow"
></div>
\ No newline at end of file
<div
id=
"right-shadow"
></div>
app/lobby.component.ts
View file @
44d0ba96
...
...
@@ -168,25 +168,27 @@ export class LobbyComponent implements OnInit {
let
contains
=
[
'
game
'
,
'
music
'
,
'
book
'
].
map
((
value
)
=>
Category
[
value
]);
let
result
=
{
runtime
:
[]};
for
(
let
app
of
this
.
apps
.
values
())
{
let
tag
:
string
;
let
tag
s
:
string
[]
;
if
(
contains
.
includes
(
app
.
category
))
{
if
(
app
.
isInstalled
())
{
tag
=
'
installed
'
;
tag
s
=
[
'
installed
'
]
;
}
else
{
tag
=
app
.
tags
?
app
.
tags
[
0
]
:
'
test
'
;
tag
s
=
app
.
tags
||
[
'
test
'
]
;
}
}
else
{
if
(
app
.
isInstalled
())
{
tag
=
'
runtime_installed
'
;
tag
s
=
[
'
runtime_installed
'
]
;
}
else
{
tag
=
'
runtime
'
;
tag
s
=
[
'
runtime
'
]
;
}
}
if
(
!
result
[
tag
])
{
result
[
tag
]
=
[];
for
(
const
tag
of
tags
)
{
if
(
!
result
[
tag
])
{
result
[
tag
]
=
[];
}
result
[
tag
].
push
(
app
);
}
result
[
tag
].
push
(
app
);
}
return
result
;
}
...
...
app/ygopro.component.ts
View file @
44d0ba96
...
...
@@ -490,8 +490,12 @@ export class YGOProComponent implements OnInit, OnDestroy {
if
(
!
this
.
system_conf
)
{
return
null
;
}
let
data
=
await
fs
.
readFile
(
this
.
system_conf
,
{
encoding
:
'
utf-8
'
});
return
<
any
>
ini
.
parse
(
data
);
try
{
let
data
=
await
fs
.
readFile
(
this
.
system_conf
,
{
encoding
:
'
utf-8
'
});
return
<
any
>
ini
.
parse
(
data
);
}
catch
(
e
)
{
return
null
;
}
};
/*
...
...
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