mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
config cleanup
This commit is contained in:
parent
239e7eca68
commit
028448cc32
@ -14,7 +14,13 @@ module.exports = {
|
||||
endpoint_v3prefix: 'ycorejs_apiv3',
|
||||
endpoint_websocket: 'eu_es01.ragestudio.net',
|
||||
|
||||
storage_appSettings: 'app_settings',
|
||||
storage: {
|
||||
theme: "app_theme",
|
||||
settings: "app_settings",
|
||||
token: "cid",
|
||||
data: "data"
|
||||
},
|
||||
|
||||
storage_authFrame: 'cid',
|
||||
storage_dataFrame: 'data',
|
||||
storage_theme: 'app_theme',
|
||||
@ -43,17 +49,14 @@ module.exports = {
|
||||
{
|
||||
name: 'public',
|
||||
include: [/.*/]
|
||||
},
|
||||
{
|
||||
name: 'splash',
|
||||
include: [/\/splash/]
|
||||
},
|
||||
}
|
||||
],
|
||||
|
||||
// Default Behaviors
|
||||
defaults: {
|
||||
app_model: "app",
|
||||
verbosity: false,
|
||||
sidebarCollaped: false,
|
||||
session_noexpire: false,
|
||||
search_ontype: false,
|
||||
post_autoposition: true,
|
||||
@ -76,5 +79,4 @@ module.exports = {
|
||||
api_maxpayload: '101376',
|
||||
api_maxovertick: 10,
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { app } from 'config'
|
||||
import config from 'config'
|
||||
import { router } from 'core/libs'
|
||||
import { connect } from 'umi'
|
||||
import MenuList from 'schemas/sidebar_menu.json'
|
||||
@ -72,7 +72,7 @@ class Sider extends React.Component {
|
||||
}
|
||||
|
||||
renderByType(type) {
|
||||
const sider_props = { handleClickMenu: this.handleClickMenu, logo: app.LogoPath }
|
||||
const sider_props = { handleClickMenu: this.handleClickMenu, logo: config.app.LogoPath }
|
||||
const filteredMenus = this.filterMenusByType(type)
|
||||
switch (type) {
|
||||
case "desktop": {
|
||||
|
@ -1,7 +1,8 @@
|
||||
import React from 'react';
|
||||
import * as antd from 'antd'
|
||||
import { RefreshCw } from 'components/Icons'
|
||||
import { objectToArrayMap, getCircularReplacer, decycle } from 'core'
|
||||
import { objectToArrayMap } from '@nodecorejs/utils'
|
||||
import { getCircularReplacer, decycle } from 'core'
|
||||
|
||||
const serializeFlags = {
|
||||
__cycle_flag: true // with id 0
|
||||
|
@ -4,7 +4,7 @@ import { imageToBase64 } from 'core'
|
||||
import * as Icons from 'components/Icons'
|
||||
import styles from './index.less'
|
||||
import { connect } from 'umi'
|
||||
import { stricts } from 'config'
|
||||
import config from 'config'
|
||||
import { settings, newSetting } from 'core/libs/settings'
|
||||
|
||||
const PrivacyList = [
|
||||
@ -43,13 +43,13 @@ const PrivacyList = [
|
||||
@connect(({ app }) => ({ app }))
|
||||
class PostCreator extends React.PureComponent {
|
||||
state = {
|
||||
maxFileSize: stricts.api_maxpayload,
|
||||
maxTextLenght: stricts.post_maxlenght,
|
||||
maxFileSize: config.stricts.api_maxpayload,
|
||||
maxTextLenght: config.stricts.post_maxlenght,
|
||||
|
||||
renderValid: false,
|
||||
loading: false,
|
||||
|
||||
textLenght: stricts.post_maxlenght,
|
||||
textLenght: config.stricts.post_maxlenght,
|
||||
rawText: '',
|
||||
posting: false,
|
||||
postingResult: false,
|
||||
|
@ -2,7 +2,7 @@ import moment from 'moment';
|
||||
import { format } from 'timeago.js';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import store from 'store';
|
||||
import { i18n, app } from 'config';
|
||||
import config from 'config';
|
||||
import handle from 'core/libs/errorhandler'
|
||||
import request from 'request'
|
||||
import html2canvas from 'html2canvas'
|
||||
@ -13,29 +13,28 @@ import * as utils from '@nodecorejs/utils'
|
||||
|
||||
const { pathToRegexp } = require('path-to-regexp');
|
||||
|
||||
export const languages = i18n ? i18n.languages.map(item => item.key) : [];
|
||||
export const defaultLanguage = i18n ? i18n.defaultLanguage : '';
|
||||
export const languages = config.i18n ? config.i18n.languages.map(item => item.key) : [];
|
||||
export const defaultLanguage = config.i18n ? config.i18n.defaultLanguage : '';
|
||||
|
||||
import * as libs from './libs'
|
||||
|
||||
export * from '@nodecorejs/utils'
|
||||
export const package_json = require('../../package.json');
|
||||
export const GUID = app.guid;
|
||||
export const GUID = config.app.guid;
|
||||
|
||||
export const clientInfo = {
|
||||
buildStable: getBuild()["stable"],
|
||||
packageName: package_json.name,
|
||||
packageStage: package_json.stage,
|
||||
siteName: app.siteName,
|
||||
siteName: config.app.siteName,
|
||||
version: package_json.version,
|
||||
logo: app.FullLogoPath,
|
||||
logo_dark: app.DarkFullLogoPath,
|
||||
logo: config.app.FullLogoPath,
|
||||
logo_dark: config.app.DarkFullLogoPath,
|
||||
os: platform.os,
|
||||
layout: platform.layout
|
||||
};
|
||||
}
|
||||
|
||||
export function getCircularReplacer() {
|
||||
const seen = new WeakSet();
|
||||
const seen = new WeakSet()
|
||||
return (key, value) => {
|
||||
if (typeof value === "object" && value !== null) {
|
||||
if (seen.has(value)) {
|
||||
@ -250,16 +249,13 @@ export function b64toBlob(b64Data, contentType = '', sliceSize = 512) {
|
||||
* @param {object} payload - Generation Data
|
||||
*/
|
||||
export function downloadDecodedURI(payload) {
|
||||
// TODO: Support encoded
|
||||
if (!payload) return false
|
||||
let { data, type, charset, filename } = payload
|
||||
/**
|
||||
*
|
||||
* @param {object} payload - Generation Data
|
||||
*/
|
||||
if (!data || !type) return false
|
||||
try {
|
||||
if (!filename) {
|
||||
filename = `${app.id}_${time.now()}.${type.split("/")[1]}`
|
||||
filename = `${"download"}_${time.now()}.${type.split("/")[1]}` // TODO: Add package name to title generation
|
||||
}
|
||||
let tmp = document.createElement('a')
|
||||
tmp.href = `data:${type};charset=${charset},${encodeURIComponent(data)}`
|
||||
@ -270,27 +266,6 @@ export function downloadDecodedURI(payload) {
|
||||
}
|
||||
}
|
||||
|
||||
export function downloadEncodedURI(payload) {
|
||||
if (!payload) return false
|
||||
let { data, filename } = payload
|
||||
/**
|
||||
*
|
||||
* @param {object} payload - Generation Data
|
||||
*/
|
||||
if (!data) return false
|
||||
try {
|
||||
if (!filename) {
|
||||
filename = `${app.id}_${time.now()}.${data.split("/")[1].split(";")[0]}`
|
||||
}
|
||||
let tmp = document.createElement('a')
|
||||
tmp.href = data
|
||||
tmp.download = filename
|
||||
tmp.click()
|
||||
} catch (error) {
|
||||
handle({ msg: error, code: 120 })
|
||||
}
|
||||
}
|
||||
|
||||
export function GetPropertyValue(object, dataToRetrieve) {
|
||||
dataToRetrieve.split('.').forEach(function (token) {
|
||||
if (object) object = object[token];
|
||||
|
@ -1,23 +0,0 @@
|
||||
import { verbosity } from '@nodecorejs/utils'
|
||||
import handle from 'core/libs/errorhandler'
|
||||
import { notify } from 'core/libs/ui'
|
||||
import settings from 'core/libs/settings'
|
||||
import endpoints from 'config/endpoints'
|
||||
import { v3_model } from 'core/libs'
|
||||
|
||||
import { getRuntime } from '@nodecore/dot-runtime'
|
||||
|
||||
export function NewFunction(payload, callback){
|
||||
if (!payload) return false
|
||||
const { data } = payload
|
||||
|
||||
return callback(false, null)
|
||||
}
|
||||
|
||||
export const ObjectFunction = {
|
||||
something: (payload, callback) => {
|
||||
return callback(false, null)
|
||||
}
|
||||
}
|
||||
|
||||
export default NewFunction
|
@ -1,2 +0,0 @@
|
||||
import { defaults, app } from 'config'
|
||||
import { get_value } from 'core'
|
@ -1,7 +1,7 @@
|
||||
import { defaults, app } from 'config'
|
||||
import config from 'config'
|
||||
|
||||
export function parseLocalStorage(){
|
||||
const fromStorage = localStorage.getItem(app.storage_appSettings)
|
||||
export function parseLocalStorage() {
|
||||
const fromStorage = localStorage.getItem(config.app.storage.settings)
|
||||
try {
|
||||
return JSON.parse(fromStorage)
|
||||
} catch (error) {
|
||||
@ -20,36 +20,36 @@ export const settings = {
|
||||
get: (key) => {
|
||||
let tmp = [];
|
||||
|
||||
const keys = Object.keys(defaults)
|
||||
const values = Object.values(defaults)
|
||||
const keys = Object.keys(config.defaults)
|
||||
const values = Object.values(config.defaults)
|
||||
const length = keys.length
|
||||
|
||||
|
||||
for (let i = 0; i < length; i++) {
|
||||
if(parseLocalStorage()){
|
||||
if (parseLocalStorage()) {
|
||||
const storagedValue = parseLocalStorage().find(item => {
|
||||
return item.id === keys[i]
|
||||
})
|
||||
if (typeof(storagedValue) == 'undefined') {
|
||||
if (typeof (storagedValue) == 'undefined') {
|
||||
tmp[keys[i]] = values[i]
|
||||
}else{
|
||||
} else {
|
||||
tmp[keys[i]] = storagedValue.value
|
||||
}
|
||||
}
|
||||
else{
|
||||
else {
|
||||
tmp[keys[i]] = values[i]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (key) {
|
||||
return tmp[key]
|
||||
}
|
||||
|
||||
|
||||
return tmp
|
||||
},
|
||||
set: (key, value) => {
|
||||
let tmp
|
||||
let data = parseLocalStorage()
|
||||
|
||||
|
||||
if (data) {
|
||||
const finded = data.find(element => {
|
||||
return element.id === key
|
||||
@ -59,21 +59,21 @@ export const settings = {
|
||||
tmp = parsed
|
||||
} else {
|
||||
const updated = data.map(element => {
|
||||
return element.id === key? Object.assign(element, { value: value }) : element
|
||||
return element.id === key ? Object.assign(element, { value: value }) : element
|
||||
})
|
||||
tmp = updated
|
||||
}
|
||||
}else{
|
||||
tmp = newSetting(key, value)
|
||||
} else {
|
||||
tmp = newSetting(key, value)
|
||||
}
|
||||
data = tmp
|
||||
try {
|
||||
localStorage.setItem( app.storage_appSettings, JSON.stringify(data) )
|
||||
localStorage.setItem(config.app.storage.settings, JSON.stringify(data))
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default (e) => settings.get(e)
|
@ -1,9 +1,9 @@
|
||||
import store from 'store';
|
||||
import { app } from 'config';
|
||||
import config from 'config';
|
||||
import { verbosity } from '@nodecorejs/utils'
|
||||
import ErrorHandler from 'core/libs/errorhandler'
|
||||
|
||||
const { appTheme_desiredContrast, storage_theme } = app
|
||||
const { appTheme_desiredContrast, storage_theme } = config.app
|
||||
|
||||
export const updateRootStyles = (styles) => {
|
||||
const rootContainer = document.getElementById(runtime.mountElementId ?? "root")
|
||||
|
@ -1,8 +1,8 @@
|
||||
import v3_request from 'api/lib/v3_request'
|
||||
import endpointList from 'config/endpoints'
|
||||
import { app } from 'config'
|
||||
import config from 'config'
|
||||
|
||||
const { endpoint_v3prefix } = app;
|
||||
const { endpoint_v3prefix } = config.app;
|
||||
|
||||
export async function api_request(payload, callback) {
|
||||
if (!payload) return false;
|
||||
|
@ -1,4 +1,3 @@
|
||||
import * as user from './user'
|
||||
import * as session from './session'
|
||||
|
||||
export { user, session }
|
||||
export { session }
|
@ -1,94 +0,0 @@
|
||||
import endpoints from 'config/endpoints';
|
||||
import { v3_model } from 'core/libs';
|
||||
|
||||
const set = {
|
||||
data: () => {
|
||||
// TODO
|
||||
},
|
||||
};
|
||||
|
||||
export const get = {
|
||||
data: (parms, callback) => {
|
||||
if (!parms) return false;
|
||||
const { user_id, access_token, serverKey, fetch } = parms;
|
||||
|
||||
let req = {
|
||||
fetch: fetch? fetch : 'user_data'
|
||||
}
|
||||
|
||||
v3_model.api_request(
|
||||
{
|
||||
body: {user_id: user_id, fetch: req.fetch},
|
||||
serverKey: serverKey,
|
||||
userToken: access_token,
|
||||
endpoint: endpoints.get_data
|
||||
|
||||
},
|
||||
(err, res) => {
|
||||
return callback(err, res)
|
||||
},
|
||||
);
|
||||
},
|
||||
basicData: (parms, callback) => {
|
||||
if (!parms) return false
|
||||
|
||||
const { username } = parms
|
||||
|
||||
if (username) {
|
||||
v3_model.api_request(
|
||||
{
|
||||
body: { username },
|
||||
endpoint: endpoints.basicData
|
||||
},
|
||||
(err, res) => {
|
||||
err? console.error(err) : null
|
||||
return callback(false, res);
|
||||
},
|
||||
);
|
||||
|
||||
} else {
|
||||
const res = { status: 105, message: 'Invalid Username!' };
|
||||
return callback(res, false);
|
||||
}
|
||||
},
|
||||
profileData: (parms, callback) => {
|
||||
if (!parms) return false
|
||||
|
||||
const { username, server_key, access_token } = parms
|
||||
|
||||
if (username) {
|
||||
v3_model.api_request(
|
||||
{
|
||||
body: { username, fetch: "user_data" },
|
||||
endpoint: endpoints.profileData,
|
||||
userToken: access_token,
|
||||
serverKey: server_key
|
||||
},
|
||||
(err, res) => {
|
||||
err? console.error(err) : null
|
||||
return callback(false, res);
|
||||
},
|
||||
);
|
||||
|
||||
} else {
|
||||
const res = { status: 105, message: 'Invalid Username!' };
|
||||
return callback(res, false);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export const actions = {
|
||||
block: parms => {
|
||||
if (!parms) return false;
|
||||
const { id, toID } = parms;
|
||||
},
|
||||
find: parms => {
|
||||
if (!parms) return false;
|
||||
const { id, username, email } = parms;
|
||||
},
|
||||
follow: parms => {
|
||||
if (!parms) return false;
|
||||
const { id, toID } = parms;
|
||||
},
|
||||
};
|
||||
|
@ -1,18 +1,15 @@
|
||||
import React from 'react'
|
||||
import { withRouter, connect } from 'umi'
|
||||
import {
|
||||
AppLayout
|
||||
} from 'components'
|
||||
import { AppLayout } from 'components'
|
||||
import { enquireScreen, unenquireScreen } from 'enquire-js'
|
||||
import store from 'store'
|
||||
import classnames from 'classnames'
|
||||
|
||||
import { app } from 'config'
|
||||
import config from 'config'
|
||||
import { theme } from 'core/libs/style'
|
||||
import * as antd from 'antd'
|
||||
import contextMenuList from 'schemas/contextMenu'
|
||||
|
||||
|
||||
const { Content } = antd.Layout
|
||||
const { Sider, Overlay, RightSider } = AppLayout
|
||||
const isActive = (key) => { return key ? key.active : false }
|
||||
@ -23,7 +20,7 @@ export default class PrimaryLayout extends React.Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
collapsed: app.default_collapse_sider ? true : false,
|
||||
collapsed: config.defaults.sidebarCollaped ? true : false,
|
||||
isMobile: false
|
||||
}
|
||||
|
||||
@ -80,10 +77,10 @@ export default class PrimaryLayout extends React.Component {
|
||||
const { isMobile } = this.state
|
||||
if (isMobile !== mobile) {
|
||||
window.isMobile = mobile
|
||||
this.setState({isMobile: mobile})
|
||||
this.setState({ isMobile: mobile })
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import store from 'store'
|
||||
import config from 'config'
|
||||
import keys from 'config/app_keys'
|
||||
import keys from 'config/keys'
|
||||
import { session } from 'core/models'
|
||||
import { verbosity } from '@nodecorejs/utils'
|
||||
import settings from 'core/libs/settings'
|
||||
@ -38,8 +38,8 @@ export default {
|
||||
dispatcher: null,
|
||||
|
||||
electron: null,
|
||||
app_settings: store.get(config.app.storage_appSettings) || [],
|
||||
app_theme: store.get(config.app.storage_theme) || [],
|
||||
app_settings: store.get(config.app.storage.settings) || [],
|
||||
app_theme: store.get(config.app.storage.theme) || [],
|
||||
notifications: [],
|
||||
},
|
||||
subscriptions: {
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { app } from 'config'
|
||||
import { verbosity } from '@nodecorejs/utils'
|
||||
import { objectToArrayMap } from 'core'
|
||||
import config from 'config'
|
||||
import { verbosity, objectToArrayMap } from '@nodecorejs/utils'
|
||||
|
||||
import SocketConnection from 'core/libs/socket/index.ts'
|
||||
|
||||
@ -8,7 +7,7 @@ export default {
|
||||
namespace: 'socket',
|
||||
state: {
|
||||
nodes: {},
|
||||
socket_address: app.endpoint_websocket, //set by default
|
||||
socket_address: config.app.endpoint_websocket, //set by default
|
||||
socket_port: "7000",
|
||||
headerNode: "/"
|
||||
},
|
||||
|
@ -1,18 +1,16 @@
|
||||
import React from 'react'
|
||||
import { pathMatchRegexp, booleanFix, objectToArrayMap } from 'core'
|
||||
import HandleError from 'core/libs/errorhandler'
|
||||
import { Invalid } from 'components'
|
||||
import styles from './index.less'
|
||||
import GlobalBadges from 'schemas/badges_list.json'
|
||||
import * as Icons from 'components/Icons'
|
||||
|
||||
import FollowButton from './components/follow'
|
||||
import Menu from './components/menu'
|
||||
import { PostsFeed } from 'components'
|
||||
|
||||
import * as antd from 'antd'
|
||||
import { verbosity, objectToArrayMap } from '@nodecorejs/utils'
|
||||
import * as Icons from 'components/Icons'
|
||||
import { connect } from 'umi'
|
||||
import { verbosity } from '@nodecorejs/utils'
|
||||
|
||||
import { pathMatchRegexp, booleanFix } from 'core'
|
||||
import HandleError from 'core/libs/errorhandler'
|
||||
import GlobalBadges from 'schemas/badges_list.json'
|
||||
import { Invalid, PostsFeed} from 'components'
|
||||
import FollowButton from './components/follow'
|
||||
|
||||
import styles from './index.less'
|
||||
|
||||
export class UserLayout extends React.Component {
|
||||
state = {
|
||||
|
@ -1,95 +1,3 @@
|
||||
import React from 'react'
|
||||
import ReduxDebugger from 'debuggers/redux'
|
||||
import * as antd from 'antd'
|
||||
import { connect } from 'umi'
|
||||
import { ClusterOutlined } from 'components/Icons'
|
||||
import { objectToArrayMap } from 'core'
|
||||
|
||||
@connect((store) => (store))
|
||||
export default class Index extends React.Component {
|
||||
handleDispatchNamespace(key) {
|
||||
console.log(`Dispatching socket namespace (${key})`)
|
||||
this.props.dispatch({
|
||||
type: "socket/namespaceConnector",
|
||||
node: this.props.socket.headerNode,
|
||||
namespace: key
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
const dispatch = this.props.dispatch
|
||||
const headerNode = this.props.socket.nodes[this.props.socket.headerNode] ?? null
|
||||
|
||||
const getListenersList = (data) => {
|
||||
if (typeof (data) == "undefined" && data == null) {
|
||||
return null
|
||||
}
|
||||
return (
|
||||
objectToArrayMap(data).map(e => {
|
||||
return (
|
||||
<div key={e.key}>
|
||||
<antd.Tag>{e.key} > <antd.Tag color={e.value ? "geekblue" : "orange"} >{e.value ? "Enabled" : "Disable"}</antd.Tag></antd.Tag>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
const getNamespacesMonitor = (data) => {
|
||||
if (typeof (data) == "undefined" && data == null) {
|
||||
return null
|
||||
}
|
||||
return (
|
||||
objectToArrayMap(data).map(e => {
|
||||
return (
|
||||
<div key={e.key} style={{ display: "flex", flexDirection: "column", justifyContent: "center", margin: "0 10px", width: "100%", height: "100%" }}>
|
||||
<h4>{e.value}</h4>
|
||||
<antd.Button onClick={() => { this.handleDispatchNamespace(e.value) }} > connect </antd.Button>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<ReduxDebugger />
|
||||
|
||||
<antd.Card>
|
||||
<h1><ClusterOutlined style={{ marginRight: "7px" }} /> Socket </h1>
|
||||
<antd.Card>
|
||||
<h3> Header Node </h3>
|
||||
<antd.Card>
|
||||
<antd.Tag>{this.props.socket.socket_address}</antd.Tag>
|
||||
<antd.Tag> {headerNode.ioConn.nsp ?? ""} </antd.Tag>
|
||||
<antd.Tag color={headerNode.connectionState ?? "failed" === "connected" ? "green" : "volcano"} > {headerNode.connectionState ?? "destroyed"} </antd.Tag>
|
||||
<antd.Tag color={(headerNode.latency ?? 0) > 60 ? "red" : "green"} > ~{headerNode.latency ?? "not exist"}ms </antd.Tag>
|
||||
</antd.Card>
|
||||
</antd.Card>
|
||||
<antd.Card>
|
||||
<h3> Listener manager </h3>
|
||||
<antd.Card>
|
||||
{getListenersList(headerNode.listeners ?? null)}
|
||||
</antd.Card>
|
||||
</antd.Card>
|
||||
<antd.Card>
|
||||
<h3> Registered Namespaces </h3>
|
||||
<antd.Card>
|
||||
<div style={{ display: "flex", flexDirection: "row", backgroundColor: "#fefefe", overflow: "scroll", textAlign: "center" }}>
|
||||
{getNamespacesMonitor(headerNode.registeredNamespaces ?? null)}
|
||||
</div>
|
||||
</antd.Card>
|
||||
</antd.Card>
|
||||
<antd.Card>
|
||||
<h3> Misc </h3>
|
||||
<antd.Card>
|
||||
<antd.Button onClick={() => { dispatch({ type: "socket/resetHeader" }) }} > Reset HeaderSocket </antd.Button>
|
||||
<antd.Button onClick={() => { dispatch({ type: "app/refreshToken" }) }} > force refreshToken </antd.Button>
|
||||
</antd.Card>
|
||||
</antd.Card>
|
||||
</antd.Card>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default () => {
|
||||
return <div></div>
|
||||
}
|
@ -12,14 +12,14 @@ import RegistrationForm from './register.js'
|
||||
import NormalLoginForm from './login.js'
|
||||
import GuestSession from './guest.js'
|
||||
|
||||
import { app } from 'config'
|
||||
import config from 'config'
|
||||
import { connect } from 'umi'
|
||||
|
||||
const types = [
|
||||
{
|
||||
id: "login",
|
||||
key: 0,
|
||||
renderText: `Sign in ${app.siteName}`
|
||||
renderText: `Sign in ${config.app.siteName}`
|
||||
},
|
||||
{
|
||||
id: "register",
|
||||
|
@ -6,8 +6,6 @@ import HeadShake from 'react-reveal/HeadShake';
|
||||
|
||||
import * as antd from 'antd'
|
||||
|
||||
import { session, user } from 'core/models'
|
||||
|
||||
import { Form, Input, Button, Checkbox } from 'antd'
|
||||
import {
|
||||
UserOutlined,
|
||||
|
@ -16,7 +16,7 @@ import {
|
||||
} from 'antd'
|
||||
|
||||
import ReCAPTCHA from 'react-google-recaptcha'
|
||||
import { g_recaptcha_key } from 'config/app_keys'
|
||||
import { g_recaptcha_key } from 'config/keys'
|
||||
|
||||
export default class RegistrationForm extends React.Component {
|
||||
state = {
|
||||
|
@ -3,7 +3,8 @@ import * as antd from 'antd'
|
||||
import * as Icons from 'components/Icons'
|
||||
import styles from './index.less'
|
||||
import { connect } from 'umi';
|
||||
import { package_json, objectToArrayMap } from 'core'
|
||||
import { package_json } from 'core'
|
||||
import { objectToArrayMap } from '@nodecorejs/utils'
|
||||
|
||||
const AppTech = (info) => {
|
||||
if (!info) return null
|
||||
|
Loading…
x
Reference in New Issue
Block a user