Skip to content

Commit 4f65a5b

Browse files
authored
Merge pull request #39 from Turtle-Hwan/feat/todo
Feat/todo
2 parents be7dfdc + 794aa02 commit 4f65a5b

29 files changed

Lines changed: 1576 additions & 194 deletions
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
create-release:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Get current version
20+
id: version
21+
run: |
22+
VERSION=$(node -p "require('./public/manifest.json').version")
23+
echo "version=$VERSION" >> $GITHUB_OUTPUT
24+
echo "tag=v$VERSION" >> $GITHUB_OUTPUT
25+
26+
- name: Check if release exists
27+
id: check_release
28+
run: |
29+
if git ls-remote --tags origin | grep -q "refs/tags/${{ steps.version.outputs.tag }}"; then
30+
echo "exists=true" >> $GITHUB_OUTPUT
31+
echo "Release ${{ steps.version.outputs.tag }} already exists, skipping..."
32+
else
33+
echo "exists=false" >> $GITHUB_OUTPUT
34+
echo "Creating new release ${{ steps.version.outputs.tag }}..."
35+
fi
36+
37+
- name: Setup pnpm
38+
if: steps.check_release.outputs.exists == 'false'
39+
uses: pnpm/action-setup@v4
40+
with:
41+
version: 9
42+
43+
- name: Setup Node.js
44+
if: steps.check_release.outputs.exists == 'false'
45+
uses: actions/setup-node@v4
46+
with:
47+
node-version: "20"
48+
cache: "pnpm"
49+
50+
- name: Install dependencies
51+
if: steps.check_release.outputs.exists == 'false'
52+
run: pnpm install
53+
54+
- name: Build extension
55+
if: steps.check_release.outputs.exists == 'false'
56+
env:
57+
VITE_GA_API_SECRET: ${{ secrets.VITE_GA_API_SECRET }}
58+
run: tsc -b && pnpm exec vite build --mode production
59+
60+
- name: Create dist.zip
61+
if: steps.check_release.outputs.exists == 'false'
62+
run: |
63+
cd dist
64+
zip -r ../dist.zip .
65+
cd ..
66+
67+
- name: Create Release
68+
if: steps.check_release.outputs.exists == 'false'
69+
uses: softprops/action-gh-release@v2
70+
with:
71+
tag_name: ${{ steps.version.outputs.tag }}
72+
name: Release ${{ steps.version.outputs.version }}
73+
body: |
74+
## LinKU ${{ steps.version.outputs.version }}
75+
76+
자동 생성된 릴리스입니다.
77+
78+
### 설치 방법
79+
1. dist.zip 파일을 다운로드하고 압축을 풉니다
80+
2. Chrome 확장 프로그램 페이지에서 "개발자 모드"를 활성화합니다
81+
3. "압축해제된 확장 프로그램을 로드합니다"를 클릭하고 압축 해제한 폴더를 선택합니다
82+
files: |
83+
dist.zip
84+
draft: false
85+
prerelease: false
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: PR Build Check
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Setup pnpm
17+
uses: pnpm/action-setup@v4
18+
with:
19+
version: 9
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: '20'
25+
cache: 'pnpm'
26+
27+
- name: Install dependencies
28+
run: pnpm install
29+
30+
- name: Build project
31+
run: pnpm run build:local
32+
33+
- name: Build success
34+
run: echo "✅ Build completed successfully!"

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"lucide-react": "^0.475.0",
2828
"react": "^19.1.0",
2929
"react-dom": "^19.1.0",
30+
"sonner": "^2.0.7",
3031
"tailwind-merge": "^3.2.0",
3132
"tailwindcss-animate": "^1.0.7"
3233
},

pnpm-lock.yaml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/App.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ body {
113113

114114
@theme inline {
115115
/* 색상 매핑 */
116+
--color-main: #00913a;
117+
--color-hover: #007a30;
116118
--color-background: var(--background);
117119
--color-foreground: var(--foreground);
118120
--color-card: var(--card);

src/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { useEffect } from "react";
22
import "./App.css";
33
import MainLayout from "./components/MainLayout";
44
import TabsLayout from "./components/TabsLayout";
5+
import { Toaster } from "./components/ui/sonner";
56
import { sendPageView } from "./utils/analytics";
67

78
function App() {
@@ -21,6 +22,7 @@ function App() {
2122
<MainLayout>
2223
<TabsLayout />
2324
</MainLayout>
25+
<Toaster duration={2000} />
2426
</>
2527
);
2628
}

src/apis/eCampusAPI.ts

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// eCampusAPI.js
2+
import { ECampusTodoItem } from "@/types/todo";
3+
24
export interface ECampusLoginResponse {
35
success: boolean;
46
data?: {
@@ -12,22 +14,11 @@ export interface ECampusLoginResponse {
1214
error?: string;
1315
}
1416

15-
export interface TodoItem {
16-
id: string;
17-
title: string;
18-
subject: string;
19-
dDay: string;
20-
dueDate: string;
21-
kj: string;
22-
gubun: string;
23-
seq: string;
24-
}
25-
2617
export interface ECampusTodoResponse {
2718
success: boolean;
2819
needLogin?: boolean;
2920
data?: {
30-
todoList?: TodoItem[];
21+
todoList?: ECampusTodoItem[];
3122
[key: string]: unknown;
3223
};
3324
error?: unknown;
@@ -108,7 +99,7 @@ export async function eCampusTodoListAPI(): Promise<ECampusTodoResponse> {
10899
}
109100

110101
// TodoList 항목 파싱
111-
const todoItems: TodoItem[] = [];
102+
const todoItems: ECampusTodoItem[] = [];
112103
const todoWraps = doc.querySelectorAll(".todo_wrap:not(.no_data)");
113104

114105
todoWraps.forEach((item, index) => {
@@ -134,7 +125,8 @@ export async function eCampusTodoListAPI(): Promise<ECampusTodoResponse> {
134125
if (!title) return;
135126

136127
todoItems.push({
137-
id: `${index}`,
128+
type: 'ecampus',
129+
id: `ecampus-${index}`,
138130
title,
139131
subject,
140132
dDay,

src/components/MainLayout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ const Banner = () => {
8686

8787
const BannerImgSkeleton = () => {
8888
return (
89-
<div className="w-[500px] h-[85px] bg-[#00913A]/10 animate-pulse rounded-md overflow-hidden flex items-center justify-between">
89+
<div className="w-[500px] h-[85px] bg-main/10 animate-pulse rounded-md overflow-hidden flex items-center justify-between">
9090
<div className="flex-1 h-full flex items-center justify-center">
91-
<div className="w-[450px] h-[65px] bg-[#00913A]/15 rounded-md"></div>
91+
<div className="w-[450px] h-[65px] bg-main/15 rounded-md"></div>
9292
</div>
9393
</div>
9494
);

0 commit comments

Comments
 (0)