Skip to content

Commit 613e280

Browse files
committed
Refactor Discord icon usage by renaming the logo SVG, adding a separate Discord text SVG, and updating all references to support both logo and text variants
1 parent 531a52d commit 613e280

6 files changed

Lines changed: 54 additions & 65 deletions

File tree

File renamed without changes.
Lines changed: 8 additions & 0 deletions
Loading

‎packages/ui/src/components/editor/common/Icon/Icon.tsx‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import Copilot from '../../../../assets/icons/copilot.svg'
1010
import CurlyBraces from '../../../../assets/icons/curly-braces.svg'
1111
import GithubCopilot from '../../../../assets/icons/github-copilot.svg'
1212
import DeepSeek from '../../../../assets/icons/deepseek.svg'
13-
import Discord from '../../../../assets/icons/discord.svg'
13+
import DiscordLogo from '../../../../assets/icons/discord-logo.svg'
14+
import DiscordText from '../../../../assets/icons/discord-text.svg'
1415
import Doubao from '../../../../assets/icons/doubao.svg'
1516
import Gemini from '../../../../assets/icons/gemini.svg'
1617
import Grok from '../../../../assets/icons/grok.svg'
@@ -42,7 +43,8 @@ export namespace Icon {
4243
| 'COPILOT'
4344
| 'CURLY_BRACES'
4445
| 'DEEPSEEK'
45-
| 'DISCORD'
46+
| 'DISCORD_LOGO'
47+
| 'DISCORD_TEXT'
4648
| 'DOUBAO'
4749
| 'GEMINI'
4850
| 'GITHUB_COPILOT'
@@ -104,8 +106,11 @@ export const Icon: React.FC<Icon.Props> = ({ variant }) => {
104106
case 'DEEPSEEK':
105107
icon = <DeepSeek />
106108
break
107-
case 'DISCORD':
108-
icon = <Discord />
109+
case 'DISCORD_LOGO':
110+
icon = <DiscordLogo />
111+
break
112+
case 'DISCORD_TEXT':
113+
icon = <DiscordText />
109114
break
110115
case 'DOUBAO':
111116
icon = <Doubao />

‎packages/vscode/src/views/panel/frontend/Home/Home.tsx‎

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,23 @@ export const Home: React.FC<Props> = (props) => {
7878
text_icon="CODE_WEB_CHAT_TEXT"
7979
label="Visit website"
8080
/>
81+
<HomeLinkButton
82+
url="https://buymeacoffee.com/robertpiosik"
83+
background_color="#ffdd00"
84+
fill_color="black"
85+
text_icon="BUY_ME_A_COFFEE_TEXT"
86+
logo_icon="BUY_ME_A_COFFEE_LOGO"
87+
label="Support author"
88+
/>
89+
<HomeLinkButton
90+
url="https://discord.gg/KJySXsrSX5"
91+
background_color="#5765f2"
92+
fill_color="white"
93+
logo_icon="DISCORD_LOGO"
94+
text_icon="DISCORD_TEXT"
95+
label="Get involved"
96+
/>
8197
<div className={styles['inner__buttons__donations']}>
82-
<HomeLinkButton
83-
url="https://buymeacoffee.com/robertpiosik"
84-
background_color="#ffdd00"
85-
fill_color="black"
86-
text_icon="BUY_ME_A_COFFEE_TEXT"
87-
logo_icon="BUY_ME_A_COFFEE_LOGO"
88-
label="Support author"
89-
/>
9098
<Donations
9199
donations={donations}
92100
is_fetching={is_fetching}

‎packages/vscode/src/views/panel/frontend/components/Footer/Footer.module.scss‎

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@
2727
height: 16px;
2828
}
2929

30+
&--cwc {
31+
background-color: black;
32+
33+
> svg {
34+
fill: white;
35+
}
36+
}
37+
3038
&--buy-me-a-coffee {
3139
background-color: #f7d600;
3240

@@ -62,32 +70,4 @@
6270
opacity: var(--disabled-opacity);
6371
}
6472
}
65-
66-
&__heart {
67-
position: absolute;
68-
z-index: 11;
69-
bottom: 32px;
70-
animation-name: float-up;
71-
animation-timing-function: ease-out;
72-
animation-fill-mode: forwards;
73-
pointer-events: none;
74-
opacity: 0;
75-
}
76-
}
77-
78-
@keyframes float-up {
79-
from {
80-
transform: translateY(0);
81-
opacity: 0;
82-
}
83-
10% {
84-
opacity: 1;
85-
}
86-
40% {
87-
opacity: 1;
88-
}
89-
to {
90-
transform: translateY(-40px);
91-
opacity: 0;
92-
}
9373
}

‎packages/vscode/src/views/panel/frontend/components/Footer/Footer.tsx‎

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ export const Footer: React.FC = () => {
1616
commit_button_enabling_trigger_count
1717
} = useContext(LayoutContext)
1818

19-
const [is_buy_me_coffee_hovered, set_is_buy_me_coffee_hovered] =
20-
useState(false)
2119
const [is_commit_disabled_temporarily, set_is_commit_disabled_temporarily] =
2220
useState(false)
2321
const [is_apply_disabled_temporarily, set_is_apply_disabled_temporarily] =
@@ -52,15 +50,23 @@ export const Footer: React.FC = () => {
5250
<>
5351
<div className={styles.footer}>
5452
<div>
53+
<a
54+
className={cn(
55+
styles['footer__icon-button'],
56+
styles['footer__icon-button--cwc']
57+
)}
58+
href="https://codeweb.chat"
59+
title="https://codeweb.chat"
60+
>
61+
<Icon variant="CODE_WEB_CHAT_LOGO" />
62+
</a>
5563
<a
5664
className={cn(
5765
styles['footer__icon-button'],
5866
styles['footer__icon-button--buy-me-a-coffee']
5967
)}
6068
href="https://buymeacoffee.com/robertpiosik"
61-
title="Support author"
62-
onMouseEnter={() => set_is_buy_me_coffee_hovered(true)}
63-
onMouseLeave={() => set_is_buy_me_coffee_hovered(false)}
69+
title="https://buymeacoffee.com/robertpiosik"
6470
>
6571
<Icon variant="BUY_ME_A_COFFEE_LOGO" />
6672
</a>
@@ -70,9 +76,9 @@ export const Footer: React.FC = () => {
7076
styles['footer__icon-button--discord']
7177
)}
7278
href="https://discord.gg/KJySXsrSX5"
73-
title="Join our Discord server!"
79+
title="https://discord.gg/KJySXsrSX5"
7480
>
75-
<Icon variant="DISCORD" />
81+
<Icon variant="DISCORD_LOGO" />
7682
</a>
7783
</div>
7884

@@ -113,24 +119,6 @@ export const Footer: React.FC = () => {
113119
</button>
114120
</div>
115121
</div>
116-
117-
{is_buy_me_coffee_hovered &&
118-
Array.from({ length: 5 }).map((_, i) => (
119-
<span
120-
key={i}
121-
className={styles.footer__heart}
122-
style={
123-
{
124-
left: `${18 + (Math.random() - 0.5) * 20}px`,
125-
animationDelay: `${i == 0 ? 0 : (i + Math.random()) / 3}s`,
126-
animationDuration: `${2 - Math.random()}s`,
127-
fontSize: `${10 + Math.random() * 8}px`
128-
} as React.CSSProperties
129-
}
130-
>
131-
❤️
132-
</span>
133-
))}
134122
</>
135123
)
136124
}

0 commit comments

Comments
 (0)