From 739bb80b04d4cd5107a7743143a159fd0db8deb9 Mon Sep 17 00:00:00 2001 From: king Date: Wed, 19 Aug 2026 22:50:57 +0900 Subject: [PATCH] =?UTF-8?q?fix(cafe24):=20=ED=8E=B8=EC=A7=91=EA=B8=B0=20?= =?UTF-8?q?=EC=83=81=EB=8B=A8=20=EB=8B=A8=EC=B6=95=ED=82=A4=20=EC=95=88?= =?UTF-8?q?=EB=82=B4=C2=B7=EA=B0=80=EA=B2=A9=20=ED=91=9C=EA=B8=B0=C2=B7?= =?UTF-8?q?=EC=84=A0=ED=83=9D=ED=96=89=20hover?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 편집기 바 왼쪽 문구를 단축키 안내만 남긴다. 글자 수·PC/모바일 공통은 화면에서 쓸 일이 없어 뺐다. 옅은 파랑(#79a6dd)으로 본문과 구분한다. - 가격을 '6900.00' 대신 '6,900원' 으로 보여준다. 원 단위 쇼핑몰이라 소수점 아래는 언제나 .00 이므로 버린다. 숫자로 못 읽으면 받은 값을 그대로 둔다. - 선택된 행에 마우스를 올려도 배경이 변하지 않게 한다. erp-shell.css 의 `.erp-table tbody tr:hover` 가 특이도가 더 높아 검은 배경을 덮어쓰고 있었다. Co-Authored-By: Claude Opus 5 --- app/modules/cafe24/routes_products.py | 19 ++++++++++++++++++- .../cafe24/templates/cafe24/_editor.html | 2 +- .../cafe24/templates/cafe24/products.html | 2 +- .../cafe24/templates/cafe24/schedules.html | 2 +- .../cafe24/templates/cafe24/system.html | 2 +- app/static/cafe24.css | 14 ++++++++++++++ 6 files changed, 36 insertions(+), 5 deletions(-) diff --git a/app/modules/cafe24/routes_products.py b/app/modules/cafe24/routes_products.py index d767164..68f1682 100644 --- a/app/modules/cafe24/routes_products.py +++ b/app/modules/cafe24/routes_products.py @@ -31,6 +31,7 @@ PC/모바일은 구분하지 않는다 — 적용 시 `description` 과 `mobile_ from __future__ import annotations import logging +from decimal import Decimal from typing import Any from urllib.parse import urlencode @@ -64,6 +65,22 @@ def _no_store(response: Any) -> Any: return response +def _price(value: Any) -> str: + """카페24 가격('6900.00') → 화면 표기('6,900원'). + + 소수점 아래는 버린다 — 이 쇼핑몰은 원 단위라 언제나 .00 이고, 화면에 보일 + 이유가 없다. 숫자로 못 읽으면 받은 값을 그대로 보여준다. + """ + text = str(value or "").strip() + if not text: + return "" + try: + won = int(Decimal(text)) + except (ArithmeticError, ValueError): + return text + return f"{won:,}원" + + def _short_dt(value: Any) -> str: """'2026-08-14T11:38:18+09:00' → '2026-08-14 11:38'.""" text = str(value or "").strip() @@ -135,7 +152,7 @@ def _editor_ctx(st: Any, product_no: int) -> dict[str, Any]: "product_url": api.config.product_url(product_no), "info": { **info, - "price": str(product.get("price") or ""), + "price": _price(product.get("price")), "updated_date": _short_dt(product.get("updated_date")), "summary_description": product.get("summary_description") or "", }, diff --git a/app/modules/cafe24/templates/cafe24/_editor.html b/app/modules/cafe24/templates/cafe24/_editor.html index 19a53f1..e1f71a3 100644 --- a/app/modules/cafe24/templates/cafe24/_editor.html +++ b/app/modules/cafe24/templates/cafe24/_editor.html @@ -78,7 +78,7 @@
- 상세설명 HTML · {{ desc.description | length }}자 · PC/모바일 공통 · Ctrl+/ 주석 · Alt+↑↓ 줄 이동 · Shift+Del 줄 삭제 + 단축키: 주석넣기[Ctrl+/] · 줄 이동[Alt+↑↓] · 줄 삭제[Shift+Del] diff --git a/app/modules/cafe24/templates/cafe24/products.html b/app/modules/cafe24/templates/cafe24/products.html index 724c049..c6e4dae 100644 --- a/app/modules/cafe24/templates/cafe24/products.html +++ b/app/modules/cafe24/templates/cafe24/products.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + {% endblock %} {% block content %} diff --git a/app/modules/cafe24/templates/cafe24/schedules.html b/app/modules/cafe24/templates/cafe24/schedules.html index 42cc3d2..02779a5 100644 --- a/app/modules/cafe24/templates/cafe24/schedules.html +++ b/app/modules/cafe24/templates/cafe24/schedules.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + {% endblock %} {% block content %} diff --git a/app/modules/cafe24/templates/cafe24/system.html b/app/modules/cafe24/templates/cafe24/system.html index 8040478..4e0b3b0 100644 --- a/app/modules/cafe24/templates/cafe24/system.html +++ b/app/modules/cafe24/templates/cafe24/system.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% block head_extra %} - + {% endblock %} {% block content %} diff --git a/app/static/cafe24.css b/app/static/cafe24.css index 6188522..bf9d55d 100644 --- a/app/static/cafe24.css +++ b/app/static/cafe24.css @@ -157,6 +157,13 @@ background: var(--color-rich-black, #0a0a0a); } +/* 선택된 행은 마우스를 올려도 그대로 둔다. erp-shell.css 의 + `.erp-table tbody tr:hover` 가 특이도가 더 높아 검은 배경을 덮어쓰므로 + 여기서 더 구체적인 선택자로 되돌린다. */ +.cf24-list-table tbody tr.cf24-row.is-active:hover { + background: var(--color-rich-black, #0a0a0a); +} + .cf24-row.is-active td, .cf24-row.is-active .cf24-col-name a { color: #fff; @@ -267,6 +274,13 @@ flex: 0 0 auto; } +/* 편집기 단축키 안내 — 옅은 파랑으로 본문과 구분한다 */ +.cf24-shortcuts { + font-size: var(--text-caption, 12px); + color: #79a6dd; + white-space: nowrap; +} + /* 편집 폼과 코드 칸은 **줄어들지 않는다.** 아래 「예약 적용」·「버전 이력」을 펼치면 코드 칸이 눌리는 대신 내용이 아래로 밀리고 오른쪽 칸(.cf24-pane-editor)이 스크롤된다. flex: 1 1 auto 였을 때는 펼칠 때마다 편집기가 작아져 작업하던 위치를 잃었다. */