v0.0.87: 저장·로그인 버튼 비활성 기본, 글 목록 삭제 아이콘, 푸시 지침

This commit is contained in:
2026-05-12 10:08:18 +09:00
parent 79fb354d91
commit 1d9a3e4527
11 changed files with 129 additions and 19 deletions

View File

@@ -10,6 +10,12 @@ const form = reactive({
const pending = ref(false)
const errorMessage = ref('')
/**
* 로그인 제출 가능 여부(이메일·비밀번호가 모두 채워졌는지)
* @returns {boolean} 제출 가능 여부
*/
const canSubmitAdminLogin = computed(() => Boolean(form.email.trim()) && Boolean(form.password))
const { data: bootstrapStatus } = await useFetch('/api/auth/bootstrap-status', {
default: () => ({
hasUsers: true,
@@ -83,9 +89,9 @@ const submitLogin = async () => {
{{ errorMessage }}
</p>
<button
class="admin-login__button rounded bg-[#15171a] px-4 py-2 text-sm font-semibold text-white disabled:opacity-50"
class="admin-login__button rounded bg-[#15171a] px-4 py-2 text-sm font-semibold text-white disabled:cursor-not-allowed disabled:opacity-50"
type="submit"
:disabled="pending"
:disabled="pending || !canSubmitAdminLogin"
>
{{ pending ? '확인 중' : '로그인' }}
</button>