diff --git a/.umirc.js b/.umirc.js index bf2df3b6..da950f3a 100644 --- a/.umirc.js +++ b/.umirc.js @@ -63,8 +63,8 @@ export default { theme: './config/theme.config.js', // Webpack Configuration alias: { - ycore: resolve(__dirname, './src/ycore_worker.js'), - ycstyle: resolve(__dirname, './src/ycore_style.scss'), + ycore: resolve(__dirname, './src/@ycore/ycore_worker.js'), + ycstyle: resolve(__dirname, './src/@ycore/ycore_style.scss'), api: resolve(__dirname, './src/services/'), components: resolve(__dirname, './src/components'), config: resolve(__dirname, './config/ycore.config.js'), diff --git a/config/ycore.config.js b/config/ycore.config.js index e4b50416..22942ed1 100644 --- a/config/ycore.config.js +++ b/config/ycore.config.js @@ -26,6 +26,7 @@ module.exports = { openwheater_apiKey:'2acf34be0b8f033b89ba4de1e674d42a', }, Endpoints: { + search_endpoint: "https://api.ragestudio.net/RS-YIBTP/yid/search?access_token=", get_sessions: "https://api.ragestudio.net/RS-YIBTP/yid/session_id?access_token=", auth_endpoint: "https://api.ragestudio.net/RS-YIBTP/yid/auth", new_post: "https://api.ragestudio.net/RS-YIBTP/yid/new_post?access_token=", diff --git a/mock/route.js b/mock/route.js index 3d8f1cdf..bc8d31b2 100644 --- a/mock/route.js +++ b/mock/route.js @@ -15,134 +15,6 @@ const database = [ route: '/main', }, - // ACCOUNT SECTION - { - id: '2', - breadcrumbParentId: '1', - name: 'Account', - icon: 'user', - }, - { - id: '21', - breadcrumbParentId: '2', - menuParentId: '2', - name: 'YulioID™', - icon: 'user', - route: '/account', - }, - { - id: '22', - breadcrumbParentId: '2', - menuParentId: '2', - name: 'YulioPay™', - icon: 'wallet', - route: '/wallet', - }, - { - id: '23', - breadcrumbParentId: '2', - menuParentId: '2', - name: 'Vault', - icon: 'save', - route: '/account', - }, - - - // RESOURCES SECTION - { - id: '3', - breadcrumbParentId: '1', - name: 'Resources', - icon: 'compass', - }, - { - id: '31', - breadcrumbParentId: '3', - menuParentId: '3', - name: 'Marketplace', - icon: 'shopping-cart', - route: '/resources/marketplace', - }, - { - id: '32', - breadcrumbParentId: '3', - menuParentId: '3', - name: 'Apps', - icon: 'desktop', - route: '/resources/apps', - }, - { - id: '33', - breadcrumbParentId: '3', - menuParentId: '3', - name: 'Download Manager', - icon: 'build', - route: '/resources/dl', - }, - { - id: '34', - breadcrumbParentId: '3', - menuParentId: '3', - name: 'Other Services', - icon: 'compass', - route: '/resources/otherservices', - }, - - // CloudStudio - { - id: '4', - breadcrumbParentId: '1', - name: 'Cloud Studio', - icon: 'cloud', - }, - { - id: '42', - breadcrumbParentId: '4', - menuParentId: '4', - name: 'Workspaces', - icon: 'deployment-unit', - route: '/changelogs', - }, - { - id: '43', - breadcrumbParentId: '4', - menuParentId: '4', - name: 'Cloud Computing', - icon: 'cloud-server', - route: '/help', - }, - { - id: '44', - breadcrumbParentId: '4', - menuParentId: '4', - name: 'GIT', - icon: 'branches', - route: '/about', - }, - // Project Manager - { - id: '5', - breadcrumbParentId: '1', - name: 'Project Manager', - icon: 'team', - }, - { - id: '51', - breadcrumbParentId: '5', - menuParentId: '5', - name: 'Project Manager', - icon: 'reconciliation', - route: '/help', - }, - { - id: '52', - breadcrumbParentId: '5', - menuParentId: '5', - name: 'Teams', - icon: 'team', - route: '/changelogs', - }, - ] module.exports = { diff --git a/package.json b/package.json index b80b71f1..2db34dfd 100644 --- a/package.json +++ b/package.json @@ -1,17 +1,15 @@ { "name": "comty-development", - "version": "0.1.09", + "version": "0.1.10", "description": "", "main": "index.js", - "author": "", + "author": "RageStudio", "license": "ISC", "dependencies": { - "@ant-design/compatible": "0.0.1-rc.1", - "@ant-design/icons": "^2.1.1", "@ant-design/pro-layout": "^4.9.11", "@lingui/react": "^2.9.0", "ant-design-pro": "^2.3.2", - "antd": "^4.0.0-rc.0", + "antd": "^3.26.3", "autoprefixer": "7.1.6", "axios": "^0.18.0", "babel-core": "7.0.0-bridge.0", diff --git a/src/ycore_style.scss b/src/@ycore/ycore_style.scss similarity index 100% rename from src/ycore_style.scss rename to src/@ycore/ycore_style.scss diff --git a/src/ycore_worker.js b/src/@ycore/ycore_worker.js similarity index 95% rename from src/ycore_worker.js rename to src/@ycore/ycore_worker.js index 92a24e12..4281961b 100644 --- a/src/ycore_worker.js +++ b/src/@ycore/ycore_worker.js @@ -1,12 +1,11 @@ import Cookies from "ts-cookies"; import axios from "axios"; -import {SetControls, CloseControls} from "./components/Layout/Control" -import {secretOrKey} from "../config/keys.js" +import {SetControls, CloseControls} from ".././components/Layout/Control" +import {secretOrKey} from "../../config/keys.js" import * as antd from "antd" -import { func } from "prop-types"; var react = require("react"); -var package_json = require("../package.json"); +var package_json = require("../../package.json"); var jquery = require("jquery"); var uifx = require("uifx"); var config = require("config"); @@ -39,7 +38,7 @@ export const UIFxList = { notifyWarning: (ycore_worker.FXapiProvider + 'NotifyWarning.wav'), notifySuccess: (ycore_worker.FXapiProvider + 'notifySuccess.wav') }; -export const infoServer = (ycore_worker.ServerType + ' Server | v' + ycore_worker.ServerVersion); + export function notifyError(err){ antd.notification.error({ @@ -600,28 +599,6 @@ export function UIFxPY(value, customVLM) { beep.setVolume(VLM || customVLM).play(); } - -export function WeatherAPI() { - let city = 'pamplona'; - let country = 'spain'; - var Api_Key = yConfig.openwheater_apiKey; - var _this = this; - var urlOBJ = ("http://api.openweathermap.org/data/2.5/weather?q=" + city + "," + country + "&appid=2acf34be0b8f033b89ba4de1e674d42a"); - var returnData; - var AjaxRequest = { - "url": urlOBJ, - "method": "POST", - "timeout": 0, - "processData": true, - "contentType": false - }; - jquery.ajax(AjaxRequest) - .done(function (response) { - returnData = response; - }); - return (returnData); -} - export function RefreshONCE(){ window.location.reload(); } diff --git a/src/components/CustomIcons/index.js b/src/components/CustomIcons/index.js index 1662e50b..0d39a4bb 100644 --- a/src/components/CustomIcons/index.js +++ b/src/components/CustomIcons/index.js @@ -1,6 +1,7 @@ const VerifiedBadge = () => () const CommonThings = () => () +const SunSVG = () => () +const MoonSVG = () => () - -const CustomIcons = {VerifiedBadge, CommonThings} +const CustomIcons = {VerifiedBadge, CommonThings, SunSVG, MoonSVG} export default CustomIcons diff --git a/src/components/DropOption/DropOption.js b/src/components/DropOption/DropOption.js index d0d4ee41..99e7d12c 100644 --- a/src/components/DropOption/DropOption.js +++ b/src/components/DropOption/DropOption.js @@ -1,7 +1,6 @@ import React from 'react' import PropTypes from 'prop-types' -import * as icon from '@ant-design/icons'; -import { Dropdown, Button, Menu } from 'antd'; +import { Dropdown, Button, Icon, Menu } from 'antd' const DropOption = ({ onMenuClick, @@ -18,11 +17,11 @@ const DropOption = ({ } {...dropdownProps}> - ); + ) } DropOption.propTypes = { diff --git a/src/components/Layout/Header.js b/src/components/Layout/Header.js index 39653c75..ad1bfd1a 100644 --- a/src/components/Layout/Header.js +++ b/src/components/Layout/Header.js @@ -1,17 +1,6 @@ import React, { PureComponent, Fragment } from 'react' -import * as icon from '@ant-design/icons'; -import { - Menu, - Layout, - Avatar, - Popover, - Badge, - List, - Switch, - Tooltip, - Dropdown, - Button, -} from 'antd'; +import { Menu, Icon, Layout, Avatar, Popover, Badge, List, Switch, Tooltip, Dropdown, Button } from 'antd' +import HeaderSearch from './local_components/HeaderSearch/index.js' import { Trans, withI18n } from '@lingui/react' import { Ellipsis } from 'ant-design-pro' import classnames from 'classnames' @@ -44,7 +33,7 @@ class Header extends PureComponent { handleOpenMenu() { let ListControls = [ (