Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commitbc6b588

Browse files
committed
chore(schemas): update user with social scope
1 parent72c14ad commitbc6b588

File tree

5 files changed

+41
-66
lines changed

5 files changed

+41
-66
lines changed

‎components/UsersTable/index.js‎

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -87,27 +87,6 @@ class UsersTable extends React.PureComponent {
8787
width:100,
8888
render:text=><MaybeCelltext={text}/>,
8989
},
90-
{
91-
title:'qq',
92-
dataIndex:'qq',
93-
align:'center',
94-
width:100,
95-
render:text=><MaybeCelltext={text}/>,
96-
},
97-
{
98-
title:'weixin',
99-
dataIndex:'weixin',
100-
align:'center',
101-
width:150,
102-
render:text=><MaybeCelltext={text}/>,
103-
},
104-
{
105-
title:'weibo',
106-
dataIndex:'weibo',
107-
align:'center',
108-
width:100,
109-
render:text=><MaybeCelltext={text}/>,
110-
},
11190
{
11291
title:'位置',
11392
dataIndex:'location',

‎containers/schemas/fragments/base.js‎

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,7 @@ export const author = `
8484
nickname
8585
avatar
8686
`
87-
exportconstuser=`
88-
${author}
89-
bio
90-
location
91-
sex
87+
exportconstuserSocial=`
9288
qq
9389
weibo
9490
weichat
@@ -102,9 +98,17 @@ export const user = `
10298
pinterest
10399
huaban
104100
`
105-
/* followersCount */
106-
/* followingsCount */
107-
101+
exportconstuser=`
102+
${author}
103+
sex
104+
bio
105+
location
106+
social {
107+
${userSocial}
108+
}
109+
followersCount
110+
followingsCount
111+
`
108112
exportconstc11n=`
109113
bannerLayout
110114
contentsLayout
@@ -146,10 +150,7 @@ export const comment = `
146150
body
147151
floor
148152
author {
149-
id
150-
nickname
151-
avatar
152-
login
153+
${author}
153154
}
154155
likesCount
155156
dislikesCount
@@ -161,9 +162,7 @@ export const commentParent = `
161162
title
162163
commentsCount
163164
author {
164-
id
165-
nickname
166-
avatar
165+
${author}
167166
}
168167
communities {
169168
id

‎containers/schemas/fragments/index.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
author,
1818
tag,
1919
user,
20+
userSocial,
2021
c11n,
2122
achievement,
2223
userBackgrounds,
@@ -42,6 +43,7 @@ const F = {
4243
pagedRepos,
4344

4445
user,
46+
userSocial,
4547
c11n,
4648
achievement,
4749
userBackgrounds,

‎containers/schemas/pages/user.js‎

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,9 @@ export const user = `
88
bio
99
sex
1010
location
11-
qq
12-
weibo
13-
weichat
14-
github
15-
zhihu
16-
douban
17-
twitter
18-
facebook
19-
dribble
20-
instagram
21-
pinterest
22-
huaban
11+
social {
12+
${F.userSocial}
13+
}
2314
followersCount
2415
followingsCount
2516
viewerHasFollowed @include(if: $userHasLogin)
@@ -74,9 +65,9 @@ export const pagedUsers = `
7465
bio
7566
sex
7667
email
77-
qq
78-
weibo
79-
weichat
68+
social {
69+
${F.userSocial}
70+
}
8071
subscribedCommunitiesCount
8172
location
8273
fromGithub
@@ -103,9 +94,9 @@ export const sessionState = `
10394
bio
10495
fromGithub
10596
location
106-
qq
107-
weibo
108-
weichat
97+
social {
98+
${F.userSocial}
99+
}
109100
sex
110101
cmsPassport
111102
customization {

‎stores/SharedModel/User.js‎

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,21 @@ const Customization = t.model('Customization', {
7979
// ...
8080
})
8181

82+
constUserSocial=t.model('UserSocial',{
83+
qq:t.maybeNull(t.string),
84+
weibo:t.maybeNull(t.string),
85+
weichat:t.maybeNull(t.string),
86+
github:t.maybeNull(t.string),
87+
zhihu:t.maybeNull(t.string),
88+
douban:t.maybeNull(t.string),
89+
twitter:t.maybeNull(t.string),
90+
facebook:t.maybeNull(t.string),
91+
dribble:t.maybeNull(t.string),
92+
instagram:t.maybeNull(t.string),
93+
pinterest:t.maybeNull(t.string),
94+
huaban:t.maybeNull(t.string),
95+
})
96+
8297
exportconstUser=t.model('User',{
8398
// identifier is desiged to be immutable, this id would be updated when login
8499
/* id: t.optional(t.string, ''), */
@@ -96,18 +111,7 @@ export const User = t.model('User', {
96111
workBackgrounds:t.optional(t.array(WorkBackground),[]),
97112
sex:t.maybeNull(t.string),
98113
// social
99-
github:t.maybeNull(t.string),
100-
zhihu:t.maybeNull(t.string),
101-
douban:t.maybeNull(t.string),
102-
twitter:t.maybeNull(t.string),
103-
facebook:t.maybeNull(t.string),
104-
dribble:t.maybeNull(t.string),
105-
instagram:t.maybeNull(t.string),
106-
pinterest:t.maybeNull(t.string),
107-
huaban:t.maybeNull(t.string),
108-
qq:t.maybeNull(t.string),
109-
weichat:t.maybeNull(t.string),
110-
weibo:t.maybeNull(t.string),
114+
social:t.optional(UserSocial,{}),
111115

112116
fromGithub:t.optional(t.boolean,false),
113117
/* fromWeixin: t.optional(t.boolean, false), */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp