mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 02:24:16 +00:00
Styles update
This commit is contained in:
parent
cf73fac82a
commit
2140218680
@ -12,5 +12,6 @@ export var DevOptions = {
|
||||
StrictLightMode: ReturnDevOption('strict_lightMode'),
|
||||
SignForNotExpire: ReturnDevOption('force_showDevLogs'),
|
||||
MaxJWTexpire: '1556952',
|
||||
MaxLengthPosts: '512'
|
||||
MaxLengthPosts: '512',
|
||||
CurrentBundle: 'light_ng'
|
||||
}
|
@ -3,6 +3,6 @@ const path = require('path')
|
||||
const lessToJs = require('less-vars-to-js')
|
||||
|
||||
module.exports = () => {
|
||||
const themePath = path.join(__dirname, '../src/themes/vars.less')
|
||||
const themePath = path.join(__dirname, `../src/themes/vars.less`)
|
||||
return lessToJs(fs.readFileSync(themePath, 'utf8'))
|
||||
}
|
||||
|
@ -1,10 +1,15 @@
|
||||
module.exports = {
|
||||
siteName: 'Comty',
|
||||
copyright: 'RageStudio©',
|
||||
logoPath: '/logo.svg',
|
||||
|
||||
LogoPath: '/logo.svg',
|
||||
FullLogoPath: '/full_logo.svg',
|
||||
DarkFullLogoPath: '/dark_full_logo.svg',
|
||||
DarkLogoPath: '/dark_logo.svg',
|
||||
|
||||
apiPrefix: '/api/v1',
|
||||
fixedHeader: true, // sticky primary layout header
|
||||
resource_bundle: 'light_ng',
|
||||
|
||||
App_Config: {
|
||||
InitRes: { width: 1000, height: 900},
|
||||
|
@ -1,10 +1,15 @@
|
||||
const fromStorage = JSON.parse(localStorage.getItem('app_settings'))
|
||||
function StorageValued(e){
|
||||
const Ite = fromStorage.map(item => {
|
||||
return item.SettingID === e? item.value : null
|
||||
})
|
||||
const fr = Ite.filter(Boolean)
|
||||
return fr.toString()
|
||||
try {
|
||||
const Ite = fromStorage.map(item => {
|
||||
return item.SettingID === e? item.value : null
|
||||
})
|
||||
const fr = Ite.filter(Boolean)
|
||||
return fr.toString()
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
return false
|
||||
}
|
||||
}
|
||||
export var AppSettings = [
|
||||
{
|
||||
|
@ -1,6 +1,8 @@
|
||||
{
|
||||
"name": "comty-development",
|
||||
"version": "0.1.13",
|
||||
"title": "Comty™",
|
||||
"DevBuild": true,
|
||||
"version": "0.1.15",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"author": "RageStudio",
|
||||
|
1
public/dark_full_logo.svg
Normal file
1
public/dark_full_logo.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg id="Capa_1" data-name="Capa 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 872.96 353.22"><defs><style>.cls-1{fill:#2b2c2e;}.cls-2{fill:#f3b425;}</style></defs><title>BalckComtyNG-Logo</title><path class="cls-1" d="M508.52,166.9c16.74-19.81,45-20.54,63.07-10.8,21,11.33,32.12,29,31.92,54.52q-.35,43.2.06,86.4c0,4.75-1.23,5.91-5.52,5.74-8.89-.37-17.82-.37-26.71,0-4.45.18-5.89-.87-5.84-6,.28-28.61.15-57.23.13-85.85,0-18.45-12.92-27.37-28.67-19.7-6.86,3.35-9.09,9.71-9.09,17.31q0,43.2,0,86.41c0,9,1,7.62-7.16,7.7-8.55.09-17.11-.22-25.66.12-4.26.17-5.6-1-5.57-5.77.22-28.61.12-57.23.09-85.85,0-3.32.19-6.68-.88-9.92-3.89-11.84-17.82-16.77-27.72-9.72-6,4.28-9.29,9.92-9.23,18,.2,29-.06,58,.2,87,.05,5.3-1.5,6.47-6.13,6.29-9.24-.37-18.5-.21-27.75-.05-2.95.05-4.31-.44-4.3-4.16q.18-70.8.11-141.59c0-1.35-.68-3.56,1.14-3.78,3.19-.4,6.65-1.42,9.58.87a31.77,31.77,0,0,1,4,4.41c5,5.79,5,5.82,11.09,1.5a51,51,0,0,1,22.25-9.07C479.9,148.17,495.75,152.45,508.52,166.9Z" transform="translate(-12.17 -6.57)"/><path class="cls-1" d="M843.78,298.68c-3.36-.73-5.31.77-7.29,1.73-17.69,8.66-34.83,5.65-51.27-3.46-22.64-12.54-33.4-33.26-33.78-60-.37-26.38,0-52.77-.19-79.16,0-3.9,1.08-5.11,4.73-5,9.25.24,18.51.31,27.76,0,4.31-.16,5.62,1.13,5.58,5.84-.23,23.23-.13,46.45-.07,69.68,0,4.45.19,8.92.62,13.34,1.19,12.07,7.17,20.39,18.08,24s20.57,1.67,28.89-7.2c6.92-7.36,10-15.85,9.86-26.36-.37-24.53,0-49.06-.2-73.59,0-4.17.73-5.89,5.1-5.72,9.77.36,19.55.22,29.33,0,3.17-.06,4.21,1,4.2,4.44-.1,42.36.13,84.73-.18,127.1-.14,20.42-8.19,38-21.52,52-13.87,14.59-31,23.07-51,23.42-6.63.12-13.27-.12-19.9-.05-2.42,0-3.42-.82-3.4-3.53.1-10.41.15-20.81,0-31.22-.06-3.73,1.94-3.56,4.37-3.62,8-.2,16,.92,24-.77,8.3-1.75,14.8-6.31,20-13.21C839.5,304.66,841.44,301.9,843.78,298.68Z" transform="translate(-12.17 -6.57)"/><path class="cls-1" d="M703.29,153.08c8,0,16.06.12,24.08-.06,3-.06,4.38.63,4.3,4.27-.22,9.83-.2,19.68,0,29.52.07,3.45-1,4.4-4.17,4.37-15.88-.15-31.76.17-47.63-.22-4.8-.12-5.88,1.6-5.79,6.19.24,12.25.85,24.55.08,36.74-1.1,17.26,15.32,31,28.25,30.7,8.38-.17,16.76.13,25.13-.08,3.23-.07,4.19,1.07,4.13,4.45-.18,9.84,0,19.68-.07,29.52,0,2,.44,4.3-2.66,4.17-14.25-.61-28.66,1.8-42.71-2.26-23.79-6.88-39.76-22.35-47.17-47.86a81.94,81.94,0,0,1-2.92-23.32c0-11.33-.09-22.66.06-34,0-3.06-.73-4.16-3.77-4.23-4.42-.09-10.34,2.31-12.85-1.21-2.13-3-.62-8.93-.65-13.57,0-5.57.39-11.18-.12-16.7-.53-5.67,1.57-7.22,6.42-6.49,2,.31,4.2-.16,6.27.1,3.65.45,4.77-1,4.73-4.93-.19-16.53,0-33.06-.17-49.58-.06-4.22.79-5.85,5.12-5.68,9.41.37,18.85.33,28.26,0,4-.13,5,1.32,5,5.38-.19,16.52.05,33-.17,49.55-.06,4.19,1.07,5.45,5,5.3C687.23,152.86,695.27,153.08,703.29,153.08Z" transform="translate(-12.17 -6.57)"/><path class="cls-1" d="M317,305.48c-105.54-6.08-96.87-163.56,7.16-158.23C421.18,156.65,412.92,304.26,317,305.48Zm.91-119.79c-51-.11-49.27,80.52-.75,81.23C368.21,266.19,366.62,186.35,317.88,185.69Z" transform="translate(-12.17 -6.57)"/><path class="cls-1" d="M65.81,201.94a99.4,99.4,0,0,1,22.54-63.18c26.28-32.3,60.3-44.42,100-37.77,16.86,2.82,31.7,10.71,45.55,21,2.2,1.64,1.88,3.34.48,5.1-7,8.81-11.71,19.19-17.44,28.88-1.38,2.34-2.41,2.63-4.29,1-.79-.69-1.8-1.13-2.54-1.87-18.9-19-54.52-20.41-76.11-5-9.33,6.65-15.9,15.06-21.52,25.1-9.14,16.34-9.58,33.62-2.89,50.08,9.07,22.35,25.54,36.66,48.74,40.48,19.38,3.18,37.1-1.07,52.17-15.1,3-2.74,4.91-3.46,7.42,1,5.14,9.19,9.57,18.89,16.3,27,1.57,1.89,1.88,3.67-.52,5.49-20.36,15.43-42.86,23.65-68,22.76A99.34,99.34,0,0,1,114.68,291c-20.59-13.21-34.88-31.53-43.24-55.72C67.74,224.64,66.25,214,65.81,201.94Z" transform="translate(-12.17 -6.57)"/><path class="cls-2" d="M23.86,93.48c-4.66,0-8-2.53-10.15-6.63a11.41,11.41,0,0,1,.44-12.15c9.5-13.91,21.42-25.17,34.6-35A189.69,189.69,0,0,1,71.38,24.93,181.12,181.12,0,0,1,120.11,7c5.25-1.13,10.27-.22,13.68,4.59,5.08,7.19,1.69,17.32-6.7,19.22-14,3.18-27.77,7.38-40.62,14.1A156.19,156.19,0,0,0,51.34,69.77,145.41,145.41,0,0,0,35.11,87.71C31.69,92.24,29.31,93.46,23.86,93.48Z" transform="translate(-12.17 -6.57)"/><path class="cls-2" d="M84.13,72.24c9.54-6.15,15.92-9.6,19.52-11.48A94.55,94.55,0,0,1,121,54c5.56-1.59,7.9-1.7,10.32-1.06.87.23,8.35,2.33,10.14,9.49a13.72,13.72,0,0,1-1.1,9.06c-1.71,3.21-4.94,5.5-9.5,6.47C111.7,82,95.45,92,81,105.43a93.29,93.29,0,0,0-9.2,10.65c-3.59,4.54-8.14,6.54-13.46,5.2a11.63,11.63,0,0,1-5.39-2.93,12.59,12.59,0,0,1-3.75-7.53c-.35-3.17.69-5.54,2-8.41a31.19,31.19,0,0,1,6.9-9.65A202.75,202.75,0,0,1,84.13,72.24Z" transform="translate(-12.17 -6.57)"/></svg>
|
After Width: | Height: | Size: 4.4 KiB |
1
public/dark_logo.svg
Normal file
1
public/dark_logo.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg id="Capa_1" data-name="Capa 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 185.74 232.39"><defs><style>.cls-1{fill:#2b2c2e;}.cls-2{fill:#feb500;}</style></defs><title>black_icon_new2019_black</title><path class="cls-1" d="M342.49,451.06c8.28,8.2,16.5,16.44,24.86,24.55,1.85,1.8.6,2.83-.41,4.08-15.56,19.36-35.85,29.16-60.57,27.74-35.91-2.07-63-26.9-67.73-62.51-5.41-40.92,21.42-78.11,59-85.47,25.83-5.05,55.39,7.3,69.51,29.39,1.07,1.68,2.31,2.94.15,5-8.15,7.85-16.08,15.91-24.21,24-.37-.34-.84-.57-1-.93C334.77,401.49,322.76,394,307,395c-13.74.89-25.63,11.25-30.41,26.51-7,22.32,3.85,43.55,25,48.88C317.7,474.46,332.28,467.59,342.49,451.06Z" transform="translate(-182.77 -275.17)"/><path class="cls-2" d="M192.52,352.88c-3.43-.21-6.6-2.45-8.51-6.25a10.13,10.13,0,0,1,1-11.27,152.39,152.39,0,0,1,33-32.36,159,159,0,0,1,61.51-27.38c8-1.68,13.53,1.45,15.06,8.26,1.48,6.53-2.47,11.86-10.49,13.61-33,7.21-59.84,24.16-80.78,50.57C200.76,351.35,197.56,352.84,192.52,352.88Z" transform="translate(-182.77 -275.17)"/><path class="cls-2" d="M228.48,378.16c-5.69.06-9-2.26-11.2-6.11a9.71,9.71,0,0,1,.8-11.28c17.71-23.09,41-37.62,69.2-44.2,5.59-1.3,11.28,2.58,12.63,8,1.59,6.42-1.53,12.16-8.11,13.87a110.09,110.09,0,0,0-24.27,9,100.52,100.52,0,0,0-31.21,26C234,376.28,231.31,378.28,228.48,378.16Z" transform="translate(-182.77 -275.17)"/></svg>
|
After Width: | Height: | Size: 1.3 KiB |
@ -25,6 +25,7 @@ export function InitSDCP(values, done) {
|
||||
{
|
||||
let cooked = JSON.parse(response)['user_data']
|
||||
let Ensamblator = btoa(JSON.stringify(cooked))
|
||||
ycore.SetupApp()
|
||||
ycore.asyncSDCP.setSDCP(Ensamblator).then(() => {
|
||||
ycore.DevOptions.ShowFunctionsLogs? console.log(prefix, ' SDCP Setup done') : null
|
||||
return done(true)
|
||||
@ -77,4 +78,13 @@ export function SDCP() {
|
||||
return null
|
||||
}
|
||||
}
|
||||
}
|
||||
export function SetupApp(){
|
||||
// TODO: Default sets
|
||||
const resourceLoad = localStorage.getItem('resource_bundle')
|
||||
if (!resourceLoad) {
|
||||
localStorage.setItem('resource_bundle', 'light_ng')
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,3 +1,11 @@
|
||||
export function init(){
|
||||
console.log('Init pass!! styles')
|
||||
}
|
||||
import {DevOptions} from 'ycore'
|
||||
|
||||
export function CurrentTheme(){
|
||||
try {
|
||||
const bundle = localStorage.getItem('resource_bundle') || DevOptions.resource_bundle
|
||||
console.log('Loading resource Bundle =>', bundle)
|
||||
return bundle
|
||||
} catch (error) {
|
||||
return null
|
||||
}
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
import React from 'react'
|
||||
import {AppSettings} from '../../globals/settings.js'
|
||||
import {Endpoints} from 'globals/endpoints.js'
|
||||
import umiRouter from 'umi/router';
|
||||
@ -12,7 +13,11 @@ export var endpoints = Endpoints;
|
||||
export var yConfig = config.yConfig;
|
||||
|
||||
var package_json = require("../../package.json");
|
||||
|
||||
export const AppInfo = {
|
||||
name: package_json.title,
|
||||
version: package_json.version,
|
||||
logo: config.FullLogoPath
|
||||
}
|
||||
export function ReturnDevOption(e){
|
||||
const Ite = AppSettings.map(item => {
|
||||
return item.SettingID === e? item.value : null
|
||||
@ -91,4 +96,29 @@ export const asyncSessionStorage = {
|
||||
export function RefreshONCE(){
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
export function DetectNoNStableBuild(e1) {
|
||||
switch (e1) {
|
||||
case 'TagComponent':
|
||||
if (package_json.DevBuild == true) {
|
||||
return React.createElement(antd.Tag, { color: 'orange' }, " No Stable");
|
||||
}
|
||||
if (package_json.DevBuild == false) {
|
||||
return React.createElement(antd.Tag, { color: 'blue' }, " Stable");
|
||||
}
|
||||
else {
|
||||
return ('No Stable');
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (package_json.DevBuild == true) {
|
||||
return ('No Stable');
|
||||
}
|
||||
if (package_json.DevBuild == false) {
|
||||
return ('Stable');
|
||||
}
|
||||
else {
|
||||
return ('No Stable');
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
const VerifiedBadge = () => (<svg xmlns="http://www.w3.org/2000/svg" fill="#55acee" width="15" height="15" viewBox="0 0 24 24"> <path d="M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12m-13 5l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"></path></svg>)
|
||||
const CommonThings = () => (<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="#ff5991" d="M15,2C16.94,2 18.59,2.7 19.95,4.05C21.3,5.41 22,7.06 22,9C22,10.56 21.5,11.96 20.58,13.2C19.64,14.43 18.44,15.27 16.97,15.7L17,15.38V15C17,12.81 16.23,10.93 14.65,9.35C13.07,7.77 11.19,7 9,7H8.63L8.3,7.03C8.73,5.56 9.57,4.36 10.8,3.42C12.04,2.5 13.44,2 15,2M9,8A7,7 0 0,1 16,15A7,7 0 0,1 9,22A7,7 0 0,1 2,15A7,7 0 0,1 9,8M9,10A5,5 0 0,0 4,15A5,5 0 0,0 9,20A5,5 0 0,0 14,15A5,5 0 0,0 9,10Z"></path></svg>)
|
||||
const SunSVG = () => (<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 21 21"><g fill="none" fill-rule="evenodd"><path fill="#fff" fill-rule="nonzero" d="M21 10.5l-3 3V18h-4.5l-3 3-3-3H3v-4.5l-3-3 3-3V3h4.5l3-3 3 3H18v4.5z"></path><circle stroke="#000" stroke-width="1.5" cx="10.5" cy="10.5" r="4"></circle></g></svg>)
|
||||
const MoonSVG = () => (<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 21 21"><g fill="none" fill-rule="evenodd"><circle fill="#fff" cx="10.5" cy="10.5" r="10.5"></circle><path d="M13.396 11c0-3.019-1.832-5.584-4.394-6.566A6.427 6.427 0 0111.304 4C15.002 4 18 7.135 18 11c0 3.866-2.998 7-6.698 7A6.42 6.42 0 019 17.566c2.564-.98 4.396-3.545 4.396-6.566z" fill="#2F2E30" fill-rule="nonzero"></path></g></svg>)
|
||||
const SunSVG = () => (<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 21 21"><g fill="none" fill-rule="evenodd"><path fill="#fff" fill-rule="nonzero" d="M21 10.5l-3 3V18h-4.5l-3 3-3-3H3v-4.5l-3-3 3-3V3h4.5l3-3 3 3H18v4.5z"></path><circle stroke="#000" stroke-width="1.5" cx="10.5" cy="10.5" r="4"></circle></g></svg>)
|
||||
const MoonSVG = () => (<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 21 21"><g fill="none" fill-rule="evenodd"><circle fill="#fff" cx="10.5" cy="10.5" r="10.5"></circle><path d="M13.396 11c0-3.019-1.832-5.584-4.394-6.566A6.427 6.427 0 0111.304 4C15.002 4 18 7.135 18 11c0 3.866-2.998 7-6.698 7A6.42 6.42 0 019 17.566c2.564-.98 4.396-3.545 4.396-6.566z" fill="#2F2E30" fill-rule="nonzero"></path></g></svg>)
|
||||
|
||||
const CustomIcons = {VerifiedBadge, CommonThings, SunSVG, MoonSVG}
|
||||
export default CustomIcons
|
||||
|
@ -9,9 +9,6 @@
|
||||
width: 30px;
|
||||
margin: 0 auto 0 auto;
|
||||
height: 190px;
|
||||
|
||||
|
||||
|
||||
}
|
||||
.brand {
|
||||
display: flex;
|
||||
@ -36,7 +33,8 @@
|
||||
box-shadow: 0px 9px 15px -6px rgba(158,158,158,0.82);
|
||||
display: flex;
|
||||
width: 100%;
|
||||
background-color: #F3F3F3;
|
||||
background-color: #FEB500; // * #F3F3F3 *//
|
||||
color:#fff;
|
||||
height: 45px;
|
||||
z-index: 9;
|
||||
align-items: center;
|
||||
@ -109,7 +107,7 @@
|
||||
}
|
||||
|
||||
.button {
|
||||
color: #b2b0c7;
|
||||
color:#fff;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
@ -128,7 +126,7 @@
|
||||
|
||||
|
||||
.iconButton {
|
||||
color: #b2b0c7;
|
||||
color: @Theme-Shade-Color;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
|
@ -1,10 +1,11 @@
|
||||
import React, { PureComponent } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import classnames from 'classnames'
|
||||
import * as antd from 'antd'
|
||||
import { withI18n, Trans } from '@lingui/react'
|
||||
import ScrollBar from '../ScrollBar'
|
||||
import { config } from 'utils'
|
||||
import styles from './L_Sider.less'
|
||||
import styles from './Sider.less'
|
||||
import * as ycore from 'ycore';
|
||||
import router from 'umi/router';
|
||||
import {CustomIcons} from 'components'
|
||||
@ -13,7 +14,7 @@ import {CustomIcons} from 'components'
|
||||
const userData = ycore.SDCP()
|
||||
|
||||
@withI18n()
|
||||
class L_Sider extends PureComponent {
|
||||
class Sider extends PureComponent {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
@ -48,25 +49,10 @@ class L_Sider extends PureComponent {
|
||||
if (ycore.DevOptions.StrictLightMode == false) {
|
||||
return "dark"
|
||||
}
|
||||
if (ycore.DevOptions.StrictLightMode == true && theme == "light") {
|
||||
return "light"
|
||||
}
|
||||
if (ycore.DevOptions.StrictLightMode == true && theme == "dark") {
|
||||
return "dark"
|
||||
}
|
||||
}
|
||||
UserIsPro(){
|
||||
if (userData.is_pro == 1){
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
UserIsAdmin(){
|
||||
if (userData.admin == 1){
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return theme
|
||||
}
|
||||
|
||||
|
||||
handleClickMenu = e => {
|
||||
e.key === 'SignOut' && ycore.LogoutCall()
|
||||
e.key === 'settingpage' && router.push('/settings')
|
||||
@ -103,11 +89,11 @@ class L_Sider extends PureComponent {
|
||||
theme={this.StrictMode()}
|
||||
width="180"
|
||||
collapsed={collapsed || false}
|
||||
className={styles.sider}
|
||||
className={classnames(styles.sider, {[styles.darkmd]: this.isDarkMode()} )}
|
||||
onMouseEnter={this.hover}
|
||||
onMouseLeave={this.hover}
|
||||
>
|
||||
<img className={styles.brand} src={collapsed? config.logoPath : config.FullLogoPath} />
|
||||
<div className={styles.brand}><img onClick={() => ycore.crouter.native('main')} src={collapsed? config.LogoPath : config.FullLogoPath } /></div>
|
||||
<div className={this.StrictMode()? styles.CollapserWrapperLight : styles.CollapserWrapperDark} ><antd.Button width={'20px'} onClick={() => onCollapseChange(!collapsed)} icon={collapsed? (this.Balancer()? "right" : "double-right") : (this.Balancer()? "left" : "double-left") } /></div>
|
||||
<div className={styles.menuContainer}>
|
||||
<ScrollBar
|
||||
@ -117,7 +103,7 @@ class L_Sider extends PureComponent {
|
||||
}}
|
||||
>
|
||||
<antd.Menu selectable={false} className={collapsed? styles.menuItemsCollapsed : styles.menuItems} mode="vertical" onClick={this.handleClickMenu}>
|
||||
{this.UserIsPro()?
|
||||
{ycore.booleanFix(userData.is_pro)?
|
||||
<antd.Menu.Item key="boosted_pages">
|
||||
<antd.Icon style={{ fontSize: '15px' }} type="thunderbolt" />
|
||||
{collapsed ? null : <Trans> Boosted Posts </Trans> }
|
||||
@ -135,7 +121,7 @@ class L_Sider extends PureComponent {
|
||||
<antd.Icon style={{ fontSize: '15px' }} type="setting" />
|
||||
{collapsed ? null : <Trans>General Settings</Trans>}
|
||||
</antd.Menu.Item>
|
||||
{this.UserIsAdmin()?
|
||||
{ycore.booleanFix(userData.admin)?
|
||||
<antd.Menu.Item key="admin_area">
|
||||
<antd.Icon style={{ fontSize: '15px' }} type="tool" />
|
||||
{collapsed ? null : <Trans>Admin Area</Trans>}
|
||||
@ -169,7 +155,7 @@ class L_Sider extends PureComponent {
|
||||
<div className={styles.siderhead}>
|
||||
<antd.Avatar size={collapsed? "small" : "large"} shape={collapsed? "circle" : "square"} src={userData.avatar} className={collapsed? styles.avatar : styles.avatarFull} />
|
||||
</div>
|
||||
{collapsed? null : <div className={styles.userInfo}><a href={`/@${userData.username}`}><h2>@{userData.username}</h2></a></div> }
|
||||
{collapsed? null : <div className={styles.userInfo}><a onClick={() => ycore.crouter.native(`@${userData.username}`)} ><h2>@{userData.username}</h2></a></div> }
|
||||
</div>
|
||||
</ScrollBar>
|
||||
</div>
|
||||
@ -179,7 +165,7 @@ class L_Sider extends PureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
L_Sider.propTypes = {
|
||||
Sider.propTypes = {
|
||||
menus: PropTypes.array,
|
||||
theme: PropTypes.string,
|
||||
isMobile: PropTypes.bool,
|
||||
@ -188,4 +174,4 @@ L_Sider.propTypes = {
|
||||
onCollapseChange: PropTypes.func,
|
||||
}
|
||||
|
||||
export default L_Sider
|
||||
export default Sider
|
@ -30,7 +30,6 @@
|
||||
.ant-btn:hover{
|
||||
background: rgb(255,255,255);
|
||||
background: linear-gradient(270deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.57) 95%);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -44,7 +43,6 @@
|
||||
z-index: 200;
|
||||
vertical-align: middle;
|
||||
:global{
|
||||
|
||||
.ant-btn {
|
||||
border: none;
|
||||
border-radius: unset;
|
||||
@ -65,25 +63,25 @@
|
||||
}
|
||||
|
||||
.brand {
|
||||
display: flex;
|
||||
vertical-align: middle;
|
||||
padding: 5px;
|
||||
width: 100%;
|
||||
max-height: 50px;
|
||||
|
||||
}
|
||||
|
||||
.userInfo{
|
||||
font-family: "Poppins", sans-serif;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
h2{
|
||||
color: @LDarkMode-color
|
||||
img{
|
||||
display: flex;
|
||||
vertical-align: middle;
|
||||
padding: 5px;
|
||||
margin: 7px auto 15px auto;
|
||||
width: 100%;
|
||||
max-height: 58px;
|
||||
}
|
||||
}
|
||||
.brand:hover{
|
||||
img{
|
||||
size: 9cm;
|
||||
}
|
||||
}
|
||||
|
||||
.avatarFull{
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.avatar{
|
||||
margin: 0 0 15px 0;
|
||||
}
|
||||
@ -97,42 +95,68 @@
|
||||
|
||||
}
|
||||
}
|
||||
.siderhead{
|
||||
font-family: 'Source Sans Pro', sans-serif;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
::first-letter{
|
||||
margin-left: 7px;
|
||||
}
|
||||
height: 60px;
|
||||
font-size: 17px;
|
||||
}
|
||||
|
||||
.siderwrapper {
|
||||
border-color: transparent;
|
||||
|
||||
font-size: 13px;
|
||||
font-family: "Poppins", sans-serif;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
|
||||
:global {
|
||||
.ant-menu-inline, .ant-menu-vertical, .ant-menu-vertical-left {
|
||||
:hover {
|
||||
background-color: rgb(80, 80, 80);
|
||||
color: #fff;
|
||||
}
|
||||
border-right: 1px solid transparent;
|
||||
}
|
||||
.ant-layout-sider-dark {
|
||||
background-color: @LDarkMode-backgroud;
|
||||
color: @DarkMode-color;
|
||||
.ant-menu-item{
|
||||
color: @DarkMode-color;
|
||||
}
|
||||
.ant-menu-inline, .ant-menu-vertical, .ant-menu-vertical-left {
|
||||
:hover {
|
||||
background-color: rgb(80, 80, 80);
|
||||
color: #fff;
|
||||
}
|
||||
border-right: 1px solid transparent;
|
||||
}
|
||||
}
|
||||
.ant-layout-sider-light {
|
||||
background-color: @LightMode-backgroud;
|
||||
color: @LightMode-color;
|
||||
background-color: @Theme-SiderDeco-Backgroud;
|
||||
color: @Theme-SiderDeco-Color;
|
||||
.ant-menu-item{
|
||||
color: @Theme-SiderDeco-Color;
|
||||
}
|
||||
.ant-menu-inline, .ant-menu-vertical, .ant-menu-vertical-left {
|
||||
:hover {
|
||||
background-color: @Theme-Hover-Backgroud;
|
||||
color: #fff;
|
||||
}
|
||||
border-right: 1px solid transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sider {
|
||||
border-right: 1px solid #dbdbdb;
|
||||
border-radius: 0 10px 10px 0 ;
|
||||
&.darkmd {
|
||||
border: none;
|
||||
}
|
||||
height: 100%;
|
||||
z-index: 50;
|
||||
:global {
|
||||
.ant-sider{
|
||||
background-color: #fff;
|
||||
}
|
||||
.ant-menu-sub {
|
||||
font-size: 14px;
|
||||
-webkit-box-shadow: 13px 4px 34px 0px rgba(0, 0, 0, 0.005);
|
||||
@ -148,42 +172,21 @@
|
||||
color: @LLightMode-color;
|
||||
}
|
||||
}
|
||||
.siderhead{
|
||||
font-family: 'Source Sans Pro', sans-serif;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
::first-letter{
|
||||
margin-left: 7px;
|
||||
}
|
||||
height: 60px;
|
||||
font-size: 17px;
|
||||
}
|
||||
.sidercontainer{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.menuItems{
|
||||
background-color: transparent;
|
||||
color: @LDarkMode-color;
|
||||
margin-bottom: 8px;
|
||||
width: 100%;
|
||||
animation: fadein 0.5s;
|
||||
:global {
|
||||
.ant-menu-item-selected{
|
||||
background-color: rgba(82, 82, 82, 0.562);
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.menuItemsCollapsed{
|
||||
background-color: transparent;
|
||||
color: @LDarkMode-color;
|
||||
|
||||
width: 100%;
|
||||
|
||||
animation: fadein 0.5s;
|
||||
:global {
|
||||
.ant-menu-item {
|
||||
@ -197,9 +200,7 @@
|
||||
background-color: rgba(82, 82, 82, 0.562);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.menuContainer {
|
||||
height: 100%;
|
||||
margin: 18px 0 8px 0;
|
||||
@ -209,17 +210,14 @@
|
||||
}
|
||||
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-layout-sider-children {
|
||||
display: flex;
|
||||
@ -245,13 +243,10 @@
|
||||
font-size: 14px;
|
||||
font-family: 'Source Sans Pro', sans-serif;
|
||||
}
|
||||
|
||||
.ant-menu-dark .ant-menu-item a {
|
||||
color: rgb(197, 197, 197);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.scrollbar-container {
|
@ -1,5 +1,5 @@
|
||||
import Header from './Header'
|
||||
import L_Sider from './L_Sider'
|
||||
import Sider from './Sider'
|
||||
import Control from './Control'
|
||||
|
||||
export { Header, L_Sider, Control }
|
||||
export { Header, Sider, Control }
|
||||
|
@ -28,7 +28,6 @@ const UserHeader = ({ values }) => {
|
||||
</div>
|
||||
<div className={styles.content}>
|
||||
<div className={styles.contentTitle}>
|
||||
{ycore.DevOptions.ShowFunctionsLogs? 'si' : 'sad'}
|
||||
<h1 style={{ marginBottom: '0px' }} >{values.username}<antd.Tooltip title="User Verified">{ycore.booleanFix(values.verified)? <antd.Icon style={{ color: 'blue', verticalAlign:'top' }} component={CustomIcons.VerifiedBadge} /> : null}</antd.Tooltip></h1>
|
||||
<span style={{ fontSize: '14px', fontWeight: '100', lineHeight: '0', marginBottom: '5px' }}>{values.about}</span>
|
||||
</div>
|
||||
|
@ -12,6 +12,11 @@ import PublicLayout from './PublicLayout'
|
||||
import PrimaryLayout from './PrimaryLayout'
|
||||
import './BaseLayout.less'
|
||||
|
||||
const bundle = localStorage.getItem('resource_bundle')
|
||||
import(`themes/${bundle}/index.less`)
|
||||
|
||||
|
||||
|
||||
const LayoutMap = {
|
||||
primary: PrimaryLayout,
|
||||
public: PublicLayout,
|
||||
|
@ -5,16 +5,16 @@ import PropTypes from 'prop-types'
|
||||
import withRouter from 'umi/withRouter'
|
||||
import { connect } from 'dva'
|
||||
import { MyLayout } from 'components'
|
||||
import classnames from 'classnames'
|
||||
import { Layout, Drawer, Result, Button, Checkbox } from 'antd'
|
||||
import { enquireScreen, unenquireScreen } from 'enquire-js'
|
||||
import { config, pathMatchRegexp, langFromPath } from 'utils'
|
||||
import store from 'store';
|
||||
import classNames from 'classnames'
|
||||
import Error from '../pages/404'
|
||||
import styles from './PrimaryLayout.less'
|
||||
|
||||
const { Content } = Layout
|
||||
const { Header, L_Sider, Control } = MyLayout
|
||||
const { Header, Sider, Control } = MyLayout
|
||||
|
||||
@withRouter
|
||||
@connect(({ app, loading }) => ({ app, loading }))
|
||||
@ -44,17 +44,13 @@ class PrimaryLayout extends PureComponent {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
unenquireScreen(this.enquireHandler)
|
||||
}
|
||||
|
||||
onCollapseChange = () => {
|
||||
this.setState({ collapsed: !this.state.collapsed })
|
||||
store.set('collapsed', this.state.collapsed)
|
||||
|
||||
}
|
||||
|
||||
ResByPassHandler() {
|
||||
const {RemByPass} = this.state;
|
||||
if (RemByPass == true){
|
||||
@ -118,7 +114,7 @@ class PrimaryLayout extends PureComponent {
|
||||
},
|
||||
|
||||
}
|
||||
const LeftSiderProps = {
|
||||
const SiderProps = {
|
||||
menus,
|
||||
theme,
|
||||
isMobile,
|
||||
@ -133,7 +129,8 @@ class PrimaryLayout extends PureComponent {
|
||||
}
|
||||
const ContainerProps = {
|
||||
theme,
|
||||
location
|
||||
location,
|
||||
collapsed,
|
||||
}
|
||||
const MobileWarning = () =>{
|
||||
if (resbypass == false) {
|
||||
@ -149,19 +146,19 @@ class PrimaryLayout extends PureComponent {
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<MobileWarning />
|
||||
<div className={styles.BarControlWrapper}><Control /></div>
|
||||
<Layout className={this.isDarkMode()? styles.container_dark : styles.container_light}>
|
||||
<L_Sider {...LeftSiderProps}/>
|
||||
<div className={styles.container}>
|
||||
<div style={{ paddingTop: config.fixedHeader ? 72 : 0 }} id="primaryLayout" >
|
||||
<Header {...headerProps} />
|
||||
<Content {...ContainerProps} className={styles.content}>
|
||||
<Sider {...SiderProps}/>
|
||||
<div id="primaryLayout"className={styles.container}>
|
||||
|
||||
<Content {...ContainerProps} className={classnames(styles.content, {[styles.collapsed]: !collapsed} )}>
|
||||
{children}
|
||||
</Content>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</Layout>
|
||||
</Fragment>
|
||||
|
@ -19,12 +19,18 @@
|
||||
}
|
||||
|
||||
.content {
|
||||
height: 100vh;
|
||||
/* width: 100vw; */
|
||||
margin: 5px 15px 5px 50px;
|
||||
vertical-align: middle;
|
||||
width: 100%;
|
||||
float: right;
|
||||
padding: 35px 25px 15px 60px;
|
||||
transition: all 0.2s ease;
|
||||
&.collapsed {
|
||||
width: ~'calc(100% - 180px)';
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
}
|
||||
.container_light {
|
||||
background-color: #E2E6E9;
|
||||
background-color: @Theme-Layout-Backgroud; //#E2E6E9;
|
||||
transition: background-color 200ms linear;
|
||||
}
|
||||
// TODO: Complete full dark theme
|
||||
|
@ -76,7 +76,7 @@ export default {
|
||||
// Runtime
|
||||
ycore.MakeBackup()
|
||||
ycore.UpdateSDCP()
|
||||
|
||||
return
|
||||
}
|
||||
else if(!pathMatchRegexp(['','/login'], window.location.pathname)) {
|
||||
console.log('REP')
|
||||
@ -84,12 +84,14 @@ export default {
|
||||
ycore.LogoutCall()
|
||||
}
|
||||
else{
|
||||
router.push({pathname: '/login',})
|
||||
ycore.RefreshONCE()
|
||||
}
|
||||
}
|
||||
if(pathMatchRegexp(['/'], window.location.pathname)){
|
||||
if(pathMatchRegexp([''], window.location.pathname)){
|
||||
router.push({pathname: '/login',})
|
||||
}
|
||||
|
||||
},
|
||||
},
|
||||
reducers: {
|
||||
|
21
src/pages/about/index.js
Normal file
21
src/pages/about/index.js
Normal file
@ -0,0 +1,21 @@
|
||||
import React from 'react'
|
||||
import styles from './index.less'
|
||||
import * as ycore from 'ycore'
|
||||
import * as antd from 'antd'
|
||||
|
||||
|
||||
class AppAbout extends React.Component {
|
||||
render(){
|
||||
return(
|
||||
<div className={styles.aboutWrapper}>
|
||||
<img src={ycore.AppInfo.logo} />
|
||||
<antd.Card >
|
||||
|
||||
<h1 className={styles.appName}> {ycore.AppInfo.name} </h1>
|
||||
<antd.Tag color="geekblue">v{ycore.AppInfo.version}</antd.Tag>{ycore.DetectNoNStableBuild('TagComponent')}
|
||||
</antd.Card>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
export default AppAbout
|
17
src/pages/about/index.less
Normal file
17
src/pages/about/index.less
Normal file
@ -0,0 +1,17 @@
|
||||
.aboutWrapper{
|
||||
margin: auto;
|
||||
max-width: 70vw;
|
||||
width: 500px;
|
||||
vertical-align: middle;
|
||||
position: relative;
|
||||
background-color: rgba(73, 72, 72, 0.349);
|
||||
img{
|
||||
width: 100%;
|
||||
padding: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.appName {
|
||||
font-family: "Poppins", sans-serif;
|
||||
font-size: 27px;
|
||||
}
|
@ -37,7 +37,7 @@ class Main extends React.Component {
|
||||
)
|
||||
} catch (err) {
|
||||
ycore.notifyError(err)
|
||||
const paylodd = {user: 'Error', ago: '', avatar: '', content: 'Error displaying data :/', publisher: '' }
|
||||
const paylodd = {user: '', ago: '', avatar: '', content: '', publisher: '' }
|
||||
return <PostCard payload={paylodd} />
|
||||
}
|
||||
|
||||
@ -48,15 +48,12 @@ class Main extends React.Component {
|
||||
const { loading, createPost } = this.state;
|
||||
return (
|
||||
<div>
|
||||
|
||||
<MainSidebar />
|
||||
{createPost? <PostCreator refreshPull={() => {this.handleRefreshList()}} /> : null}
|
||||
{loading?
|
||||
<antd.Card style={{ maxWidth: '26.5vw', margin: 'auto' }} >
|
||||
<antd.Skeleton avatar paragraph={{ rows: 4 }} active />
|
||||
</antd.Card> :
|
||||
<div id="PostsWrapper" className={styles.PostsWrapper}>
|
||||
|
||||
<antd.BackTop target={() => document.getElementById("PostsWrapper") } />
|
||||
{this.renderFeedPosts()}
|
||||
</div>}
|
||||
|
11
src/themes/light_ng/index.less
Normal file
11
src/themes/light_ng/index.less
Normal file
@ -0,0 +1,11 @@
|
||||
@Theme-Shade-1: #ff971d;
|
||||
@Theme-Shade-2: #ffe8d6;
|
||||
@Theme-Shade-3: #f9f6f7;
|
||||
@Theme-Shade-4: #ffffff;
|
||||
|
||||
@Theme-Shade-Color: #f9f6f7;
|
||||
@Theme-Layout-Backgroud: #FAFAFA;
|
||||
@Theme-SiderDeco-Backgroud: #4D91EA;
|
||||
@Theme-SiderDeco-Color: #f9f6f7;
|
||||
|
||||
@Theme-Hover-Backgroud: rgba(107, 162, 235, 0.507);
|
@ -1,5 +1,6 @@
|
||||
@import '~themes/default.less';
|
||||
@import '~themes/mixin.less';
|
||||
@import '~themes/light_ng/index.less';
|
||||
|
||||
@DarkMode-backgroud_container: rgb(24, 26, 27);
|
||||
@DarkMode-backgroud: #212121;
|
||||
|
Loading…
x
Reference in New Issue
Block a user