mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
0.3.13A1
This commit is contained in:
parent
cdb4d115c1
commit
86c37b49a2
0
capacitor.config.json
Normal file → Executable file
0
capacitor.config.json
Normal file → Executable file
0
comty_dist.service
Normal file → Executable file
0
comty_dist.service
Normal file → Executable file
@ -32,5 +32,6 @@ export var AppSettings = {
|
||||
CurrentBundle: 'light_ng',
|
||||
// In KB
|
||||
MaximunAPIPayload: '101376',
|
||||
limit_post_catch: '20'
|
||||
limit_post_catch: '20',
|
||||
Maximun_tick_overrun: 10,
|
||||
}
|
0
dist-server.sh
Normal file → Executable file
0
dist-server.sh
Normal file → Executable file
0
globals/endpoints/comty_endpoints.js
Normal file → Executable file
0
globals/endpoints/comty_endpoints.js
Normal file → Executable file
0
globals/endpoints/index.js
Normal file → Executable file
0
globals/endpoints/index.js
Normal file → Executable file
0
globals/endpoints/twitter_endpoints.js
Normal file → Executable file
0
globals/endpoints/twitter_endpoints.js
Normal file → Executable file
57
package.json
57
package.json
@ -3,31 +3,19 @@
|
||||
"UUID": "C8mVSr-4nmPp2-pr5Vrz-CU4kg4",
|
||||
"title": "Comty™",
|
||||
"DevBuild": true,
|
||||
"version": "0.3.09",
|
||||
"version": "0.3.13",
|
||||
"stage": "dev-pre",
|
||||
"description": "",
|
||||
"main": "app/main.js",
|
||||
"author": "RageStudio",
|
||||
"license": "ISC",
|
||||
"build": {
|
||||
"appId": "com.ragestudio.comtydesktop",
|
||||
"mac": {
|
||||
"category": "ragestudio.comty.social.desktop"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@capacitor/android": "^1.5.2",
|
||||
"@capacitor/cli": "^1.5.2",
|
||||
"@capacitor/core": "^1.5.2",
|
||||
"@lingui/cli": "^2.9.1",
|
||||
"@lingui/loader": "^2.9.1",
|
||||
"@lingui/react": "^2.9.1",
|
||||
"@material-ui/core": "^4.9.9",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"antd": "^4.1.1",
|
||||
"axios": "^0.19.2",
|
||||
"bag.js": "0.0.2",
|
||||
"antd": "^4.1.2",
|
||||
"classnames": "^2.2.6",
|
||||
"cryptr": "^6.0.2",
|
||||
"dotenv": "^8.2.0",
|
||||
"dva": "2.4.1",
|
||||
"dva-model-extend": "^0.1.2",
|
||||
"enquire-js": "^0.2.1",
|
||||
@ -39,7 +27,6 @@
|
||||
"moment": "^2.24.0",
|
||||
"node-sass": "^4.13.1",
|
||||
"nprogress": "^0.2.0",
|
||||
"os-utils": "0.0.14",
|
||||
"path-to-regexp": "^6.1.0",
|
||||
"prop-types": "^15.7.2",
|
||||
"radium": "^0.26.0",
|
||||
@ -50,48 +37,31 @@
|
||||
"react-perfect-scrollbar": "^1.5.8",
|
||||
"react-reveal": "^1.2.2",
|
||||
"react-scripts": "^3.4.1",
|
||||
"react-select-country-list": "^2.1.2",
|
||||
"react-sound": "^1.2.0",
|
||||
"react-virtualized": "^9.21.2",
|
||||
"socket.io-client": "^2.3.0",
|
||||
"store": "^2.0.12",
|
||||
"timeago.js": "^4.0.2",
|
||||
"ts-cookies": "^1.0.0",
|
||||
"umi-plugin-datahub": "^4.1.0",
|
||||
"umi": "^2.13.12",
|
||||
"umi-plugin-react": "^1.15.7",
|
||||
"validator": "^12.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@capacitor/android": "^1.5.2",
|
||||
"@capacitor/cli": "^1.5.2",
|
||||
"@capacitor/core": "^1.5.2",
|
||||
"@lingui/babel-preset-react": "^2.9.1",
|
||||
"@lingui/cli": "^2.9.1",
|
||||
"@lingui/loader": "^2.9.1",
|
||||
"umi-plugin-datahub": "^4.1.0",
|
||||
"@types/react": "^16.9.33",
|
||||
"babel-core": "7.0.0-bridge.0",
|
||||
"babel-eslint": "^10.0.3",
|
||||
"babel-plugin-dev-expression": "^0.2.2",
|
||||
"babel-plugin-import": "^1.13.0",
|
||||
"babel-plugin-macros": "^2.8.0",
|
||||
"babel-plugin-module-resolver": "^4.0.0",
|
||||
"cross-env": "^7.0.0",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-react-app": "^5.2.0",
|
||||
"eslint-plugin-flowtype": "^4.7.0",
|
||||
"eslint-plugin-import": "^2.20.2",
|
||||
"eslint-plugin-jsx-a11y": "^6.2.3",
|
||||
"eslint-plugin-react": "^7.18.3",
|
||||
"husky": "^4.2.4",
|
||||
"less-vars-to-js": "^1.3.0",
|
||||
"lint-staged": "^10.1.3",
|
||||
"module": "^1.2.5",
|
||||
"now": "^17.0.3",
|
||||
"prettier": "^1.19.1",
|
||||
"rimraf": "^3.0.2",
|
||||
"stylelint": "^13.3.1",
|
||||
"stylelint-config-prettier": "^8.0.1",
|
||||
"stylelint-config-standard": "^20.0.0",
|
||||
"typescript": "^3.8.3",
|
||||
"umi": "^2.13.12",
|
||||
"umi-plugin-react": "^1.15.7",
|
||||
"wait-on": "^4.0.2",
|
||||
"workbox-webpack-plugin": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
@ -115,14 +85,9 @@
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "rimraf dist",
|
||||
"analyze": "cross-env ANALYZE=1 umi build",
|
||||
"build": "umi build",
|
||||
"start": "umi dev",
|
||||
"test": "cross-env BABELRC=none umi test",
|
||||
"prettier": "prettier --write 'src/**/*.{js,less}'",
|
||||
"add-locale": "lingui add-locale",
|
||||
"extract": "lingui extract",
|
||||
"trans": "lingui extract --clean && node ./scripts/translate.js"
|
||||
"test": "cross-env BABELRC=none umi test"
|
||||
}
|
||||
}
|
||||
|
0
src/@ycore/libs/app_functions/modals.js
Normal file → Executable file
0
src/@ycore/libs/app_functions/modals.js
Normal file → Executable file
0
src/@ycore/libs/app_functions/modals.less
Normal file → Executable file
0
src/@ycore/libs/app_functions/modals.less
Normal file → Executable file
0
src/@ycore/libs/app_functions/pre.js
Normal file → Executable file
0
src/@ycore/libs/app_functions/pre.js
Normal file → Executable file
0
src/@ycore/libs/comty_ng/comty_get.js
Normal file → Executable file
0
src/@ycore/libs/comty_ng/comty_get.js
Normal file → Executable file
0
src/@ycore/libs/comty_ng/comty_post.js
Normal file → Executable file
0
src/@ycore/libs/comty_ng/comty_post.js
Normal file → Executable file
0
src/@ycore/libs/comty_ng/comty_post_comment.js
Normal file → Executable file
0
src/@ycore/libs/comty_ng/comty_post_comment.js
Normal file → Executable file
0
src/@ycore/libs/comty_ng/comty_search.js
Normal file → Executable file
0
src/@ycore/libs/comty_ng/comty_search.js
Normal file → Executable file
0
src/@ycore/libs/comty_ng/comty_user.js
Normal file → Executable file
0
src/@ycore/libs/comty_ng/comty_user.js
Normal file → Executable file
0
src/@ycore/libs/rs_cloud/api_call.js
Normal file → Executable file
0
src/@ycore/libs/rs_cloud/api_call.js
Normal file → Executable file
0
src/@ycore/libs/rs_cloud/pre.js
Normal file → Executable file
0
src/@ycore/libs/rs_cloud/pre.js
Normal file → Executable file
57
src/@ycore/libs/ycore_sync/pre.js
Normal file → Executable file
57
src/@ycore/libs/ycore_sync/pre.js
Normal file → Executable file
@ -4,37 +4,42 @@ import * as Icons from '@ant-design/icons'
|
||||
import io from 'socket.io-client'
|
||||
import config from 'config'
|
||||
|
||||
const prefix = '[Yulio Sync]'
|
||||
var endpoint = config.sync_server;
|
||||
|
||||
|
||||
export const sync = {
|
||||
listen: (callback) => {
|
||||
let conn_overrun_tick = 0;
|
||||
const socket = io(endpoint);
|
||||
|
||||
socket.on('connect_error', (error) => {
|
||||
conn_overrun_tick ++
|
||||
ycore.yconsole.log('Overrun tick => ',conn_overrun_tick)
|
||||
if (conn_overrun_tick == 1) {
|
||||
antd.notification.open({
|
||||
onClose: () => conn_overrun_tick = 0,
|
||||
duration: 15,
|
||||
message: 'Disconected from server!',
|
||||
description: 'Attempting to reconnect...',
|
||||
icon: <Icons.LoadingOutlined spin />,
|
||||
});
|
||||
let active = true;
|
||||
if (active){
|
||||
let conn_overrun_tick = 0;
|
||||
const socket = io(endpoint);
|
||||
socket.on('connect_error', (error) => {
|
||||
conn_overrun_tick ++
|
||||
ycore.yconsole.log('Overrun tick => ',conn_overrun_tick)
|
||||
if (conn_overrun_tick == 1) {
|
||||
antd.notification.open({
|
||||
duration: 5,
|
||||
message: 'Disconected from server!',
|
||||
description: 'Attempting to reconnect...',
|
||||
icon: <Icons.LoadingOutlined spin />,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
socket.on('connect', () => {
|
||||
conn_overrun_tick = 0
|
||||
antd.message.success('Connected to the server')
|
||||
});
|
||||
|
||||
socket.on('pull_event', function (data) {
|
||||
console.log('SOCKET => ',data)
|
||||
callback(data)
|
||||
});
|
||||
if (conn_overrun_tick == ycore.AppSettings.Maximun_tick_overrun) {
|
||||
active = false;
|
||||
}
|
||||
});
|
||||
socket.on('connect', () => {
|
||||
conn_overrun_tick = 0
|
||||
// antd.message.success('Connected to the server')
|
||||
});
|
||||
|
||||
socket.on('pull_event', function (data) {
|
||||
console.log('SOCKET => ',data)
|
||||
callback(data)
|
||||
});
|
||||
}else{
|
||||
console.log(prefix,' Offline Mode')
|
||||
}
|
||||
|
||||
},
|
||||
FeedListen: (callback) => {
|
||||
|
0
src/@ycore/libs/yulio_id/ctid_gen.js
Normal file → Executable file
0
src/@ycore/libs/yulio_id/ctid_gen.js
Normal file → Executable file
0
src/@ycore/libs/yulio_id/token_data.js
Normal file → Executable file
0
src/@ycore/libs/yulio_id/token_data.js
Normal file → Executable file
0
src/@ycore/libs/yulio_id/validate.js
Normal file → Executable file
0
src/@ycore/libs/yulio_id/validate.js
Normal file → Executable file
0
src/components/App_about/index.js
Normal file → Executable file
0
src/components/App_about/index.js
Normal file → Executable file
0
src/components/App_about/index.less
Normal file → Executable file
0
src/components/App_about/index.less
Normal file → Executable file
0
src/components/Layout/Secondary/index.js
Normal file → Executable file
0
src/components/Layout/Secondary/index.js
Normal file → Executable file
0
src/components/Layout/Secondary/index.less
Normal file → Executable file
0
src/components/Layout/Secondary/index.less
Normal file → Executable file
0
src/components/Layout/Secondary/renders.js
Normal file → Executable file
0
src/components/Layout/Secondary/renders.js
Normal file → Executable file
0
src/components/Layout/Secondary/renders.less
Normal file → Executable file
0
src/components/Layout/Secondary/renders.less
Normal file → Executable file
0
src/components/Layout/Sider/default.js
Normal file → Executable file
0
src/components/Layout/Sider/default.js
Normal file → Executable file
0
src/components/Layout/Sider/default.less
Normal file → Executable file
0
src/components/Layout/Sider/default.less
Normal file → Executable file
2
src/components/Layout/Sider/index.js
Normal file → Executable file
2
src/components/Layout/Sider/index.js
Normal file → Executable file
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { config } from 'utils'
|
||||
import config from 'config'
|
||||
import * as ycore from 'ycore'
|
||||
|
||||
import Sider_Mobile from './mobile.js'
|
||||
|
0
src/components/Layout/Sider/mobile.js
Normal file → Executable file
0
src/components/Layout/Sider/mobile.js
Normal file → Executable file
0
src/components/Layout/Sider/mobile.less
Normal file → Executable file
0
src/components/Layout/Sider/mobile.less
Normal file → Executable file
0
src/components/Like_button/index.js
Normal file → Executable file
0
src/components/Like_button/index.js
Normal file → Executable file
0
src/components/Like_button/index.scss
Normal file → Executable file
0
src/components/Like_button/index.scss
Normal file → Executable file
0
src/components/MainFeed/components/index.js
Normal file → Executable file
0
src/components/MainFeed/components/index.js
Normal file → Executable file
0
src/components/MainFeed/components/invalid/index.js
Normal file → Executable file
0
src/components/MainFeed/components/invalid/index.js
Normal file → Executable file
0
src/components/MainFeed/components/invalid/invalid.less
Normal file → Executable file
0
src/components/MainFeed/components/invalid/invalid.less
Normal file → Executable file
0
src/components/MainFeed/components/newav/index.js
Normal file → Executable file
0
src/components/MainFeed/components/newav/index.js
Normal file → Executable file
0
src/components/MainFeed/components/newav/newav.less
Normal file → Executable file
0
src/components/MainFeed/components/newav/newav.less
Normal file → Executable file
0
src/components/MainFeed/components/renderFeedPosts/index.js
Normal file → Executable file
0
src/components/MainFeed/components/renderFeedPosts/index.js
Normal file → Executable file
0
src/components/MainFeed/index.less
Normal file → Executable file
0
src/components/MainFeed/index.less
Normal file → Executable file
0
src/components/MediaPlayer/index.js
Normal file → Executable file
0
src/components/MediaPlayer/index.js
Normal file → Executable file
0
src/components/MediaPlayer/index.less
Normal file → Executable file
0
src/components/MediaPlayer/index.less
Normal file → Executable file
0
src/components/MediaPlayer/plyr.js
Normal file → Executable file
0
src/components/MediaPlayer/plyr.js
Normal file → Executable file
0
src/components/MobileWarning/index.js
Normal file → Executable file
0
src/components/MobileWarning/index.js
Normal file → Executable file
0
src/components/MobileWarning/index.less
Normal file → Executable file
0
src/components/MobileWarning/index.less
Normal file → Executable file
0
src/pages/events/index.js
Normal file → Executable file
0
src/pages/events/index.js
Normal file → Executable file
0
src/pages/events/index.less
Normal file → Executable file
0
src/pages/events/index.less
Normal file → Executable file
0
src/pages/login/login.js
Normal file → Executable file
0
src/pages/login/login.js
Normal file → Executable file
0
src/pages/login/register.js
Normal file → Executable file
0
src/pages/login/register.js
Normal file → Executable file
0
src/pages/marketplace/index.js
Normal file → Executable file
0
src/pages/marketplace/index.js
Normal file → Executable file
0
src/pages/marketplace/index.less
Normal file → Executable file
0
src/pages/marketplace/index.less
Normal file → Executable file
0
src/pages/saves/index.js
Normal file → Executable file
0
src/pages/saves/index.js
Normal file → Executable file
0
src/pages/saves/index.less
Normal file → Executable file
0
src/pages/saves/index.less
Normal file → Executable file
0
src/pages/settings/components/earnings/index.js
Normal file → Executable file
0
src/pages/settings/components/earnings/index.js
Normal file → Executable file
0
src/pages/settings/components/notification/index.js
Normal file → Executable file
0
src/pages/settings/components/notification/index.js
Normal file → Executable file
0
src/pages/settings/components/notification/index.less
Normal file → Executable file
0
src/pages/settings/components/notification/index.less
Normal file → Executable file
0
src/pages/settings/components/security/index.js
Normal file → Executable file
0
src/pages/settings/components/security/index.js
Normal file → Executable file
0
src/pages/settings/components/security/index.less
Normal file → Executable file
0
src/pages/settings/components/security/index.less
Normal file → Executable file
0
src/pages/settings/components/security/sessions.js
Normal file → Executable file
0
src/pages/settings/components/security/sessions.js
Normal file → Executable file
0
src/themes/antd-design.less
Normal file → Executable file
0
src/themes/antd-design.less
Normal file → Executable file
0
src/themes/base/index.less
Normal file → Executable file
0
src/themes/base/index.less
Normal file → Executable file
0
src/themes/base/resolutions.less
Normal file → Executable file
0
src/themes/base/resolutions.less
Normal file → Executable file
0
src/themes/fonts-imports.css
Normal file → Executable file
0
src/themes/fonts-imports.css
Normal file → Executable file
@ -3,11 +3,6 @@ import umiRouter from 'umi/router'
|
||||
import pathToRegexp from 'path-to-regexp'
|
||||
import { i18n } from 'config'
|
||||
|
||||
export classnames from 'classnames'
|
||||
export config from 'config'
|
||||
export request from './request'
|
||||
export { Color } from './theme'
|
||||
|
||||
export const { defaultLanguage } = i18n
|
||||
export const languages = i18n.languages.map(item => item.key)
|
||||
|
||||
@ -245,3 +240,19 @@ export function setLocale(language) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export const _app = {
|
||||
setup: () => {
|
||||
|
||||
},
|
||||
query: () => {
|
||||
|
||||
},
|
||||
logout: () => {
|
||||
|
||||
},
|
||||
login: (data) => {
|
||||
|
||||
},
|
||||
|
||||
}
|
@ -1,96 +0,0 @@
|
||||
import axios from 'axios'
|
||||
import { cloneDeep, isEmpty } from 'lodash'
|
||||
import pathToRegexp from 'path-to-regexp'
|
||||
import { message } from 'antd'
|
||||
import qs from 'qs'
|
||||
|
||||
const { CancelToken } = axios
|
||||
window.cancelRequest = new Map()
|
||||
|
||||
export default function request(options) {
|
||||
let { data, url, method = 'get' } = options
|
||||
const cloneData = cloneDeep(data)
|
||||
|
||||
try {
|
||||
let domain = ''
|
||||
const urlMatch = url.match(/[a-zA-z]+:\/\/[^/]*/)
|
||||
if (urlMatch) {
|
||||
;[domain] = urlMatch
|
||||
url = url.slice(domain.length)
|
||||
}
|
||||
|
||||
const match = pathToRegexp.parse(url)
|
||||
url = pathToRegexp.compile(url)(data)
|
||||
|
||||
for (const item of match) {
|
||||
if (item instanceof Object && item.name in cloneData) {
|
||||
delete cloneData[item.name]
|
||||
}
|
||||
}
|
||||
url = domain + url
|
||||
} catch (e) {
|
||||
message.error(e.message)
|
||||
}
|
||||
|
||||
options.url =
|
||||
method.toLocaleLowerCase() === 'get'
|
||||
? `${url}${isEmpty(cloneData) ? '' : '?'}${qs.stringify(cloneData)}`
|
||||
: url
|
||||
|
||||
options.cancelToken = new CancelToken(cancel => {
|
||||
window.cancelRequest.set(Symbol(Date.now()), {
|
||||
pathname: window.location.pathname,
|
||||
cancel,
|
||||
})
|
||||
})
|
||||
|
||||
return axios(options)
|
||||
.then(response => {
|
||||
const { statusText, status, data } = response
|
||||
|
||||
let result = {}
|
||||
if (typeof data === 'object') {
|
||||
result = data
|
||||
if (Array.isArray(data)) {
|
||||
result.list = data
|
||||
}
|
||||
} else {
|
||||
result.data = data
|
||||
}
|
||||
|
||||
return Promise.resolve({
|
||||
success: true,
|
||||
message: statusText,
|
||||
statusCode: status,
|
||||
...result,
|
||||
})
|
||||
})
|
||||
.catch(error => {
|
||||
const { response, message } = error
|
||||
|
||||
if (String(message) === 'Canceling...') {
|
||||
return {
|
||||
success: false,
|
||||
}
|
||||
}
|
||||
|
||||
let msg
|
||||
let statusCode
|
||||
|
||||
if (response && response instanceof Object) {
|
||||
const { data, statusText } = response
|
||||
statusCode = response.status
|
||||
msg = data.message || statusText
|
||||
} else {
|
||||
statusCode = 600
|
||||
msg = error.message || 'Network Error'
|
||||
}
|
||||
|
||||
/* eslint-disable */
|
||||
return Promise.reject({
|
||||
success: false,
|
||||
statusCode,
|
||||
message: msg,
|
||||
})
|
||||
})
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
module.exports = {
|
||||
Color: {
|
||||
green: '#64ea91',
|
||||
blue: '#8fc9fb',
|
||||
purple: '#d897eb',
|
||||
red: '#f69899',
|
||||
yellow: '#f8c82e',
|
||||
peach: '#f797d6',
|
||||
borderBase: '#e5e5e5',
|
||||
borderSplit: '#f4f4f4',
|
||||
grass: '#d6fbb5',
|
||||
sky: '#c1e0fc',
|
||||
},
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user