diff --git a/VERSION b/VERSION
index 5fcb5fe..eb4ff85 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-v4.0.15
+v4.0.16
diff --git a/admin.html b/admin.html
index d199b01..a59ed39 100644
--- a/admin.html
+++ b/admin.html
@@ -3,7 +3,7 @@
-
+
관리자 - UNIARE
@@ -47,6 +47,13 @@
+
+
+
+
@@ -119,6 +126,7 @@
+
@@ -153,7 +161,22 @@
-
+
+
+
+
+
계정과 개인 정보는 삭제되며 저장한 덱은 익명으로 유지됩니다. 복구할 수 없습니다.
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
+
@@ -116,6 +116,10 @@
+
+
@@ -158,7 +162,25 @@
-
+
+
+
회원 탈퇴
+
+ 계정과 개인 정보는 삭제되며 저장한 덱은 다른 사용자가 계속 참고할 수 있도록 익명으로 유지됩니다. 이 작업은 복구할 수 없습니다.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -328,6 +350,10 @@
document.getElementById('profile-username').value = user.username || '';
document.getElementById('profile-avatar').src = resolveAvatarSrc(user);
document.getElementById('profile-avatar-remove').classList.toggle('hidden', !user.avatarUrl);
+ document.getElementById('profile-open-delete').classList.toggle(
+ 'hidden',
+ user.role === 'admin',
+ );
}
/**
@@ -462,6 +488,7 @@
});
const passwordModal = document.getElementById('password-modal');
+ const accountDeleteModal = document.getElementById('account-delete-modal');
document.getElementById('profile-open-password').addEventListener('click', () => {
document.getElementById('password-current').value = '';
@@ -505,6 +532,44 @@
if (e.target === passwordModal) passwordModal.classList.remove('open');
});
+ document.getElementById('profile-open-delete').addEventListener('click', () => {
+ const confirmationInput = document.getElementById('account-delete-confirmation');
+ confirmationInput.value = '';
+ document.getElementById('account-delete-error').classList.add('hidden');
+ document.getElementById('account-delete-yes').disabled = true;
+ accountDeleteModal.classList.add('open');
+ confirmationInput.focus();
+ });
+
+ document.getElementById('account-delete-confirmation').addEventListener('input', (event) => {
+ document.getElementById('account-delete-yes').disabled = event.target.value !== 'DELETE';
+ });
+
+ document.getElementById('account-delete-no').addEventListener('click', () => {
+ accountDeleteModal.classList.remove('open');
+ });
+
+ document.getElementById('account-delete-yes').addEventListener('click', async () => {
+ const confirmation = document.getElementById('account-delete-confirmation').value;
+ const errorEl = document.getElementById('account-delete-error');
+ const yesButton = document.getElementById('account-delete-yes');
+ errorEl.classList.add('hidden');
+ yesButton.disabled = true;
+ try {
+ await UaDeckApi.deleteMyAccount(confirmation);
+ UaDeckApi.logout();
+ location.href = '/';
+ } catch (err) {
+ errorEl.textContent = err.message || t('accountWithdrawalFailed', '회원 탈퇴에 실패했습니다.');
+ errorEl.classList.remove('hidden');
+ yesButton.disabled = confirmation !== 'DELETE';
+ }
+ });
+
+ accountDeleteModal.addEventListener('click', (event) => {
+ if (event.target === accountDeleteModal) accountDeleteModal.classList.remove('open');
+ });
+
init();
@@ -30,8 +30,8 @@
로그인으로 돌아가기
-
-
+
+
-
-
+
+
-
-
+
+
diff --git a/reset-password.html b/reset-password.html
index 057b73a..42c62ea 100644
--- a/reset-password.html
+++ b/reset-password.html
@@ -3,7 +3,7 @@