Tighten header quick login layout

Shrink SNS circular buttons, move '간편로그인' label to the left, and hide the user/status badge until authenticated.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dsyoon
2026-02-07 18:17:21 +09:00
parent e6a8e23217
commit 3370ca562e
3 changed files with 33 additions and 31 deletions

View File

@@ -435,16 +435,18 @@
}
function updateAuthUi() {
// 항상 상태를 보여주고, 버튼은 상태에 따라 비활성/숨김 처리
el.user.hidden = false;
const email = auth.user && auth.user.email ? String(auth.user.email) : "";
const name = auth.user && auth.user.name ? String(auth.user.name) : "";
let label = email ? email : name ? name : auth.user ? "로그인됨" : "로그인 필요";
if (auth.mode === "misconfigured") label = "로그인 설정 필요";
if (auth.mode === "sdk_missing") label = "로그인 SDK 로드 실패";
el.userText.textContent = label;
if (auth.authorized) el.user.setAttribute("data-auth", "ok");
else el.user.removeAttribute("data-auth");
// 로그인 전에는 사용자 배지를 숨김(요청: "로그인 설정 필요" 영역 제거)
if (!auth.user) {
el.user.hidden = true;
} else {
el.user.hidden = false;
const email = auth.user && auth.user.email ? String(auth.user.email) : "";
const name = auth.user && auth.user.name ? String(auth.user.name) : "";
const label = email ? email : name ? name : "로그인됨";
el.userText.textContent = label;
if (auth.authorized) el.user.setAttribute("data-auth", "ok");
else el.user.removeAttribute("data-auth");
}
// 로그인 기능이 활성(enabled)일 때만 로그인/로그아웃 버튼을 의미 있게 노출
const enabled = auth.mode === "enabled";