${desc || " "}
-
${favTag}${tags}
+
${favTag}${lockTag}${tags}
-
열기
-
+ ${openHtml}
+
@@ -771,10 +801,12 @@
}
const isAuthed = await client.isAuthenticated();
auth.user = isAuthed ? await client.getUser() : null;
+ sessionEmail = auth.user && auth.user.email ? String(auth.user.email).trim().toLowerCase() : "";
if (el.btnLogout) el.btnLogout.hidden = !auth.user;
if (el.snsLogin) el.snsLogin.hidden = Boolean(auth.user);
if (el.user) el.user.hidden = !auth.user;
if (el.userText && auth.user) el.userText.textContent = auth.user.email || auth.user.name || "로그인됨";
+ render();
}
async function loginWithConnection(provider) {
@@ -795,6 +827,7 @@
async function logout() {
const client = await ensureAuthClient();
if (!client) return;
+ sessionEmail = "";
await client.logout({
logoutParams: { returnTo: location.origin === "null" ? location.href : location.origin + location.pathname },
});
@@ -870,6 +903,11 @@
const card = e.target.closest(".card");
if (!card) return;
const id = card.getAttribute("data-id");
+ if ((btn.getAttribute("data-act") === "copy" || btn.getAttribute("data-act") === "open") && card.getAttribute("data-access") === "0") {
+ toast("이 링크는 현재 권한으로 접근할 수 없습니다.");
+ e.preventDefault();
+ return;
+ }
const act = btn.getAttribute("data-act");
const link = id ? getById(id) : null;
if (!link) return;