mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
added window.openLink() for support electron desktop to open new window with the default os browser
This commit is contained in:
parent
af1c26aa0c
commit
aa75f8f9ed
@ -1,6 +1,5 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
gitlab: "https://gitlab.com/rstudio-development/comty-development",
|
github:"https://github.com/srgooglo/comty",
|
||||||
github:"https://github.com/srgooglo/Comty-Development",
|
trello: "https://trello.com/invite/b/UbwvlG1I/2bc02725b9b210d2e9e9a82c5040b895/comty-development",
|
||||||
trellojoin: "https://trello.com/invite/b/UbwvlG1I/2bc02725b9b210d2e9e9a82c5040b895/comty-development",
|
|
||||||
patreon: "https://www.patreon.com/rstudio",
|
patreon: "https://www.patreon.com/rstudio",
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"gitlab": "https://gitlab.com/rstudio-development/comty-development",
|
"github":"https://github.com/srgooglo/comty",
|
||||||
"github":"https://github.com/srgooglo/Comty-Development",
|
|
||||||
"trellojoin": "https://trello.com/invite/b/UbwvlG1I/2bc02725b9b210d2e9e9a82c5040b895/comty-development",
|
"trellojoin": "https://trello.com/invite/b/UbwvlG1I/2bc02725b9b210d2e9e9a82c5040b895/comty-development",
|
||||||
"patreon": "https://www.patreon.com/rstudio"
|
"patreon": "https://www.patreon.com/rstudio"
|
||||||
}
|
}
|
@ -35,6 +35,13 @@ class PrimaryLayout extends React.Component {
|
|||||||
}, false)
|
}, false)
|
||||||
|
|
||||||
// include API extensions
|
// include API extensions
|
||||||
|
window.openLink = (e) => {
|
||||||
|
if(this.props.app.embedded){
|
||||||
|
this.props.app.electron.shell.openExternal(e)
|
||||||
|
}else{
|
||||||
|
window.open(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
window.requireQuery = (require) =>{
|
window.requireQuery = (require) =>{
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
this.props.dispatch({
|
this.props.dispatch({
|
||||||
|
@ -6,24 +6,25 @@ import l from 'globals/links'
|
|||||||
|
|
||||||
export default class AppAbout extends React.Component {
|
export default class AppAbout extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
|
const handleClickLinks = (e) => {
|
||||||
|
const link = l[e]
|
||||||
|
link? window.openLink(link) : console.log("Link not available")
|
||||||
|
}
|
||||||
return <>
|
return <>
|
||||||
<About />
|
<About />
|
||||||
<antd.Card>
|
<antd.Card>
|
||||||
<div>
|
<div>
|
||||||
<h4>🎉✨ It's completely free and open source !</h4>
|
<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>
|
<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 href={l.patreon}><Icons.Patreon/> Support us with Patreon!</a>
|
<a onClick={() => handleClickLinks("patreon")}><Icons.Patreon/> Support us with Patreon!</a>
|
||||||
</div>
|
</div>
|
||||||
<antd.Divider dashed />
|
<antd.Divider dashed />
|
||||||
<div>
|
<div>
|
||||||
<h4>👨💻 You are developer? You can help us by joining our team!</h4>
|
<h4>👨💻 You are developer? You can help us by joining our team!</h4>
|
||||||
<a href={l.gitlab}><Icons.Gitlab />Official Repository</a><br />
|
<a onClick={() => handleClickLinks("github")}><Icons.GitHub />Official Repository</a><br />
|
||||||
<a href={l.github}><Icons.GitHub />Mirror Repository</a><br />
|
<a onClick={() => handleClickLinks("trello")}><Icons.Trello />Join our Trello</a>
|
||||||
<a href={l.trellojoin}><Icons.Trello />Join our Trello</a>
|
|
||||||
</div>
|
</div>
|
||||||
</antd.Card>
|
</antd.Card>
|
||||||
|
|
||||||
|
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user