From b2ac69142adc660d5a90da1136dc1ec82070ec6f Mon Sep 17 00:00:00 2001 From: srgooglo <38926803+srgooglo@users.noreply.github.com> Date: Mon, 3 Feb 2020 14:21:48 +0100 Subject: [PATCH] initial commits, interface, models --- .umirc.js | 2 - globals/debug.json | 23 ++++ globals/services.json | 18 +++ globals/settings.json | 26 ++++ public/favicon.ico | Bin 116 -> 16958 bytes public/full_logo.svg | 40 +----- public/logo.svg | 17 +-- src/components/Layout/Header.js | 52 ++------ src/components/Layout/Header.less | 112 ++++++++-------- src/components/Layout/L_Sider.js | 95 -------------- src/components/Layout/L_Sider.less | 138 -------------------- src/components/Layout/R_Sider.js | 105 ++++++++++----- src/components/Layout/R_Sider.less | 42 ++++-- src/components/Layout/index.js | 4 +- src/components/PostCard/index.js | 36 +++++ src/components/PostCard/index.less | 34 +++++ src/components/index.js | 5 +- src/layouts/BaseLayout.js | 4 - src/layouts/PrimaryLayout.js | 2 - src/layouts/PrimaryLayout.less | 5 +- src/locales/en/messages.json | 54 ++++++++ src/pages/main/index.js | 28 ++++ src/pages/main/index.tsx | 18 --- src/themes/default.less | 2 +- src/{components/Layout => themes}/fonty.css | 0 src/themes/index.less | 2 +- src/themes/mixin.less | 1 + src/themes/vars.less | 2 +- 28 files changed, 411 insertions(+), 456 deletions(-) create mode 100644 globals/debug.json create mode 100644 globals/services.json create mode 100644 globals/settings.json delete mode 100644 src/components/Layout/L_Sider.js delete mode 100644 src/components/Layout/L_Sider.less create mode 100644 src/components/PostCard/index.js create mode 100644 src/components/PostCard/index.less create mode 100644 src/locales/en/messages.json create mode 100644 src/pages/main/index.js delete mode 100644 src/pages/main/index.tsx rename src/{components/Layout => themes}/fonty.css (100%) diff --git a/.umirc.js b/.umirc.js index e721f8fc..ea306e3b 100644 --- a/.umirc.js +++ b/.umirc.js @@ -63,12 +63,10 @@ export default { theme: './config/theme.config.js', // Webpack Configuration alias: { - sockets: resolve(__dirname, './sockets'), ycore: resolve(__dirname, './src/ycore_worker.tsx'), ycstyle: resolve(__dirname, './src/ycore_style.scss'), api: resolve(__dirname, './src/services/'), components: resolve(__dirname, './src/components'), - widgets: resolve(__dirname, './src/widgets'), config: resolve(__dirname, './config/ycore.config.js'), models: resolve(__dirname, './src/models'), routes: resolve(__dirname, './src/routes'), diff --git a/globals/debug.json b/globals/debug.json new file mode 100644 index 00000000..8816f6a8 --- /dev/null +++ b/globals/debug.json @@ -0,0 +1,23 @@ +[ + { + "id": "1", + "title": "PINS", + "avatar": "https://dl.ragestudio.net/statics/icons/nxkuOJlFJuAUhzlMTCEe.png", + "description": "Debug pins functions, create, modify, delete...", + "component": "PINS_debugger" + }, + { + "id": "2", + "title": "SDCP™", + "avatar":"https://dl.ragestudio.net/statics/icons/nxkuOJlFJuAUhzlMTCEe.png", + "description": "Debug SDCP Controller and data proccess", + "component": "SDCP_debugger" + }, + { + "id": "3", + "title": "API", + "avatar": "https://dl.ragestudio.net/statics/icons/nxkuOJlFJuAUhzlMTCEe.png", + "description": "Debug API Controller and data proccess", + "component": "API_debugger" + } +] \ No newline at end of file diff --git a/globals/services.json b/globals/services.json new file mode 100644 index 00000000..db868fcd --- /dev/null +++ b/globals/services.json @@ -0,0 +1,18 @@ +[ + { + "id": "2", + "enable": "1", + "logo": "https://api.ragestudio.net/branding/svg/Comty-banner-jetblack.png", + "title": "Comty", + "description": "Discover our social network, very usedfull for develop socialite", + "uri": "https://comty.julioworld.club" + }, + { + "id": "5", + "enable": "1", + "logo": "https://api.ragestudio.net/branding/svg/yuliostore_black.png", + "title": "JulioStore", + "description": "Huilio?", + "uri": "https://store.julioworld.club" + } +] \ No newline at end of file diff --git a/globals/settings.json b/globals/settings.json new file mode 100644 index 00000000..1a1b85dd --- /dev/null +++ b/globals/settings.json @@ -0,0 +1,26 @@ +[ + { + "SettingID": "strict_lightMode", + "title": "Strict Light Mode", + "description": "Force the app to apply full light mode theme when the light mode is activated... (Experimental)", + "value": false + }, + { + "SettingID": "force_collapse", + "title": "Collapsed Default", + "description": "Force the app to apply collapse mode when an component has updated", + "value": false + }, + { + "SettingID": "force_showDevLogs", + "title": "Show Functions Logs", + "description": "Show all console logs... [Developer]", + "value": true + }, + { + "SettingID": "sessions_noexpire", + "title": "No expire session", + "description": "Force the app to not expire any session... [Developer]", + "value": true + } +] \ No newline at end of file diff --git a/public/favicon.ico b/public/favicon.ico index 5c41e85f3a3518c3b3d24513d7e0d0a00d78c93a..ad1b1170aed68fb9483c3823d96300560cfc0b6a 100644 GIT binary patch literal 16958 zcmeHNONbps6s_k322mUWDk{PZ$!1Xe#E2gVGeew!pOp*6r65KWMO;W+guEwy2)NQ+ zKoAiXqqtBU@JF6RjDibwCm1q8Q6qlF5Bdh5)1Fh^x2@N9efsz2y~$KKx!t$!t-j~p zs_N>ODAmHBg$0GbXVmO&rOsDM%>q!V4nVzb3$fVzdou%@8Q9DKGZ015dSe@6xDD8s zgGK1Jx+;Z!9ly)Q)hGT#mRs>W@;wfOw8Jpko5utCapEt$LpbNzFkb_C7$g3i%c1qo z<8JCWAN0C_9EbYvHG{9|nz`IL2K<}gE-Cz3a*($-gyDKn0lU-7R|lAEisewFJc9AqrHFDk{qM(N|v{cI!i_r15$ zxz9XQZIa8f(WcD%pJ$+fZ@n_(n0ux8 z*DQVKKkku*_`_blCkMWFi;iP*=e79PEN$N`cud+@%WOE-d)S&|ra9mkMaIcKK>TZ# zA!`7S9Q-Xa8=Kt2&g4!%Hk|{=QRL5L0ZHsxUcvWEm^ zDZc>D0}ADU_DLQ>_eRe30p3#QA@RQ(F`K;2>-W)jW|P|_kW=OK_DmxRe6iQm#57j-n(8jIQ@z1 z#~ktRLEmqNy~*9YehW6&JI2xZk@%}h8$GW+KF^qO%Qg3WTMg&X=bHx{=O5sC;7TBO ztg5`l-^(JpBpS9|rCLE~&~}{JlJF220V+h=cPqFIMWl0WJs9nq{uf!2J`z zDqtJKrsrP6-#hdfzKXQb^Xg+>k9%VO8vUH_wj5B;z3vELGk#=~CpM%X5;L8Kg%{)`R4y*uq{C|Od`-t!-p9_FbEU}vLv$i(?z8pyZ3~cWN zUID%WxSlxQc2(t0|I#f#e$LOnoNaI~wYSO<=Fga0zyW}D&T`JX{}OhO02cyQ&Su|;^A`@>!@dRbIOplUhwU@K zwE%M{+0ise@^1BDu>Kp@^TqCya240%mdFETdH!Wf9aN4 zkBCRO6_NZ#eiq>TcGW!FNBgM_z+ZC3_uhTLhk)ywTJrE2>^4IEg}*6xfZP5g7r#OZ zXOTQp+)+pEM_~S&yz{PS!1Z?EDS*Eh@jbc-to#0t+uc8iR zU(IO(5|6}3*`@&`Mby#qWYkp?xa;D3m63GXeKk!vuZtCRc!SpAwuRP>!#%c4rzo0O zi3e--bP^)fkFy2xxrT18F{xQJg@m2*iv&AVx?A05{Vb AssI20 diff --git a/public/full_logo.svg b/public/full_logo.svg index 6f64918f..cc7477fb 100644 --- a/public/full_logo.svg +++ b/public/full_logo.svg @@ -1,39 +1 @@ - - - - - - - - - - - - - - - - - - - - - rDashboard-White-TM-T3 - - - - - - +ComtyNG-Logo \ No newline at end of file diff --git a/public/logo.svg b/public/logo.svg index e00195f0..afd838cd 100644 --- a/public/logo.svg +++ b/public/logo.svg @@ -1,16 +1 @@ - - - - - RDSeries-T3 - - - +icon_new2019_black \ No newline at end of file diff --git a/src/components/Layout/Header.js b/src/components/Layout/Header.js index d63de26b..f6b2b7bc 100644 --- a/src/components/Layout/Header.js +++ b/src/components/Layout/Header.js @@ -5,16 +5,11 @@ import { Ellipsis } from 'ant-design-pro' import classnames from 'classnames' import PropTypes from 'prop-types' import styles from './Header.less' +import { config } from 'utils' + import * as ycore from 'ycore' import router from 'umi/router' import moment from 'moment' -import Bread from './Bread' - - -let userData = ycore.SDCP() - - - @withI18n() class Header extends PureComponent { @@ -38,10 +33,7 @@ class Header extends PureComponent { onAllNotificationsRead, } = this.props - - - - const menuContent = ( + const notificationIcon = ( )} @@ -98,31 +89,16 @@ class Header extends PureComponent { ) return ( - -
- -
-
-
- - - {menuContent} - -
- + +
+ + + +
+
+ + {notificationIcon} +
) } diff --git a/src/components/Layout/Header.less b/src/components/Layout/Header.less index c0c68236..72a454fe 100644 --- a/src/components/Layout/Header.less +++ b/src/components/Layout/Header.less @@ -1,60 +1,36 @@ @import '~themes/vars.less'; -.bread { - float: left; -} - -.darkmode_btn { - margin-bottom: 8px; - height: 40px; - line-height: 40px; - margin-top: 4px; - padding: 0 16px; - overflow: hidden; - font-size: 13px; - text-overflow: ellipsis; -} - -#header_dark{ - background-color: @DarkMode-backgroud_container; - color: @DarkMode-color; - transition: background-color 200ms linear; - -} -#header_light{ - background-color: @LightMode-backgroud; - color: @LightMode-color; - transition: background-color 200ms linear; - -} - -.header { - padding: 0; - position: relative; +.brand { display: flex; - justify-content: space-between; - height: 64px; + margin: 0 20px 3px 23px; + width: 90px; +} +:global{ + .ant-layout-header{ + padding: 0; + } +} +.header { + -webkit-box-shadow: 0px 9px 15px -6px rgba(158,158,158,0.82); + -moz-box-shadow: 0px 9px 15px -6px rgba(158,158,158,0.82); + box-shadow: 0px 9px 15px -6px rgba(158,158,158,0.82); + display: flex; + width: 100%; + background-color: @DarkMode-backgroud; + height: 45px; z-index: 9; align-items: center; - - &.fixed { - position: fixed; - top: 0; - width: ~'calc(100% - 370px)'; - z-index: 10; - transition: width 0.2s; - - &.collapsed { - width: ~'calc(100% - 115px)'; - } - } - + position: fixed; + top: 0; + width: 100%; + z-index: 10; + transition: width 0.2s; :global { + .ant-menu-submenu-title { height: 40px; } - .ant-menu-horizontal { line-height: 40px; @@ -93,10 +69,19 @@ .rightContainer { display: flex; - align-items: center; + position: absolute; + right: 0; + margin: 0 50px; + } + .leftContainer { + margin: 0 23px; + display: flex; + + } .button { + color: #b2b0c7; width: 40px; height: 40px; line-height: 40px; @@ -115,6 +100,32 @@ .iconButton { + color: #b2b0c7; + width: 40px; + height: 40px; + display: flex; + justify-content: center; + align-items: center; + border-radius: 53px; + cursor: pointer; + .background-hover(); + + &:hover { + .iconFont { + color: @primary-color; + } + } + + &+.iconButton { + margin-left: 8px; + } + + .iconFont { + color: #b2b0c7; + font-size: 24px; + } +} +.iconButtonADD { color: #b2b0c7; width: 48px; height: 48px; @@ -135,10 +146,7 @@ margin-left: 8px; } - .iconFont { - color: #b2b0c7; - font-size: 24px; - } + } .search { padding: 0 12px; diff --git a/src/components/Layout/L_Sider.js b/src/components/Layout/L_Sider.js deleted file mode 100644 index ac6c7dae..00000000 --- a/src/components/Layout/L_Sider.js +++ /dev/null @@ -1,95 +0,0 @@ -import React, { PureComponent } from 'react' -import PropTypes from 'prop-types' -import { Icon, Switch, Layout, Tag, Divider} from 'antd' -import { withI18n, Trans } from '@lingui/react' -import ScrollBar from '../ScrollBar' -import { config } from 'utils' -import styles from './L_Sider.less' -import { ycore_worker, DevOptions } from 'ycore'; -import SiderMenu from './Menu.js' -import { CustomMenu } from './local_components' - -@withI18n() -class L_Sider extends PureComponent { - - StrictMode = () =>{ - const { theme } = this.props; - if (DevOptions.StrictLightMode == false) { - return "dark" - } - if (DevOptions.StrictLightMode == true && theme == "light") { - return "light" - } - if (DevOptions.StrictLightMode == true && theme == "dark") { - return "dark" - } - } - - render() { - const { - i18n, - menus, - theme, - isMobile, - collapsed, - onThemeChange, - onCollapseChange, - } = this.props - - return ( -
- -
- {collapsed?
:
} -
- -
- - - - -
-
-
- ) - } -} - -L_Sider.propTypes = { - menus: PropTypes.array, - theme: PropTypes.string, - isMobile: PropTypes.bool, - collapsed: PropTypes.bool, - onThemeChange: PropTypes.func, - onCollapseChange: PropTypes.func, -} - -export default L_Sider diff --git a/src/components/Layout/L_Sider.less b/src/components/Layout/L_Sider.less deleted file mode 100644 index a9c429e9..00000000 --- a/src/components/Layout/L_Sider.less +++ /dev/null @@ -1,138 +0,0 @@ -@import '~themes/vars.less'; -@import (inline) './fonty.css'; - -.siderhandler { - overflow-x: hidden; - height: 100vh; - bottom: 0; - :global { - letter-spacing: 0.6px; - font-weight: 500; - font-size: 1.4447884416924666vh; - .ant-layout-sider-dark { - background-color: @DarkMode-backgroud; - color: @DarkMode-color; - -webkit-box-shadow: 13px 4px 34px 0px rgba(0, 0, 0, 0.05); - -moz-box-shadow: 13px 4px 34px 0px rgba(0, 0, 0, 0.05); - box-shadow: 13px 4px 34px 0px rgba(0, 0, 0, 0.05); - } - .ant-layout-sider-light { - background-color: @LightMode-backgroud; - color: @LightMode-color; - -webkit-box-shadow: 13px 4px 34px 0px rgba(0, 0, 0, 0.05); - -moz-box-shadow: 13px 4px 34px 0px rgba(0, 0, 0, 0.05); - box-shadow: 13px 4px 34px 0px rgba(0, 0, 0, 0.05); - } - .ant-menu-dark { - background-color: @DarkMode-backgroud; - color: @DarkMode-color; - -webkit-box-shadow: 13px 4px 34px 0px rgba(0, 0, 0, 0.005); - -moz-box-shadow: 13px 4px 34px 0px rgba(0, 0, 0, 0.005); - box-shadow: 13px 4px 34px 0px rgba(0, 0, 0, 0.005); - :global{ - color: @DarkMode-color; - } - } - .ant-menu-light { - background-color: @LightMode-backgroud; - color: @LightMode-color; - -webkit-box-shadow: 13px 4px 34px 0px rgba(0, 0, 0, 0.005); - -moz-box-shadow: 13px 4px 34px 0px rgba(0, 0, 0, 0.005); - box-shadow: 13px 4px 34px 0px rgba(0, 0, 0, 0.005); - } - .ant-menu-dark .ant-menu-inline .ant-menu-sub { - -webkit-box-shadow: 0px 27px 29px -18px rgba(23, 23, 23, 0); - -moz-box-shadow: 0px 27px 29px -18px rgba(23, 23, 23, 0); - box-shadow: 0px 27px 29px -18px rgba(23, 23, 23, 0); - background-color: @DarkMode-backgroud; - } - .ant-menu-light .ant-menu-inline .ant-menu-sub { - -webkit-box-shadow: 0px 27px 29px -18px rgba(23, 23, 23, 0); - -moz-box-shadow: 0px 27px 29px -18px rgba(23, 23, 23, 0); - box-shadow: 0px 27px 29px -18px rgba(23, 23, 23, 0); - background-color: @LightMode-backgroud; - } - .ant-menu-dark .ant-menu-item::after { - border-right: 3px solid #00FEA1; - } - .ant-menu-light .ant-menu-item::after { - border-right: 3px solid #00FEA1; - } - .ant-menu-dark .ant-menu-item-selected { - background: rgb(80, 78, 82); - } - .ant-menu-light .ant-menu-item-selected { - background: rgb(219, 219, 219); - } - .ant-layout-sider-children { - display: flex; - flex-direction: column; - justify-content: space-between; - } - - } -} - -.sider { - .brand { - z-index: 1; - height: 70px; - display: flex; - align-items: center; - justify-content: center; - padding: 0 23px; - .logo { - display: flex; - align-items: center; - justify-content: center; - .logocollapsed{ - width: 68px; - transition: width 0.1s; - } - .logonotcollapsed { - width: 90px; - transition: width 0.1s; - } - } - } - .menuContainer { - height: ~'calc(100vh - 120px)'; - overflow-x: hidden; - flex: 1; - &::-webkit-scrollbar-thumb { - background-color: transparent; - } - &:hover { - &::-webkit-scrollbar-thumb { - background-color: rgba(59, 59, 59, 0.2); - } - } - :global { - .ant-menu-inline .ant-menu-item { - font-size: 14px; - } - .ant-menu-dark .ant-menu-item a { - color: @DarkMode-color; - } - .ant-menu-light .ant-menu-item a { - color: @LightMode-color; - } - .ant-menu-item a:hover { - color: #00FEA1; - } - } - } -} - - -@keyframes fadeLeftIn { - 0% { - transform: translateX(5px); - opacity: 0; - } - - 100% { - transform: translateX(0); - opacity: 1; - } -} \ No newline at end of file diff --git a/src/components/Layout/R_Sider.js b/src/components/Layout/R_Sider.js index 0e59f1a2..e110a3ee 100644 --- a/src/components/Layout/R_Sider.js +++ b/src/components/Layout/R_Sider.js @@ -7,6 +7,7 @@ import router from 'umi/router' import { SDCP, LogoutCall, DevOptions} from 'ycore' import styles from './R_Sider.less' +import ycstyle from 'ycstyle' let userData = SDCP() @@ -57,7 +58,20 @@ class R_Sider extends PureComponent { return "dark" } } + UserIsPro(){ + if (userData.is_pro == 1){ + return true + } + return false + } + UserIsAdmin(){ + if (userData.admin == 1){ + return true + } + return false + } render() { + const { theme, onThemeChange} = this.props; return ( @@ -65,7 +79,7 @@ class R_Sider extends PureComponent {
- - {this.Balancer()? null : {userData.username}} +
{this.Balancer()?
: -
- - - - Account - - - - Settings - - - - - - - - Logout - - +
+
+

@{userData.username}

+ Points: {userData.points} +
+ +
+ + {this.UserIsPro()? + + + Boosted Posts + + : + + + Upgrade to Pro + } + + + Edit Profile + + + + General Settings + + + {this.UserIsAdmin()? + + + Admin Area + + : + null + } + + + +
+ + + + + + + + Logout + + +
+
} diff --git a/src/components/Layout/R_Sider.less b/src/components/Layout/R_Sider.less index 3977545f..328bbc62 100644 --- a/src/components/Layout/R_Sider.less +++ b/src/components/Layout/R_Sider.less @@ -1,5 +1,4 @@ @import '~themes/vars.less'; -@import (inline) './fonty.css'; @LDarkMode-backgroud: rgba(47, 46, 48, 0.74); @LLightMode-backgroud: #fff; @@ -7,14 +6,41 @@ @LDarkMode-color: #fff; @LLightMode-color: #2F2E30; +.userInfo{ + font-family: "Poppins", sans-serif; + align-items: center; + text-align: center; + h2{ + color: @LDarkMode-color + } +} +.avatarFull{ + width: 120px; +} +.avatar{ + margin: 0 0 15px 0; +} + +.something_thats_pulling_me_down{ + :global{ + text-align: center; + bottom: 0; + position: absolute; + width: 100%; + + } +} + .siderwrapper { + font-size: 13px; + font-family: "Poppins", sans-serif; height: 100%; right: 0; position: absolute; :global { .ant-menu-inline, .ant-menu-vertical, .ant-menu-vertical-left { :hover { - color: #00FEA1; + color: #ffca1d; } border-right: 1px solid transparent; } @@ -69,7 +95,6 @@ color: @LDarkMode-color; margin-bottom: 8px; width: 100%; - text-align: center; animation: fadein 0.5s; :global { .ant-menu-item-selected{ @@ -78,12 +103,7 @@ } } - .SignOut{ - margin-bottom: 7px; - bottom: 0; - position: absolute; - width: 100%; - } + .menuContainer { height: ~'calc(100vh - 120px)'; overflow-x: hidden; @@ -109,9 +129,7 @@ color: rgb(197, 197, 197); } - .ant-menu-item a:hover { - color: #00FEA1; - } + } diff --git a/src/components/Layout/index.js b/src/components/Layout/index.js index 78dfdc90..cd5785a5 100644 --- a/src/components/Layout/index.js +++ b/src/components/Layout/index.js @@ -1,7 +1,5 @@ import Header from './Header' -import Bread from './Bread' -import L_Sider from './L_Sider' import R_Sider from './R_Sider' import Control from './Control' -export { Header, Bread, L_Sider, R_Sider, Control } +export { Header, R_Sider, Control } diff --git a/src/components/PostCard/index.js b/src/components/PostCard/index.js new file mode 100644 index 00000000..ed6d1716 --- /dev/null +++ b/src/components/PostCard/index.js @@ -0,0 +1,36 @@ +import React from 'react' +import * as antd from 'antd' +import styles from './index.less' + +const { Meta } = antd.Card; + +// Set default by configuration +const emptyPayload = {user: 'Post Empty', ago: 'This Post is empty', avatar: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png', content: 'Test Test' } +const defaultActions = [,,] + +class PostCard extends React.PureComponent{ + constructor(props){ + super(props) + } + render(){ + const { payload, customActions, } = this.props + const { user, ago, avatar, content } = payload || emptyPayload; + const actions = customActions || defaultActions; + return( +
+ + } + title={

@{user}

} + description={{ago}} + bordered={false} + /> +
+

{content}

+
+
+
+ ) + } +} +export default PostCard \ No newline at end of file diff --git a/src/components/PostCard/index.less b/src/components/PostCard/index.less new file mode 100644 index 00000000..ce38d4a1 --- /dev/null +++ b/src/components/PostCard/index.less @@ -0,0 +1,34 @@ +.cardWrapper{ + width: auto; + max-width: 75vw; + min-width: 40vw; + :global{ + .ant-card-meta-detail > div:not(:last-child){ + margin: 0 + } + .ant-card { + + border-radius: 10px; + } + } +} +.postAvatar{ + position: absolute; + left: -8px; + top: -8px; +} +.postContent{ + h3{ + color: rgb(85, 85, 85); + font-weight: 470; + } + padding: 23px 13px 13px 13px; +} +.textAgo{ + font-size: 10px; + margin: 0 0 0 0; +} +.titleUser{ + font-family: 'Poppins', sans-serif; + margin: 0 0 0 25px; +} diff --git a/src/components/index.js b/src/components/index.js index 863da32d..e0ff7be4 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -1,3 +1,4 @@ +import PostCard from './PostCard' import Editor from './Editor' import FilterItem from './FilterItem' import DropOption from './DropOption' @@ -5,9 +6,7 @@ import Loader from './Loader/Loader.js' import ScrollBar from './ScrollBar' import * as MyLayout from './Layout/index.js' import Page from './Page' -import Debugger from './Debugger' import YulioID from './YulioID/experimental/index.js' -import YulioAuth from './YulioAuth/index.js' import CoreLoader from './CoreLoader' -export { MyLayout, Editor, FilterItem, DropOption, Loader, Page, ScrollBar, YulioID, YulioAuth, Debugger, CoreLoader } +export { MyLayout, Editor, FilterItem, DropOption, Loader, Page, ScrollBar, YulioID, CoreLoader, PostCard } diff --git a/src/layouts/BaseLayout.js b/src/layouts/BaseLayout.js index 4f5f5ca7..e38d0f82 100644 --- a/src/layouts/BaseLayout.js +++ b/src/layouts/BaseLayout.js @@ -10,15 +10,11 @@ import withRouter from 'umi/withRouter' import PublicLayout from './PublicLayout' import PrimaryLayout from './PrimaryLayout' -import SocketLayout from './SocketLayout' -import PublicViewLayout from './PublicViewLayout' import './BaseLayout.less' const LayoutMap = { - socket: SocketLayout, primary: PrimaryLayout, public: PublicLayout, - publicview: PublicViewLayout, } @withRouter diff --git a/src/layouts/PrimaryLayout.js b/src/layouts/PrimaryLayout.js index 372fa705..806202ea 100644 --- a/src/layouts/PrimaryLayout.js +++ b/src/layouts/PrimaryLayout.js @@ -2,7 +2,6 @@ /* global document */ import React, { PureComponent, Fragment } from 'react' import PropTypes from 'prop-types' -import { RefreshONCE, LogoutCall, SDCP } from 'ycore' import withRouter from 'umi/withRouter' import { connect } from 'dva' import { MyLayout } from 'components' @@ -159,7 +158,6 @@ class PrimaryLayout extends PureComponent {
-
diff --git a/src/layouts/PrimaryLayout.less b/src/layouts/PrimaryLayout.less index a286c9b7..bc3c9ab3 100644 --- a/src/layouts/PrimaryLayout.less +++ b/src/layouts/PrimaryLayout.less @@ -25,7 +25,7 @@ } .container_light { - background-color: #fff; + background-color: rgb(249, 249, 249); transition: background-color 200ms linear; } // TODO: Complete full dark theme @@ -66,6 +66,9 @@ background-color: @DarkMode-backgroud_container; transition: background-color 200ms linear; } + .ant-card{ + background-color: @DarkMode-backgroud; + } transition: background-color 200ms linear; } } diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json new file mode 100644 index 00000000..4e8253ac --- /dev/null +++ b/src/locales/en/messages.json @@ -0,0 +1,54 @@ +{ + "/dashboard": "/dashboard", + "Add Param": "Add Param", + "Address": "Address", + "Age": "Age", + "Are you sure delete this record?": "Are you sure delete this record?", + "Author": "Author", + "Avatar": "Avatar", + "Categories": "Categories", + "Clear notifications": "Clear notifications", + "Comments": "Comments", + "Create": "Create", + "Create User": "Create User", + "CreateTime": "CreateTime", + "Dark": "Dark", + "Delete": "Delete", + "Email": "Email", + "Female": "Female", + "Gender": "Gender", + "Hi,": "Hi,", + "Image": "Image", + "Light": "Light", + "Male": "Male", + "Name": "Name", + "NickName": "NickName", + "Not Found": "Not Found", + "Operation": "Operation", + "Params": "Params", + "Password": "Password", + "Phone": "Phone", + "Pick an address": "Pick an address", + "Please pick an address": "Please pick an address", + "Publised": "Publised", + "Publish Date": "Publish Date", + "Reset": "Reset", + "Search": "Search", + "Search Name": "Search Name", + "Send": "Send", + "Sign in": "Sign in", + "Sign out": "Sign out", + "Switch Theme": "Switch Theme", + "Tags": "Tags", + "The input is not valid E-mail!": "The input is not valid E-mail!", + "The input is not valid phone!": "The input is not valid phone!", + "Title": "Title", + "Total {total} Items": "Total {total} Items", + "Unpublished": "Unpublished", + "Update": "Update", + "Update User": "Update User", + "Username": "Username", + "Views": "Views", + "Visibility": "Visibility", + "You have viewed all notifications.": "You have viewed all notifications." +} \ No newline at end of file diff --git a/src/pages/main/index.js b/src/pages/main/index.js new file mode 100644 index 00000000..ff0f0e2c --- /dev/null +++ b/src/pages/main/index.js @@ -0,0 +1,28 @@ +import React from 'react' +import * as antd from 'antd' +import * as ycore from 'ycore' +import {PostCard} from 'components' + +var userData = ycore.SDCP() + + +class Main extends React.Component { + renderUserSDCP() { + const rep = [userData].map((item)=> {return JSON.stringify(item)}) + return ( + + ) + } + render(){ + const paylodd = {user: userData.username, ago: 'Hace 1 Segundo', avatar: userData.avatar, content: 'Hola buenas adios buenas'} + return ( +
+ +
+ ) + } +} +export default Main; \ No newline at end of file diff --git a/src/pages/main/index.tsx b/src/pages/main/index.tsx deleted file mode 100644 index ababced9..00000000 --- a/src/pages/main/index.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react' -import * as ycore from 'ycore' -import * as antd from 'antd' - - - -class Main extends React.Component{ - render(){ - return ( -
-

