Merge pull request #1295 from Gri-ffin/bring-socialmedia-links
Bring social media links
This commit is contained in:
commit
56f64b666f
@ -68,6 +68,12 @@ function createMainWindow() {
|
|||||||
if (process.platform !== 'darwin') app.quit()
|
if (process.platform !== 'darwin') app.quit()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/* Open external links in the default browser */
|
||||||
|
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
|
||||||
|
require('electron').shell.openExternal(url)
|
||||||
|
return { action: 'deny' }
|
||||||
|
})
|
||||||
|
|
||||||
/* Enable dev tools for development */
|
/* Enable dev tools for development */
|
||||||
if (!app.isPackaged) mainWindow.webContents.openDevTools()
|
if (!app.isPackaged) mainWindow.webContents.openDevTools()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,8 @@ import {
|
|||||||
SettingsIcon,
|
SettingsIcon,
|
||||||
MonitorIcon,
|
MonitorIcon,
|
||||||
LayoutGridIcon,
|
LayoutGridIcon,
|
||||||
|
Twitter,
|
||||||
|
Github,
|
||||||
} from 'lucide-react'
|
} from 'lucide-react'
|
||||||
|
|
||||||
import { twMerge } from 'tailwind-merge'
|
import { twMerge } from 'tailwind-merge'
|
||||||
@ -52,6 +54,23 @@ export default function RibbonNav() {
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
const linksMenu = [
|
||||||
|
{
|
||||||
|
name: 'Twitter',
|
||||||
|
icon: (
|
||||||
|
<Twitter size={20} className="flex-shrink-0 text-muted-foreground" />
|
||||||
|
),
|
||||||
|
link: 'https://twitter.com/janhq_',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Github',
|
||||||
|
icon: (
|
||||||
|
<Github size={20} className="flex-shrink-0 text-muted-foreground" />
|
||||||
|
),
|
||||||
|
link: 'https://github.com/janhq/jan',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
const secondaryMenus = [
|
const secondaryMenus = [
|
||||||
{
|
{
|
||||||
name: 'System Monitor',
|
name: 'System Monitor',
|
||||||
@ -118,6 +137,32 @@ export default function RibbonNav() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
<>
|
||||||
|
{linksMenu
|
||||||
|
.filter((link) => !!link)
|
||||||
|
.map((link, i) => {
|
||||||
|
return (
|
||||||
|
<div className="relative flex p-2" key={i}>
|
||||||
|
<Tooltip>
|
||||||
|
<TooltipTrigger>
|
||||||
|
<a
|
||||||
|
href={link.link}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="relative flex w-full flex-shrink-0 cursor-pointer items-center justify-center"
|
||||||
|
>
|
||||||
|
{link.icon}
|
||||||
|
</a>
|
||||||
|
</TooltipTrigger>
|
||||||
|
<TooltipContent side="right" sideOffset={10}>
|
||||||
|
<span>{link.name}</span>
|
||||||
|
<TooltipArrow />
|
||||||
|
</TooltipContent>
|
||||||
|
</Tooltip>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</>
|
||||||
{secondaryMenus
|
{secondaryMenus
|
||||||
.filter((secondary) => !!secondary)
|
.filter((secondary) => !!secondary)
|
||||||
.map((secondary, i) => {
|
.map((secondary, i) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user