Browse Source

fix(panel): align telegram icon with its label in home card actions

The .tg-icon override (display: inline-block; vertical-align: -2px)
defeated the default .anticon flex centering that every other card
action icon relies on, so the icon rendered ~2px below the @XrayUI
text. Dropping the override lets AntD center it like its neighbors.
Sanaei 8 hours ago
parent
commit
b319dd0c3a
2 changed files with 2 additions and 7 deletions
  1. 1 6
      frontend/src/pages/index/IndexPage.css
  2. 1 1
      frontend/src/pages/index/IndexPage.tsx

+ 1 - 6
frontend/src/pages/index/IndexPage.css

@@ -12,7 +12,7 @@
   flex-wrap: nowrap;
 }
 
-.index-page .action > span:not(.anticon):not(.tg-icon) {
+.index-page .action > span:not(.anticon) {
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
@@ -36,11 +36,6 @@
   margin-inline-end: 0;
 }
 
-.index-page .tg-icon {
-  display: inline-block;
-  vertical-align: -2px;
-}
-
 .index-page .ip-toggle-icon {
   cursor: pointer;
   font-size: 16px;

+ 1 - 1
frontend/src/pages/index/IndexPage.tsx

@@ -246,7 +246,7 @@ export default function IndexPage() {
                       hoverable
                       actions={[
                         <Space className="action" key="tg" role="button" tabIndex={0} aria-label="@XrayUI" onClick={openTelegram} onKeyDown={activateOnKey(openTelegram)}>
-                          <TelegramFilled className="tg-icon" aria-hidden="true" />
+                          <TelegramFilled aria-hidden="true" />
                           {!isMobile && <span>@XrayUI</span>}
                         </Space>,
                         <Space