fix(inout): 메일 창 — 연결 전 아래 줄 숨김, redirect_uri_mismatch 대비 등록할 주소 안내

- .io-dlg-footbar 의 display:flex 가 hidden 속성을 덮어써 연결 전에도 [메일 발송]·[연결 끊기]가 보이던 문제
  → .io/.io-dlg/.io-viewer 안의 [hidden] 은 늘 숨김.
- 구글이 redirect_uri_mismatch 로 막으면 ERP 로 돌아오지 않으므로, 연결 안내에 구글 클라우드
  "승인된 리디렉션 URI"에 넣을 정확한 주소(callback_url)를 미리 보여 준다.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-16 16:59:14 +09:00
parent 9429485236
commit 12f1d455b9
8 changed files with 25 additions and 9 deletions
+4
View File
@@ -112,6 +112,8 @@
· .erp-input 은 min-width 240px + content-box 라 좁은 칸에서 옆 칸을 덮는다 → 이 모듈 안에서는 테두리 기준·최소폭 없음
· .erp-table-wrap 은 카드 모양(그림자·둥근 모서리)이라 카드 안에 넣으면 상자가 겹쳐 보인다 → 카드 안에서는 평평하게 */
.io *, .io *::before, .io *::after, .io-dlg *, .io-dlg *::before, .io-dlg *::after { box-sizing: border-box; }
/* hidden 속성은 늘 숨김 — display 를 준 요소(예: 메일 창 아래 줄 flex)가 hidden 을 덮어써 보이던 문제(2026-10-16) */
.io [hidden], .io-dlg [hidden], .io-viewer [hidden] { display: none !important; }
.io .erp-input { min-width: 0; }
.io .erp-card-block .erp-table-wrap { border-radius: 0; box-shadow: none; background: transparent; }
@@ -193,6 +195,8 @@
.io-mail-preview { width: 100%; height: 380px; border: 1px solid var(--color-subtle-ash); border-radius: 8px; background: #fff; }
.io-mail-connect { padding: 8px 2px 4px; font-size: 13.5px; line-height: 1.7; }
.io-mail-connect .erp-btn { margin-top: 6px; }
.io-mail-admin { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: var(--color-ghost-gray); font-size: 12px; color: #3d3f42; }
.io-mail-admin code { display: inline-block; margin-top: 4px; padding: 2px 6px; border-radius: 4px; background: #fff; border: 1px solid var(--color-subtle-ash); font-size: 12px; user-select: all; word-break: break-all; }
.io-hint { margin: -4px 0 12px; font-size: 12.5px; color: #9a5b00; }
.io-dlg-footbar { display: flex; align-items: center; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--color-subtle-ash); background: #fafbfc; }
.io-link-btn { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--color-midtone-gray); text-decoration: underline; cursor: pointer; }
+5 -1
View File
@@ -471,7 +471,11 @@
"<p><b>발주 메일은 내 Gmail(" + esc(data.from) + ")로 보냅니다.</b> 처음 한 번만 Gmail 연결이 필요합니다.</p>" +
"<p class=\"erp-muted\">구글 화면에서 <b>같은 계정</b>을 고르고 '메일 보내기' 권한을 허락하세요. 보내기 권한만 받으며, 메일함은 읽지 않습니다.</p>" +
(data.configured ? "" : '<p class="io-error">서버 설정(APP_ENCRYPTION_KEY·구글 OAuth)이 없어 연결할 수 없습니다 — 관리자에게 알려 주세요.</p>') +
'<a class="erp-btn erp-btn-primary" href="' + esc(data.connect_url) + '">Gmail 연결</a></div>';
'<a class="erp-btn erp-btn-primary" href="' + esc(data.connect_url) + '">Gmail 연결</a>' +
// 구글이 redirect_uri_mismatch 로 막으면 ERP 로 돌아오지 않는다 — 등록할 주소를 미리 보여 준다
'<div class="io-mail-admin">구글 화면에 <b>400 오류: redirect_uri_mismatch</b> 가 나오면, 관리자가 구글 클라우드 → API 및 서비스 → 사용자 인증 정보 → ' +
'로그인용 OAuth 클라이언트 → <b>승인된 리디렉션 URI</b>에 아래 주소를 추가해야 합니다(Gmail API 사용·gmail.send 범위도 함께).<br>' +
'<code>' + esc(data.callback_url) + '</code></div></div>';
return;
}
foot.hidden = false;