Skip to content

Commit

Permalink
feat: add qq and discord
Browse files Browse the repository at this point in the history
  • Loading branch information
chenfan0 committed Aug 28, 2024
1 parent 57ee0e3 commit 82d3877
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/renderer/src/assets/images/dark/discord.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/renderer/src/assets/images/dark/qq.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/renderer/src/assets/images/light/discord.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/renderer/src/assets/images/light/qq.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 35 additions & 5 deletions src/renderer/src/components/NavBar/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ import lightSettingIcon from '@/assets/images/light/setting.svg'
import darkLogo from '@/assets/images/dark/logo.png'
import lightLogo from '@/assets/images/light/logo.png'
import DefaultSettingSheet from './components/DefaultSettingSheet'
import darkQQIcon from '@/assets/images/dark/qq.svg'
import lightQQIcon from '@/assets/images/light/qq.svg'
import darkDiscordIcon from '@/assets/images/dark/discord.svg'
import lightDiscordIcon from '@/assets/images/light/discord.svg'

import {
Select,
SelectTrigger,
Expand All @@ -35,19 +40,46 @@ export default function NavBar() {
const [settingSheetOpen, setSettingSheetOpen] = useState(false)

const handleLogoClick = () => {
window.api.navByDefaultBrowser('https://github.com/chenfan0/fideo-live-record')
window.api.navByDefaultBrowser('https://www.fideo.site')
}

const handleQQClick = () => {
window.api.navByDefaultBrowser(
'http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=6J5_9669aU4Dxjb_mWGpAhNvQ7JGrh0h&authKey=HiUtMqFPDEbO9xZFS6V2kNo3rBv3L%2B764z5o9zepXFI%2Bf1h4HkA8%2F2eTZ4F4TdQH&noverify=0&group_code=891116727'
)
}

const handleDiscordClick = () => {
window.api.navByDefaultBrowser('https://discord.gg/md5HqyGW')
}

return (
<div className="flex items-center justify-between px-[24px]">
<div className="flex items-center gap-8">
<div className="flex items-center gap-4">
<UseThemeIcon
dark={darkLogo}
light={lightLogo}
className="w-[64px] cursor-pointer select-none"
handleClick={handleLogoClick}
tooltipContent={t('nav_bar.go_to_website')}
/>
<UseThemeIcon
dark={darkQQIcon}
light={lightQQIcon}
className="w-[24px] h-[24px] cursor-pointer select-none"
handleClick={handleQQClick}
tooltipContent={t('nav_bar.qq')}
/>
<UseThemeIcon
dark={darkDiscordIcon}
light={lightDiscordIcon}
className="w-[24px] h-[24px] cursor-pointer select-none"
handleClick={handleDiscordClick}
tooltipContent={t('nav_bar.discord')}
/>
</div>

<div className="flex items-center gap-[12px]">
<Select
defaultValue={navSelectedStatus}
key={navSelectedStatus}
Expand All @@ -66,13 +98,11 @@ export default function NavBar() {
</SelectGroup>
</SelectContent>
</Select>
</div>

<div className="flex items-center gap-[12px]">
<UseThemeIcon
dark={darkAddIcon}
light={lightAddIcon}
className="w-[22px] h-[22px] cursor-pointer select-none"
className="w-[22px] h-[22px] cursor-pointer select-none ml-6"
tooltipContent={t('nav_bar.create')}
handleClick={() => setCreateSheetOpen(true)}
/>
Expand Down
10 changes: 8 additions & 2 deletions src/renderer/src/locales/locales.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ export default {
nav_bar: {
create: 'Create New Recording Item',
setting: 'Default Settings',
toggle_theme: 'Toggle Theme'
toggle_theme: 'Toggle Theme',
qq: 'Join QQ Group',
discord: 'Join Discord',
go_to_website: 'Go to Website'
},
default_settings: {
title: 'Default Settings',
Expand Down Expand Up @@ -125,7 +128,10 @@ export default {
nav_bar: {
create: '新建录制项',
setting: '默认配置',
toggle_theme: '切换主题'
toggle_theme: '切换主题',
qq: '加入QQ群',
discord: '加入Discord',
go_to_website: '前往官网'
},
default_settings: {
title: '默认配置',
Expand Down

0 comments on commit 82d3877

Please sign in to comment.