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
44d0ba96
Commit
44d0ba96
authored
Aug 25, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optional system conf
parent
ed16c36b
Changes
4
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 {
...
@@ -55,13 +55,15 @@ export class AppDetailComponent implements OnInit, OnChanges {
'
mysterious
'
:
'
迷之物体
'
,
'
mysterious
'
:
'
迷之物体
'
,
'
touhou
'
:
'
东方 Project
'
,
'
touhou
'
:
'
东方 Project
'
,
'
touhou_pc98
'
:
'
东方旧作
'
,
'
touhou_pc98
'
:
'
东方旧作
'
,
'
language
'
:
'
语言包
'
'
language
'
:
'
语言包
'
,
'
ygopro
'
:
'
YGOPro
'
}
:
{
}
:
{
'
recommend
'
:
'
Recommended
'
,
'
recommend
'
:
'
Recommended
'
,
'
mysterious
'
:
'
Something
'
,
'
mysterious
'
:
'
Something
'
,
'
touhou
'
:
'
Touhou Project
'
,
'
touhou
'
:
'
Touhou Project
'
,
'
touhou_pc98
'
:
'
Touhou old series
'
,
'
touhou_pc98
'
:
'
Touhou old series
'
,
'
language
'
:
'
Language Pack
'
'
language
'
:
'
Language Pack
'
,
'
ygopro
'
:
'
YGOPro
'
};
};
}
}
...
...
app/lobby.component.html
View file @
44d0ba96
...
@@ -42,6 +42,15 @@
...
@@ -42,6 +42,15 @@
</a>
</a>
</li>
</li>
</ul>
</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>
<span
i18n
*ngIf=
"grouped_apps.mysterious"
>
迷之物体
</span>
<ul
*ngIf=
"grouped_apps.mysterious"
class=
"nav nav-pills flex-column"
>
<ul
*ngIf=
"grouped_apps.mysterious"
class=
"nav nav-pills flex-column"
>
<li
*ngFor=
"let app of grouped_apps.mysterious"
class=
"nav-item"
>
<li
*ngFor=
"let app of grouped_apps.mysterious"
class=
"nav-item"
>
...
@@ -95,4 +104,4 @@
...
@@ -95,4 +104,4 @@
</div>
</div>
</div>
</div>
<div
id=
"right-shadow"
></div>
<div
id=
"right-shadow"
></div>
\ No newline at end of file
app/lobby.component.ts
View file @
44d0ba96
...
@@ -168,25 +168,27 @@ export class LobbyComponent implements OnInit {
...
@@ -168,25 +168,27 @@ export class LobbyComponent implements OnInit {
let
contains
=
[
'
game
'
,
'
music
'
,
'
book
'
].
map
((
value
)
=>
Category
[
value
]);
let
contains
=
[
'
game
'
,
'
music
'
,
'
book
'
].
map
((
value
)
=>
Category
[
value
]);
let
result
=
{
runtime
:
[]};
let
result
=
{
runtime
:
[]};
for
(
let
app
of
this
.
apps
.
values
())
{
for
(
let
app
of
this
.
apps
.
values
())
{
let
tag
:
string
;
let
tag
s
:
string
[]
;
if
(
contains
.
includes
(
app
.
category
))
{
if
(
contains
.
includes
(
app
.
category
))
{
if
(
app
.
isInstalled
())
{
if
(
app
.
isInstalled
())
{
tag
=
'
installed
'
;
tag
s
=
[
'
installed
'
]
;
}
else
{
}
else
{
tag
=
app
.
tags
?
app
.
tags
[
0
]
:
'
test
'
;
tag
s
=
app
.
tags
||
[
'
test
'
]
;
}
}
}
else
{
}
else
{
if
(
app
.
isInstalled
())
{
if
(
app
.
isInstalled
())
{
tag
=
'
runtime_installed
'
;
tag
s
=
[
'
runtime_installed
'
]
;
}
else
{
}
else
{
tag
=
'
runtime
'
;
tag
s
=
[
'
runtime
'
]
;
}
}
}
}
if
(
!
result
[
tag
])
{
for
(
const
tag
of
tags
)
{
result
[
tag
]
=
[];
if
(
!
result
[
tag
])
{
result
[
tag
]
=
[];
}
result
[
tag
].
push
(
app
);
}
}
result
[
tag
].
push
(
app
);
}
}
return
result
;
return
result
;
}
}
...
...
app/ygopro.component.ts
View file @
44d0ba96
...
@@ -490,8 +490,12 @@ export class YGOProComponent implements OnInit, OnDestroy {
...
@@ -490,8 +490,12 @@ export class YGOProComponent implements OnInit, OnDestroy {
if
(
!
this
.
system_conf
)
{
if
(
!
this
.
system_conf
)
{
return
null
;
return
null
;
}
}
let
data
=
await
fs
.
readFile
(
this
.
system_conf
,
{
encoding
:
'
utf-8
'
});
try
{
return
<
any
>
ini
.
parse
(
data
);
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