Skip to content

Commit ef34197

Browse files
Feat/#321/extension dist discord webhook (#322)
* setting: add packages adm-zip, form-data * refactor: svg sprite 방식으로 모든 source 포함 단점 해결을 위해 용량이 크고 icon이 아닌 이미지는 각 apps public으로 이동 * feat: dist zip 압축 및 discord 전송 webhook 구현 * feat: extension package.json share:dev 스크립트 추가 * setting: extension vite.config sourcemap: false 옵션 설정 * feat: share-extension workflow 추가 * feat: share-extension workflow default branch develop 설정 * refactor: button tag type 추가 * refactor: uploadToDiscord에 await 추가하여 무조건 에러 메시지 뜨고 process 종료하도록 변경 * refactor: hidden img alt 빈 문자열로 변경
1 parent a122099 commit ef34197

28 files changed

Lines changed: 233 additions & 68 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: 📦 Share Pinback Extension
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
branch:
7+
description: '빌드할 브랜치를 확인하세요 (기본: develop)'
8+
required: true
9+
default: 'develop'
10+
11+
jobs:
12+
build-and-send:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Repository
16+
uses: actions/checkout@v4
17+
with:
18+
ref: ${{ github.event.inputs.branch }}
19+
20+
- name: Install pnpm
21+
uses: pnpm/action-setup@v3
22+
with:
23+
version: 9
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 20
29+
cache: 'pnpm'
30+
31+
- name: Install dependencies
32+
run: pnpm install --frozen-lockfile
33+
34+
- name: Build and Share Extension
35+
env:
36+
VITE_DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
37+
run: pnpm share:ext
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

apps/client/src/pages/level/components/LevelInfoCard.tsx

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
import { cn } from '@pinback/design-system/utils';
2-
import { Level } from '@pinback/design-system/ui';
3-
import { Icon, type IconName } from '@pinback/design-system/icons';
41
import { TREE_LEVEL_TABLE, TreeLevel } from '@pages/level/types/treeLevelType';
2+
import { Level } from '@pinback/design-system/ui';
3+
import { cn } from '@pinback/design-system/utils';
54

6-
const LEVEL_TOOLTIP_ICON = {
7-
1: 'tooltip_1',
8-
2: 'tooltip_2',
9-
3: 'tooltip_3',
10-
4: 'tooltip_4',
11-
5: 'tooltip_5',
12-
} as const satisfies Record<TreeLevel, IconName>;
5+
const LEVEL_TOOLTIP_IMAGE = {
6+
1: '/assets/tooltip_1.svg',
7+
2: '/assets/tooltip_2.svg',
8+
3: '/assets/tooltip_3.svg',
9+
4: '/assets/tooltip_4.svg',
10+
5: '/assets/tooltip_5.svg',
11+
} as const satisfies Record<TreeLevel, string>;
1312

1413
export default function LevelInfoCard() {
1514
const rows = [...TREE_LEVEL_TABLE].reverse();
@@ -33,12 +32,12 @@ export default function LevelInfoCard() {
3332
>
3433
<div className="flex w-full items-center gap-[1.2rem]">
3534
<div className="bg-gray0 flex h-[4.6rem] w-[4.6rem] items-center justify-center rounded-[0.8rem]">
36-
<Icon
37-
name={LEVEL_TOOLTIP_ICON[row.level]}
35+
<img
36+
src={LEVEL_TOOLTIP_IMAGE[row.level]}
37+
alt={`${row.level} 썸네일 아이콘`}
3838
width={46}
3939
height={46}
40-
className="rounded-[0.8rem]"
41-
aria-label={`${row.level} 썸네일 아이콘`}
40+
className="object-cover"
4241
/>
4342
</div>
4443

apps/client/src/pages/myBookmark/components/footer/Footer.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,13 @@ const Footer = () => {
5252
aria-label="Pinback 블로그"
5353
className="transition-opacity hover:opacity-80"
5454
>
55-
<Icon name="palms" width={28} height={28} />
55+
<img
56+
src="/assets/palms.svg"
57+
alt="Palms 로고"
58+
width={28}
59+
height={28}
60+
className="object-contain"
61+
/>
5662
</a>
5763
</div>
5864
</div>

0 commit comments

Comments
 (0)