fix(cafe24): 편집기 상단 단축키 안내·가격 표기·선택행 hover

- 편집기 바 왼쪽 문구를 단축키 안내만 남긴다. 글자 수·PC/모바일 공통은
  화면에서 쓸 일이 없어 뺐다. 옅은 파랑(#79a6dd)으로 본문과 구분한다.
- 가격을 '6900.00' 대신 '6,900원' 으로 보여준다. 원 단위 쇼핑몰이라 소수점
  아래는 언제나 .00 이므로 버린다. 숫자로 못 읽으면 받은 값을 그대로 둔다.
- 선택된 행에 마우스를 올려도 배경이 변하지 않게 한다. erp-shell.css 의
  `.erp-table tbody tr:hover` 가 특이도가 더 높아 검은 배경을 덮어쓰고
  있었다.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-19 22:50:57 +09:00
parent 8cfe963526
commit 739bb80b04
6 changed files with 36 additions and 5 deletions
+18 -1
View File
@@ -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 "",
},