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 8, 2022. It is now read-only.

Commit13ba7f1

Browse files
committed
refactor(config): mv other config to config.json & resolve warnings
1 parent631f8fa commit13ba7f1

File tree

11 files changed

+64
-114
lines changed

11 files changed

+64
-114
lines changed

‎config/assets.js‎

Lines changed: 0 additions & 10 deletions
This file was deleted.

‎config/config.json‎

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
{
2-
"//--- endpoint configs ---//":"",
3-
"ASSETS_ENDPOINT":"https://cps-oss.oss-cn-shanghai.aliyuncs.com",
4-
"GRAPHQL_ENDPOINT":"https://api.coderplanets.com/graphiql",
52
"//--- general configs ---//":"",
63
"DEFAULT_THEME":"cyan",
74
"SENIOR_AMOUNT_THRESHOLD":51.2,
@@ -12,6 +9,58 @@
129
"M":30,
1310
"L":40
1411
},
12+
"WORD_LIMIT": {
13+
"COMMENT":300
14+
},
15+
"ATATARS_LIST_LENGTH": {
16+
"POSTS":4,
17+
"COMMENTS":5
18+
},
19+
"TAG_COLORS": [
20+
"red",
21+
"orange",
22+
"yellow",
23+
"green",
24+
"cyan",
25+
"blue",
26+
"purple",
27+
"dodgerblue",
28+
"yellowgreen",
29+
"brown",
30+
"cadetblue",
31+
"grey"
32+
],
33+
"TAG_COLOR_ORDER": {
34+
"red":0,
35+
"orange":1,
36+
"yellow":2,
37+
"green":3,
38+
"cyan":4,
39+
"blue":5,
40+
"purple":6,
41+
"dodgerblue":7,
42+
"yellowgreen":8,
43+
"brown":9,
44+
"cadetblue":10,
45+
"grey":11
46+
},
47+
"//--- endpoint configs ---//":"",
48+
"ASSETS_ENDPOINT":"https://cps-oss.oss-cn-shanghai.aliyuncs.com",
49+
"ICON_BASE":"https://cps-oss.oss-cn-shanghai.aliyuncs.com/icons",
50+
"ICON_CMD":"https://cps-oss.oss-cn-shanghai.aliyuncs.com/icons/cmd",
51+
"DEFAULT_ICON":"https://cps-oss.oss-cn-shanghai.aliyuncs.com/icons/cmd/cheatsheet.svg",
52+
"DEFAULT_USER_AVATAR":"https://cps-oss.oss-cn-shanghai.aliyuncs.com/icons/cmd/alien_user3.svg",
53+
"GRAPHQL_ENDPOINT":"https://api.coderplanets.com/graphiql",
54+
"SITE_URL":"https://coderplanets.com",
55+
"GITHUB_WEB_ADDR":"https://github.com/coderplanets/coderplanets_web",
56+
"GITHUB_SERVER_ADDR":"https://github.com/coderplanets/coderplanets_server",
57+
"API_SERVER_ADDR":"http://api.coderplanets.com/graphiql",
58+
"GITHUB_ME":"https://github.com/mydearxym",
59+
"GITHUB_CPS_TEAM":"https://github.com/orgs/coderplanets/people",
60+
"ISSUE_ADDR":"https://github.com/coderplanets/coderplanets_web/issues",
61+
"MENTION_USER_ADDR":"https://coderplanets.com/users/",
62+
"COMMUNITY_WIKI":"https://github.com/coderplanets/cps_wiki/blob/master",
63+
"COMMUNITY_CHEATSHEET":"https://github.com/coderplanets/cps_cheatsheets/blob/master",
1564
"//--- contact configs ---//":"",
1665
"EMAIL_CLUB":"club@group.coderplanets.com",
1766
"EMAIL_SUPPORT":"support@group.coderplanets.com",

‎config/endpoint.js‎

Lines changed: 0 additions & 26 deletions
This file was deleted.

‎config/general.js‎

Lines changed: 0 additions & 43 deletions
This file was deleted.

‎config/index.js‎

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,3 @@
1-
import*asCONFIGfrom'./config.json'
1+
export*from'./config.json'
22

3-
exportconst{EMAIL_CLUB,EMAIL_SUPPORT,EMAIL_HELLO,EMAIL_BUSINESS}=CONFIG
4-
exportconst{
5-
DEFAULT_THEME,
6-
SENIOR_AMOUNT_THRESHOLD,
7-
SPONSOR_AMOUNT_THRESHOLD,
8-
PAGE_SIZE,
9-
}=CONFIG
10-
11-
export{WORD_LIMIT,TAG_COLORS,TAG_COLOR_ORDER}from'./general'
12-
13-
export{
14-
SITE_URL,
15-
GRAPHQL_ENDPOINT,
16-
ISSUE_ADDR,
17-
GITHUB_WEB_ADDR,
18-
GITHUB_SERVER_ADDR,
19-
API_SERVER_ADDR,
20-
GITHUB_ME,
21-
GITHUB_CPS_TEAM,
22-
MENTION_USER_ADDR,
23-
COMMUNITY_WIKI,
24-
COMMUNITY_CHEATSHEET,
25-
DEFAULT_USER_AVATAR,
26-
}from'./endpoint'
27-
28-
export{ASSETS_ENDPOINT,ICON_BASE,ICON_CMD,DEFAULT_ICON}from'./assets'
293
export{defaultasLABEL_POOL}from'./label_pool'

‎config/label_pool.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import{ICON_CMD}from'./assets'
1+
import*asCONFIGfrom'./config.json'
2+
3+
const{ICON_CMD}=CONFIG
24

35
constLABEL_POOL={
46
default:{

‎src/components/AvatarsRow/index.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import React from 'react'
88
importTfrom'prop-types'
99
importRfrom'ramda'
1010

11-
import{ATATARS_LIST_LENGTH}from'@config/general'
11+
// eslint-disable-next-line import/named
12+
import{ATATARS_LIST_LENGTH}from'@config'
1213
import{buildLog,prettyNum}from'@utils'
1314

1415
importTooltipfrom'@components/Tooltip'

‎src/containers/Header/UserAccount.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
importReactfrom'react'
22

3-
import{ICON_CMD}from'@config/assets'
3+
// eslint-disable-next-line import/named
4+
import{ICON_CMD}from'@config'
45
importPopoverfrom'@components/Popover'
56

67
import{onLogin,onLogout,previewAccount}from'./logic'

‎src/containers/MailBox/MailsPanel.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
importReactfrom'react'
22
importRfrom'ramda'
33

4+
// eslint-disable-next-line import/named
5+
import{ICON_CMD}from'@config'
46
importTabSelectorfrom'@components/TabSelector'
5-
import{ICON_CMD}from'@config/assets'
67

78
import{Wrapper,SeeAllMessages}from'./styles/mails_panel'
89
importMailListsfrom'./MailLists'

‎src/containers/MailsViewer/index.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
importReactfrom'react'
88

9-
import{ICON_CMD}from'@config/assets'
9+
// eslint-disable-next-line import/named
10+
import{ICON_CMD}from'@config'
1011
import{connectStore,buildLog}from'@utils'
1112

1213
importTabSelectorfrom'@components/TabSelector'

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp