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
21c0e06f
Commit
21c0e06f
authored
Jul 21, 2017
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
社区热帖
parent
b5d2229e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
14 deletions
+44
-14
src/app/lobby/lobby.component.css
src/app/lobby/lobby.component.css
+1
-5
src/app/lobby/lobby.component.html
src/app/lobby/lobby.component.html
+32
-8
src/app/login.service.ts
src/app/login.service.ts
+0
-1
src/app/ygopro.service.ts
src/app/ygopro.service.ts
+11
-0
No files found.
src/app/lobby/lobby.component.css
View file @
21c0e06f
...
@@ -64,14 +64,10 @@ md-card-content {
...
@@ -64,14 +64,10 @@ md-card-content {
[
md-card-avatar
]
{
[
md-card-avatar
]
{
width
:
128px
;
width
:
128px
;
height
:
72px
;
height
:
72px
;
background-size
:
cover
;
object-fit
:
cover
;
border-radius
:
initial
;
border-radius
:
initial
;
}
}
#avatar
{
background-size
:
cover
;
}
[
fontSet
]
{
[
fontSet
]
{
font-size
:
24px
;
font-size
:
24px
;
}
}
...
...
src/app/lobby/lobby.component.html
View file @
21c0e06f
...
@@ -78,14 +78,38 @@
...
@@ -78,14 +78,38 @@
<md-card
*ngFor=
"let item of ygopro.news"
class=
"example-card"
>
<md-card
*ngFor=
"let item of ygopro.news"
class=
"example-card"
>
<a
[href]=
"item.url"
target=
"_blank"
>
<a
[href]=
"item.url"
target=
"_blank"
>
<md-card-header>
<md-card-header>
<
div
*ngIf=
"item.image"
md-card-avatar
[style.background-image]=
"'url(' + item.image + ')'"
></div
>
<
img
*ngIf=
"item.image"
md-card-avatar
[src]=
"item.image"
>
<md-card-title>
{{item.title}}
</md-card-title>
<md-card-title>
{{item.title}}
</md-card-title>
<md-card-subtitle>
{{item.updated_at | date:"mediumDate"}}
</md-card-subtitle>
<md-card-subtitle>
{{item.updated_at | date:"mediumDate"}}
</md-card-subtitle>
</md-card-header>
</md-card-header>
</a>
</a>
</md-card>
<!--<md-card *ngFor="let item of ygopro.topics | async">-->
<!--<a [href]="item.url" target="_blank">-->
<!--<md-card-header>-->
<!--<img *ngIf="item.image_url" md-card-avatar [src]="item.image_url">-->
<!--<md-card-title>{{item.title}}</md-card-title>-->
<!--<md-card-subtitle>by {{item.last_poster_username}} / {{item.last_posted_at | date:"mediumDate"}}</md-card-subtitle>-->
<!--</md-card-header>-->
<!--</a>-->
<!---->
<!--<md-card-header>-->
<!--<img [src]="item.created_by.avatar_url" md-card-avatar class="example-header-image">-->
<!--<md-card-title>{{item.title}}</md-card-title>-->
<!--<!–<md-card-subtitle>Dog Breed</md-card-subtitle>–>-->
<!--</md-card-header>-->
<!--<img md-card-image [src]="item.image_url">-->
<!--<md-card-content>-->
<!--<md-card-content>-->
<!--<img src="https://material.angular.io/assets/img/examples/shiba2.jpg">-->
<!--<!–<p [innerHTML]="item.description">–>-->
<!--<p>{{item.text}}</p>-->
<!--<!–The Shiba Inu is the smallest of the six original and distinct spitz breeds of dog from Japan.–>-->
<!--<!–A small, agile dog that copes very well with mountainous terrain, the Shiba Inu was originally–>-->
<!--<!–bred for hunting.–>-->
<!--<!–</p>–>-->
<!--</md-card-content>-->
<!--</md-card-content>-->
</md-card>
<!--<md-card-actions>-->
<!--<button md-button>LIKE</button>-->
<!--<button md-button>SHARE</button>-->
<!--</md-card-actions>-->
<!--</md-card>-->
src/app/login.service.ts
View file @
21c0e06f
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
fromPairs
}
from
'
lodash
'
;
import
{
fromPairs
}
from
'
lodash
'
;
import
{
TextDecoder
,
TextEncoder
}
from
'
text-encoding
'
;
import
{
User
}
from
'
./ygopro.service
'
;
import
{
User
}
from
'
./ygopro.service
'
;
@
Injectable
()
@
Injectable
()
...
...
src/app/ygopro.service.ts
View file @
21c0e06f
...
@@ -71,6 +71,7 @@ export class YGOProService {
...
@@ -71,6 +71,7 @@ export class YGOProService {
news
:
News
[];
news
:
News
[];
windbot
:
string
[];
windbot
:
string
[];
topics
:
Observable
<
any
>
;
readonly
default_options
:
Options
=
{
readonly
default_options
:
Options
=
{
mode
:
1
,
mode
:
1
,
...
@@ -110,6 +111,16 @@ export class YGOProService {
...
@@ -110,6 +111,16 @@ export class YGOProService {
const
app
=
apps
.
find
(
app
=>
app
.
id
===
'
ygopro
'
);
const
app
=
apps
.
find
(
app
=>
app
.
id
===
'
ygopro
'
);
this
.
news
=
app
.
news
[
'
zh-CN
'
];
this
.
news
=
app
.
news
[
'
zh-CN
'
];
this
.
windbot
=
(
<
YGOProData
>
app
.
data
).
windbot
[
'
zh-CN
'
];
this
.
windbot
=
(
<
YGOProData
>
app
.
data
).
windbot
[
'
zh-CN
'
];
// this.topics = this.http.get('https://ygobbs.com/top.json').flatMap(response => promisify(parseString)(response.text())).map(doc => {
// console.log(doc['rss'].channel[0].item)
// return doc['rss'].channel[0].item;
// });
this
.
topics
=
this
.
http
.
get
(
'
https://ygobbs.com/top/quarterly.json
'
).
map
(
response
=>
response
.
json
().
topic_list
.
topics
.
map
(
topic
=>
({
...
topic
,
url
:
new
URL
(
`/t/
${
topic
.
slug
}
/
${
topic
.
id
}
`
,
'
https://ygobbs.com
'
).
toString
(),
image_url
:
topic
.
image_url
&&
new
URL
(
topic
.
image_url
,
'
https://ygobbs.com
'
).
toString
()
})));
}
}
create_room
(
room
:
Room
,
host_password
:
string
)
{
create_room
(
room
:
Room
,
host_password
:
string
)
{
...
...
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