Skip to content

Commit

Permalink
RAP v2.1 commits
Browse files Browse the repository at this point in the history
  • Loading branch information
Bosn committed Jul 18, 2019
1 parent 447059f commit 576b956
Show file tree
Hide file tree
Showing 204 changed files with 7,912 additions and 6,612 deletions.
128 changes: 89 additions & 39 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
"main": "app.js",
"scripts": {
"dev": "npm run start",
"build-css": "node-sass src/ -o src/",
"watch-css": "npm run build-css && node-sass src/ -o src/ --watch --recursive",
"build-css": "node-sass src/ -o build/",
"watch-css": "npm run build-css && node-sass src/ -o build/ --watch --recursive",
"start-js": "react-scripts start",
"start": "npm-run-all -p watch-css start-js",
"build": "npm run build-css && react-scripts build",
"start": "npm-run-all -p watch-css start-js --max-old-space-size=4096",
"build": "npm run lint && npm run build-css && react-scripts build",
"test-backup": "npm run linter && react-scripts test --env=jsdom",
"test": "npm run linter",
"eject": "react-scripts eject",
"linter": "standard --fix"
"lint": "tslint --project ./ -c tslint.json"
},
"repository": {
"type": "git",
Expand All @@ -22,39 +22,50 @@
"author": "[email protected]",
"license": "ISC",
"dependencies": {
"animate.css": "3.6.1",
"bootstrap": "^4.1.1",
"chart.js": "^2.6.0",
"codemirror": "5.39.0",
"graceful": "1.0.1",
"jquery": "^3.3.1",
"koa": "2.5.1",
"@material-ui/core": "^4.2.0",
"@material-ui/icons": "^4.2.1",
"@material-ui/pickers": "^3.1.2",
"@material-ui/styles": "^4.2.0",
"animate.css": "3.7.2",
"bootstrap": "^4.3.1",
"chart.js": "^2.8.0",
"classnames": "^2.2.6",
"codemirror": "5.48.0",
"connected-react-router": "^6.5.0",
"debounce-promise": "^3.1.2",
"formik": "^1.5.7",
"formik-material-ui": "^0.0.19",
"graceful": "1.0.2",
"history": "^4.9.0",
"jquery": "^3.4.1",
"koa": "2.7.0",
"koa-router": "7.4.0",
"koa-session": "5.8.1",
"koa-session": "5.12.2",
"koa-static": "5.0.0",
"lodash": "4.17.10",
"lodash": "4.17.13",
"mockjs": "1.0.1-beta3",
"moment": "2.22.2",
"node-fetch": "2.1.2",
"normalizr": "^3.2.4",
"moment": "2.24.0",
"node-fetch": "2.6.0",
"normalizr": "^3.4.0",
"nprogress": "0.2.0",
"parsleyjs": "^2.7.2",
"popper.js": "^1.14.3",
"prop-types": "15.6.2",
"react": "16.4.1",
"react-dom": "16.4.1",
"react-icons": "2.2.7",
"react-modal": "3.4.5",
"react-redux": "5.0.7",
"react-router": "4.3.1",
"react-router-config": "1.0.0-beta.4",
"react-router-dom": "4.3.1",
"react-router-redux": "5.0.0-alpha.6",
"redux": "4.0.0",
"redux-saga": "0.16.0",
"reselect": "^3.0.1",
"sortablejs": "1.7.0",
"urijs": "1.19.1"
"parsleyjs": "^2.9.1",
"popper.js": "^1.15.0",
"prop-types": "15.7.2",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-icons": "3.7.0",
"react-modal": "3.8.2",
"react-redux": "^7.1.0",
"react-router": "5.0.1",
"react-router-config": "5.0.1",
"react-router-dom": "5.0.1",
"react-select": "^3.0.4",
"redux": "4.0.3",
"redux-saga": "1.0.5",
"reselect": "^4.0.0",
"sortablejs": "1.9.0",
"urijs": "1.19.1",
"yup": "^0.27.0"
},
"standard": {
"parser": "babel-eslint",
Expand All @@ -66,10 +77,49 @@
]
},
"devDependencies": {
"babel-eslint": "7.2.3",
"node-sass": "4.9.0",
"npm-run-all": "4.1.3",
"react-scripts": "1.1.4",
"standard": "11.0.1"
"@types/chart.js": "^2.7.55",
"@types/classnames": "^2.2.9",
"@types/codemirror": "^0.0.76",
"@types/history": "^4.7.2",
"@types/jest": "^24.0.15",
"@types/jquery": "^3.3.30",
"@types/lodash": "^4.14.136",
"@types/mockjs": "^1.0.2",
"@types/node": "^12.6.2",
"@types/nprogress": "^0.2.0",
"@types/react": "^16.8.23",
"@types/react-dom": "^16.8.4",
"@types/react-modal": "^3.8.2",
"@types/react-redux": "^7.1.1",
"@types/react-router-config": "^5.0.0",
"@types/react-router-dom": "^4.3.4",
"@types/react-select": "^3.0.0",
"@types/sortablejs": "^1.7.2",
"@types/urijs": "^1.19.3",
"@types/yup": "^0.26.21",
"node-sass": "4.12.0",
"npm-run-all": "4.1.5",
"pre-commit": "^1.2.2",
"react-scripts": "^3.0.1",
"standard": "12.0.1",
"tslint": "^5.18.0",
"tslint-react": "^4.0.0",
"tslint-react-hooks": "^2.1.1",
"typescript": "^3.5.3"
},
"pre-commit": [
"lint"
],
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
19 changes: 19 additions & 0 deletions public/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 0 additions & 67 deletions src/actions/account.js

