mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
refactor settings components
This commit is contained in:
parent
7ff346fded
commit
510ef113bb
@ -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>
|
||||
</>
|
||||
}
|
||||
}
|
||||
|
30
packages/comty/src/pages/settings/components/about/index.js
Normal file
30
packages/comty/src/pages/settings/components/about/index.js
Normal 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>
|
||||
</>
|
||||
}
|
||||
}
|
@ -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
|
||||
}
|
@ -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'
|
||||
|
Loading…
x
Reference in New Issue
Block a user