Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 241211 몇가지 수정 #64

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
"lint": "eslint --ext .ts,.tsx ."
},
"devDependencies": {
"@electron-forge/cli": "^7.4.0",
"@electron-forge/maker-deb": "^7.4.0",
"@electron-forge/maker-rpm": "^7.4.0",
"@electron-forge/maker-squirrel": "^7.4.0",
"@electron-forge/maker-zip": "^7.4.0",
"@electron-forge/plugin-auto-unpack-natives": "^7.4.0",
"@electron-forge/plugin-fuses": "^7.4.0",
"@electron-forge/plugin-vite": "^7.4.0",
"@electron-forge/publisher-github": "^7.4.0",
"@electron-forge/cli": "^7.6.0",
"@electron-forge/maker-deb": "^7.6.0",
"@electron-forge/maker-rpm": "^7.6.0",
"@electron-forge/maker-squirrel": "^7.6.0",
"@electron-forge/maker-zip": "^7.6.0",
"@electron-forge/plugin-auto-unpack-natives": "^7.6.0",
"@electron-forge/plugin-fuses": "^7.6.0",
"@electron-forge/plugin-vite": "^7.6.0",
"@electron-forge/publisher-github": "^7.6.0",
"@electron/fuses": "^1.8.0",
"@types/node": "^20.14.10",
"@types/react": "^18.3.3",
Expand All @@ -38,10 +38,10 @@
"postcss": "^8.4.39",
"prettier": "^3.3.2",
"prettier-plugin-tailwindcss": "^0.6.6",
"tailwindcss": "^3.4.4",
"tailwindcss": "^3.4.16",
"ts-node": "^10.0.0",
"typescript": "~4.5.4",
"vite": "^5.0.12",
"vite": "^5.4.11",
"vite-plugin-svgr": "^4.2.0"
},
"author": {
Expand Down Expand Up @@ -88,5 +88,10 @@
"update-electron-app": "^3.0.0",
"usehooks-ts": "^3.1.0",
"vaul": "^0.9.1"
},
"resolutions": {
"cross-spawn": "^7.0.3",
"path-to-regexp": "^0.1.10",
"body-parser": "^1.20.3"
}
}
6 changes: 5 additions & 1 deletion src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ const trayIconMap: Record<string, string> = {
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADoSURBVHgB3ZIxDoIwFIb/Eg7gEWBxldFNiLOJR+AG6g3AY+Cio6NxcDK66cgN8AawmLjVV62JkhYrOBi/5IWmr+/j5bXAr8N0Cc55Rh9HmdytgeMWuJwLMGvO4mRSKSSZL8qUss3yLnvtK2bTJBIrC2o86EgPik0+eqx0wh5q8nmH3b5qd6EV0vwc6C5DEAwAt72n6Re3AKf5zcba8yQc8mpy8VMZrXK9rXD6qEZIMrk+UbjPSdUMOzBn9fYENyeCCeJRU4Qy8kYyw24j1IEKva/JpLD8fEI0QXRTR2ZX5AoZAWMsxd9wBR1E9hNu08zLAAAAAElFTkSuQmCC',
};
const getTrayIcon = (icon: string): NativeImage => {
return nativeImage.createFromDataURL(trayIconMap[icon] ?? trayIconMap.default);
const image = nativeImage.createFromDataURL(trayIconMap[icon] ?? trayIconMap.default);
// https://stackoverflow.com/questions/41664208/electron-tray-icon-change-depending-on-dark-theme
// @note: 템플릿 이미지 설정을 해줘야 배경에 맞춰 자동으로 아이콘 색상 변경됨
image.setTemplateImage(true);
return image;
};

const createTray = (mainWindow: BrowserWindow) => {
Expand Down
11 changes: 9 additions & 2 deletions src/renderer/pages/selection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ const alarmMessageMap: Record<CatType, string> = {
BLACK: '어디갔나옹...',
THREE_COLOR: '내가 여기있는데 어디갔냐옹!',
};
const typeNameMap: Record<CatType, string> = {
CHEESE: '치즈냥',
BLACK: '까만냥',
THREE_COLOR: '삼색냥',
};
const RIVE_STATE_MACHINE_NAME = 'State Machine_selectCat';

const Selection = () => {
Expand All @@ -49,6 +54,7 @@ const Selection = () => {
no: cat.no,
name: cat.name,
type: cat.type,
typeName: typeNameMap[cat.type],
id: String(cat.no),
iconName: iconNameMap[cat.type],
adjective: adjectiveMap[cat.type],
Expand Down Expand Up @@ -95,7 +101,7 @@ const Selection = () => {
<Frame>
<Frame.NavBar title="고양이 선택" onBack={handleClickBackButton} />

<div className="flex w-full flex-col gap-[42px]">
<div className="flex w-full flex-col gap-[24px]">
<div className="flex flex-col gap-1">
<h1 className="header-3 text-text-primary">어떤 고양이와 함께할까요?</h1>
<p className="body-r text-text-secondary">언제든지 다른 고양이와 함께할 수 있어요</p>
Expand Down Expand Up @@ -148,7 +154,8 @@ const Selection = () => {
selectedCatId === cat.id ? 'text-text-primary' : 'text-text-secondary',
)}
>
{cat.name}
{/* @note: 유저가 입력한 고양이 이름이 아닌 종류에 대한 이름을 보여준다 */}
{cat.typeName}
</span>
</SelectGroupItem>
))}
Expand Down
Loading