This file was deleted.

59 changes: 59 additions & 0 deletions src/actions/account.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// 登陆
export const login = (user: any, onResolved: any) => ({ type: 'USER_LOGIN', user, onResolved })
export const loginSucceeded = (user: any) => ({ type: 'USER_LOGIN_SUCCEEDED', user })
export const loginFailed = (message: any) => ({ type: 'USER_LOGIN_FAILED', message })

// 登出
export const logout = () => ({ type: 'USER_LOGOUT' })
export const logoutSucceeded = () => { return ({ type: 'USER_LOGOUT_SUCCEEDED' }) }
export const logoutFailed = () => ({ type: 'USER_LOGOUT_FAILED' })

// 获取登陆信息
export const fetchLoginInfo = () => ({ type: 'USER_FETCH_LOGIN_INFO' })
export const fetchLoginInfoSucceeded = (user: any) => ({ type: 'USER_FETCH_LOGIN_INFO_SUCCEEDED', user })
export const fetchLoginInfoFailed = (message: any) => ({ type: 'USER_FETCH_LOGIN_INFO_FAILED', message })

// 注册
export const addUser = (user: any, onResolved: any) => ({ type: 'USER_ADD', user, onResolved })
export const addUserSucceeded = (user: any) => ({ type: 'USER_ADD_SUCCEEDED', user })
export const addUserFailed = (message: any) => ({ type: 'USER_ADD_FAILED', message })

// 删除用户
export const deleteUser = (id: any) => ({ type: 'USER_DELETE', id })
export const deleteUserSucceeded = (id: any) => ({ type: 'USER_DELETE_SUCCEEDED', id })
export const deleteUserFailed = (id: any) => ({ type: 'USER_DELETE_FAILED', id })

// 获取用户列表
export const fetchUserCount = () => ({ type: 'USER_COUNT_FETCH' })
export const fetchUserCountSucceeded = (count: any) => ({ type: 'USER_COUNT_FETCH_SUCCEEDED', count })
export const fetchUserCountFailed = (message: any) => ({ type: 'USER_COUNT_FETCH_FAILED', message })
export const fetchUserList = ({ cursor, limit } = { cursor: '', limit: ''}) => ({ type: 'USER_LIST_FETCH', cursor, limit })
export const fetchUserListSucceeded = (users: any) => ({ type: 'USER_LIST_FETCH_SUCCEEDED', users })
export const fetchUserListFailed = (message: any) => ({ type: 'USER_LIST_FETCH_FAILED', message })

// 获取用户设置
export const fetchSetting = () => ({ type: 'SETTING_FETCH' })
export const fetchSettingSucceeded = (setting: any) => ({ type: 'SETTING_FETCH_SUCCEEDED', setting })
export const fetchSettingFailed = (message: any) => ({ type: 'SETTING_FETCH_FAILED', message })

