Always show SNS quick login area before auth setup

Display Naver/Kakao/Google quick login UI even when Auth0 is not configured, open config modal on click if connection is missing, and add cache-busting query strings.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dsyoon
2026-02-07 18:14:41 +09:00
parent 516e374a50
commit e6a8e23217
3 changed files with 27 additions and 11 deletions

View File

@@ -4,9 +4,12 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="color-scheme" content="light dark" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<title>NCue | 개인 링크 홈</title>
<meta name="description" content="개인 서비스 링크를 모아 관리하는 홈 화면" />
<link rel="stylesheet" href="./styles.css" />
<link rel="stylesheet" href="./styles.css?v=20260207-quicklogin" />
<!-- Auth0 SPA SDK (정적 사이트용) -->
<!-- jsDelivr 차단/실패 시 unpkg로 자동 대체 -->
<script
@@ -27,7 +30,7 @@
allowedEmails: [],
};
</script>
<script defer src="./script.js"></script>
<script defer src="./script.js?v=20260207-quicklogin"></script>
</head>
<body>
<a class="skip-link" href="#main">본문으로 건너뛰기</a>

View File

@@ -455,16 +455,24 @@
el.btnLogin.disabled = false;
el.btnLogout.disabled = false;
// 간편 로그인 버튼 노출 (connection이 설정되어 있고, 미로그인 상태)
// 간편 로그인 버튼 노출
// - 설정 전(로그인 설정 필요)에도 디자인이 보이도록 영역은 항상 노출
// - connection이 없으면 클릭 시 설정 모달을 띄움(핸들러에서 처리)
const cfg = getAuthConfig();
const showQuick = enabled && !auth.user;
const g = showQuick && Boolean(cfg.connections.google);
const k = showQuick && Boolean(cfg.connections.kakao);
const n = showQuick && Boolean(cfg.connections.naver);
if (el.btnGoogle) el.btnGoogle.hidden = !g;
if (el.btnKakao) el.btnKakao.hidden = !k;
if (el.btnNaver) el.btnNaver.hidden = !n;
if (el.snsLogin) el.snsLogin.hidden = !(g || k || n);
const showQuick = !auth.user;
if (el.snsLogin) el.snsLogin.hidden = !showQuick;
if (el.btnGoogle) {
el.btnGoogle.hidden = !showQuick;
el.btnGoogle.classList.toggle("is-disabled", !cfg.connections.google);
}
if (el.btnKakao) {
el.btnKakao.hidden = !showQuick;
el.btnKakao.classList.toggle("is-disabled", !cfg.connections.kakao);
}
if (el.btnNaver) {
el.btnNaver.hidden = !showQuick;
el.btnNaver.classList.toggle("is-disabled", !cfg.connections.naver);
}
}
function applyManageLock() {

View File

@@ -218,6 +218,11 @@ html[data-theme="light"] .topbar {
transition: transform 120ms ease, filter 120ms ease;
}
.sns-btn.is-disabled {
opacity: 0.55;
filter: grayscale(0.2);
}
.sns-btn:hover {
transform: translateY(-1px);
filter: brightness(1.02);