CohoraHubPublishReviewOpen Cohora
Mini Apps
Mini App

Focus Counter

완료한 집중 세션을 기록하는 작은 카운터입니다.

CohoraCommunity source

Preview

미리보기 데이터는 저장되지 않습니다.

Permissions

미니앱 자체 데이터 저장. PC 파일·명령어·외부 네트워크 접근 없음.

앱 코드
<!doctype html><html lang="ko"><meta charset="utf-8"><style>body{margin:0;padding:36px;font:16px system-ui;color:#252525;background:#fafafa}main{max-width:420px;margin:auto}h1{font-size:24px}output{display:block;font-size:80px;margin:30px 0}button{padding:12px 20px;border:0;border-radius:6px;background:#167452;color:white;font:inherit}#error{color:#b52e36}</style><main><h1>Focus Counter</h1><p>완료한 집중 세션</p><output id="count">0</output><button id="add" disabled>세션 완료 +1</button><p id="error" role="alert"></p></main><script>(async()=>{const count=document.getElementById('count'),button=document.getElementById('add'),error=document.getElementById('error');let n=0;try{const data=await window.cohoraApp.getData();n=Number.isSafeInteger(data?.count)&&data.count>=0?data.count:0;count.value=String(n);button.disabled=false}catch(e){error.textContent='기록을 읽지 못했습니다.'}button.onclick=async()=>{button.disabled=true;try{await window.cohoraApp.setData({count:n+1});count.value=String(++n);error.textContent=''}catch(e){error.textContent='저장하지 못했습니다.'}finally{button.disabled=false}}})();</script></html>

Tags

focusproductivity

Manifest와 의존성을 검토한 뒤 Workspace에 설치합니다.

Version
1.0.0
Installs
0
Updated
2026-09-11
Publisher
Cohora
설치 전에 구성과 필요한 권한을 다시 확인합니다.