refactor: 미니앱 페이지 분리 (/app)

- /app → 텔레그램 미니앱 전용 대시보드
- / → 랜딩 페이지 (마케팅)
- initMiniApp() 메서드 추가

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
kappa
2026-01-22 13:53:38 +09:00
parent ea35848a97
commit 4c64346787
3 changed files with 412 additions and 222 deletions

24
app.js
View File

@@ -219,6 +219,30 @@ function anvilApp() {
}
},
// 미니앱 전용 초기화 (/app 페이지용)
initMiniApp() {
if (window.Telegram?.WebApp) {
const tg = window.Telegram.WebApp;
tg.ready();
tg.expand();
this.telegram.isAvailable = true;
this.telegram.user = tg.initDataUnsafe.user || null;
this.telegram.initData = tg.initData;
console.log('[MiniApp] Initialized', {
user: this.telegram.user,
platform: tg.platform
});
// 미니앱은 무조건 대시보드 로드
this.loadDashboard();
} else {
console.log('[MiniApp] Not in Telegram environment');
this.telegram.isAvailable = false;
}
},
// 대시보드 초기 로드
async loadDashboard() {
console.log('[Dashboard] Loading dashboard data...');