Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
179 changes: 179 additions & 0 deletions public/popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -331,3 +331,182 @@ body {
.confirm-buttons .btn {
flex: 1;
}

/* 주기 선택 드롭다운 */
.cycle-select {
width: 100%;
padding: 10px 12px;
border: 1px solid #ddd;
border-radius: 6px;
font-size: 14px;
background-color: #fff;
cursor: pointer;
transition: border-color 0.2s;
}

.cycle-select:focus {
outline: none;
border-color: #3498db;
}

/* 주기 목록 */
.cycle-list {
list-style: none;
margin-top: 12px;
margin-bottom: 12px;
}

.cycle-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px;
margin-bottom: 8px;
background-color: #f8f9fa;
border-radius: 6px;
}

.cycle-item-empty {
padding: 12px;
text-align: center;
color: #95a5a6;
font-size: 12px;
}

.cycle-info {
flex: 1;
min-width: 0;
}

.cycle-title {
font-weight: 500;
font-size: 13px;
margin-bottom: 2px;
}

.cycle-durations {
font-size: 11px;
color: #7f8c8d;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.cycle-actions {
display: flex;
gap: 4px;
margin-left: 8px;
}

.btn-small {
padding: 6px 10px;
font-size: 12px;
width: auto;
}

/* 모달 */
.modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 200;
}

.modal-content {
background: #fff;
padding: 20px;
border-radius: 8px;
width: 290px;
max-height: 90vh;
overflow-y: auto;
}

.modal-content h3 {
margin-bottom: 16px;
font-size: 16px;
color: #2c3e50;
}

/* Duration 입력 그룹 */
.duration-input-group {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 8px;
}

.duration-value {
width: 60px;
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
text-align: center;
}

.duration-value:focus {
outline: none;
border-color: #3498db;
}

.duration-unit {
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
background-color: #fff;
cursor: pointer;
}

.duration-unit:focus {
outline: none;
border-color: #3498db;
}

.btn-remove-duration {
width: 28px;
height: 28px;
padding: 0;
border: none;
border-radius: 4px;
background-color: #e74c3c;
color: #fff;
font-size: 16px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
}

.btn-remove-duration:hover {
background-color: #c0392b;
}

/* 폼 버튼 영역 */
.form-actions {
display: flex;
gap: 8px;
margin-top: 16px;
}

.form-actions .btn {
flex: 1;
}

/* 주기 섹션 */
#cycle-section {
margin-top: 12px;
margin-bottom: 12px;
}

#cycle-section h3 {
font-size: 14px;
margin-bottom: 8px;
color: #2c3e50;
}
42 changes: 42 additions & 0 deletions public/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ <h1>Recycle Study</h1>
<span id="user-email"></span>
</div>

<!-- 복습 주기 선택 -->
<div class="form-group">
<label for="cycle-select">복습 주기</label>
<select id="cycle-select" class="cycle-select">
<!-- 동적으로 옵션 추가 -->
</select>
</div>

<button id="save-url-btn" class="btn btn-primary btn-large">
현재 페이지 저장
</button>
Expand All @@ -52,6 +60,16 @@ <h1>Recycle Study</h1>

<hr class="divider">

<!-- 주기 관리 버튼 -->
<button id="cycle-manage-btn" class="btn btn-secondary">복습 주기 관리</button>

<!-- 주기 관리 섹션 -->
<div id="cycle-section" class="hidden">
<h3>나의 복습 주기</h3>
<ul id="cycle-list" class="cycle-list"></ul>
<button id="cycle-add-btn" class="btn btn-secondary btn-small">+ 새 주기 추가</button>
</div>

<button id="show-devices-btn" class="btn btn-secondary">디바이스 관리</button>

<div id="devices-section" class="hidden">
Expand All @@ -71,6 +89,30 @@ <h3>등록된 디바이스</h3>
</div>
</div>

<!-- 주기 폼 모달 -->
<div id="cycle-modal" class="modal hidden">
<div class="modal-content">
<h3 id="cycle-modal-title">새 복습 주기</h3>
<form id="cycle-form">
<div class="form-group">
<label for="cycle-title-input">주기 이름</label>
<input type="text" id="cycle-title-input" placeholder="예: 시험 대비 단기 암기">
</div>
<div class="form-group">
<label>복습 간격 (등록 시점 기준)</label>
<div id="cycle-durations-container">
<!-- 동적으로 추가 -->
</div>
<button type="button" id="add-duration-btn" class="btn btn-text btn-small">+ 간격 추가</button>
</div>
<div class="form-actions">
<button type="button" id="cycle-form-cancel" class="btn btn-secondary">취소</button>
<button type="submit" id="cycle-form-submit" class="btn btn-primary">저장</button>
</div>
</form>
</div>
</div>

<script type="module" src="popup.js"></script>
</body>
</html>
Loading