// 修改用户设置
export const updateSetting = (setting: any) => ({ type: 'SETTING_UPDATE', setting })
export const updateSettingSucceeded = (setting: any) => ({ type: 'SETTING_UPDATE', setting })
export const updateSettingFailed = (message: any) => ({ type: 'SETTING_UPDATE', message })

// 获取用户通知
export const fetchNotificationList = () => ({ type: 'NOTIFICATION_LIST_FETCH' })
export const fetchNotificationListSucceeded = () => ({ type: 'NOTIFICATION_LIST_FETCH_SUCCEEDED' })
export const fetchNotificationListFailed = () => ({ type: 'NOTIFICATION_LIST_FETCH_Failed' })

// 阅读用户通知
export const readNotification = (id: any) => ({ type: 'NOTIFICATION_READ', id })
export const readNotificationSucceeded = (id: any) => ({ type: 'NOTIFICATION_READ_SUCCEEDED', id })
export const readNotificationFailed = (message: any) => ({ type: 'NOTIFICATION_READ_FAILED', message })

// 获取用户日志
export const fetchLogList = (
{ cursor, limit } = { cursor: '', limit: '' }
) => ({ type: 'LOG_LIST_FETCH', cursor, limit })
export const fetchLogListSucceeded = (logs: any) => ({ type: 'LOG_LIST_FETCH_SUCCEEDED', logs })
export const fetchLogListFailed = (message: any) => ({ type: 'LOG_LIST_FETCH_FAILED', message })
20 changes: 0 additions & 20 deletions src/actions/analytics.js

This file was deleted.

28 changes: 28 additions & 0 deletions src/actions/analytics.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// 获取平台计数信息
export const fetchCounter = () => ({ type: 'ANALYTICS_COUNTER_FETCH' })
export const fetchCounterSucceeded = (counter: any) => ({ type: 'ANALYTICS_COUNTER_FETCH_SUCCEEDED', counter })
export const fetchCounterFailed = (message: any) => ({ type: 'ANALYTICS_COUNTER_FETCH_FAILED', message })

export const fetchAnalyticsRepositoriesCreated = (
{ start, end } = { start: '', end: '' }
) => ({ type: 'ANALYTICS_REPOSITORIES_CREATED', start, end })
export const fetchAnalyticsRepositoriesCreatedSucceeded = (analytics: any) => ({ type: 'ANALYTICS_REPOSITORIES_CREATED_SUCCEEDED', analytics })
export const fetchAnalyticsRepositoriesCreatedFailed = (message: any) => ({ type: 'ANALYTICS_REPOSITORIES_CREATED_FAILED', message })

export const fetchAnalyticsRepositoriesUpdated = (
{ start, end } = { start: '', end: '' }
) => ({ type: 'ANALYTICS_REPOSITORIES_UPDATED', start, end })
export const fetchAnalyticsRepositoriesUpdatedSucceeded = (analytics: any) => ({ type: 'ANALYTICS_REPOSITORIES_UPDATED_SUCCEEDED', analytics })
export const fetchAnalyticsRepositoriesUpdatedFailed = (message: any) => ({ type: 'ANALYTICS_REPOSITORIES_UPDATED_FAILED', message })

export const fetchAnalyticsUsersActivation = (
{ start, end } = { start: '', end: '' }
) => ({ type: 'ANALYTICS_USERS_ACTIVATION', start, end })
export const fetchAnalyticsUsersActivationSucceeded = (analytics: any) => ({ type: 'ANALYTICS_USERS_ACTIVATION_SUCCEEDED', analytics })
export const fetchAnalyticsUsersActivationFailed = (message: any) => ({ type: 'ANALYTICS_USERS_ACTIVATION_FAILED', message })

export const fetchAnalyticsRepositoriesActivation = (
{ start, end } = { start: '', end: '' }
) => ({ type: 'ANALYTICS_REPOSITORIES_ACTIVATION', start, end })
export const fetchAnalyticsRepositoriesActivationSucceeded = (analytics: any) => ({ type: 'ANALYTICS_REPOSITORIES_ACTIVATION_SUCCEEDED', analytics })
export const fetchAnalyticsRepositoriesActivationFailed = (message: any) => ({ type: 'ANALYTICS_REPOSITORIES_ACTIVATION_FAILED', message })
1 change: 1 addition & 0 deletions src/actions/common.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const refresh = () => ({ type: 'REFRESH' })
Loading

0 comments on commit 576b956

Please sign in to comment.