From ed38aa12f208a44ababe9b94c6fd7f69450a05c6 Mon Sep 17 00:00:00 2001
From: srgooglo <38926803+srgooglo@users.noreply.github.com>
Date: Thu, 13 Feb 2020 17:58:27 +0100
Subject: [PATCH] Fixed Dependencies & Core Optimization
---
config/theme.config.js | 2 +-
package.json | 110 +-
src/@ycore/ycore_worker.js | 4 +-
src/components/DropOption/DropOption.js | 34 -
src/components/DropOption/package.json | 6 -
src/components/Editor/Editor.js | 17 -
src/components/Editor/Editor.less | 106 --
src/components/Editor/package.json | 6 -
src/components/FilterItem/FilterItem.js | 30 -
src/components/FilterItem/FilterItem.less | 17 -
src/components/FilterItem/package.json | 6 -
src/components/Layout/Control.less | 1 +
src/components/Loader/Loader.less | 1 +
src/components/PostCard/index.less | 1 +
src/components/PostCreator/index.less | 1 +
src/components/ScrollBar/index.less | 1 +
src/components/UserProfile/styles.less | 2 +-
.../YulioID/experimental/formstyle.less | 4 +-
src/components/YulioID/legacy/forms.js | 357 -----
src/components/YulioID/legacy/index.js | 551 -------
src/components/YulioID/legacy/legacy.js | 738 ----------
src/components/YulioID/legacy/model.js | 29 -
src/components/YulioID/legacy/ycore_sdcp.js | 431 ------
src/components/YulioID/legacy/yid.scss | 1285 -----------------
src/components/index.js | 5 +-
src/models/app.js | 27 +-
src/pages/main/index.less | 1 +
27 files changed, 64 insertions(+), 3709 deletions(-)
delete mode 100644 src/components/DropOption/DropOption.js
delete mode 100644 src/components/DropOption/package.json
delete mode 100644 src/components/Editor/Editor.js
delete mode 100644 src/components/Editor/Editor.less
delete mode 100644 src/components/Editor/package.json
delete mode 100644 src/components/FilterItem/FilterItem.js
delete mode 100644 src/components/FilterItem/FilterItem.less
delete mode 100644 src/components/FilterItem/package.json
delete mode 100644 src/components/YulioID/legacy/forms.js
delete mode 100644 src/components/YulioID/legacy/index.js
delete mode 100644 src/components/YulioID/legacy/legacy.js
delete mode 100644 src/components/YulioID/legacy/model.js
delete mode 100644 src/components/YulioID/legacy/ycore_sdcp.js
delete mode 100644 src/components/YulioID/legacy/yid.scss
diff --git a/config/theme.config.js b/config/theme.config.js
index 6a454e54..d9def83d 100644
--- a/config/theme.config.js
+++ b/config/theme.config.js
@@ -3,6 +3,6 @@ const path = require('path')
const lessToJs = require('less-vars-to-js')
module.exports = () => {
- const themePath = path.join(__dirname, '../src/themes/default.less')
+ const themePath = path.join(__dirname, '../src/themes/vars.less')
return lessToJs(fs.readFileSync(themePath, 'utf8'))
}
diff --git a/package.json b/package.json
index 2db34dfd..e73745b1 100644
--- a/package.json
+++ b/package.json
@@ -1,36 +1,29 @@
{
"name": "comty-development",
- "version": "0.1.10",
+ "version": "0.1.13",
"description": "",
"main": "index.js",
"author": "RageStudio",
"license": "ISC",
"dependencies": {
- "@ant-design/pro-layout": "^4.9.11",
- "@lingui/react": "^2.9.0",
+ "@ant-design/pro-layout": "^4.10.13",
+ "@lingui/react": "^2.9.1",
"ant-design-pro": "^2.3.2",
- "antd": "^3.26.3",
- "autoprefixer": "7.1.6",
- "axios": "^0.18.0",
+ "antd": "^3.26.9",
+ "autoprefixer": "9.7.4",
+ "axios": "^0.19.2",
"babel-core": "7.0.0-bridge.0",
"bcryptjs": "^2.4.3",
"body-parser": "^1.19.0",
- "chart.js": "^2.9.3",
"classnames": "^2.2.6",
- "concurrently": "^5.0.2",
- "cryptr": "^4.0.2",
- "dns": "^0.2.2",
+ "concurrently": "^5.1.0",
+ "cryptr": "^6.0.1",
"dotenv": "^8.2.0",
- "draftjs-to-html": "^0.8.4",
- "draftjs-to-markdown": "^0.5.1",
"dva-model-extend": "^0.1.2",
"enquire-js": "^0.2.1",
- "highcharts-exporting": "^0.1.7",
- "highcharts-more": "^0.1.7",
"immutability-helper": "^3.0.1",
"is-empty": "^1.2.0",
"jquery": "^3.4.1",
- "js-cookie": "^2.2.1",
"json-format": "^1.0.1",
"jsonwebtoken": "^8.5.1",
"lodash": "^4.17.15",
@@ -40,84 +33,65 @@
"nprogress": "^0.2.0",
"os-utils": "0.0.14",
"passport": "^0.4.1",
- "passport-auth0": "^1.3.1",
+ "passport-auth0": "^1.3.2",
"passport-jwt": "^4.0.0",
- "path-to-regexp": "^2.4.0",
- "prop-types": "^15.7.0",
- "qs": "^6.9.0",
+ "path-to-regexp": "^6.1.0",
+ "prop-types": "^15.7.2",
+ "qs": "^6.9.1",
"radium": "^0.26.0",
"rc-tween-one": "^2.6.8",
"react-animations": "^1.0.0",
- "react-bootstrap": "^0.32.4",
- "react-chartjs": "^1.2.0",
- "react-chat-elements": "^10.1.1",
- "react-countup": "^4.3.0",
"react-dazzle": "^1.4.0",
- "react-detect-offline": "^2.4.0",
- "react-draft-wysiwyg": "^1.14.1",
"react-fullscreen-crossbrowser": "^1.0.9",
- "react-helmet": "^5.2.0",
- "react-highcharts": "^16.1.0",
+ "react-helmet": "^5.2.1",
"react-iframe": "^1.8.0",
"react-modal": "^3.11.1",
"react-new-window": "^0.1.2",
"react-notifications": "^1.4.3",
- "react-perfect-scrollbar": "^1.4.2",
- "react-plyr": "^2.2.0",
- "react-responsive": "^8.0.1",
+ "react-perfect-scrollbar": "^1.5.8",
+ "react-responsive": "^8.0.3",
"react-router": "^5.1.2",
- "react-scripts": "2.1.1",
- "react-select-country-list": "^2.0.1",
- "react-server-status": "^1.1.1",
+ "react-scripts": "^3.3.1",
+ "react-select-country-list": "^2.1.2",
"react-sound": "^1.2.0",
"recompose": "^0.30.0",
- "simple-oauth2": "^3.1.0",
- "socket.io-client": "^2.1.1",
"store": "^2.0.12",
- "stripe": "^7.14.0",
"ts-cookies": "^1.0.0",
- "uifx": "^1.0.8",
- "umi-plugin-datahub": "^3.2.1",
- "universal-cookie": "^4.0.2",
- "validator": "^12.1.0",
- "websocket": "^1.0.31"
+ "umi-plugin-datahub": "^4.1.0",
+ "validator": "^12.2.0"
},
"devDependencies": {
- "electron-builder": "^20.43.0",
- "electron-devtools-installer": "^2.2.4",
- "electron-reload": "^1.4.0",
- "rimraf": "^2.6.3",
- "wait-on": "^3.2.0",
- "@lingui/babel-preset-react": "^2.9.0",
- "@lingui/cli": "^2.9.0",
- "@lingui/loader": "^2.9.0",
- "@types/react": "^16.9.16",
+ "rimraf": "^3.0.2",
+ "wait-on": "^4.0.0",
+ "@lingui/babel-preset-react": "^2.9.1",
+ "@lingui/cli": "^2.9.1",
+ "@lingui/loader": "^2.9.1",
+ "@types/react": "^16.9.19",
"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": "^3.2.0",
- "cross-env": "^5.2.1",
- "electron": "^7.1.8",
- "eslint": "^5.15.0",
- "eslint-config-react-app": "^3.0.5",
- "eslint-plugin-flowtype": "^3.13.0",
- "eslint-plugin-import": "^2.19.1",
+ "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.6.0",
+ "eslint-plugin-import": "^2.20.1",
"eslint-plugin-jsx-a11y": "^6.2.3",
- "eslint-plugin-react": "^7.17.0",
- "husky": "^1.3.0",
+ "eslint-plugin-react": "^7.18.3",
+ "husky": "^4.2.3",
"less-vars-to-js": "^1.3.0",
- "lint-staged": "^8.1.0",
+ "lint-staged": "^10.0.7",
"mockjs": "^1.1.0",
"module": "^1.2.5",
- "now": "^16.7.0",
- "prettier": "^1.16.0",
- "stylelint": "^9.10.0",
- "stylelint-config-prettier": "^5.3.0",
- "stylelint-config-standard": "^18.2.0",
- "typescript": "^3.7.3",
- "umi": "^2.12.7",
- "umi-plugin-react": "^1.14.10"
+ "now": "^17.0.3",
+ "prettier": "^1.19.1",
+ "stylelint": "^13.1.0",
+ "stylelint-config-prettier": "^8.0.1",
+ "stylelint-config-standard": "^20.0.0",
+ "typescript": "^3.7.5",
+ "umi": "^2.13.3",
+ "umi-plugin-react": "^1.15.2"
},
"lingui": {
"fallbackLocale": "en",
diff --git a/src/@ycore/ycore_worker.js b/src/@ycore/ycore_worker.js
index 0522226c..3c560720 100644
--- a/src/@ycore/ycore_worker.js
+++ b/src/@ycore/ycore_worker.js
@@ -168,7 +168,7 @@ export function ValidLoginSession(){
}
if (SDCPContainer) {
try {
- let SDCPContainerDC = atob(SDCPContainer)
+ atob(SDCPContainer)
ValidSDCP = true
} catch (error) {
return
@@ -337,14 +337,12 @@ export function GetUserData (values, customPayload, callback) {
let resParsed = JSON.parse(resString);
DevOptions.ShowFunctionsLogs ? console.log(prefix, 'Fechted user data...' ) : null
callback( resParsed )
- return resParsed
}
)
.fail(
function (response) {
DevOptions.ShowFunctionsLogs ? console.log(prefix, 'Server failure!', response) : null
callback( null )
- return
}
)
}
diff --git a/src/components/DropOption/DropOption.js b/src/components/DropOption/DropOption.js
deleted file mode 100644
index 99e7d12c..00000000
--- a/src/components/DropOption/DropOption.js
+++ /dev/null
@@ -1,34 +0,0 @@
-import React from 'react'
-import PropTypes from 'prop-types'
-import { Dropdown, Button, Icon, Menu } from 'antd'
-
-const DropOption = ({
- onMenuClick,
- menuOptions = [],
- buttonStyle,
- dropdownProps,
-}) => {
- const menu = menuOptions.map(item => (
-
{item.name}
- ))
- return (
- {menu}
- } {...dropdownProps}>
-
-
-
- )
-}
-
-DropOption.propTypes = {
- onMenuClick: PropTypes.func,
- menuOptions: PropTypes.array.isRequired,
- buttonStyle: PropTypes.object,
- dropdownProps: PropTypes.object,
-}
-
-export default DropOption
diff --git a/src/components/DropOption/package.json b/src/components/DropOption/package.json
deleted file mode 100644
index 0a1dc405..00000000
--- a/src/components/DropOption/package.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "name": "DropOption",
- "version": "0.0.0",
- "private": true,
- "main": "./DropOption.js"
-}
diff --git a/src/components/Editor/Editor.js b/src/components/Editor/Editor.js
deleted file mode 100644
index 3d002511..00000000
--- a/src/components/Editor/Editor.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import React from 'react';
-import { Editor } from 'react-draft-wysiwyg';
-import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';
-import styles from './Editor.less';
-
-const DraftEditor = props => {
- return (
-
- )
-}
-
-export default DraftEditor
diff --git a/src/components/Editor/Editor.less b/src/components/Editor/Editor.less
deleted file mode 100644
index 2cea380a..00000000
--- a/src/components/Editor/Editor.less
+++ /dev/null
@@ -1,106 +0,0 @@
-.wrapper {
- height: 500px;
-
- :global {
- .rdw-dropdownoption-default {
- padding: 6px;
- }
-
- .rdw-dropdown-optionwrapper {
- box-sizing: content-box;
- width: 100%;
- border-radius: 0 0 2px 2px;
- &:hover {
- box-shadow: none;
- }
- }
-
- .rdw-inline-wrapper {
- flex-wrap: wrap;
- margin-bottom: 0;
-
- .rdw-option-wrapper {
- margin-bottom: 6px;
- }
- }
-
- .rdw-option-active {
- box-shadow: 1px 1px 0 #e8e8e8 inset;
- }
-
- .rdw-colorpicker-option {
- box-shadow: none;
- }
-
- .rdw-colorpicker-modal,
- .rdw-embedded-modal,
- .rdw-emoji-modal,
- .rdw-image-modal,
- .rdw-link-modal {
- box-shadow: 4px 4px 40px rgba(0, 0, 0, 0.05);
- }
-
- .rdw-colorpicker-modal,
- .rdw-embedded-modal,
- .rdw-link-modal {
- height: auto;
- }
-
- .rdw-emoji-modal {
- width: 214px;
- }
-
- .rdw-colorpicker-modal {
- width: auto;
- }
-
- .rdw-embedded-modal-btn,
- .rdw-image-modal-btn,
- .rdw-link-modal-btn {
- height: 32px;
- margin-top: 12px;
- }
-
- .rdw-embedded-modal-input,
- .rdw-embedded-modal-size-input,
- .rdw-link-modal-input {
- padding: 2px 6px;
- height: 32px;
- }
-
- .rdw-dropdown-selectedtext {
- color: #000;
- }
-
- .rdw-dropdown-wrapper,
- .rdw-option-wrapper {
- min-width: 36px;
- transition: all 0.2s ease;
- height: 30px;
-
- &:active {
- box-shadow: 1px 1px 0 #e8e8e8 inset;
- }
-
- &:hover {
- box-shadow: 1px 1px 0 #e8e8e8;
- }
- }
-
- .rdw-dropdown-wrapper {
- min-width: 60px;
- }
-
- .rdw-editor-main {
- box-sizing: border-box;
- }
- }
-
- .editor {
- border: 1px solid #f1f1f1;
- padding: 5px;
- border-radius: 2px;
- height: auto;
- min-height: 200px;
- }
-}
diff --git a/src/components/Editor/package.json b/src/components/Editor/package.json
deleted file mode 100644
index 80696262..00000000
--- a/src/components/Editor/package.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "name": "Editor",
- "version": "0.0.0",
- "private": true,
- "main": "./Editor.js"
-}
diff --git a/src/components/FilterItem/FilterItem.js b/src/components/FilterItem/FilterItem.js
deleted file mode 100644
index 6cb14136..00000000
--- a/src/components/FilterItem/FilterItem.js
+++ /dev/null
@@ -1,30 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import styles from './FilterItem.less';
-
-const FilterItem = ({ label = '', children }) => {
- const labelArray = label.split('')
- return (
-
- {
- labelArray.length > 0 ? (
-
- {labelArray.map((item, index) => (
-
- { item }
-
- ))}
-
- ) : ('')
- }
-
{ children }
-
- )
-}
-
-FilterItem.propTypes = {
- label: PropTypes.string,
- children: PropTypes.element.isRequired,
-}
-
-export default FilterItem
diff --git a/src/components/FilterItem/FilterItem.less b/src/components/FilterItem/FilterItem.less
deleted file mode 100644
index c2e98ec5..00000000
--- a/src/components/FilterItem/FilterItem.less
+++ /dev/null
@@ -1,17 +0,0 @@
-.filterItem {
- display: flex;
- justify-content: space-between;
-
- .labelWrap {
- width: 64px;
- line-height: 28px;
- margin-right: 12px;
- justify-content: space-between;
- display: flex;
- overflow: hidden;
- }
-
- .item {
- flex: 1;
- }
-}
diff --git a/src/components/FilterItem/package.json b/src/components/FilterItem/package.json
deleted file mode 100644
index 04c7d8a3..00000000
--- a/src/components/FilterItem/package.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "name": "FilterItem",
- "version": "0.0.0",
- "private": true,
- "main": "./FilterItem.js"
-}
diff --git a/src/components/Layout/Control.less b/src/components/Layout/Control.less
index 261448f2..9e002b99 100644
--- a/src/components/Layout/Control.less
+++ b/src/components/Layout/Control.less
@@ -1,3 +1,4 @@
+@import '~themes/vars.less';
.ControlCard{
background-color: rgba(0, 0, 0, 0.1);
width: auto;
diff --git a/src/components/Loader/Loader.less b/src/components/Loader/Loader.less
index eaa7af13..dadbb586 100644
--- a/src/components/Loader/Loader.less
+++ b/src/components/Loader/Loader.less
@@ -1,3 +1,4 @@
+@import '~themes/vars.less';
.loader {
background-color: rgba(255, 255, 255, 0.945);
width: 100%;
diff --git a/src/components/PostCard/index.less b/src/components/PostCard/index.less
index 76b8d0f8..ca3adc4a 100644
--- a/src/components/PostCard/index.less
+++ b/src/components/PostCard/index.less
@@ -1,3 +1,4 @@
+@import '~themes/vars.less';
.cardWrapper{
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
border-radius: 7px;
diff --git a/src/components/PostCreator/index.less b/src/components/PostCreator/index.less
index 62dec13a..d4917a67 100644
--- a/src/components/PostCreator/index.less
+++ b/src/components/PostCreator/index.less
@@ -1,3 +1,4 @@
+@import '~themes/vars.less';
.cardWrapper{
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
border-radius: 7px;
diff --git a/src/components/ScrollBar/index.less b/src/components/ScrollBar/index.less
index 31e149bc..3b396a81 100644
--- a/src/components/ScrollBar/index.less
+++ b/src/components/ScrollBar/index.less
@@ -1,3 +1,4 @@
+@import '~themes/vars.less';
:global {
.ps--active-x > .ps__rail-x,
.ps--active-y > .ps__rail-y {
diff --git a/src/components/UserProfile/styles.less b/src/components/UserProfile/styles.less
index 73d5febf..f26eb7b3 100644
--- a/src/components/UserProfile/styles.less
+++ b/src/components/UserProfile/styles.less
@@ -1,4 +1,4 @@
-@import '~themes/default';
+@import '~themes/vars.less';
.UserCover {
position: relative;
diff --git a/src/components/YulioID/experimental/formstyle.less b/src/components/YulioID/experimental/formstyle.less
index 923938ae..9a1a23f1 100644
--- a/src/components/YulioID/experimental/formstyle.less
+++ b/src/components/YulioID/experimental/formstyle.less
@@ -1,4 +1,6 @@
- .inputform {
+@import '~themes/vars.less';
+
+.inputform {
:global{
input {
height: 50px;
diff --git a/src/components/YulioID/legacy/forms.js b/src/components/YulioID/legacy/forms.js
deleted file mode 100644
index 1ae723e3..00000000
--- a/src/components/YulioID/legacy/forms.js
+++ /dev/null
@@ -1,357 +0,0 @@
-//****************************************|
-//**** Yulio ID v1.6 *****|
-//****************************************|
-//
-// @ Licensed by RageStudio(c) 2019
-// @ Build 03102019EU21700 F/WIAPIS
-// @ https://api.ragestudio.net/RS-YIBTP
-//
-//****************************************|
-
-import React, { PureComponent } from 'react'
-import PropTypes from 'prop-types'
-import { connect } from 'dva'
-import { Button, Row, Form, Input, Drawer, Icon, Collapse, Select, Checkbox, Result, Layout, message, notification } from 'antd'
-import { Trans, withI18n } from '@lingui/react'
-import { setLocale } from 'utils'
-import { UIFxPY, UIFxList, DevOptions } from 'ycore';
-import { endpoints } from 'ycore';
-import $ from 'jquery';
-import styles from './yid.scss';
-import {resetToken} from './ycore_sdcp.js'
-
-import Cookies from 'universal-cookie';
-import Cryptr from 'cryptr';
-
-const cookies = new Cookies();
-
-const FormItem = Form.Item
-
-@withI18n()
-@connect(({ loading }) => ({ loading }))
-@Form.create()
-class YulioIDForms extends PureComponent {
- constructor() {
- super()
- this.state = {
- // Drawers Visibility (Default on False)
- MainLoginVisible: false,
- NOTFdrawer: false,
- SOTFdrawer: false,
- RGSOTFdrawer: false,
- registerVisible: false,
- ForggotPasswordVisible: false,
- // Arrays
- ErrorType: '',
- FailArray: '',
- username: '',
- password: '',
- server_key: '',
- access_token: '',
- user_data: [],
- ExceptionID: '',
- EXCPMS: '',
- CompleteFORM: '',
- TSDCP: '',
- user_id: '',
- api_response: {},
- api_response_ud: [],
- RGUsername: '',
- RGEmail: '',
- RGPassword: '',
- RGGender: '',
- }
- this.initRegister = this.initRegister.bind(this);
- this.initFPassword = this.initFPassword.bind(this);
- this.cancelRegister = this.cancelRegister.bind(this);
- this.cancelRecoverPassword = this.cancelRecoverPassword.bind(this);
- this.closeNOTF = this.closeNOTF.bind(this);
- this.closeSOTF = this.closeSOTF.bind(this);
- this.closeRGSOTF = this.closeSOTF.bind(this);
-
- }
- // Handlers & others
- handleUsername(text) {
- this.setState({ username: text.target.value })
- }
- handlePassword(text) {
- this.setState({ password: text.target.value })
- }
- handleRGUsername(text) {
- this.setState({ RGUsername: text.target.value })
- }
- handleRGPassword(text) {
- this.setState({ RGPassword: text.target.value })
- }
- handleRGEmail(text) {
- this.setState({ RGEmail: text.target.value })
- }
- handleRGGender(Ivalue) {
- this.setState({ RGGender: Ivalue })
- }
- handleFPEmail(Ivalue) {
- this.setState({ FGEmail: Ivalue })
- }
-
-
- triggerNOTF() {
- this.setState({ NOTFdrawer: true });
- }
- closeNOTF() {
- this.setState({ NOTFdrawer: false });
- }
-
- triggerSOTF() {
- this.setState({ SOTFdrawer: true });
- }
- closeSOTF() {
- this.setState({ SOTFdrawer: false });
- }
-
- triggerRGSOTF() {
- this.setState({ RGSOTFdrawer: true });
- }
- closeRGSOTF() {
- this.setState({ RGSOTFdrawer: false });
- }
-
- cancelRegister() {
- this.setState({ registerVisible: false })
- }
- cancelRecoverPassword(){
- this.setState({ ForggotPasswordVisible: false })
- }
-
- initRegister() {
- var messageListener = message.loading('Initialising YulioID ', 1.5)
- { messageListener }
- if (DevOptions.DisableRegister == false) {
- this.setState({ registerVisible: true })
- }
- else {
- messageListener.then(() => message.error('Cannot connect to YulioID Services (Disabled Register)', 2.5))
- }
- }
-
- initFPassword() {
- var messageListener = message.loading('Initialising YulioID ', 1.5)
- { messageListener }
- if (DevOptions.DisablePasswordRecover == false) {
- this.setState({ ForggotPasswordVisible: true })
- }
- else {
- messageListener.then(() => message.error('Cannot connect to YulioID Services (Disabled Password Recovery)', 2.5))
- }
- }
- ValidateSession() {
- if (DevOptions.DisableLogin == false) {
- this.setState({ MainLoginVisible: true })
- }
- else {
- message.error('Error trying to connect to YulioID services', 2.5)
- $("#ErrorNotification").css({ display: 'block' })
- }
- }
-
- componentDidMount() {
- // INIT
- this.setState({ server_key: endpoints.server_key });
- this.ValidateSession();
-
- const istoken = localStorage.getItem('access_token');
- const isdone = this.state.CompleteFORM;
- const getSDCP = localStorage.getItem('SDCP');
- const availableToken = cookies.get('access_token')
- if (availableToken) {
- resetToken()
- }
-
- if (isdone == 'true') {
- setTimeout(() => { location.reload() }, 3000);
- }
- if (!getSDCP) {
- localStorage.setItem('GetNewData', true);
- }
- }
-render() {
- const { loading, form, i18n } = this.props
- const MensageException = this.state.EXCPMS;
- const ExceptionID = this.state.ExceptionID;
- const { Panel } = Collapse;
-
- const { getFieldDecorator } = this.props.form;
-
- return (
-
- {/* LOGIN SECTION */}
-
-
-
-
-
- YulioID™
- Welcome Back !
-
-
-
-
-
-
-
-
-
-
- {/* REGISTER SECTION */}
-
-
-
- YulioID™
- Register
- Wow congratulations, very soon you will begin to discover rStudio, but first you will have to start by filling out this form
-
-
-
-
-
- {/* FORGOTTEN PASSWORD SECTION */}
-
-
-
- YulioID™
- Forgotten Password!
- To recover your account enter the email used to register
-
-
-
-
-
- {/* NOTF */}
-
-
-
{this.state.FailArray}
-
{MensageException}
-
-
}>
-
-
- STATUS HANDLER => {this.state.ErrorType}
- EXCEPTION => {this.state.api_response}
- EXCEPTION MENSAGE => {MensageException}
- ID {ExceptionID}
-
-
-
-
-
-
-
-
- {/* SOTF */}
-
-
-
Success
- Please wait while process your data ...
-
-
- {/* RGSOTF */}
-
-
-
-
Registered
- Welcome to Dashboard, you will start discovering now
- Please check your new data while we are process you ...
-
-
-
- )
- }
-}
-
-YulioIDForms.propTypes = {
- form: PropTypes.object,
- dispatch: PropTypes.func,
- loading: PropTypes.object,
-}
-
-export default YulioIDForms
\ No newline at end of file
diff --git a/src/components/YulioID/legacy/index.js b/src/components/YulioID/legacy/index.js
deleted file mode 100644
index f4669d1a..00000000
--- a/src/components/YulioID/legacy/index.js
+++ /dev/null
@@ -1,551 +0,0 @@
-//****************************************|
-//**** Yulio ID v1.6 *****|
-//****************************************|
-//
-// @ Licensed by RageStudio(c) 2019
-// @ Build 03102019EU21700 F/WIAPIS
-// @ https://api.ragestudio.net/RS-YIBTP
-//
-//****************************************|
-
-import React, { PureComponent } from 'react'
-import PropTypes from 'prop-types'
-import { connect } from 'dva'
-import { Button, Row, Form, Input, Drawer, Icon, Collapse, Select, Checkbox, Result, Layout, message, notification } from 'antd'
-import { Trans, withI18n } from '@lingui/react'
-import { setLocale } from 'utils'
-import { UIFxPY, UIFxList, DevOptions } from 'ycore';
-import { endpoints } from 'ycore';
-import $ from 'jquery';
-import styles from './yid.scss';
-import './ycore_sdcp';
-import YIDForms from './forms.js'
-
-// import {getUserData, getUserRGData, getRegister, getAuth, resetToken, processError, processSuccess, processRGSuccess, processJSON, processRGJSON} from './loginFunctions.js';
-
-import Cookies from 'universal-cookie';
-import Cryptr from 'cryptr';
-
-const cookies = new Cookies();
-
-const FormItem = Form.Item
-
-@withI18n()
-@connect(({ loading }) => ({ loading }))
-@Form.create()
-class YulioID extends PureComponent {
- constructor() {
- super()
- this.state = {
- // Drawers Visibility (Default on False)
- MainLoginVisible: false,
- NOTFdrawer: false,
- SOTFdrawer: false,
- RGSOTFdrawer: false,
- registerVisible: false,
- ForggotPasswordVisible: false,
- // Arrays
- ErrorType: '',
- FailArray: '',
- username: '',
- password: '',
- server_key: '',
- access_token: '',
- user_data: [],
- ExceptionID: '',
- EXCPMS: '',
- CompleteFORM: '',
- TSDCP: '',
- user_id: '',
- api_response: {},
- api_response_ud: [],
- RGUsername: '',
- RGEmail: '',
- RGPassword: '',
- RGGender: '',
- }
- this.getAuth = this.getAuth.bind(this);
- this.getRegister = this.getRegister.bind(this);
- this.getUserData = this.getUserData.bind(this);
- this.initRegister = this.initRegister.bind(this);
- this.initFPassword = this.initFPassword.bind(this);
- this.cancelRegister = this.cancelRegister.bind(this);
- this.cancelRecoverPassword = this.cancelRecoverPassword.bind(this);
- this.closeNOTF = this.closeNOTF.bind(this);
- this.closeSOTF = this.closeSOTF.bind(this);
- this.closeRGSOTF = this.closeSOTF.bind(this);
- this.processSuccess = this.processSuccess.bind(this);
- this.processRGSuccess = this.processSuccess.bind(this);
- this.processJSON = this.processJSON.bind(this);
- this.processRGJSON = this.processJSON.bind(this);
- }
- // Handlers & others
- handleUsername(text) {
- this.setState({ username: text.target.value })
- }
- handlePassword(text) {
- this.setState({ password: text.target.value })
- }
- handleRGUsername(text) {
- this.setState({ RGUsername: text.target.value })
- }
- handleRGPassword(text) {
- this.setState({ RGPassword: text.target.value })
- }
- handleRGEmail(text) {
- this.setState({ RGEmail: text.target.value })
- }
- handleRGGender(Ivalue) {
- this.setState({ RGGender: Ivalue })
- }
- handleFPEmail(Ivalue) {
- this.setState({ FGEmail: Ivalue })
- }
-
-
- triggerNOTF() {
- this.setState({ NOTFdrawer: true });
- }
- closeNOTF() {
- this.setState({ NOTFdrawer: false });
- }
-
- triggerSOTF() {
- this.setState({ SOTFdrawer: true });
- }
- closeSOTF() {
- this.setState({ SOTFdrawer: false });
- }
-
- triggerRGSOTF() {
- this.setState({ RGSOTFdrawer: true });
- }
- closeRGSOTF() {
- this.setState({ RGSOTFdrawer: false });
- }
-
- cancelRegister() {
- this.setState({ registerVisible: false })
- }
- cancelRecoverPassword(){
- this.setState({ ForggotPasswordVisible: false })
- }
-
- initRegister() {
- var messageListener = message.loading('Initialising YulioID ', 1.5)
- { messageListener }
- if (DevOptions.DisableRegister == false) {
- this.setState({ registerVisible: true })
- }
- else {
- messageListener.then(() => message.error('Cannot connect to YulioID Services (Disabled Register)', 2.5))
- }
- }
-
- initFPassword() {
- var messageListener = message.loading('Initialising YulioID ', 1.5)
- { messageListener }
- if (DevOptions.DisablePasswordRecover == false) {
- this.setState({ ForggotPasswordVisible: true })
- }
- else {
- messageListener.then(() => message.error('Cannot connect to YulioID Services (Disabled Password Recovery)', 2.5))
- }
- }
- ValidateSession() {
- if (DevOptions.DisableLogin == false) {
- this.setState({ MainLoginVisible: true })
- }
- else {
- message.error('Error trying to connect to YulioID services', 2.5)
- $("#ErrorNotification").css({ display: 'block' })
- }
- }
-
- componentDidMount() {
- // INIT
- this.setState({ server_key: endpoints.server_key });
- this.ValidateSession();
-
- const istoken = localStorage.getItem('access_token');
- const isdone = this.state.CompleteFORM;
- const getSDCP = localStorage.getItem('SDCP');
- const availableToken = cookies.get('access_token')
- if (availableToken) {
- this.resetToken()
- }
-
- if (isdone == 'true') {
- setTimeout(() => { location.reload() }, 3000);
- }
- if (!getSDCP) {
- localStorage.setItem('GetNewData', true);
- }
- }
-
- resetToken() {
- let _this = this;
- const tojb1 = endpoints.removeToken;
- const tobj2 = cookies.get('access_token')
- let urlOBJ = `${tojb1}${tobj2}`;
- UIFxPY(UIFxList.notifyWarning)
- var form = new FormData();
- form.append("server_key", endpoints.server_key);
-
-
- var settings = {
- "url": urlOBJ,
- "method": "POST",
- "timeout": 0,
- "processData": false,
- "mimeType": "multipart/form-data",
- "contentType": false,
- "data": form
- };
- $.ajax(settings).done(function (response) {
- notification.open({
- placement: 'topLeft',
- message: 'For continue your request, is necessary to login with YulioID™ again',
- description:
- 'LoginBridge™ report a access token expiration, and is required you for continue login again with security reasons.',
- icon: ,
- });
- cookies.remove('access_token', { path: '/' })
- });
- }
- getUserData() {
- const nonProccesContainer = this.state.api_response;
- const IdFromLRApi = JSON.parse(nonProccesContainer)['user_id'];
- const getStoragedToken = JSON.parse(nonProccesContainer)['access_token'];
-
- var form2 = new FormData();
- form2.append("server_key", endpoints.server_key);
- form2.append("fetch", "user_data,email,username,avatar");
- form2.append("user_id", IdFromLRApi);
-
- let _this = this;
- const yCore_GUDEP = endpoints.get_userData_endpoint;
- let urlOBJ = `${yCore_GUDEP}${getStoragedToken}`;
-
- var settings2 = {
- "url": urlOBJ,
- "method": "POST",
- "timeout": 0,
- "processData": false,
- "mimeType": "multipart/form-data",
- "contentType": false,
- "data": form2
- };
- $.ajax(settings2)
- .done(function (response2) {
- _this.setState({ api_response_ud: response2 }),
- _this.processSuccess();
- })
- }
- getUserRGData() {
- const nonProccesContainer = this.state.api_response;
- const IdFromLRApi = JSON.parse(nonProccesContainer)['user_id'];
- const getStoragedToken = JSON.parse(nonProccesContainer)['access_token'];
-
- var form2 = new FormData();
- form2.append("server_key", endpoints.server_key);
- form2.append("fetch", "user_data,email,username,avatar");
- form2.append("user_id", IdFromLRApi);
-
- let _this = this;
- const yCore_GUDEP = endpoints.get_userData_endpoint;
- let urlOBJ = `${yCore_GUDEP}${getStoragedToken}`;
-
- var settings2 = {
- "url": urlOBJ,
- "method": "POST",
- "timeout": 0,
- "processData": false,
- "mimeType": "multipart/form-data",
- "contentType": false,
- "data": form2
- };
-
- $.ajax(settings2)
- .done(function (response2) {
- _this.setState({ api_response_ud: response2 }),
- _this.processRGSuccess();
- })
-
-
- }
-
- getRegister() {
- $("#loadingRGspn").css({ opacity: 1, "z-index": 5 });
- const username = this.state.RGUsername;
- const password = this.state.RGPassword;
- const email = this.state.RGEmail;
- const confirm_password = this.state.RGPassword;
- const server_key = this.state.server_key;
-
- var form = new FormData();
-
- form.append("server_key", server_key);
- form.append("username", username);
- form.append("email", email);
- form.append("password", password);
- form.append("confirm_password", confirm_password);
-
- var settings = {
- "url": endpoints.register_endpoint,
- "method": "POST",
- "timeout": 0,
- "processData": false,
- "mimeType": "multipart/form-data",
- "contentType": false,
- "data": form,
- };
-
- let _this = this;
- $.ajax(settings)
- .done(function (response) {
- _this.setState({ api_response: response }),
- _this.processRGJSON();
- })
- .fail(function (response) {
-
- _this.setState({
- FailArray: 'Server Failure',
- ErrorType: '1',
- api_response: 'Cannot catch response, Error 500',
- ExceptionID: '500',
- EXCPMS: 'Cannot catch response, Error 500',
-
- }),
- $("#loadingRGspn").css({ opacity: 0, "z-index": -1 }),
- _this.triggerNOTF();
- })
- }
-
- RecoverPassword(inputIO){
- const cookies = new Cookies();
- let _this = this;
- const tojb1 = endpoints.resetPassword_endpoint;
- const tobj2 = cookies.get('access_token')
- let urlOBJ = `${tojb1}${tobj2}`;
- UIFxPY(UIFxList.notifyWarning)
- var form = new FormData();
- form.append("server_key", endpoints.server_key);
- form.append("email", inputIO);
-
- var settings = {
- "url": urlOBJ,
- "method": "POST",
- "timeout": 0,
- "processData": false,
- "mimeType": "multipart/form-data",
- "contentType": false,
- "data": form
- };
- $.ajax(settings).done(function (response) {
- notification.open({
- placement: 'topLeft',
- message: 'The instructions to recover your account have been sent to the email',
- description:
- 'If you cant find the email, try looking for it in the spam folder or try again',
- icon: ,
- });
- console.log(response)
- });
- }
-
- getAuth() {
- $("#loadingspn").css({ opacity: 1, "z-index": 5 });
- const username = this.state.username;
- const password = this.state.password;
- const server_key = this.state.server_key;
-
- var form = new FormData();
-
- form.append("server_key", server_key);
- form.append("username", username);
- form.append("password", password);
- var settings = {
- "url": endpoints.auth_endpoint,
- "method": "POST",
- "timeout": 0,
- "processData": false,
- "mimeType": "multipart/form-data",
- "contentType": false,
- "data": form,
- };
-
- let _this = this;
- $.ajax(settings)
- .done(function (response) {
- _this.setState({ api_response: response }),
- _this.processJSON();
- })
- .fail(function (response) {
-
- _this.setState({
- FailArray: 'Server Failure',
- ErrorType: '1',
- api_response: 'Cannot catch response, Error 500',
- ExceptionID: '500',
- EXCPMS: 'Cannot catch response, Error 500',
-
- }),
- notification.open({
- placement: 'topLeft',
- message: 'Currently our servers are having operating problems',
- description: 'Please be patient until the services become available again, try again later. We apologize for the inconveniences',
- icon:
- }),
- $("#loadingspn").css({ opacity: 0, "z-index": -1 }),
- _this.triggerNOTF();
- })
-
-
- }
-
- processError() {
- const nonProccesContainer = this.state.api_response;
- const stringParsed = JSON.parse(nonProccesContainer)['api_status'];
- const ExceptionMensage = JSON.parse(this.state.api_response)['errors'];
- const ExcepID = ExceptionMensage.error_id;
- const ExceptionMensagePRC = ExceptionMensage.error_text;
-
- if (stringParsed == '400') {
- this.triggerNOTF();
- this.setState({ FailArray: 'Bad credentials' });
- this.setState({
- ErrorType: stringParsed,
- ExceptionID: ExcepID
- });
- $("#loadingspn").css({ opacity: 0, "z-index": -1 });
- $("#loadingRGspn").css({ opacity: 0, "z-index": -1 });
- this.setState({ EXCPMS: ExceptionMensagePRC });
- }
- if (stringParsed == '404') {
- this.triggerNOTF();
- this.setState({ ErrorType: stringParsed });
- $("#loadingspn").css({ opacity: 0, "z-index": -1 });
- $("#loadingRGspn").css({ opacity: 0, "z-index": -1 });
- this.setState({ EXCPMS: ExceptionMensagePRC });
- }
- }
-
- processSuccess() {
- // CREATE SDCP PACKAGE
- const nonProccesContainer = this.state.api_response;
- const accessTokesParsed = JSON.parse(this.state.api_response)['access_token'];
- const userDataParsed = JSON.parse(this.state.api_response_ud)['user_data'];
- this.setState({ user_data: userDataParsed });
- const proccessForParse = JSON.stringify(this.state.user_data);
- const icryptr = new Cryptr(accessTokesParsed);
- const encryptedString = icryptr.encrypt(proccessForParse);
-
- this.setState({ access_token: accessTokesParsed, TSDCP: encryptedString });
-
- cookies.set('access_token', accessTokesParsed, { path: '/' });
- cookies.set('last_api_response', nonProccesContainer, { path: '/' });
- cookies.set('last_api_response_ud', (this.state.TSDCP), { path: '/' });
-
- localStorage.setItem('UIfx', 0.6);
- localStorage.setItem('SDCP', (this.state.TSDCP));
-
- const usernameST = this.state.username;
- const password = this.state.password;
-
- this.triggerSOTF();
-
- const userID = JSON.parse(proccessForParse)['user_id'];
- let avatar = JSON.parse(proccessForParse)['avatar'];
-
- const { dispatch } = this.props;
- let dispatchPayloadValue = { userID, usernameST, avatar, accessTokesParsed };
- setTimeout(function () { dispatch({ type: 'login/login', payload: dispatchPayloadValue }) }, 1300)
- UIFxPY(UIFxList.notifySuccess, 0.5);
- console.log('%c 🎉 Your data has been storaged in SDCP with this values 🎉 =>', 'background: orange; font-size: 16px; color: white; display: block;', dispatchPayloadValue);
-
- }
- processRGSuccess() {
- // CREATE SDCP PACKAGE
- const nonProccesContainer = this.state.api_response;
- const accessTokesParsed = JSON.parse(this.state.api_response)['access_token'];
- const userDataParsed = JSON.parse(this.state.api_response_ud)['user_data'];
- this.setState({ user_data: userDataParsed });
- const proccessForParse = JSON.stringify(this.state.user_data);
- const icryptr = new Cryptr(accessTokesParsed);
- const encryptedString = icryptr.encrypt(proccessForParse);
-
- this.setState({ access_token: accessTokesParsed, TSDCP: encryptedString });
-
- cookies.set('access_token', accessTokesParsed, { path: '/' });
- cookies.set('last_api_response', nonProccesContainer, { path: '/' });
- cookies.set('last_api_response_ud', (this.state.TSDCP), { path: '/' });
-
- localStorage.setItem('UIfx', 0.6);
- localStorage.setItem('SDCP', (this.state.TSDCP));
-
- const usernameST = this.state.RGUsername;
-
- this.triggerRGSOTF();
-
- const userID = JSON.parse(proccessForParse)['user_id'];
- const identADMINType = JSON.parse(proccessForParse)['admin'];
- const identDEVELOPERType = JSON.parse(proccessForParse)['dev'];
-
- let avatar = JSON.parse(proccessForParse)['avatar'];
-
- const { dispatch } = this.props;
- let dispatchPayloadValue = { userID, usernameST, avatar, accessTokesParsed };
- setTimeout(function () { dispatch({ type: 'login/login', payload: dispatchPayloadValue }) }, 1300)
- UIFxPY(UIFxList.notifySuccess, 0.3);
- console.log('%c 🎉 Your data has been storaged in SDCP with this values 🎉 =>', 'background: orange; font-size: 16px; color: white; display: block;', dispatchPayloadValue);
-
- }
-
- processJSON() {
- const nonProccesContainer = this.state.api_response;
- const stringParsed = JSON.parse(nonProccesContainer);
- const identStatus = JSON.parse(nonProccesContainer)['api_status'];
- if (DevOptions.InfiniteLogin == false) {
- if (identStatus == '400') {
- this.processError();
- }
-
- if (identStatus == '200') {
- this.getUserData();
- }
- }
- }
-
- processRGJSON() {
- const nonProccesContainer = this.state.api_response;
- const stringParsed = JSON.parse(nonProccesContainer);
- const identStatus = JSON.parse(nonProccesContainer)['api_status'];
- if (identStatus == '400') {
- $("#loadingRGspn").css({ opacity: 0, "z-index": -1 }),
- this.processError();
- }
-
- if (identStatus == '200') {
- this.getRGUserData();
- }
-
- }
-
- render() {
- const ErrorType = this.state.ErrorType;
- const MensageException = this.state.EXCPMS;
- const ExceptionID = this.state.ExceptionID;
- const { Panel } = Collapse;
-
- return (
-
- )
-}
-}
-
-
-export default YulioID
diff --git a/src/components/YulioID/legacy/legacy.js b/src/components/YulioID/legacy/legacy.js
deleted file mode 100644
index eced2b83..00000000
--- a/src/components/YulioID/legacy/legacy.js
+++ /dev/null
@@ -1,738 +0,0 @@
-//****************************************|
-//**** Yulio ID v1.6 *****|
-//****************************************|
-//
-// @ Licensed by RageStudio(c) 2019
-// @ Build 03102019EU21700 F/WIAPIS
-// @ https://api.ragestudio.net/RS-YIBTP
-//
-//****************************************|
-
-import React, { PureComponent } from 'react'
-import PropTypes from 'prop-types'
-import { connect } from 'dva'
-import { Button, Row, Form, Input, Drawer, Icon, Collapse, Select, Checkbox, Result, Layout, message, notification } from 'antd'
-import { Trans, withI18n } from '@lingui/react'
-import { setLocale } from 'utils'
-import { UIFxPY, UIFxList, DevOptions, avilableSDCP } from 'ycore';
-import { endpoints } from 'ycore';
-import router from 'umi/router'
-import $ from 'jquery';
-import styles from './yid.scss';
-
-// import {getUserData, getUserRGData, getRegister, getAuth, resetToken, processError, processSuccess, processRGSuccess, processJSON, processRGJSON} from './loginFunctions.js';
-
-import Cookies from 'universal-cookie';
-import Cryptr from 'cryptr';
-
-const cookies = new Cookies();
-
-const FormItem = Form.Item
-
-
-const RenderInclude = ({data}) => {if (!data) {return null;} else {return data;}}
-
-
-
-@withI18n()
-@connect(({ loading }) => ({ loading }))
-@Form.create()
-class YulioID extends PureComponent {
-
- constructor(props) {
- super()
- this.state = {
- // Drawers Visibility (Default on False)
- MainLoginVisible: false,
- NOTFdrawer: false,
- SOTFdrawer: false,
- RGSOTFdrawer: false,
- registerVisible: false,
- ForggotPasswordVisible: false,
- // Arrays
- ErrorType: '',
- FailArray: '',
- username: '',
- password: '',
- server_key: '',
- access_token: '',
- user_data: [],
- ExceptionID: '',
- EXCPMS: '',
- CompleteFORM: '',
- TSDCP: '',
- user_id: '',
- api_response: {},
- api_response_ud: [],
- RGUsername: '',
- RGEmail: '',
- RGPassword: '',
- RGGender: '',
- }
- this.getAuth = this.getAuth.bind(this);
- this.getRegister = this.getRegister.bind(this);
- this.getUserData = this.getUserData.bind(this);
- this.initRegister = this.initRegister.bind(this);
- this.initFPassword = this.initFPassword.bind(this);
- this.cancelRegister = this.cancelRegister.bind(this);
- this.cancelRecoverPassword = this.cancelRecoverPassword.bind(this);
- this.closeNOTF = this.closeNOTF.bind(this);
- this.closeSOTF = this.closeSOTF.bind(this);
- this.closeRGSOTF = this.closeSOTF.bind(this);
- this.processSuccess = this.processSuccess.bind(this);
- this.processRGSuccess = this.processSuccess.bind(this);
- this.processJSON = this.processJSON.bind(this);
- this.processRGJSON = this.processJSON.bind(this);
- this.handleKeyDown = this.handleKeyDown.bind(this);
- }
- // Handlers & others
- handleUsername(text) {
- this.setState({ username: text.target.value })
- }
- handlePassword(text) {
- this.setState({ password: text.target.value })
- }
- handleRGUsername(text) {
- this.setState({ RGUsername: text.target.value })
- }
- handleRGPassword(text) {
- this.setState({ RGPassword: text.target.value })
- }
- handleRGEmail(text) {
- this.setState({ RGEmail: text.target.value })
- }
- handleRGGender(Ivalue) {
- this.setState({ RGGender: Ivalue })
- }
- handleFPEmail(Ivalue) {
- this.setState({ FGEmail: Ivalue })
- }
-
- triggerNOTF() {
- this.setState({ NOTFdrawer: true });
- }
- closeNOTF() {
- this.setState({ NOTFdrawer: false });
- }
-
- triggerSOTF() {
- this.setState({ SOTFdrawer: true });
- }
- closeSOTF() {
- this.setState({ SOTFdrawer: false });
- }
-
- triggerRGSOTF() {
- this.setState({ RGSOTFdrawer: true });
- }
- closeRGSOTF() {
- this.setState({ RGSOTFdrawer: false });
- }
-
- cancelRegister() {
- this.setState({ registerVisible: false })
- }
- cancelRecoverPassword(){
- this.setState({ ForggotPasswordVisible: false })
- }
-
- initRegister() {
- var messageListener = message.loading('Initialising YulioID...', 1.5)
- { messageListener }
- if (DevOptions.DisableRegister == false) {
- this.setState({ registerVisible: true })
- }
- else {
- messageListener.then(() => message.error('Cannot connect to YulioID Services (Disabled Register)', 2.5))
- }
- }
-
- initFPassword() {
- var messageListener = message.loading('Initialising YulioID...', 1.5)
- { messageListener }
- if (DevOptions.DisablePasswordRecover == false) {
- this.setState({ ForggotPasswordVisible: true })
- }
- else {
- messageListener.then(() => message.error('Cannot connect to YulioID Services (Disabled Password Recovery)', 2.5))
- }
- }
- ValidateSession() {
- if (DevOptions.DisableLogin == false) {
- this.setState({ MainLoginVisible: true })
- }
- else {
- message.error('Error trying to connect to YulioID services', 2.5)
- $("#ErrorNotification").css({ display: 'block' })
- }
- }
-
- componentDidMount() {
- // INIT
- this.setState({ server_key: endpoints.server_key });
- this.ValidateSession();
-
- const istoken = localStorage.getItem('access_token');
- const isdone = this.state.CompleteFORM;
- const getSDCP = localStorage.getItem('SDCP');
- const availableToken = cookies.get('access_token')
- if (availableToken) {
- this.resetToken()
-
- }
-
- if (isdone == 'true') {
- setTimeout(() => { location.reload() }, 3000);
- }
- if (!getSDCP) {
- localStorage.setItem('GetNewData', true);
- }
- }
-
- resetToken() {
- let _this = this;
- const tojb1 = endpoints.removeToken;
- const tobj2 = cookies.get('access_token')
- let urlOBJ = `${tojb1}${tobj2}`;
- UIFxPY(UIFxList.notifyWarning)
- var form = new FormData();
- form.append("server_key", endpoints.server_key);
-
-
- var settings = {
- "url": urlOBJ,
- "method": "POST",
- "timeout": 0,
- "processData": false,
- "mimeType": "multipart/form-data",
- "contentType": false,
- "data": form
- };
- $.ajax(settings).done(function (response) {
- notification.open({
- placement: 'topLeft',
- message: 'For continue your request, is necessary to login with YulioID™ again',
- description:
- 'LoginBridge™ report a access token expiration, and is required you for continue login again with security reasons.',
- icon: ,
- });
- cookies.remove('access_token', { path: '/' })
- });
- }
- getUserData() {
- const nonProccesContainer = this.state.api_response;
- const IdFromLRApi = JSON.parse(nonProccesContainer)['user_id'];
- const getStoragedToken = JSON.parse(nonProccesContainer)['access_token'];
-
- var form2 = new FormData();
- form2.append("server_key", endpoints.server_key);
- form2.append("fetch", "user_data,email,username,avatar");
- form2.append("user_id", IdFromLRApi);
-
- let _this = this;
- const yCore_GUDEP = endpoints.get_userData_endpoint;
- let urlOBJ = `${yCore_GUDEP}${getStoragedToken}`;
-
- var settings2 = {
- "url": urlOBJ,
- "method": "POST",
- "timeout": 0,
- "processData": false,
- "mimeType": "multipart/form-data",
- "contentType": false,
- "data": form2
- };
- $.ajax(settings2)
- .done(function (response2) {
- _this.setState({ api_response_ud: response2 }),
- _this.processSuccess();
- })
- }
- getUserRGData() {
- const nonProccesContainer = this.state.api_response;
- const IdFromLRApi = JSON.parse(nonProccesContainer)['user_id'];
- const getStoragedToken = JSON.parse(nonProccesContainer)['access_token'];
-
- var form2 = new FormData();
- form2.append("server_key", endpoints.server_key);
- form2.append("fetch", "user_data,email,username,avatar");
- form2.append("user_id", IdFromLRApi);
-
- let _this = this;
- const yCore_GUDEP = endpoints.get_userData_endpoint;
- let urlOBJ = `${yCore_GUDEP}${getStoragedToken}`;
-
- var settings2 = {
- "url": urlOBJ,
- "method": "POST",
- "timeout": 0,
- "processData": false,
- "mimeType": "multipart/form-data",
- "contentType": false,
- "data": form2
- };
-
- $.ajax(settings2)
- .done(function (response2) {
- _this.setState({ api_response_ud: response2 }),
- _this.processRGSuccess();
- })
-
-
- }
-
- getRegister() {
- $("#loadingRGspn").css({ opacity: 1, "z-index": 5 });
- const username = this.state.RGUsername;
- const password = this.state.RGPassword;
- const email = this.state.RGEmail;
- const confirm_password = this.state.RGPassword;
- const server_key = this.state.server_key;
-
- var form = new FormData();
-
- form.append("server_key", server_key);
- form.append("username", username);
- form.append("email", email);
- form.append("password", password);
- form.append("confirm_password", confirm_password);
-
- var settings = {
- "url": endpoints.register_endpoint,
- "method": "POST",
- "timeout": 0,
- "processData": false,
- "mimeType": "multipart/form-data",
- "contentType": false,
- "data": form,
- };
-
- let _this = this;
- $.ajax(settings)
- .done(function (response) {
- _this.setState({ api_response: response }),
- _this.processRGJSON();
- })
- .fail(function (response) {
-
- _this.setState({
- FailArray: 'Server Failure',
- ErrorType: '1',
- api_response: 'Cannot catch response, Error 500',
- ExceptionID: '500',
- EXCPMS: 'Cannot catch response, Error 500',
-
- }),
- $("#loadingRGspn").css({ opacity: 0, "z-index": -1 }),
- _this.triggerNOTF();
- })
- }
-
- RecoverPassword(inputIO){
- const cookies = new Cookies();
- let _this = this;
- const tojb1 = endpoints.resetPassword_endpoint;
- const tobj2 = cookies.get('access_token')
- let urlOBJ = `${tojb1}${tobj2}`;
- UIFxPY(UIFxList.notifyWarning)
- var form = new FormData();
- form.append("server_key", endpoints.server_key);
- form.append("email", inputIO);
-
- var settings = {
- "url": urlOBJ,
- "method": "POST",
- "timeout": 0,
- "processData": false,
- "mimeType": "multipart/form-data",
- "contentType": false,
- "data": form
- };
- $.ajax(settings).done(function (response) {
- notification.open({
- placement: 'topLeft',
- message: 'The instructions to recover your account have been sent to the email',
- description:
- 'If you cant find the email, try looking for it in the spam folder or try again',
- icon: ,
- });
- console.log(response)
- });
- }
-
- getAuth() {
- $("#loadingspn").css({ opacity: 1, "z-index": 5 });
- const username = this.state.username;
- const password = this.state.password;
- const server_key = this.state.server_key;
-
- var form = new FormData();
-
- form.append("server_key", server_key);
- form.append("username", username);
- form.append("password", password);
- var settings = {
- "url": endpoints.auth_endpoint,
- "method": "POST",
- "timeout": 0,
- "processData": false,
- "mimeType": "multipart/form-data",
- "contentType": false,
- "data": form,
- };
-
- let _this = this;
- $.ajax(settings)
- .done(function (response) {
- _this.setState({ api_response: response }),
- _this.processJSON();
- })
- .fail(function (response) {
-
- _this.setState({
- FailArray: 'Server Failure',
- ErrorType: '1',
- api_response: 'Cannot catch response, Error 500',
- ExceptionID: '500',
- EXCPMS: 'Cannot catch response, Error 500',
-
- }),
- notification.open({
- placement: 'topLeft',
- message: 'Currently our servers are having operating problems',
- description: 'Please be patient until the services become available again, try again later. We apologize for the inconveniences',
- icon:
- }),
- $("#loadingspn").css({ opacity: 0, "z-index": -1 }),
- _this.triggerNOTF();
- })
-
-
- }
-
- processError() {
- const nonProccesContainer = this.state.api_response;
- const stringParsed = JSON.parse(nonProccesContainer)['api_status'];
- const ExceptionMensage = JSON.parse(this.state.api_response)['errors'];
- const ExcepID = ExceptionMensage.error_id;
- const ExceptionMensagePRC = ExceptionMensage.error_text;
-
- if (stringParsed == '400') {
- this.triggerNOTF();
- this.setState({ FailArray: 'Bad credentials' });
- this.setState({
- ErrorType: stringParsed,
- ExceptionID: ExcepID
- });
- $("#loadingspn").css({ opacity: 0, "z-index": -1 });
- $("#loadingRGspn").css({ opacity: 0, "z-index": -1 });
- this.setState({ EXCPMS: ExceptionMensagePRC });
- }
- if (stringParsed == '404') {
- this.triggerNOTF();
- this.setState({ ErrorType: stringParsed });
- $("#loadingspn").css({ opacity: 0, "z-index": -1 });
- $("#loadingRGspn").css({ opacity: 0, "z-index": -1 });
- this.setState({ EXCPMS: ExceptionMensagePRC });
- }
- }
-
- processSuccess() {
- // CREATE SDCP PACKAGE
- const nonProccesContainer = this.state.api_response;
- const accessTokesParsed = JSON.parse(this.state.api_response)['access_token'];
- const userDataParsed = JSON.parse(this.state.api_response_ud)['user_data'];
- this.setState({ user_data: userDataParsed });
- const proccessForParse = JSON.stringify(this.state.user_data);
- const icryptr = new Cryptr(accessTokesParsed);
- const encryptedString = icryptr.encrypt(proccessForParse);
-
- this.setState({ access_token: accessTokesParsed, TSDCP: encryptedString });
-
- cookies.set('access_token', accessTokesParsed, { path: '/' });
- cookies.set('last_api_response', nonProccesContainer, { path: '/' });
- cookies.set('last_api_response_ud', (this.state.TSDCP), { path: '/' });
-
- localStorage.setItem('UIfx', 0.6);
- localStorage.setItem('SDCP', (this.state.TSDCP));
-
- const usernameST = this.state.username;
-
- this.triggerSOTF();
-
- const userID = JSON.parse(proccessForParse)['user_id'];
- let avatar = JSON.parse(proccessForParse)['avatar'];
-
- const { dispatch } = this.props;
- let dispatchPayloadValue = { userID, usernameST, avatar, accessTokesParsed };
- setTimeout(function () { dispatch({ type: 'login/login', payload: dispatchPayloadValue }) }, 1300)
- UIFxPY(UIFxList.notifySuccess, 0.5);
- console.log('%c 🎉 Your data has been storaged in SDCP with this values 🎉 =>', 'background: orange; font-size: 16px; color: white; display: block;', dispatchPayloadValue);
-
- }
- processRGSuccess() {
- // CREATE SDCP PACKAGE
- const nonProccesContainer = this.state.api_response;
- const accessTokesParsed = JSON.parse(this.state.api_response)['access_token'];
- const userDataParsed = JSON.parse(this.state.api_response_ud)['user_data'];
- this.setState({ user_data: userDataParsed });
- const proccessForParse = JSON.stringify(this.state.user_data);
- const icryptr = new Cryptr(accessTokesParsed);
- const encryptedString = icryptr.encrypt(proccessForParse);
-
- this.setState({ access_token: accessTokesParsed, TSDCP: encryptedString });
-
- cookies.set('access_token', accessTokesParsed, { path: '/' });
- cookies.set('last_api_response', nonProccesContainer, { path: '/' });
- cookies.set('last_api_response_ud', (this.state.TSDCP), { path: '/' });
-
- localStorage.setItem('UIfx', 0.6);
- localStorage.setItem('SDCP', (this.state.TSDCP));
-
- const usernameST = this.state.RGUsername;
-
- this.triggerRGSOTF();
-
- const userID = JSON.parse(proccessForParse)['user_id'];
- const identADMINType = JSON.parse(proccessForParse)['admin'];
- const identDEVELOPERType = JSON.parse(proccessForParse)['dev'];
-
- let avatar = JSON.parse(proccessForParse)['avatar'];
-
- const { dispatch } = this.props;
- let dispatchPayloadValue = { userID, usernameST, avatar, accessTokesParsed };
- setTimeout(function () { dispatch({ type: 'login/login', payload: dispatchPayloadValue }) }, 1300)
- UIFxPY(UIFxList.notifySuccess, 0.3);
- console.log('%c 🎉 Your data has been storaged in SDCP with this values 🎉 =>', 'background: orange; font-size: 16px; color: white; display: block;', dispatchPayloadValue);
-
- }
-
- processJSON() {
- const nonProccesContainer = this.state.api_response;
- const stringParsed = JSON.parse(nonProccesContainer);
- const identStatus = JSON.parse(nonProccesContainer)['api_status'];
- if (DevOptions.InfiniteLogin == false) {
- if (identStatus == '400') {
- this.processError();
- }
-
- if (identStatus == '200') {
- this.getUserData();
- }
- }
- }
-
- processRGJSON() {
- const nonProccesContainer = this.state.api_response;
- const stringParsed = JSON.parse(nonProccesContainer);
- const identStatus = JSON.parse(nonProccesContainer)['api_status'];
- if (identStatus == '400') {
- $("#loadingRGspn").css({ opacity: 0, "z-index": -1 }),
- this.processError();
- }
-
- if (identStatus == '200') {
- this.getRGUserData();
- }
-
- }
-
- handleKeyDown = (e) => {
- const _this = this;
- if (e.key === 'Enter') {
- this.getAuth
- }
- }
-
-
-
-
- render() {
- const { loading, form, i18n, include} = this.props
- const ErrorType = this.state.ErrorType;
- const MensageException = this.state.EXCPMS;
- const ExceptionID = this.state.ExceptionID;
- const { Panel } = Collapse;
-
- const { getFieldDecorator } = this.props.form;
-
- return (
-
-
-
-
- {/* LOGIN SECTION */}
-
-
-
-
-
- YulioID™
- Welcome Back !
-
-
-
-
-
-
-
-
-
-
-
-
- {/* REGISTER SECTION */}
-
-
-
- YulioID™
- Register
- Wow congratulations, very soon you will begin to discover rStudio, but first you will have to start by filling out this form
-
-
-
-
-
- {/* FORGOTTEN PASSWORD SECTION */}
-
-
-
- YulioID™
- Forgotten Password!
- To recover your account enter the email used to register
-
-
-
-
-
- {/* NOTF */}
-
-
-
{this.state.FailArray}
-
{MensageException}
-
-
}>
-
-
- STATUS HANDLER => {this.state.ErrorType}
- EXCEPTION => {this.state.api_response}
- EXCEPTION MENSAGE => {MensageException}
- ID {ExceptionID}
-
-
-
-
-
-
-
-
- {/* SOTF */}
-
-
-
Success
- Please wait while process your data ...
-
-
- {/* RGSOTF */}
-
-
-
-
Registered
- Welcome to Dashboard, you will start discovering now
- Please check your new data while we are process you ...
-
-
-
- )
- }
-}
-
-YulioID.propTypes = {
- form: PropTypes.object,
- dispatch: PropTypes.func,
- loading: PropTypes.object,
- include: PropTypes.object,
-}
-
-export default YulioID
diff --git a/src/components/YulioID/legacy/model.js b/src/components/YulioID/legacy/model.js
deleted file mode 100644
index cd0694ae..00000000
--- a/src/components/YulioID/legacy/model.js
+++ /dev/null
@@ -1,29 +0,0 @@
-import { router, pathMatchRegexp } from 'utils'
-import api from 'api'
-
-const { legacyloginUser } = api
-
-export default {
- namespace: 'login',
-
- state: {},
-
- effects: {
- *login({ payload }, { put, call, select }) {
- const data = yield call(legacyloginUser, payload)
- const { locationQuery } = yield select(_ => _.app)
- if (data.success) {
- const { from } = locationQuery
- yield put({ type: 'app/query' })
- if (!pathMatchRegexp('/login', from)) {
- if (from === '/') router.push('/dashboard')
- else router.push(from)
- } else {
- router.push('/dashboard')
- }
- } else {
- throw data
- }
- },
- },
-}
diff --git a/src/components/YulioID/legacy/ycore_sdcp.js b/src/components/YulioID/legacy/ycore_sdcp.js
deleted file mode 100644
index 192fad8b..00000000
--- a/src/components/YulioID/legacy/ycore_sdcp.js
+++ /dev/null
@@ -1,431 +0,0 @@
-//****************************************|
-//**** yCore SDCP v1.6 *****|
-//****************************************|
-//
-// @ Licensed by RageStudio(c) 2019
-// @ Build 03102019EU21700 F/WIAPIS
-// @ https://api.ragestudio.net/RS-YIBTP
-//
-//****************************************|
-
-import React, { PureComponent } from 'react'
-import { Form, Icon, message, notification } from 'antd'
-import { UIFxPY, UIFxList, DevOptions } from 'ycoreLegacy';
-import { endpoints } from 'ycoreLegacy';
-import $ from 'jquery';
-
-import Cookies from 'universal-cookie';
-import Cryptr from 'cryptr';
-
-const cookies = new Cookies();
-
-const FormItem = Form.Item
-
-export class SDCP extends PureComponent {
- constructor() {
- super()
- this.state = {
- // Arrays
- ErrorType: '',
- FailArray: '',
- username: '',
- password: '',
- server_key: '',
- access_token: '',
- user_data: [],
- ExceptionID: '',
- EXCPMS: '',
- CompleteFORM: '',
- TSDCP: '',
- user_id: '',
- api_response: {},
- api_response_ud: [],
- RGUsername: '',
- RGEmail: '',
- RGPassword: '',
- RGGender: '',
- }
- this.getAuth = this.getAuth.bind(this);
- this.getRegister = this.getRegister.bind(this);
- this.getUserData = this.getUserData.bind(this);
- this.initRegister = this.initRegister.bind(this);
- this.initFPassword = this.initFPassword.bind(this);
- this.cancelRegister = this.cancelRegister.bind(this);
- this.cancelRecoverPassword = this.cancelRecoverPassword.bind(this);
- this.closeNOTF = this.closeNOTF.bind(this);
- this.closeSOTF = this.closeSOTF.bind(this);
- this.closeRGSOTF = this.closeSOTF.bind(this);
- this.processSuccess = this.processSuccess.bind(this);
- this.processRGSuccess = this.processSuccess.bind(this);
- this.processJSON = this.processJSON.bind(this);
- this.processRGJSON = this.processJSON.bind(this);
- }
-
-
- initRegister(inputIO) {
- var messageListener = message.loading('Initialising YulioID Service..', 2.5)
- { messageListener }
- if (DevOptions.DisableRegister == false) {
- this.setState({ registerVisible: true })
- }
- else {
- messageListener.then(() => message.error('Error trying to connect to YulioID services', 2.5))
- }
- }
-
- initFPassword(inputIO) {
- var messageListener = message.loading('Initialising YulioID Service..', 2.5)
- { messageListener }
- if (DevOptions.DisablePasswordRecover == false) {
- this.setState({ ForggotPasswordVisible: true })
- }
- else {
- messageListener.then(() => message.error('Error trying to connect to YulioID services', 2.5))
- }
- }
- ValidateSession(inputIO) {
- if (DevOptions.DisableLogin == false) {
- this.setState({ MainLoginVisible: true })
- }
- else {
- message.error('Error trying to connect to YulioID services', 2.5)
- $("#ErrorNotification").css({ display: 'block' })
- }
- }
-
- componentDidMount(inputIO) {
- // INIT
- this.setState({ server_key: endpoints.server_key });
- this.ValidateSession();
-
- const istoken = localStorage.getItem('access_token');
- const isdone = this.state.CompleteFORM;
- const getSDCP = localStorage.getItem('SDCP');
- const availableToken = cookies.get('access_token')
- if (availableToken) {
- this.resetToken()
- }
-
- if (isdone == 'true') {
- setTimeout(() => { location.reload() }, 3000);
- }
- if (!getSDCP) {
- localStorage.setItem('GetNewData', true);
- }
- }
-
- resetToken(inputIO) {
- let _this = this;
- const tojb1 = endpoints.removeToken;
- const tobj2 = cookies.get('access_token')
- let urlOBJ = `${tojb1}${tobj2}`;
- UIFxPY(UIFxList.notifyWarning)
- var form = new FormData();
- form.append("server_key", endpoints.server_key);
-
-
- var settings = {
- "url": urlOBJ,
- "method": "POST",
- "timeout": 0,
- "processData": false,
- "mimeType": "multipart/form-data",
- "contentType": false,
- "data": form
- };
- $.ajax(settings).done(function (response) {
- notification.open({
- placement: 'topLeft',
- message: 'For continue your request, is necessary to login with YulioID™ again',
- description:
- 'LoginBridge™ report a access token expiration, and is required you for continue login again with security reasons.',
- icon: ,
- });
- cookies.remove('access_token', { path: '/' })
- });
- }
- getUserData(inputIO) {
- const nonProccesContainer = this.state.api_response;
- const IdFromLRApi = JSON.parse(nonProccesContainer)['user_id'];
- const getStoragedToken = JSON.parse(nonProccesContainer)['access_token'];
-
- var form2 = new FormData();
- form2.append("server_key", endpoints.server_key);
- form2.append("fetch", "user_data,email,username,avatar");
- form2.append("user_id", IdFromLRApi);
-
- let _this = this;
- const yCore_GUDEP = endpoints.get_userData_endpoint;
- let urlOBJ = `${yCore_GUDEP}${getStoragedToken}`;
-
- var settings2 = {
- "url": urlOBJ,
- "method": "POST",
- "timeout": 0,
- "processData": false,
- "mimeType": "multipart/form-data",
- "contentType": false,
- "data": form2
- };
- $.ajax(settings2)
- .done(function (response2) {
- _this.setState({ api_response_ud: response2 }),
- _this.processSuccess();
- })
- }
- getUserRGData(inputIO) {
- const nonProccesContainer = this.state.api_response;
- const IdFromLRApi = JSON.parse(nonProccesContainer)['user_id'];
- const getStoragedToken = JSON.parse(nonProccesContainer)['access_token'];
- var form2 = new FormData();
- form2.append("server_key", endpoints.server_key);
- form2.append("fetch", "user_data,email,username,avatar");
- form2.append("user_id", IdFromLRApi);
- let _this = this;
- const yCore_GUDEP = endpoints.get_userData_endpoint;
- let urlOBJ = `${yCore_GUDEP}${getStoragedToken}`;
- var settings2 = {
- "url": urlOBJ,
- "method": "POST",
- "timeout": 0,
- "processData": false,
- "mimeType": "multipart/form-data",
- "contentType": false,
- "data": form2
- };
- $.ajax(settings2)
- .done(function (response2) {
- _this.setState({ api_response_ud: response2 }),
- _this.processRGSuccess();
- })
- }
-
- getRegister(inputIO) {
- $("#loadingRGspn").css({ opacity: 1, "z-index": 5 });
- const username = this.state.RGUsername;
- const password = this.state.RGPassword;
- const email = this.state.RGEmail;
- const confirm_password = this.state.RGPassword;
- const server_key = this.state.server_key;
- var form = new FormData();
- form.append("server_key", server_key);
- form.append("username", username);
- form.append("email", email);
- form.append("password", password);
- form.append("confirm_password", confirm_password);
- var settings = {
- "url": endpoints.register_endpoint,
- "method": "POST",
- "timeout": 0,
- "processData": false,
- "mimeType": "multipart/form-data",
- "contentType": false,
- "data": form,
- };
- let _this = this;
- $.ajax(settings)
- .done(function (response) {
- _this.setState({ api_response: response }),
- _this.processRGJSON();
- })
- .fail(function (response) {
-
- _this.setState({
- FailArray: 'Server Failure',
- ErrorType: '1',
- api_response: 'Cannot catch response, Error 500',
- ExceptionID: '500',
- EXCPMS: 'Cannot catch response, Error 500',
-
- }),
- $("#loadingRGspn").css({ opacity: 0, "z-index": -1 }),
- _this.triggerNOTF();
- })
- }
-
- RecoverPassword(inputIO){
- const cookies = new Cookies();
- let _this = this;
- const tojb1 = endpoints.resetPassword_endpoint;
- const tobj2 = cookies.get('access_token')
- let urlOBJ = `${tojb1}${tobj2}`;
- UIFxPY(UIFxList.notifyWarning)
- var form = new FormData();
- form.append("server_key", endpoints.server_key);
- form.append("email", inputIO);
-
- var settings = {
- "url": urlOBJ,
- "method": "POST",
- "timeout": 0,
- "processData": false,
- "mimeType": "multipart/form-data",
- "contentType": false,
- "data": form
- };
- $.ajax(settings).done(function (response) {
- notification.open({
- placement: 'topLeft',
- message: 'The instructions to recover your account have been sent to the email',
- description:
- 'If you cant find the email, try looking for it in the spam folder or try again',
- icon: ,
- });
- console.log(response)
- });
- }
-
- getAuth(inputIO) {
- $("#loadingspn").css({ opacity: 1, "z-index": 5 });
- const username = this.state.username;
- const password = this.state.password;
- const server_key = this.state.server_key;
-
- var form = new FormData();
-
- form.append("server_key", server_key);
- form.append("username", username);
- form.append("password", password);
- var settings = {
- "url": endpoints.auth_endpoint,
- "method": "POST",
- "timeout": 0,
- "processData": false,
- "mimeType": "multipart/form-data",
- "contentType": false,
- "data": form,
- };
- let _this = this;
- $.ajax(settings)
- .done(function (response) {
- _this.setState({ api_response: response }),
- _this.processJSON();
- })
- .fail(function (response) {
- _this.setState({
- FailArray: 'Server Failure',
- ErrorType: '1',
- api_response: 'Cannot catch response, Error 500',
- ExceptionID: '500',
- EXCPMS: 'Cannot catch response, Error 500',
-
- }),
- notification.open({
- placement: 'topLeft',
- message: 'Currently our servers are having operating problems',
- description: 'Please be patient until the services become available again, try again later. We apologize for the inconveniences',
- icon:
- }),
- $("#loadingspn").css({ opacity: 0, "z-index": -1 }),
- _this.triggerNOTF();
- })
- }
-
- processError(inputIO) {
- const nonProccesContainer = this.state.api_response;
- const stringParsed = JSON.parse(nonProccesContainer)['api_status'];
- const ExceptionMensage = JSON.parse(this.state.api_response)['errors'];
- const ExcepID = ExceptionMensage.error_id;
- const ExceptionMensagePRC = ExceptionMensage.error_text;
- if (stringParsed == '400') {
- this.triggerNOTF();
- this.setState({ FailArray: 'Bad credentials' });
- this.setState({
- ErrorType: stringParsed,
- ExceptionID: ExcepID
- });
- $("#loadingspn").css({ opacity: 0, "z-index": -1 });
- $("#loadingRGspn").css({ opacity: 0, "z-index": -1 });
- this.setState({ EXCPMS: ExceptionMensagePRC });
- }
- if (stringParsed == '404') {
- this.triggerNOTF();
- this.setState({ ErrorType: stringParsed });
- $("#loadingspn").css({ opacity: 0, "z-index": -1 });
- $("#loadingRGspn").css({ opacity: 0, "z-index": -1 });
- this.setState({ EXCPMS: ExceptionMensagePRC });
- }
- }
-
- processSuccess(inputIO) {
- // CREATE SDCP PACKAGE
- const nonProccesContainer = this.state.api_response;
- const accessTokesParsed = JSON.parse(this.state.api_response)['access_token'];
- const userDataParsed = JSON.parse(this.state.api_response_ud)['user_data'];
- this.setState({ user_data: userDataParsed });
- const proccessForParse = JSON.stringify(this.state.user_data);
- const icryptr = new Cryptr(accessTokesParsed);
- const encryptedString = icryptr.encrypt(proccessForParse);
- this.setState({ access_token: accessTokesParsed, TSDCP: encryptedString });
- cookies.set('access_token', accessTokesParsed, { path: '/' });
- cookies.set('last_api_response', nonProccesContainer, { path: '/' });
- cookies.set('last_api_response_ud', (this.state.TSDCP), { path: '/' });
- localStorage.setItem('UIfx', 0.6);
- localStorage.setItem('SDCP', (this.state.TSDCP));
- const usernameST = this.state.username;
- const password = this.state.password;
- this.triggerSOTF();
- const userID = JSON.parse(proccessForParse)['user_id'];
- let avatar = JSON.parse(proccessForParse)['avatar'];
- const { dispatch } = this.props;
- let dispatchPayloadValue = { userID, usernameST, avatar, accessTokesParsed };
- setTimeout(function () { dispatch({ type: 'login/login', payload: dispatchPayloadValue }) }, 1300)
- UIFxPY(UIFxList.notifySuccess, 0.5);
- console.log('%c 🎉 Your data has been storaged in SDCP with this values 🎉 =>', 'background: orange; font-size: 16px; color: white; display: block;', dispatchPayloadValue);
-
- }
- processRGSuccess(inputIO) {
- // CREATE SDCP PACKAGE
- const nonProccesContainer = this.state.api_response;
- const accessTokesParsed = JSON.parse(this.state.api_response)['access_token'];
- const userDataParsed = JSON.parse(this.state.api_response_ud)['user_data'];
- this.setState({ user_data: userDataParsed });
- const proccessForParse = JSON.stringify(this.state.user_data);
- const icryptr = new Cryptr(accessTokesParsed);
- const encryptedString = icryptr.encrypt(proccessForParse);
- this.setState({ access_token: accessTokesParsed, TSDCP: encryptedString });
- cookies.set('access_token', accessTokesParsed, { path: '/' });
- cookies.set('last_api_response', nonProccesContainer, { path: '/' });
- cookies.set('last_api_response_ud', (this.state.TSDCP), { path: '/' });
- localStorage.setItem('UIfx', 0.6);
- localStorage.setItem('SDCP', (this.state.TSDCP));
- const usernameST = this.state.RGUsername;
- this.triggerRGSOTF();
- const userID = JSON.parse(proccessForParse)['user_id'];
- const identADMINType = JSON.parse(proccessForParse)['admin'];
- const identDEVELOPERType = JSON.parse(proccessForParse)['dev'];
- let avatar = JSON.parse(proccessForParse)['avatar'];
- const { dispatch } = this.props;
- let dispatchPayloadValue = { userID, usernameST, avatar, accessTokesParsed };
- setTimeout(function () { dispatch({ type: 'login/login', payload: dispatchPayloadValue }) }, 1300)
- UIFxPY(UIFxList.notifySuccess, 0.3);
- console.log('%c 🎉 Your data has been storaged in SDCP with this values 🎉 =>', 'background: orange; font-size: 16px; color: white; display: block;', dispatchPayloadValue);
- }
-
- processJSON(inputIO) {
- const nonProccesContainer = this.state.api_response;
- const stringParsed = JSON.parse(nonProccesContainer);
- const identStatus = JSON.parse(nonProccesContainer)['api_status'];
- if (DevOptions.InfiniteLogin == false) {
- if (identStatus == '400') {
- this.processError();
- }
- if (identStatus == '200') {
- this.getUserData();
- }
- }
- }
-
- processRGJSON(inputIO) {
- const nonProccesContainer = this.state.api_response;
- const stringParsed = JSON.parse(nonProccesContainer);
- const identStatus = JSON.parse(nonProccesContainer)['api_status'];
- if (identStatus == '400') {
- $("#loadingRGspn").css({ opacity: 0, "z-index": -1 }),
- this.processError();
- }
- if (identStatus == '200') {
- this.getRGUserData();
- }
- }
-}
diff --git a/src/components/YulioID/legacy/yid.scss b/src/components/YulioID/legacy/yid.scss
deleted file mode 100644
index 6cb1f83d..00000000
--- a/src/components/YulioID/legacy/yid.scss
+++ /dev/null
@@ -1,1285 +0,0 @@
-/* (2.0) YulioID V2 */
-
-@import url('https://cdnjs.cloudflare.com/ajax/libs/simple-line-icons/2.4.1/css/simple-line-icons.min.css');
-@import url('https://fonts.googleapis.com/css?family=Poppins:300,300i,500,500i,700');
-
- .mainlp {
- --neutralShade0: #f8f8f8;
- --neutralShade1: #f2f2f2;
- --neutralShade2: #e8e9e9;
- --neutralShade3: #d1d3d4;
- --neutralShade4: #babdbf;
- --neutralShade5: #808488;
- --neutralShade6: #666a6d;
- --neutralShade7: #4d5052;
- --neutralShade8: #212122;
- --grayColor: #999;
- --lightGrayColor: #ddd;
- --borderRadius: 6px;
- --boxShadow: 0 2px 5px rgba(#333, 0.2);
- }
-
- /*overall layout*/
- .mainlp {
- width: 90%;
- max-width: 1050px;
- margin: 3em auto 0;
- display: grid;
- grid: repeat(5, fit-content(300px))/100%;
- color: var(--foregroundColor);
- text-align: left;
- }
-
- .mainlp .sectionlp {
- border: 1px solid var(--accentColor);
- position: relative;
- padding: 40px 40px 50px;
- }
- .mainlp .sectionlp > h6 {
- color: var(--accentColor);
- background: var(--canvasColor);
- position: absolute;
- top: -10px;
- left: 20px;
- padding: 0 10px;
- }
- .mainlp .sectionlp .h6lp.subheader {
- color: var(--grayColor);
- margin-top: 20px;
- margin-bottom: 20px;
- width: 100%;
- }
-
- @media (max-width: 992px) {
- section:not(:last-child) {
- border-width: 0 0 1px;
- }
-
- section:last-child {
- border-width: 0;
- }
- }
- @media (min-width: 992px) {
- main {
- grid: repeat(9, auto)/45% 1fr 45%;
- grid-auto-flow: dense;
- }
-
- .media-card-1 {
- grid-column: 1 / 2;
- border-width: 1px 0;
- }
-
- .media-card-2 {
- grid-column: 2 / 4;
- border-width: 1px 0 1px 1px;
- }
-
- .media-card-3 {
- grid-column: 1 / 4;
- border-width: 0;
- }
-
- .filter-section {
- grid-column: 3 / 4;
- grid-row: 1 / 2;
- border-width: 0 0 0 1px;
- }
-
- .well-cta-1 {
- grid-row: 3;
- grid-column: 1 / 3;
- border-width: 1px 1px 0 0;
- }
-
- .well-cta-2 {
- grid-row: 2;
- grid-column: 2 / 4;
- border-width: 1px 0 0;
- }
-
- .tables {
- grid-row: 4;
- grid-column: 1 / -1;
- border-width: 1px 0 0;
- }
-
- .forms {
- grid-column: 1 / 3;
- border-width: 0;
- }
-
- .comments {
- grid-row: 2;
- grid-column: 1 / 2;
- border-width: 1px 1px 0 0;
- padding-top: 60px;
- }
-
- .modals {
- grid-row: 3;
- grid-column: 3 / 4;
- justify-content: center;
- border-width: 1px 0 0;
- }
- }
-
-
- /*checkboxes*/
- input:disabled ~ * {
- opacity: 0.3;
- user-select: none;
- pointer-events: none;
- }
-
- .checkboxtoggle input {
- display: none;
- }
- .checkboxtoggle label {
- outline: 0;
- display: block;
- width: 45px;
- height: 16px;
- background: var(--grayColor);
- position: relative;
- cursor: pointer;
- border-radius: 2em;
- padding: 2px;
- transition: all 0.4s ease;
- margin: 0;
- }
- .checkboxtoggle .labellp:after {
- position: relative;
- display: block;
- content: "";
- width: 20px;
- height: 20px;
- border-radius: 50%;
- background: #fff;
- transition: all 0.2s ease;
- border: 1px solid var(--grayColor);
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
- left: -4px;
- top: -5px;
- }
- .checkboxtoggle input:checked + .labellp {
- background: var(--accent2Color);
- }
- .checkboxtoggle input:checked + .labellp:after {
- left: 52%;
- }
-
- .checkbox {
- position: relative;
- user-select: none;
- margin-bottom: 10px;
- }
- .checkbox input {
- display: none;
- }
- .checkbox .labellp {
- position: relative;
- vertical-align: middle;
- cursor: pointer;
- font-weight: 500;
- padding-left: 35px;
- }
- .checkbox .spanlp.box {
- display: inline-block;
- width: 20px;
- border-radius: var(--borderRadius);
- border: 1px solid var(--grayColor);
- width: 24px;
- height: 24px;
- vertical-align: middle;
- margin-right: 3px;
- transition: 0.3s ease;
- position: absolute;
- left: 0;
- }
- .checkbox .spanlp.box:before, .checkbox .spanlp.box:after {
- content: "";
- position: absolute;
- width: 4px;
- height: 16px;
- border-radius: 40px;
- background: var(--backgroundColor);
- transition: all 0.3s ease;
- }
- .checkbox .spanlp.box:before {
- transform: rotate(45deg) translateY(-5px) translateX(10px) scale(0);
- }
- .checkbox .spanlp.box:after {
- height: 8px;
- transform: rotate(-45deg) translateY(10px) translateX(-4px) scale(0);
- }
- .checkbox input:checked + .labellp .spanlp.box {
- background: var(--accent2Color);
- border-color: var(--accent2Color);
- }
- .checkbox input:checked + .labellp .spanlp.box:before {
- transform: rotate(45deg) translateY(-5px) translateX(10px) scale(1);
- }
- .checkbox input:checked + .labellp .spanlp.box:after {
- height: 8px;
- transform: rotate(-45deg) translateY(10px) translateX(-4px) scale(1);
- }
- .checkbox input:disabled:checked + .spanlp.box {
- background: var(--grayColor);
- border: var(--grayColor);
- }
- .checkbox input:disabled:checked ~ .labellp:before, .checkbox input:disabled:checked ~ .labellp:after {
- background: black;
- }
-
- /*buttons & links*/
- .links__sec {
- margin: 10px 0 30px;
- }
- .links a.link {
- display: inline;
- margin: 10px 30px 5px 0;
- border-bottom: 2px dashed;
- font-weight: 500;
- line-height: 2.5;
- cursor: pointer;
- color: var(--neutralShade5);
- }
- .links a.link:hover, .links a.link.hover {
- color: var(--neutralShade6);
- border-bottom: 2px solid;
- }
- .links a.link.primary {
- color: var(--primaryColor);
- }
- .links a.link.primary:hover, .links a.link.primary.hover {
- color: var(--primaryShade5);
- }
- .links a.link.secondary {
- color: var(--secondaryColor);
- }
- .links a.link.secondary:hover, .links a.link.secondary.hover {
- color: var(--secondaryShade5);
- }
-
- .buttons {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- }
- .buttons > * {
- flex: 1 1 calc(50% - 20px);
- margin-top: 20px;
- }
- .buttons > *:nth-child(odd) {
- margin-right: 20px;
- }
-
- a.buttonlp,
- input.buttonlp,
- .buttonlp {
- outline: none;
- width: 100%;
- text-align: center;
- display: inline-block;
- border: none;
- font: 500 16px/1 "Poppins", sans-serif;
- padding: 20px;
- cursor: pointer;
- border-radius: var(--borderRadius);
- background: var(--primaryColor);
- color: var(--backgroundColor);
- position: relative;
- top: 0;
- transition: 0.2s ease;
- }
- a.buttonlp:hover, a.buttonlp.hover,
- input.buttonlp:hover,
- input.buttonlp.hover,
- .buttonlp:hover,
- .buttonlp.hover {
- top: -3px;
- box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
- }
- a.buttonlp:active, a.buttonlp.active,
- input.buttonlp:active,
- .input.buttonlp.active,
- .buttonlp:active,
- .buttonlp.active {
- background: var(--primaryShade4);
- outline: none;
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
- top: 0;
- }
- a.buttonlp.disabled,
- input.buttonlp.disabled,
- .buttonlp.disabled {
- opacity: 0.4;
- user-select: none;
- pointer-events: none;
- }
- a.buttonlp.medium,
- input.buttonlp.medium,
- .buttonlp.medium {
- padding: 15px 18px;
- width: auto;
- }
- a.buttonlp.small,
- input.buttonlp.small,
- .buttonlp.small {
- padding: 10px 12px;
- width: auto;
- font-size: 14px;
- font-weight: 500;
- }
- a.buttonlp.secondary,
- input.buttonlp.secondary,
- .buttonlp.secondary {
- background: var(--secondaryColor);
- }
- a.buttonlp.secondary:active, a.buttonlp.secondary:focus, a.buttonlp.secondary.active,
- input.buttonlp.secondary:active,
- input.buttonlp.secondary:focus,
- input.buttonlp.secondary.active,
- .buttonlp.secondary:active,
- .buttonlp.secondary:focus,
- .buttonlp.secondary.active {
- background: var(--secondaryShade4);
- outline: none;
- }
- a.buttonlp.accent,
- input.buttonlp.accent,
- .buttonlp.accent {
- background: var(--accentColor);
- }
- a.buttonlp.accent:active, a.buttonlp.accent:focus, a.buttonlp.accent.active,
- input.buttonlp.accent:active,
- input.buttonlp.accent:focus,
- input.buttonlp.accent.active,
- .buttonlp.accent:active,
- .buttonlp.accent:focus,
- .buttonlp.accent.active {
- background: var(--accentShade4);
- }
- a.buttonlp.accent2,
- input.buttonlp.accent2,
- .buttonlp.accent2 {
- background: var(--accent2Color);
- }
- a.buttonlp.accent2:active, a.buttonlp.accent2:focus, a.buttonlp.accent2.active,
- input.buttonlp.accent2:active,
- input.buttonlp.accent2:focus,
- input.buttonlp.accent2.active,
- .buttonlp.accent2:active,
- .buttonlp.accent2:focus,
- .buttonlp.accent2.active {
- background: var(--accent2Shade4);
- }
- a.buttonlp.accent3,
- input.buttonlp.accent3,
- .buttonlp.accent3 {
- background: var(--accent3Color);
- }
- a.buttonlp.accent3:active, a.buttonlp.accent3:focus, a.buttonlp.accent3.active,
- input.buttonlp.accent3:active,
- input.buttonlp.accent3:focus,
- input.buttonlp.accent3.active,
- .buttonlp.accent3:active,
- .buttonlp.accent3:focus,
- .buttonlp.accent3.active {
- background: var(--accent3Shade4);
- }
-
- /*inputs*/
- .input__wrapper {
- margin-bottom: 10px;
- }
- .inputRG__wrapper {
- margin-bottom: 0px;
- }
-
- .labelform {
- font-weight: 500;
- display: block;
- margin-bottom: 5px;
- }
-
- input.inputform,
- select,
- textarea {
- height: 50px;
- font-size: 16px;
- border: 2px solid var(--neutralShade3);
- width: 100%;
- padding: 12px;
- font-family: "Poppins";
- border-radius: var(--borderRadius);
- color: var(--foregroundColor);
- background: var(--backgroundColor);
- }
- input.inputform:focus, input.inputform.active,
- select:focus,
- select.active,
- textarea:focus,
- textarea.active {
- outline: none;
- border-color: var(--primaryColor);
- }
- input.inputform:disabled,
- select:disabled,
- textarea:disabled {
- cursor: not-allowed;
- background: var(--neutralShade1);
- opacity: 0.6;
- }
-
- input.inputform.input {
- height: 56px;
- font-size: 18px;
- padding: 15px;
- }
-
- .TOSAccept {
- margin: 7px;
- }
- .TOSAccept span::first-letter {
- color: blue;
- }
-
- /*badges*/
- .badge {
- display: inline-block;
- padding: 6px 12px;
- border-radius: 50px;
- font-weight: 500;
- text-transform: uppercase;
- line-height: 1;
- }
-
- .alert {
- margin-bottom: 15px;
- display: block;
- padding: 10px 15px;
- border-radius: var(--borderRadius);
- font-weight: 500;
- position: relative;
- cursor: pointer;
- }
- .alert.non-collapsible:before, .alert.non-collapsible:after {
- content: none;
- }
- .alert:before, .alert:after {
- content: "";
- position: absolute;
- width: 4px;
- height: 16px;
- border-radius: 40px;
- right: 30px;
- top: 8px;
- }
- .alert:before {
- transform: rotate(45deg) translateY(-5.5px) translateX(13.5px);
- }
- .alert:after {
- transform: rotate(-45deg) translateY(13.5px) translateX(5.5px);
- }
-
- .status-primary {
- background: var(--primaryShade1);
- color: var(--primaryShade5);
- }
- .status-primary:before, .status-primary:after {
- background: var(--primaryShade5);
- }
-
- .status-secondary {
- background: var(--secondaryShade1);
- color: var(--secondaryShade5);
- }
- .status-secondary:before, .status-secondary:after {
- background: var(--secondaryShade5);
- }
-
- .status-info {
- background: var(--accentShade1);
- color: var(--accentShade5);
- }
- .status-info:before, .status-info:after {
- background: var(--accentShade5);
- }
-
- .status-success {
- background: var(--accent2Shade1);
- color: var(--accent2Shade5);
- }
- .status-success:before, .status-success:after {
- background: var(--accent2Shade5);
- }
-
- .status-error {
- background: var(--accent3Shade1);
- color: var(--accent3Shade5);
- }
- .status-error:before, .status-error:after {
- background: var(--accent3Shade5);
- }
-
- /*tooltips*/
- .tooltip {
- cursor: pointer;
- position: relative;
- display: block;
- width: 100%;
- text-align: center;
- z-index: 10;
- }
- .tooltip .spanlp {
- border-bottom: 1px dotted;
- }
- .tooltip:after {
- content: attr(data-tooltip);
- background: var(--neutralShade2);
- max-width: 90%;
- width: auto;
- position: absolute;
- left: 0;
- right: 0;
- margin: auto;
- opacity: 0;
- height: auto;
- font-size: 14px;
- padding: 10px;
- border-radius: var(--borderRadius);
- color: var(--foregroundColor);
- text-align: center;
- }
- .tooltip.dark:after {
- background: var(--neutralShade7);
- color: var(--backgroundColor);
- }
- .tooltip.top:after {
- bottom: 80%;
- transition: opacity 0.3s ease 0.3s, bottom 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s;
- }
- .tooltip.top:hover:after, .tooltip.top.hovered:after {
- bottom: 130%;
- opacity: 1;
- }
- .tooltip.bottom:after {
- top: 80%;
- transition: opacity 0.3s ease 0.3s, top 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s;
- }
- .tooltip.bottom:hover:after, .tooltip.bottom.hovered:after {
- top: 130%;
- opacity: 1;
- }
-
- /*spinner*/
- .spinner + .labellp {
- font-size: 14px;
- font-weight: 500;
- margin-top: 8px;
- display: inline-block;
- text-transform: uppercase;
- color: var(--primaryShade4);
- }
-
- .spinner1 .spinner {
- max-width: 50px;
- margin: auto;
- height: 20px;
- position: relative;
- }
- .spinner1 .spinner:after {
- content: "";
- position: absolute;
- width: 20px;
- height: 20px;
- left: -10%;
- background: var(--primaryColor);
- animation: spinnerLeftRight 1s infinite;
- }
- .spinner1 .spinner:before {
- content: "";
- position: absolute;
- width: 20px;
- height: 20px;
- left: -10%;
- background: var(--primaryShade2);
- opacity: 1;
- animation: spinnerLeftRight 1s infinite 0.06s;
- }
-
- @keyframes spinnerLeftRight {
- 0% {
- left: 85%;
- }
- 50% {
- left: -10%;
- }
- 100% {
- left: 85%;
- }
- }
-
-
- #sunset + .labellp {
- background: linear-gradient(to right, #ff9557 50%, #ffcc67 50%);
- }
- .mainlp {
- --canvasColor: #f9f9f9;
- --backgroundColor: #fff;
- --foregroundColor: #111;
- --primaryColor: #373F51;
- --primaryShade1: #ffe2d1;
- --primaryShade2: #ffceb2;
- --primaryShade3: #ffb184;
- --primaryShade4: #e88850;
- --primaryShade5: #d17a48;
- --secondaryColor: #ffcc67;
- --secondaryShade1: #fff1d5;
- --secondaryShade2: #ffde9e;
- --secondaryShade3: #ffd074;
- --secondaryShade4: #e8ba5e;
- --secondaryShade5: #ba954b;
- --accentColor: #4e5166;
- --accentShade1: #cecfd5;
- --accentShade2: #aeafb9;
- --accentShade3: #8e909d;
- --accentShade4: #6e7081;
- --accentShade5: #404354;
- --accent2Color: #588b8b;
- --accent2Shade1: #c2d4d4;
- --accent2Shade2: #a3bfbf;
- --accent2Shade3: #85aaaa;
- --accent2Shade4: #507f7f;
- --accent2Shade5: #497272;
- --accent3Color: #fe5f55;
- --accent3Shade1: #fec4c1;
- --accent3Shade2: #fea7a2;
- --accent3Shade3: #fe7c73;
- --accent3Shade4: #e7574e;
- --accent3Shade5: #b9463e;
- }
-
-
-
- /* PROFILE CARDS */
- .profile {
- position: relative;
- background: var(--backgroundColor);
- color: var(--foregroundColor);
- box-shadow: 0 3px 15px rgba(51, 51, 51, 0.2);
- border-radius: 10px;
- overflow: hidden;
- transition: .2s ease;
- display: grid;
- grid: 200px repeat(5, auto)/100%;
- }
- .profile__image img {
- width: 100%;
- height: 100%;
- object-fit: cover;
- border-bottom: 7px solid var(--secondaryColor);
- }
- .profile__info {
- padding: 20px 25px 0;
- }
- .profile__stats {
- padding: 5px 25px;
- }
- .profile__stats__title {
- color: var(--grayColor);
- text-transform: uppercase;
- font-size: 16px;
- }
- .profile__cta {
- padding: 0 25px 25px;
- }
- .profile a:hover {
- top: 0;
- box-shadow: none;
- background: var(--primaryShade4);
- }
- .profile a:active, .profile a:focus {
- top: 0;
- box-shadow: none;
- background: var(--primaryShade5);
- }
-
- @media (min-width: 500px) {
- .profile-default {
- min-width: 500px;
- max-width: 450px;
- margin: auto;
- overflow: hidden;
- grid: 340px auto auto/repeat(3, minmax(80px, 1fr));
- grid-gap: 10px;
- }
- .profile-default .profile__image {
- grid-column: span 3;
- }
- .profile-default .profile__info {
- grid-column: span 3;
- }
- .profile-default .profile__stats {
- padding: 5px 25px;
- }
- .profile-default .profile__cta {
- grid-column: span 3;
- }
- }
- @media (min-width: 768px) {
- .profile-long {
- grid-template-columns: 150px repeat(3, 1fr) auto;
- grid-template-rows: auto auto;
- width: 100%;
- padding-right: 20px;
- }
- .profile-long .profile__image {
- grid-column: 1 / 2;
- grid-row: 1 / 3;
- margin-right: 20px;
- }
- .profile-long .profile__image img {
- border-radius: 10px 0 0 10px;
- border: none;
- }
- .profile-long .profile__info {
- grid-column: 2 / 6;
- grid-row: 1;
- padding: 20px 20px 15px 0;
- }
- .profile-long .profile__stats {
- min-width: 100px;
- padding: 15px 0;
- border-top: 0.5px solid var(--grayColor);
- grid-row: 2 / 3;
- }
- .profile-long .profile__stats:nth-child(3) {
- grid-column: 2 / 3;
- }
- .profile-long .profile__stats:nth-child(4) {
- grid-column: 3 / 4;
- }
- .profile-long .profile__stats:nth-child(5) {
- grid-column: 4 / 5;
- }
- .profile-long .profile__cta {
- grid-row: 2 / 3;
- grid-column: 5 / 6;
- border-top: 0.5px solid var(--grayColor);
- padding: 15px 0 0;
- }
- }
- .profile-imgonly {
- border-radius: 10px;
- overflow: hidden;
- min-width: 250px;
- width: 100%;
- grid: 480px 0px / 100%;
- }
- .profile-imgonly:hover {
- grid: 434px 56px / 100%;
- }
- .profile-imgonly .profile__image, .profile-imgonly .profile__info {
- grid-row: 1 / 2;
- grid-column: 1 / 2;
- }
- .profile-imgonly .profile__image {
- position: relative;
- }
- .profile-imgonly .profile__image:after {
- content: '';
- position: absolute;
- bottom: 0;
- left: 0;
- width: 100%;
- height: 30%;
- background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
- }
- .profile-imgonly .profile__image img {
- border: none;
- }
- .profile-imgonly .profile__stats {
- display: none;
- }
- .profile-imgonly .profile__info {
- z-index: 5;
- grid-row: 1 / 2;
- align-self: end;
- margin: 0 0 15px;
- color: #fff;
- text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
- }
- .profile-imgonly .profile__info p {
- display: none;
- }
- .profile-imgonly .profile__cta {
- padding: 0;
- }
- .profile-imgonly .profile__cta a {
- border-radius: 0;
- }
-
- #dark:checked ~ .mainlp a.buttonlp,
- #pinkaru:checked ~ .mainlp a.buttonlp {
- color: var(--foregroundColor);
- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
- }
- #dark:checked ~ .mainlp .buttonlp:hover,
- #pinkaru:checked ~ .mainlp .buttonlp:hover {
- background: var(--primaryShade2);
- }
- #dark:checked ~ .mainlp .buttonlp:active,
- #pinkaru:checked ~ .mainlp .buttonlp:active {
- background: var(--primaryShade1);
- }
- #dark:checked ~ .mainlp .profile-default img,
- #pinkaru:checked ~ .mainlp .profile-default img {
- border-bottom: 7px solid var(--secondaryShade5);
- }
-
- /*FILTERS*/
- .filters__title {
- font-size: 18px;
- color: var(--grayColor);
- margin: 25px 0;
- }
- .filters__item {
- display: grid;
- grid-template-columns: 1fr auto;
- align-items: center;
- margin-bottom: 10px;
- }
- .filters__item .checkbox {
- position: relative;
- margin: 0;
- }
- .filters__item .checkbox .tooltip {
- display: inline-block;
- margin-left: 10px;
- width: auto;
- vertical-align: middle;
- }
- .filters__item .checkbox .tooltip .spanlp {
- border: none;
- }
- .filters__item .checkbox .tooltip:after {
- min-width: 100px;
- margin-left: -50px;
- }
- .filters:not(:first-of-type) {
- border-top: 0.5px solid var(--lightGrayColor);
- margin-top: 25px;
- }
-
- /* WELL CTA */
- .well-cta {
- border-radius: 10px;
- background: var(--secondaryColor);
- color: var(--foregroundColor);
- overflow: hidden;
- }
- .well-cta__text {
- padding: 30px;
- }
- .well-cta__text p {
- font-size: 18px;
- line-height: 1.5;
- }
- .well-cta__text a {
- margin: 25px 0 0;
- }
- .well-cta__image {
- padding: 30px 0 0;
- }
- .well-cta img {
- width: 100%;
- max-height: 300px;
- object-fit: contain;
- margin-bottom: -7px;
- }
-
- @media (min-width: 768px) {
- .well-cta {
- display: grid;
- grid: auto / 1fr 250px;
- }
- .well-cta__image {
- align-self: flex-end;
- padding: 15px 0 0;
- }
- }
- #bluepurple:checked ~ .mainlp .well-cta__text {
- color: var(--backgroundColor);
- }
-
- .well-cta--form {
- display: grid;
- grid-gap: 10px;
- padding: 30px;
- background: var(--primaryShade1);
- border-radius: 10px;
- }
- .well-cta--form__text {
- margin-bottom: 10px;
- }
- .well-cta--form h3 {
- color: var(--primaryShade5);
- }
-
- @media (min-width: 768px) {
- .well-cta--form {
- grid-template-columns: 1fr auto;
- }
- .well-cta--form__text {
- grid-column: span 2;
- }
- }
- /*TABLE*/
- .table {
- background: var(--backgroundColor);
- border-radius: 10px;
- }
- .table__wrapper {
- width: 100%;
- overflow-y: hidden;
- overflow-x: auto;
- border-radius: 10px;
- box-shadow: 0 3px 15px rgba(51, 51, 51, 0.2);
- }
- .table tr {
- display: grid;
- grid: auto/80px 80px repeat(2, minmax(150px, 2fr)) repeat(2, minmax(120px, 1.5fr)) 50px;
- align-items: center;
- }
- .table td {
- padding: 15px;
- }
- .table__header {
- color: var(--neutralShade5);
- font-weight: 500;
- text-transform: uppercase;
- border-bottom: 0.5px solid var(--lightGrayColor);
- }
- .table__body tr:nth-child(even) {
- background: var(--neutralShade0);
- }
-
- #dark:checked ~ .mainlp .table__body tr:nth-child(even),
- #pinkaru:checked ~ .mainlp .table__body tr:nth-child(even) {
- background: var(--neutralShade8);
- }
-
- /*FORMS*/
- .formlogin {
- border-radius: 10px;
- padding: 30px;
- box-shadow: 0 3px 15px rgba(51, 51, 51, 0.2);
- background: var(--backgroundColor);
- margin-top: 30px;
- position: relative;
- overflow: hidden;
- }
- .formlogin .checkbox {
- margin-bottom: 30px;
- }
- .formlogin .spinner__wrapper {
- place-items: center;
- position: absolute;
- width: 100%;
- height: 100%;
- left: 0;
- top: 0;
- background: rgba(255, 255, 255, 0.85);
- opacity: 0;
- z-index: -1;
- }
-
- @media (min-width: 768px) {
- .formlogin {
- grid: auto / 1fr 40%;
- }
- .formlogin .input__wrapper {
- grid-column: span 2;
- }
- .formlogin .inputRG__wrapper {
- grid-column: span 2;
- }
- .formlogin .checkbox {
- align-self: center;
- margin-bottom: 0;
- }
- }
- #dark:checked ~ .mainlp .spinner__wrapper,
- #pinkaru:checked ~ .mainlp .spinner__wrapper {
- background: rgba(20, 20, 20, 0.85);
- }
-
- /*COMMENT ITEM*/
- .comment {
- display: grid;
- grid: auto / 60px 1fr;
- grid-gap: 12px;
- }
- .comment__image {
- grid-row: 1 / 4;
- }
- .comment__image img {
- width: 60px;
- height: 60px;
- object-fit: cover;
- border-radius: 50%;
- }
- .comment__info h5 {
- margin-bottom: 0;
- }
- .comment__info h5 .spanlp {
- vertical-align: middle;
- }
- .comment__info h5 .badge {
- margin-left: 8px;
- font-size: 80%;
- }
- .comment__info h5 .badge i {
- font-size: 80%;
- margin-right: 6px;
- }
- .comment__info__time {
- color: var(--grayColor);
- }
- .comment__reaction i {
- margin-right: 8px;
- font-size: 85%;
- }
- .comment__reaction__heart {
- cursor: pointer;
- transition: .3s ease;
- }
- .comment__reaction__heart.toggled {
- color: var(--accent3Shade5);
- font-weight: 500;
- }
-
- /*PANEL*/
- .panel {
- display: grid;
- grid: 200px auto min-content / 100%;
- border-radius: 10px;
- overflow: hidden;
- background: var(--backgroundColor);
- box-shadow: 0 3px 15px rgba(51, 51, 51, 0.2);
- max-width: 480px;
- margin: auto;
- }
- .panel__image img {
- width: 100%;
- height: 100%;
- object-fit: cover;
- }
- .panel__info {
- padding: 30px 30px 20px;
- }
- .panel__info h1 {
- margin-bottom: 25px;
- }
- .panel__info p {
- font-size: 20px;
- margin: 15px 0;
- }
- .panel__info .alert {
- font-weight: 300;
- margin-top: 30px;
- }
- .panel__cta {
- padding: 0 30px 30px;
- text-align: center;
- }
-
- footer {
- display: grid;
- grid: min-content / 1fr max-content;
- text-align: left;
- width: 90%;
- margin: 1em auto 4em;
- max-width: 1050px;
- align-items: center;
- }
- footer a {
- text-decoration: none;
- color: #333;
- padding: 3px 0;
- border-bottom: 1px dashed;
- }
- footer a:hover {
- border-bottom: 1px solid;
- }
- footer .social a {
- text-decoration: none;
- margin-left: 10px;
- }
- footer .social a .icons {
- display: inline-block;
- font-size: 20px;
- }
- footer.dark, footer.dark a {
- color: #f9f9f9;
- }
-
-
-
-
- /*typography 2*/
- .stonglp {
- font-weight: 500;
- }
-
- .emlp {
- font-style: italic;
- }
-
- .h1lp {
- font: 700 48px/1.2 "Poppins", sans-serif;
- margin-bottom: 10px;
- }
-
- .h2lp {
- font: 700 32px/1.2 "Poppins", sans-serif;
- margin-bottom: 10px;
- }
-
- .h3lp {
- font: 700 24px/1.2 "Poppins", sans-serif;
- margin-bottom: 10px;
- }
-
- .h4lp {
- font: 700 20px/1.2 "Poppins", sans-serif;
- margin-bottom: 10px;
- }
-
- .h5lp {
- font: 500 18px/1.2 "Poppins", sans-serif;
- margin-bottom: 10px;
- }
-
- .h6lp {
- font: 500 16px/1.2 "Poppins", sans-serif;
- text-transform: uppercase;
- }
-
- .apierrort {
- font: 700 20px/1.2 "Poppins", sans-serif;
- margin-bottom: 10px;
-}
-
-.apierrort::first-letter {
- text-transform: uppercase;
-}
-
-.devServer{
- color: orangered;
- text-align: left;
- margin: 10px;
- float: left;
- position: fixed;
- z-index: 104;
- font-size: 16px;
-
-}
-.devServer span{
- text-shadow: 2px 0 0 #fff, -2px 0 0 #fff, 0 2px 0 #fff, 0 -2px 0 #fff, 1px 1px #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff;
-}
-
-
-.bgHero iframe {
- width: 100%;
- height: 100%;
- position: fixed;
- top: 0;
- z-index: 103;
-}
-
-$circle-length: 340px;
-$check-length: 230px;
-
-@keyframes scaleAnimation {
- 0% {
- opacity: 0;
- transform: scale(1.5);
- }
- 100% {
- opacity: 1;
- transform: scale(1);
- }
-}
-
-@keyframes drawCircle {
- 0% {
- stroke-dashoffset: $circle-length;
- }
- 100% {
- stroke-dashoffset: 0;
- }
-}
-
-@keyframes drawCheck {
- 0% {
- stroke-dashoffset: $check-length;
- }
- 100% {
- stroke-dashoffset: 0;
- }
-}
-
-@keyframes fadeOut {
- 0% {
- opacity: 1;
- }
- 100% {
- opacity: 0;
- }
-}
-
-@keyframes fadeIn {
- 0% {
- opacity: 0;
- }
- 100% {
- opacity: 1;
- }
-}
-
-#successAnimationCircle {
- stroke-dasharray: $circle-length $circle-length;
- stroke: #FFF;
-}
-
-#successAnimationCheck {
- stroke-dasharray: $check-length $check-length;
- stroke: #FFF;
-}
-
-#successAnimationResult {
- fill: #FFF;
- opacity: 0;
-}
-
-#successAnimation .animated {
- animation: 1s ease-out 0s 1 both scaleAnimation;
-
- #successAnimationCircle {
- animation: 1s cubic-bezier(0.77, 0, 0.175, 1) 0s 1 both drawCircle,
- 0.3s linear 0.9s 1 both fadeOut;
- }
-
- #successAnimationCheck {
- animation: 1s cubic-bezier(0.77, 0, 0.175, 1) 0s 1 both drawCheck,
- 0.3s linear 0.9s 1 both fadeOut;
- }
-
- #successAnimationResult {
- animation: 0.3s linear 0.9s both fadeIn;
- }
-}
diff --git a/src/components/index.js b/src/components/index.js
index 073905cd..ce2c537f 100644
--- a/src/components/index.js
+++ b/src/components/index.js
@@ -3,9 +3,6 @@ import UserProfile from './UserProfile'
import MainSidebar from './MainSidebar'
import PostCard from './PostCard'
import PostCreator from './PostCreator'
-import Editor from './Editor'
-import FilterItem from './FilterItem'
-import DropOption from './DropOption'
import Loader from './Loader/Loader.js'
import ScrollBar from './ScrollBar'
import * as MyLayout from './Layout/index.js'
@@ -13,4 +10,4 @@ import Page from './Page'
import YulioID from './YulioID/experimental/index.js'
import CoreLoader from './CoreLoader'
-export { UserProfile, MyLayout, Editor, FilterItem, DropOption, Loader, Page, ScrollBar, YulioID, CoreLoader, PostCard, PostCreator, CustomIcons, MainSidebar}
+export { UserProfile, MyLayout, Loader, Page, ScrollBar, YulioID, CoreLoader, PostCard, PostCreator, CustomIcons, MainSidebar}
diff --git a/src/models/app.js b/src/models/app.js
index 42ae45e1..cd0e4681 100644
--- a/src/models/app.js
+++ b/src/models/app.js
@@ -62,11 +62,6 @@ export default {
},
effects: {
*query({payload}, { call, put, select }) {
- const { locationPathname } = yield select(_ => _.app)
- const { list } = yield call(queryRouteList)
- let routeList = list
- yield put({type: 'updateState', payload: { routeList: list }, })
-
const valid = ycore.ValidLoginSession();
const validBackup = ycore.ValidBackup();
if (valid == true) {
@@ -74,30 +69,26 @@ export default {
router.push({pathname: '/main',})
ycore.RefreshONCE()
}
+ const { locationPathname } = yield select(_ => _.app)
+ const { list } = yield call(queryRouteList)
+ let routeList = list
+ yield put({type: 'updateState', payload: { routeList: list }, })
// Runtime
ycore.MakeBackup()
ycore.UpdateSDCP()
}
- else if(!pathMatchRegexp(['/', '/login'], window.location.pathname)) {
+ else if(!pathMatchRegexp(['','/login'], window.location.pathname)) {
+ console.log('REP')
if (validBackup == true) {
ycore.LogoutCall()
}
else{
- router.push({pathname: '/login',})
- ycore.RefreshONCE()
+ ycore.RefreshONCE()
}
-
}
- },
-
- *signOut({ payload }, { call, put }) {
- const data = yield call(logoutUser)
- if (data.success) {
- sessionStorage.clear()
- yield put({ type: 'query' })
- } else {
- throw data
+ if(pathMatchRegexp(['/'], window.location.pathname)){
+ router.push({pathname: '/login',})
}
},
},
diff --git a/src/pages/main/index.less b/src/pages/main/index.less
index 32f8d0b3..e00b07fb 100644
--- a/src/pages/main/index.less
+++ b/src/pages/main/index.less
@@ -1,3 +1,4 @@
+@import '~themes/vars.less';
.PostsWrapper{
margin: auto;
align-content: center;