import React from 'react'; import * as ycore from 'ycore' import * as antd from 'antd' import * as Icons from '@ant-design/icons'; import jwt from 'jsonwebtoken' import styles from './style.less' import MainFeed from '../../components/MainFeed'; const UserData = ycore.userData() export default class __m extends React.Component { constructor(props){ super(props), this.state = { s_id: '', coninfo: 'Getting info...', s_token: '', s_ses: '' }; } componentDidMount() { if (ycore.IsThisUser.dev() == false || ycore.IsThisUser.admin() == false) { return ycore.crouter.native('main') } this.handleSID() this.handleToken() } handleSID(){ ycore.get_app_session.get_id((err, response)=> { if (err){ return ycore.notifyError(err) } this.setState({ s_id: response}) }) } handleToken(){ const a = ycore.handlerYIDT.getRaw() const b = jwt.decode(a) this.setState({ s_token: b}) {ycore.ValidLoginSession(res => { this.setState({s_ses: res}) })} } DescompileSDCP(){ let result = {}; for (var i = 0; i < UserData.length; i++) { result[UserData[i].key] = UserData[i].value; } console.log([result]) } render() { const arrayOfSDCP = Object.entries(UserData).map((e) => ( { [e[0]]: e[1] } )); const { UserID, UserToken, expiresIn } = this.state.s_token const { ValidSDCP, ValidCookiesToken, final } = this.state.s_ses const AddDummy = {id: "3", publisher: {id: "1"},post_id: "1", user_id: "48", recipient_id: "0", postText: "New by ID Dummy Payload"} return (

yCore™ Server

Server UID

{ycore.yConfig.server_key}

Your SID

{this.state.s_id}

Current Session

Raw => {JSON.stringify(this.state.s_token)}

UID => {UserID}

Session Token => {UserToken}

expiresIn => {expiresIn}


ValidSDCP => {JSON.stringify(ValidSDCP)}

ValidCookiesToken => {JSON.stringify(ValidCookiesToken)}

Valid? => {JSON.stringify(final)}

Using v{ycore.AppInfo.version} | User @{UserData.username}#{UserData.id} |

Test yCore™

ycore.notifyError('Yep, its not empty, jeje funny')} > Send empty notifyError() ycore.notifyError(` ycore.GetPosts(uid, get, '0', (err, result) => { const parsed = JSON.parse(result)['data'] const isEnd = parsed.length < ycore.AppSettings.limit_post_catch? true : false this.setState({ isEnd: isEnd, data: parsed, loading: false }) })` )} > Send mock notifyError() ycore.notify.error('Error Mock 1')} > notify.error ycore.notify.proccess('Proccess Mock 1')} > notify.proccess

SDCP™

UserData

{ JSON.stringify(arrayOfSDCP) }

MainFeed | ENV Test

ycore.FeedHandler.addToRend(AddDummy)}> ADD DUMMY ycore.FeedHandler.killByID(3)} > KillByID (3)
) } }