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 였을 때는 펼칠 때마다 편집기가 작아져 작업하던 위치를 잃었다. */