코드 정리 및 UI 개선: 불필요한 파일 제거, 디버그 로그 정리, 프로덕션 설정 개선, 할일관리 헤더 개선
This commit is contained in:
@@ -28,6 +28,7 @@ class Settings(BaseSettings):
|
|||||||
|
|
||||||
# CORS 설정
|
# CORS 설정
|
||||||
ALLOWED_HOSTS: List[str] = ["http://localhost:24100", "http://127.0.0.1:24100"]
|
ALLOWED_HOSTS: List[str] = ["http://localhost:24100", "http://127.0.0.1:24100"]
|
||||||
|
ALLOWED_ORIGINS: List[str] = ["http://localhost:24100", "http://127.0.0.1:24100"]
|
||||||
|
|
||||||
# 파일 업로드 설정
|
# 파일 업로드 설정
|
||||||
UPLOAD_DIR: str = "uploads"
|
UPLOAD_DIR: str = "uploads"
|
||||||
|
|||||||
@@ -30,12 +30,12 @@ app = FastAPI(
|
|||||||
lifespan=lifespan,
|
lifespan=lifespan,
|
||||||
)
|
)
|
||||||
|
|
||||||
# CORS 설정 (개발용 - 더 관대한 설정)
|
# CORS 설정
|
||||||
app.add_middleware(
|
app.add_middleware(
|
||||||
CORSMiddleware,
|
CORSMiddleware,
|
||||||
allow_origins=["*"], # 개발용으로 모든 오리진 허용
|
allow_origins=settings.ALLOWED_ORIGINS if hasattr(settings, 'ALLOWED_ORIGINS') else ["*"],
|
||||||
allow_credentials=True,
|
allow_credentials=True,
|
||||||
allow_methods=["*"],
|
allow_methods=["GET", "POST", "PUT", "DELETE", "OPTIONS"],
|
||||||
allow_headers=["*"],
|
allow_headers=["*"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -233,11 +233,7 @@ function todosApp() {
|
|||||||
|
|
||||||
// 할일 일정 설정
|
// 할일 일정 설정
|
||||||
async scheduleTodo() {
|
async scheduleTodo() {
|
||||||
console.log('🔧 scheduleTodo 호출됨:', this.currentTodo, this.scheduleForm);
|
if (!this.currentTodo || !this.scheduleForm.start_date) return;
|
||||||
if (!this.currentTodo || !this.scheduleForm.start_date) {
|
|
||||||
console.log('❌ 필수 데이터 누락:', { currentTodo: this.currentTodo, start_date: this.scheduleForm.start_date });
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// 선택한 날짜의 총 시간 체크
|
// 선택한 날짜의 총 시간 체크
|
||||||
@@ -273,17 +269,14 @@ function todosApp() {
|
|||||||
let response;
|
let response;
|
||||||
|
|
||||||
// 이미 일정이 설정된 할일인지 확인
|
// 이미 일정이 설정된 할일인지 확인
|
||||||
console.log('📋 할일 상태 확인:', this.currentTodo.status);
|
|
||||||
if (this.currentTodo.status === 'draft') {
|
if (this.currentTodo.status === 'draft') {
|
||||||
// 새로 일정 설정
|
// 새로 일정 설정
|
||||||
console.log('📅 새로 일정 설정 API 호출');
|
|
||||||
response = await window.api.post(`/todos/${this.currentTodo.id}/schedule`, {
|
response = await window.api.post(`/todos/${this.currentTodo.id}/schedule`, {
|
||||||
start_date: startDate.toISOString(),
|
start_date: startDate.toISOString(),
|
||||||
estimated_minutes: newMinutes
|
estimated_minutes: newMinutes
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// 기존 일정 지연 (active 상태의 할일)
|
// 기존 일정 지연 (active 상태의 할일)
|
||||||
console.log('🔄 기존 일정 지연 API 호출');
|
|
||||||
response = await window.api.put(`/todos/${this.currentTodo.id}/delay`, {
|
response = await window.api.put(`/todos/${this.currentTodo.id}/delay`, {
|
||||||
delayed_until: startDate.toISOString()
|
delayed_until: startDate.toISOString()
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,92 +0,0 @@
|
|||||||
/**
|
|
||||||
* 간단한 테스트용 documentViewer
|
|
||||||
*/
|
|
||||||
window.documentViewer = () => ({
|
|
||||||
// 기본 상태
|
|
||||||
loading: false,
|
|
||||||
error: null,
|
|
||||||
|
|
||||||
// 네비게이션
|
|
||||||
navigation: null,
|
|
||||||
|
|
||||||
// 검색
|
|
||||||
searchQuery: '',
|
|
||||||
|
|
||||||
// 데이터
|
|
||||||
notes: [],
|
|
||||||
bookmarks: [],
|
|
||||||
documentLinks: [],
|
|
||||||
backlinks: [],
|
|
||||||
|
|
||||||
// UI 상태
|
|
||||||
activeFeatureMenu: null,
|
|
||||||
selectedHighlightColor: '#FFFF00',
|
|
||||||
|
|
||||||
// 모달 상태
|
|
||||||
showLinksModal: false,
|
|
||||||
showLinkModal: false,
|
|
||||||
showNotesModal: false,
|
|
||||||
showBookmarksModal: false,
|
|
||||||
showBacklinksModal: false,
|
|
||||||
|
|
||||||
// 폼 데이터
|
|
||||||
linkForm: {
|
|
||||||
target_document_id: '',
|
|
||||||
selected_text: '',
|
|
||||||
book_scope: 'same',
|
|
||||||
target_book_id: '',
|
|
||||||
link_type: 'document',
|
|
||||||
target_text: '',
|
|
||||||
description: ''
|
|
||||||
},
|
|
||||||
|
|
||||||
// 기타 데이터
|
|
||||||
availableBooks: [],
|
|
||||||
filteredDocuments: [],
|
|
||||||
|
|
||||||
// 초기화
|
|
||||||
init() {
|
|
||||||
console.log('🔧 간단한 documentViewer 로드됨');
|
|
||||||
this.documentId = new URLSearchParams(window.location.search).get('id');
|
|
||||||
console.log('📋 문서 ID:', this.documentId);
|
|
||||||
},
|
|
||||||
|
|
||||||
// 뒤로가기
|
|
||||||
goBack() {
|
|
||||||
console.log('🔙 뒤로가기 클릭됨');
|
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
|
||||||
const fromPage = urlParams.get('from');
|
|
||||||
|
|
||||||
if (fromPage === 'index') {
|
|
||||||
window.location.href = '/index.html';
|
|
||||||
} else if (fromPage === 'hierarchy') {
|
|
||||||
window.location.href = '/hierarchy.html';
|
|
||||||
} else {
|
|
||||||
window.location.href = '/index.html';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 기본 함수들
|
|
||||||
toggleFeatureMenu(feature) {
|
|
||||||
console.log('🎯 기능 메뉴 토글:', feature);
|
|
||||||
this.activeFeatureMenu = this.activeFeatureMenu === feature ? null : feature;
|
|
||||||
},
|
|
||||||
|
|
||||||
searchInDocument() {
|
|
||||||
console.log('🔍 문서 검색:', this.searchQuery);
|
|
||||||
},
|
|
||||||
|
|
||||||
// 빈 함수들 (오류 방지용)
|
|
||||||
navigateToDocument() { console.log('네비게이션 함수 호출됨'); },
|
|
||||||
goToBookContents() { console.log('목차로 이동 함수 호출됨'); },
|
|
||||||
createHighlightWithColor() { console.log('하이라이트 생성 함수 호출됨'); },
|
|
||||||
resetTargetSelection() { console.log('타겟 선택 리셋 함수 호출됨'); },
|
|
||||||
loadDocumentsFromBook() { console.log('서적 문서 로드 함수 호출됨'); },
|
|
||||||
onTargetDocumentChange() { console.log('타겟 문서 변경 함수 호출됨'); },
|
|
||||||
openTargetDocumentSelector() { console.log('타겟 문서 선택기 열기 함수 호출됨'); },
|
|
||||||
saveDocumentLink() { console.log('문서 링크 저장 함수 호출됨'); },
|
|
||||||
closeLinkModal() { console.log('링크 모달 닫기 함수 호출됨'); },
|
|
||||||
getSelectedBookTitle() { return '테스트 서적'; }
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log('✅ 테스트용 documentViewer 정의됨');
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -226,12 +226,28 @@
|
|||||||
<!-- 메인 컨텐츠 -->
|
<!-- 메인 컨텐츠 -->
|
||||||
<main class="container mx-auto px-4 pt-20 pb-8">
|
<main class="container mx-auto px-4 pt-20 pb-8">
|
||||||
<!-- 페이지 헤더 -->
|
<!-- 페이지 헤더 -->
|
||||||
<div class="text-center mb-6">
|
<div class="text-center mb-8">
|
||||||
<h1 class="text-2xl md:text-4xl font-bold text-gray-900 mb-2">
|
<h1 class="text-3xl md:text-4xl font-bold text-gray-900 mb-3">
|
||||||
<i class="fas fa-tasks text-indigo-600 mr-2"></i>
|
<i class="fas fa-tasks text-indigo-600 mr-3"></i>
|
||||||
할일관리
|
할일관리
|
||||||
</h1>
|
</h1>
|
||||||
<p class="text-sm md:text-xl text-gray-600">간편한 할일 관리</p>
|
<p class="text-lg md:text-xl text-gray-600 mb-4">효율적인 일정 관리와 생산성 향상</p>
|
||||||
|
|
||||||
|
<!-- 간단한 통계 -->
|
||||||
|
<div class="flex justify-center space-x-6 text-sm text-gray-500">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<i class="fas fa-inbox w-4 h-4 mr-1 text-gray-400"></i>
|
||||||
|
<span>검토필요 <strong x-text="stats.draft_count || 0"></strong>개</span>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-center">
|
||||||
|
<i class="fas fa-tasks w-4 h-4 mr-1 text-blue-500"></i>
|
||||||
|
<span>진행중 <strong x-text="stats.todo_count || 0"></strong>개</span>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-center">
|
||||||
|
<i class="fas fa-check w-4 h-4 mr-1 text-green-500"></i>
|
||||||
|
<span>완료 <strong x-text="stats.completed_count || 0"></strong>개</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 할일 입력 (memos/트위터 스타일) -->
|
<!-- 할일 입력 (memos/트위터 스타일) -->
|
||||||
|
|||||||
Reference in New Issue
Block a user