- Sigueme pe -

-
- ) - } -} -export default Main; \ No newline at end of file diff --git a/src/themes/default.less b/src/themes/default.less index 43cf08e8..219e61aa 100644 --- a/src/themes/default.less +++ b/src/themes/default.less @@ -39,7 +39,7 @@ // --- // Background color for `` -@body-background: #fff; +@body-background: rgb(249, 249, 249); // Base background color for most components @component-background: #fff; @font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', diff --git a/src/components/Layout/fonty.css b/src/themes/fonty.css similarity index 100% rename from src/components/Layout/fonty.css rename to src/themes/fonty.css diff --git a/src/themes/index.less b/src/themes/index.less index a4218382..8e5ecb3f 100644 --- a/src/themes/index.less +++ b/src/themes/index.less @@ -3,7 +3,7 @@ body { height: 100%; overflow-y: hidden; - background-color: #fff; + background-color: rgb(249, 249, 249); } ::-webkit-scrollbar-thumb { diff --git a/src/themes/mixin.less b/src/themes/mixin.less index d8a4d070..cf693569 100644 --- a/src/themes/mixin.less +++ b/src/themes/mixin.less @@ -1,4 +1,5 @@ @import '~themes/default'; +@import (inline) './fonty.css'; @dark-half: #494949; @purple: #d897eb; diff --git a/src/themes/vars.less b/src/themes/vars.less index b1c52c52..0005321e 100644 --- a/src/themes/vars.less +++ b/src/themes/vars.less @@ -2,7 +2,7 @@ @import '~themes/mixin.less'; @DarkMode-backgroud_container: rgb(24, 26, 27); -@DarkMode-backgroud: #2F2E30; +@DarkMode-backgroud: #212121; @LightMode-backgroud: #fff; @DarkMode-color_container: rgb(195, 191, 182);