mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
0.2.23-A1
This commit is contained in:
parent
e686a979b8
commit
46e443989d
11
comty_dist.service
Normal file
11
comty_dist.service
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Comty_Development
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=serve ./dist
|
||||||
|
Restart=always
|
||||||
|
User=root
|
||||||
|
WorkingDirectory=/ycore/development/comty-development
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
59
dist-server.sh
Normal file
59
dist-server.sh
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
pause(){
|
||||||
|
read -p "Press [Enter] key to continue..." fackEnterKey
|
||||||
|
}
|
||||||
|
|
||||||
|
start_cli_dev(){
|
||||||
|
sudo serve ./dist
|
||||||
|
}
|
||||||
|
|
||||||
|
start_dev(){
|
||||||
|
sudo systemctl start comty_dist
|
||||||
|
echo "Starting dev server..."
|
||||||
|
}
|
||||||
|
|
||||||
|
stop_dev(){
|
||||||
|
sudo systemctl stop comty_dist
|
||||||
|
echo "Stoping dev server..."
|
||||||
|
}
|
||||||
|
show_logs(){
|
||||||
|
sudo journalctl -u comty_dist
|
||||||
|
pause
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
show_menus() {
|
||||||
|
clear
|
||||||
|
echo "~~~~~~~~~~~~~~~~~~~~~"
|
||||||
|
echo " BuildServe Server "
|
||||||
|
echo "~~~~~~~~~~~~~~~~~~~~~"
|
||||||
|
echo "1. Start CLI Server"
|
||||||
|
echo "2. Start Server"
|
||||||
|
echo "3. Stop Server"
|
||||||
|
echo "4. Show DevServer Logs"
|
||||||
|
echo ""
|
||||||
|
echo "0. Exit"
|
||||||
|
}
|
||||||
|
|
||||||
|
read_options(){
|
||||||
|
local choice
|
||||||
|
read -p "Enter choice [ 1 - 4 ] " choice
|
||||||
|
case $choice in
|
||||||
|
0) exit 0;;
|
||||||
|
1) start_cli_dev ;;
|
||||||
|
2) start_dev ;;
|
||||||
|
3) stop_dev ;;
|
||||||
|
4) show_logs;;
|
||||||
|
*) echo -e "${RED}Error...${STD}" && sleep 2
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
trap '' SIGINT SIGQUIT SIGTSTP
|
||||||
|
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
|
||||||
|
show_menus
|
||||||
|
read_options
|
||||||
|
done
|
@ -3,7 +3,7 @@
|
|||||||
"UUID": "C8mVSr-4nmPp2-pr5Vrz-CU4kg4",
|
"UUID": "C8mVSr-4nmPp2-pr5Vrz-CU4kg4",
|
||||||
"title": "Comty™",
|
"title": "Comty™",
|
||||||
"DevBuild": true,
|
"DevBuild": true,
|
||||||
"version": "0.2.22",
|
"version": "0.2.23",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "app/main.js",
|
"main": "app/main.js",
|
||||||
"author": "RageStudio",
|
"author": "RageStudio",
|
||||||
@ -16,6 +16,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@ant-design/compatible": "^1.0.1",
|
"@ant-design/compatible": "^1.0.1",
|
||||||
|
"@ant-design/pro-layout": "^5.0.6",
|
||||||
|
"@lingui/react": "^2.9.1",
|
||||||
"@material-ui/core": "^4.9.3",
|
"@material-ui/core": "^4.9.3",
|
||||||
"@material-ui/icons": "^4.9.1",
|
"@material-ui/icons": "^4.9.1",
|
||||||
"antd": "^4.0.2",
|
"antd": "^4.0.2",
|
||||||
@ -33,6 +35,7 @@
|
|||||||
"md5": "^2.2.1",
|
"md5": "^2.2.1",
|
||||||
"moment": "^2.24.0",
|
"moment": "^2.24.0",
|
||||||
"node-sass": "^4.13.1",
|
"node-sass": "^4.13.1",
|
||||||
|
"nprogress": "^0.2.0",
|
||||||
"os-utils": "0.0.14",
|
"os-utils": "0.0.14",
|
||||||
"path-to-regexp": "^6.1.0",
|
"path-to-regexp": "^6.1.0",
|
||||||
"prop-types": "^15.7.2",
|
"prop-types": "^15.7.2",
|
||||||
@ -81,7 +84,7 @@
|
|||||||
"stylelint": "^13.1.0",
|
"stylelint": "^13.1.0",
|
||||||
"stylelint-config-prettier": "^8.0.1",
|
"stylelint-config-prettier": "^8.0.1",
|
||||||
"stylelint-config-standard": "^20.0.0",
|
"stylelint-config-standard": "^20.0.0",
|
||||||
"typescript": "^3.7.5",
|
"typescript": "^3.8.3",
|
||||||
"umi": "^2.13.3",
|
"umi": "^2.13.3",
|
||||||
"umi-plugin-react": "^1.15.2",
|
"umi-plugin-react": "^1.15.2",
|
||||||
"wait-on": "^4.0.0",
|
"wait-on": "^4.0.0",
|
||||||
|
@ -3,4 +3,4 @@ export * from './libs/comty_ng/pre.js';
|
|||||||
export * from './libs/yulio_id/pre.js';
|
export * from './libs/yulio_id/pre.js';
|
||||||
export * from './libs/ycore_styles/pre.js';
|
export * from './libs/ycore_styles/pre.js';
|
||||||
export * from './libs/ycore_sdcp/pre.js';
|
export * from './libs/ycore_sdcp/pre.js';
|
||||||
export * from './libs/comty_layout/pre.js'
|
export * from './libs/app_functions/pre.js'
|
15
src/@ycore/libs/comty_layout/pre.js → src/@ycore/libs/app_functions/pre.js
Executable file → Normal file
15
src/@ycore/libs/comty_layout/pre.js → src/@ycore/libs/app_functions/pre.js
Executable file → Normal file
@ -1,6 +1,21 @@
|
|||||||
import {SetControls, CloseControls} from "../../../components/Layout/Control"
|
import {SetControls, CloseControls} from "../../../components/Layout/Control"
|
||||||
import {SwapMode} from '../../../components/Layout/Secondary'
|
import {SwapMode} from '../../../components/Layout/Secondary'
|
||||||
|
|
||||||
|
|
||||||
|
export function QueryRuntime() {
|
||||||
|
|
||||||
|
}
|
||||||
|
export const CheckThisApp = {
|
||||||
|
desktop_mode: () => {
|
||||||
|
const a = localStorage.getItem('desktop_src')
|
||||||
|
if (a == 'true') {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
export const SecondarySwap = {
|
export const SecondarySwap = {
|
||||||
ext: ()=> {
|
ext: ()=> {
|
||||||
SwapMode.ext()
|
SwapMode.ext()
|
@ -1,7 +1,6 @@
|
|||||||
import * as ycore from 'ycore'
|
import * as ycore from 'ycore'
|
||||||
import localforage from 'localforage'
|
import localforage from 'localforage'
|
||||||
|
|
||||||
|
|
||||||
export const asyncSDCP = {
|
export const asyncSDCP = {
|
||||||
setSDCP: function (value) {
|
setSDCP: function (value) {
|
||||||
return Promise.resolve().then(function () {
|
return Promise.resolve().then(function () {
|
||||||
@ -111,6 +110,7 @@ export const CryptSDCP = {
|
|||||||
|
|
||||||
export function SetupApp(){
|
export function SetupApp(){
|
||||||
// TODO: Default sets
|
// TODO: Default sets
|
||||||
|
ycore.notify.success('Authorised, please reload the app for login!')
|
||||||
const resourceLoad = localStorage.getItem('resource_bundle')
|
const resourceLoad = localStorage.getItem('resource_bundle')
|
||||||
if (!resourceLoad) {
|
if (!resourceLoad) {
|
||||||
localStorage.setItem('resource_bundle', 'light_ng')
|
localStorage.setItem('resource_bundle', 'light_ng')
|
||||||
|
@ -12,7 +12,7 @@ export function userData(){
|
|||||||
return ycore.handlerYIDT.get()
|
return ycore.handlerYIDT.get()
|
||||||
}
|
}
|
||||||
|
|
||||||
function __API__User (payload, sdcp){
|
function __API__User (payload, sdcp, callback){
|
||||||
const { UserID, UserToken } = payload
|
const { UserID, UserToken } = payload
|
||||||
|
|
||||||
const a = ycore.CryptSDCP.atob_parse(sdcp)
|
const a = ycore.CryptSDCP.atob_parse(sdcp)
|
||||||
@ -30,7 +30,7 @@ function __API__User (payload, sdcp){
|
|||||||
exp: ycore.AppSettings.SignForNotExpire? 0 : Math.floor(Date.now() / 1000) + (60 * 60),
|
exp: ycore.AppSettings.SignForNotExpire? 0 : Math.floor(Date.now() / 1000) + (60 * 60),
|
||||||
}
|
}
|
||||||
ycore.handlerYIDT.set(frame, done => {
|
ycore.handlerYIDT.set(frame, done => {
|
||||||
done? ycore.crouter.native('main') : null
|
done? callback(false, true) : callback(true, false)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,8 +202,15 @@ export function __AppSetup__(EncUsername, EncPassword, callback) {
|
|||||||
ycore.yconsole.log(FramePayload)
|
ycore.yconsole.log(FramePayload)
|
||||||
callback(null, '200')
|
callback(null, '200')
|
||||||
|
|
||||||
ycore.GetSDCPfromCloud(FramePayload, (res) => res? __API__User(FramePayload, res) : null )
|
ycore.GetSDCPfromCloud(FramePayload, (res) => res? __API__User(FramePayload, res,
|
||||||
|
(err, done) => {
|
||||||
|
if (err){
|
||||||
|
ycore.notify.error('Critical error, token declined!')
|
||||||
|
return false
|
||||||
|
}
|
||||||
ycore.SetupApp()
|
ycore.SetupApp()
|
||||||
|
}) : null )
|
||||||
|
|
||||||
}
|
}
|
||||||
if (identState == 400) {
|
if (identState == 400) {
|
||||||
callback(null, '400')
|
callback(null, '400')
|
||||||
|
@ -143,6 +143,13 @@ export const crouter = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const notify = {
|
export const notify = {
|
||||||
|
success: (...res) => {
|
||||||
|
antd.notification.success({
|
||||||
|
message: 'Well',
|
||||||
|
description: (res.toString()),
|
||||||
|
placement: 'bottomLeft'
|
||||||
|
})
|
||||||
|
},
|
||||||
error: (...res) => {
|
error: (...res) => {
|
||||||
antd.notification.error({
|
antd.notification.error({
|
||||||
message: 'Wopss',
|
message: 'Wopss',
|
||||||
|
@ -90,9 +90,12 @@ export default class Secondary extends React.PureComponent{
|
|||||||
<img onClick={() => ycore.crouter.native(`@${userData.username}`)} src={userData.avatar} />
|
<img onClick={() => ycore.crouter.native(`@${userData.username}`)} src={userData.avatar} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.container} >
|
<div className={classnames(styles.container, {[styles.desktop_mode]: this.props.desktop_mode})} >
|
||||||
|
<div className={styles.container_body}>
|
||||||
{this.state.swap? <antd.Button type="ghost" icon={<Icons.LeftOutlined />} onClick={() => this.closeSwap()} > Back </antd.Button> : null}
|
{this.state.swap? <antd.Button type="ghost" icon={<Icons.LeftOutlined />} onClick={() => this.closeSwap()} > Back </antd.Button> : null}
|
||||||
{this.renderMode()}
|
{this.renderMode()}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -16,7 +16,11 @@
|
|||||||
width: 96vw;
|
width: 96vw;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
>.container{
|
||||||
|
border-radius: 12px 12px 12px 12px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
transition: all @SwapAnimDuration ease-in-out;
|
transition: all @SwapAnimDuration ease-in-out;
|
||||||
|
|
||||||
@ -53,8 +57,9 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
background-color: #201F23;
|
background-color: #201F23;
|
||||||
color: @DarkMode-color_container !important;
|
color: @DarkMode-color_container !important;
|
||||||
border-radius: 32px 0 0 32px;
|
&.desktop_mode{
|
||||||
padding: 30px 375px 30px 75px;
|
border-radius: 0 12px 12px 0;
|
||||||
|
}
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
:global{
|
:global{
|
||||||
@ -73,6 +78,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.container_body{
|
||||||
|
padding: 30px 375px 30px 75px;
|
||||||
|
}
|
||||||
|
|
||||||
.container_2{
|
.container_2{
|
||||||
z-index: 201;
|
z-index: 201;
|
||||||
|
@ -13,8 +13,6 @@ import * as ycore from 'ycore';
|
|||||||
import router from 'umi/router';
|
import router from 'umi/router';
|
||||||
import {CustomIcons} from 'components'
|
import {CustomIcons} from 'components'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@withI18n()
|
@withI18n()
|
||||||
class Sider extends PureComponent {
|
class Sider extends PureComponent {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
@ -68,7 +66,7 @@ class Sider extends PureComponent {
|
|||||||
theme={this.StrictMode()}
|
theme={this.StrictMode()}
|
||||||
width="180"
|
width="180"
|
||||||
collapsed={collapsed}
|
collapsed={collapsed}
|
||||||
className={classnames(styles.sider, {[styles.darkmd]: this.isDarkMode()} )}
|
className={classnames(styles.sider, {[styles.darkmd]: this.isDarkMode(), [styles.desktop_mode]: this.props.desktop_mode} )}
|
||||||
onMouseEnter={() => this.setState({ collapsedWidth: '90' })}
|
onMouseEnter={() => this.setState({ collapsedWidth: '90' })}
|
||||||
onMouseLeave={() => this.setState({ collapsedWidth: '35' })}
|
onMouseLeave={() => this.setState({ collapsedWidth: '35' })}
|
||||||
>
|
>
|
||||||
|
@ -109,10 +109,10 @@
|
|||||||
border-color: transparent;
|
border-color: transparent;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-family: "Poppins", sans-serif;
|
font-family: "Poppins", sans-serif;
|
||||||
height: 100%;
|
height: 100vh;
|
||||||
width: 100%;
|
z-index: 100;
|
||||||
left: 0;
|
float: left;
|
||||||
position: absolute;
|
position: relative;
|
||||||
|
|
||||||
:global {
|
:global {
|
||||||
.ant-layout-sider-dark {
|
.ant-layout-sider-dark {
|
||||||
@ -154,9 +154,8 @@
|
|||||||
|
|
||||||
.sider {
|
.sider {
|
||||||
border-right: transparent;
|
border-right: transparent;
|
||||||
border-radius: 0 10px 10px 0 ;
|
&.desktop_mode{
|
||||||
&.darkmd {
|
border-radius: 12px 0 0 12px;
|
||||||
border: none;
|
|
||||||
}
|
}
|
||||||
height: 100%;
|
height: 100%;
|
||||||
z-index: 50;
|
z-index: 50;
|
||||||
|
38
src/components/Layout/WindowAppBar.js
Normal file
38
src/components/Layout/WindowAppBar.js
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import React from 'react'
|
||||||
|
import styles from './WindowAppBar.less'
|
||||||
|
import * as Icons from '@ant-design/icons'
|
||||||
|
const remote = {
|
||||||
|
getCurrentWindow: () =>{
|
||||||
|
return
|
||||||
|
},
|
||||||
|
handleFullRescale: () => {
|
||||||
|
return
|
||||||
|
},
|
||||||
|
app: {
|
||||||
|
quit: () => {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export default class WindowAppBar extends React.PureComponent {
|
||||||
|
handleFullRescale(){
|
||||||
|
return
|
||||||
|
// const currentWindow = remote.getCurrentWindow()
|
||||||
|
// if(currentWindow.isMaximized()) {
|
||||||
|
// currentWindow.unmaximize()
|
||||||
|
// } else {
|
||||||
|
// currentWindow.maximize()
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
render(){
|
||||||
|
return(
|
||||||
|
<div className={styles.WindowAppBar}>
|
||||||
|
<div className={styles.WindowControl}>
|
||||||
|
<Icons.MinusOutlined onClick={() => remote.getCurrentWindow().minimize() } id="minimize-button" />
|
||||||
|
<Icons.FullscreenOutlined onClick={() => this.handleFullRescale()} />
|
||||||
|
<Icons.CloseOutlined onClick={() => remote.app.quit()} id="close-button" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
31
src/components/Layout/WindowAppBar.less
Normal file
31
src/components/Layout/WindowAppBar.less
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
.WindowAppBar {
|
||||||
|
-webkit-app-region: drag;
|
||||||
|
position: relative;
|
||||||
|
vertical-align: top;
|
||||||
|
width: 100%;
|
||||||
|
height: 25px;
|
||||||
|
z-index: 5000;
|
||||||
|
background-color: #2d2d2d;
|
||||||
|
}
|
||||||
|
.WindowControl {
|
||||||
|
float: right;
|
||||||
|
height: 100%;
|
||||||
|
padding: 0 20px 0 0;
|
||||||
|
transition: all 140ms linear;
|
||||||
|
:global {
|
||||||
|
color: #747474;
|
||||||
|
.anticon {
|
||||||
|
margin: 0 15px 0 15px;
|
||||||
|
display: inline-block;
|
||||||
|
color: inherit;
|
||||||
|
font-style: normal;
|
||||||
|
vertical-align: middle;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.WindowControl:hover{
|
||||||
|
:global{
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
import Sider from './Sider'
|
import Sider from './Sider'
|
||||||
import Control from './Control'
|
import Control from './Control'
|
||||||
import Secondary from './Secondary/index.js'
|
import Secondary from './Secondary/index.js'
|
||||||
|
import WindowAppBar from './WindowAppBar'
|
||||||
|
|
||||||
export { Sider, Control, Secondary }
|
export { Sider, Control, Secondary,WindowAppBar }
|
||||||
|
@ -6,6 +6,8 @@ import { Button, Input, Drawer } from 'antd';
|
|||||||
import * as ycore from 'ycore'
|
import * as ycore from 'ycore'
|
||||||
|
|
||||||
import styles from './index.less';
|
import styles from './index.less';
|
||||||
|
import { ANT_MARK } from 'antd/lib/locale-provider';
|
||||||
|
import { validateLocaleAndSetLanguage } from 'typescript';
|
||||||
|
|
||||||
const FormItem = Form.Item
|
const FormItem = Form.Item
|
||||||
|
|
||||||
@ -101,6 +103,7 @@ class YulioID extends Component {
|
|||||||
<div><br/><br/><br/>
|
<div><br/><br/><br/>
|
||||||
<div className={styles.resultbox}>
|
<div className={styles.resultbox}>
|
||||||
<h6 > {StateMessage} </h6>
|
<h6 > {StateMessage} </h6>
|
||||||
|
<Button onClick={() => ycore.RefreshONCE()}> Reload </Button>
|
||||||
{StateException ? <div className={styles.retryBTN}><Button style={{ width: '270px' }} type='dashed' onClick={() => this.handleRetry()}>Retry</Button></div> : null}
|
{StateException ? <div className={styles.retryBTN}><Button style={{ width: '270px' }} type='dashed' onClick={() => this.handleRetry()}>Retry</Button></div> : null}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|
||||||
.bar {
|
.bar {
|
||||||
background: @primary-color;
|
background: transparent;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 2048;
|
z-index: 2048;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
@ -16,7 +16,7 @@ import * as Icons from '@ant-design/icons'
|
|||||||
import styles from './PrimaryLayout.less'
|
import styles from './PrimaryLayout.less'
|
||||||
|
|
||||||
const { Content } = antd.Layout
|
const { Content } = antd.Layout
|
||||||
const { Sider, Control, Secondary } = MyLayout
|
const { Sider, Control, Secondary, WindowAppBar } = MyLayout
|
||||||
|
|
||||||
@withRouter
|
@withRouter
|
||||||
@connect(({ app, loading }) => ({ app, loading }))
|
@connect(({ app, loading }) => ({ app, loading }))
|
||||||
@ -27,12 +27,17 @@ class PrimaryLayout extends React.Component {
|
|||||||
this.state = {
|
this.state = {
|
||||||
collapsed: (ycore.AppSettings.default_collapse_sider? true : false),
|
collapsed: (ycore.AppSettings.default_collapse_sider? true : false),
|
||||||
isMobile: false,
|
isMobile: false,
|
||||||
|
desktop_mode: false,
|
||||||
userData: ''
|
userData: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.setState({ userData: ycore.userData() })
|
this.setState({
|
||||||
|
userData: ycore.userData(),
|
||||||
|
desktop_mode: ycore.CheckThisApp.desktop_mode()
|
||||||
|
})
|
||||||
|
|
||||||
this.enquireHandler = enquireScreen(mobile => {
|
this.enquireHandler = enquireScreen(mobile => {
|
||||||
const { isMobile } = this.state
|
const { isMobile } = this.state
|
||||||
if (isMobile !== mobile) {
|
if (isMobile !== mobile) {
|
||||||
@ -64,11 +69,12 @@ class PrimaryLayout extends React.Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { app, location, dispatch, children } = this.props
|
const { app, location, dispatch, children } = this.props
|
||||||
const { userData, collapsed, isMobile } = this.state
|
const { userData, collapsed, isMobile, desktop_mode } = this.state
|
||||||
const { onCollapseChange } = this
|
const { onCollapseChange } = this
|
||||||
const { theme } = app
|
const { theme } = app
|
||||||
|
|
||||||
const SiderProps = {
|
const SiderProps = {
|
||||||
|
desktop_mode: desktop_mode,
|
||||||
theme,
|
theme,
|
||||||
userData,
|
userData,
|
||||||
isMobile,
|
isMobile,
|
||||||
@ -83,6 +89,7 @@ class PrimaryLayout extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const SecondaryProps = {
|
const SecondaryProps = {
|
||||||
|
desktop_mode: desktop_mode,
|
||||||
userData,
|
userData,
|
||||||
isMobile,
|
isMobile,
|
||||||
theme,
|
theme,
|
||||||
@ -90,9 +97,10 @@ class PrimaryLayout extends React.Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<React.Fragment >
|
<React.Fragment >
|
||||||
|
<div className={classnames(styles.AppWrapper, {[styles.desktop_mode]: desktop_mode})}>
|
||||||
{isMobile? <MobileWarning /> : null}
|
{isMobile? <MobileWarning /> : null}
|
||||||
<div className={styles.BarControlWrapper}><Control /></div>
|
<div className={styles.BarControlWrapper}><Control /></div>
|
||||||
<antd.Layout className={classnames( styles.layout, {[styles.md_dark]: this.isDarkMode() })}>
|
<antd.Layout className={classnames( styles.layout, {[styles.md_dark]: this.isDarkMode(), [styles.desktop_mode]: desktop_mode })}>
|
||||||
<Sider {...SiderProps}/>
|
<Sider {...SiderProps}/>
|
||||||
|
|
||||||
<div id="primaryLayout" className={styles.leftContainer}>
|
<div id="primaryLayout" className={styles.leftContainer}>
|
||||||
@ -107,6 +115,7 @@ class PrimaryLayout extends React.Component {
|
|||||||
<Secondary {...SecondaryProps} />
|
<Secondary {...SecondaryProps} />
|
||||||
|
|
||||||
</antd.Layout>
|
</antd.Layout>
|
||||||
|
</div>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1,21 +1,9 @@
|
|||||||
@import '~themes/vars.less';
|
@import '~themes/vars.less';
|
||||||
|
|
||||||
|
.AppWrapper{
|
||||||
.mobilewarning{
|
&.desktop_mode{
|
||||||
background-color: rgba(0, 0, 0, 0.975);
|
padding: 0 30px 0 30px;
|
||||||
color: white;
|
border-radius: 10px;
|
||||||
width: 100%;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
z-index: 100000;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
text-align: center;
|
|
||||||
:global {
|
|
||||||
.ant-result-title {
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,8 +20,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.layout{
|
.layout{
|
||||||
|
|
||||||
background-color: @Theme-Layout-Backgroud; //#E2E6E9;
|
background-color: @Theme-Layout-Backgroud; //#E2E6E9;
|
||||||
transition: background-color 200ms linear;
|
transition: background-color 200ms linear;
|
||||||
|
&.desktop_mode{
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
&.md_radius{
|
&.md_radius{
|
||||||
width: 95%;
|
width: 95%;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
@ -51,7 +51,7 @@ export default {
|
|||||||
router.push({pathname: '/main',})
|
router.push({pathname: '/main',})
|
||||||
}
|
}
|
||||||
ycore.MakeBackup()
|
ycore.MakeBackup()
|
||||||
ycore.UpdateSDCP()
|
ycore.QueryRuntime()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
else if(!pathMatchRegexp(['','/login'], window.location.pathname)) {
|
else if(!pathMatchRegexp(['','/login'], window.location.pathname)) {
|
||||||
|
@ -4,13 +4,13 @@ import { Page } from 'components'
|
|||||||
import styles from './404.less'
|
import styles from './404.less'
|
||||||
|
|
||||||
const Error404 = () => (
|
const Error404 = () => (
|
||||||
<Page inner>
|
|
||||||
<div className={styles.error}>
|
<div className={styles.error}>
|
||||||
<LegacyIcon type="api" />
|
<LegacyIcon type="api" />
|
||||||
<h1>OBA BLYAT</h1>
|
<h1>OBA BLYAT</h1>
|
||||||
<p><strong>ERROR 404</strong></p>
|
<p><strong>ERROR 404</strong></p>
|
||||||
</div>
|
</div>
|
||||||
</Page>
|
|
||||||
)
|
)
|
||||||
|
|
||||||
export default Error404
|
export default Error404
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||||
}
|
}
|
||||||
.error {
|
.error {
|
||||||
|
background-color: transparent;
|
||||||
color: black;
|
color: black;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -46,6 +46,18 @@ export default class __m extends React.Component {
|
|||||||
this.setState({s_ses: res})
|
this.setState({s_ses: res})
|
||||||
})}
|
})}
|
||||||
}
|
}
|
||||||
|
handleDesktop(){
|
||||||
|
const a = localStorage.getItem('desktop_src')
|
||||||
|
let to;
|
||||||
|
if (a == 'false') {
|
||||||
|
to = true
|
||||||
|
}else {
|
||||||
|
to = false
|
||||||
|
}
|
||||||
|
ycore.notify.proccess('Switching to ', to? 'Desktop Mode' : 'Normal Mode')
|
||||||
|
localStorage.setItem('desktop_src', to)
|
||||||
|
setTimeout(() => ycore.RefreshONCE(), 2000)
|
||||||
|
}
|
||||||
DescompileSDCP(){
|
DescompileSDCP(){
|
||||||
let result = {};
|
let result = {};
|
||||||
for (var i = 0; i < UserData.length; i++) {
|
for (var i = 0; i < UserData.length; i++) {
|
||||||
@ -107,6 +119,7 @@ export default class __m extends React.Component {
|
|||||||
|
|
||||||
<antd.Button onClick={() => ycore.notify.error('Error Mock 1')} > notify.error </antd.Button>
|
<antd.Button onClick={() => ycore.notify.error('Error Mock 1')} > notify.error </antd.Button>
|
||||||
<antd.Button onClick={() => ycore.notify.proccess('Proccess Mock 1')} > notify.proccess </antd.Button>
|
<antd.Button onClick={() => ycore.notify.proccess('Proccess Mock 1')} > notify.proccess </antd.Button>
|
||||||
|
<antd.Button onClick={() => this.handleDesktop()} > Switch to Desktop_mode </antd.Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.titleHeader}>
|
<div className={styles.titleHeader}>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import React, { PureComponent } from 'react'
|
import React, { PureComponent } from 'react'
|
||||||
import * as ycore from 'ycore'
|
import * as ycore from 'ycore'
|
||||||
|
|
||||||
@withI18n()
|
|
||||||
class Index extends PureComponent {
|
class Index extends PureComponent {
|
||||||
render() {
|
render() {
|
||||||
ycore.crouter.native(`login`)
|
ycore.crouter.native(`login`)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
body {
|
body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
background-color: rgb(249, 249, 249);
|
background-color: transparent; // rgb(249, 249, 249);
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar-thumb {
|
::-webkit-scrollbar-thumb {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user