리팩토링: renderer.js 구성 요소들을 독립적인 파일로 나누기

This commit is contained in:
2026-05-15 17:09:39 +09:00
parent 1c8a4cc2fe
commit 75a1f9e2f5
5 changed files with 383 additions and 369 deletions
+27
View File
@@ -0,0 +1,27 @@
const loading = document.getElementById('loading');
const loadingText = document.getElementById('loading-text');
const toast = document.getElementById('toast');
const statusDot = document.getElementById('status-dot');
const statusText = document.getElementById('status-text');
export function showLoading(msg = '처리 중...') {
loadingText.textContent = msg;
loading.classList.add('show');
}
export function hideLoading() {
loading.classList.remove('show');
}
export function setStatus(msg, ready) {
statusText.textContent = msg;
statusDot.className = 'status-dot' + (ready ? ' ready' : '');
}
export function showToast(msg, bg = '#6af7a0', color = '#0a2a1a') {
toast.textContent = msg;
toast.style.background = bg;
toast.style.color = color;
toast.classList.add('show');
setTimeout(() => toast.classList.remove('show'), 3000);
}