refactor settings components

This commit is contained in:
srgooglo 2021-01-05 08:16:31 +01:00
parent b5c9ce90a4
commit 9941d9ea95
4 changed files with 36 additions and 39 deletions

View File

@ -1,31 +0,0 @@
import React from 'react'
import { About } from 'components'
import * as Icons from 'components/Icons'
import * as antd from 'antd'
import l from 'schemas/links'
export default class AppAbout extends React.Component {
render() {
const handleClickLinks = (e) => {
const link = l[e]
link? window.openLink(link) : console.log("Link not available")
}
return <>
<About />
<antd.Card>
<div>
<h4>🎉 It's completely free and open source !</h4>
<h5>It is an impressive amount of work and effort, help us to continue offering quality services, you can support us from our patreon campaign.</h5>
<a onClick={() => handleClickLinks("patreon")}><Icons.Patreon/> Support us with Patreon!</a>
</div>
<antd.Divider dashed />
<div>
<h4>👨💻 You are developer? You can help us by joining our team!</h4>
<a onClick={() => handleClickLinks("github")}><Icons.GitHub />Official Repository</a><br />
<a onClick={() => handleClickLinks("trello")}><Icons.Trello />Join our Trello</a>
</div>
</antd.Card>
</>
}
}

View File

@ -0,0 +1,30 @@
import React from 'react'
import { About } from 'components'
import * as Icons from 'components/Icons'
import * as antd from 'antd'
import l from 'schemas/links'
export default class AppAbout extends React.Component {
render() {
const handleClickLinks = (e) => {
const link = l[e]
link ? window.openLink(link) : console.log("Link not available")
}
return <>
<About />
<antd.Card>
<div>
<h4>🎉 It's completely free and open source !</h4>
<h5>It is an impressive amount of work and effort, help us to continue offering quality services, you can support us from our patreon campaign.</h5>
<a onClick={() => handleClickLinks("patreon")}><Icons.Patreon /> Support us with Patreon!</a>
</div>
<antd.Divider dashed />
<div>
<h4>👨💻 You are developer? You can help us by joining our team!</h4>
<a onClick={() => handleClickLinks("github")}><Icons.GitHub />Official Repository</a><br />
<a onClick={() => handleClickLinks("trello")}><Icons.Trello />Join our Trello</a>
</div>
</antd.Card>
</>
}
}

View File

@ -9,7 +9,7 @@ import SettingList from 'schemas/settings.json'
import {connect} from 'umi'
@connect(({ app }) => ({ app }))
class Base extends Component {
export default class GeneralSettings extends Component {
constructor(props) {
super(props);
this.state = {
@ -124,6 +124,4 @@ class Base extends Component {
</Fragment>
)
}
}
export default Base
}

View File

@ -3,10 +3,10 @@ import * as Icons from 'components/Icons'
import { ListedMenu } from 'components'
import NotificationView from './components/notification/index.js'
import SecurityView from './components/security/index.js'
import Base from './components/base.js'
import AppAbout from './components/about.js'
import NotificationView from './components/notification'
import SecurityView from './components/security'
import Base from './components/general'
import AppAbout from './components/about'
import Theme from './components/theme'
import ElectronApp from './components/electron'
import Keybinds from './components/keybinds'