mobile download
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ko">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
||||
<meta name="theme-color" content="#0f0f23" />
|
||||
<title>GoldenChart 앱 설치</title>
|
||||
<style>
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
body {
|
||||
font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
|
||||
background: linear-gradient(160deg, #1e1e3f 0%, #0f0f23 55%);
|
||||
color: #fff;
|
||||
min-height: 100vh;
|
||||
padding: 24px 20px 40px;
|
||||
}
|
||||
.wrap { max-width: 420px; margin: 0 auto; text-align: center; }
|
||||
.logo {
|
||||
width: 72px; height: 72px; border-radius: 18px;
|
||||
background: linear-gradient(135deg, #8b5cf6, #2196f3);
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
font-size: 28px; font-weight: 800; margin: 0 auto 16px;
|
||||
}
|
||||
h1 { font-size: 22px; margin-bottom: 8px; }
|
||||
.muted { color: #9ca3af; font-size: 14px; line-height: 1.5; margin-bottom: 24px; }
|
||||
.card {
|
||||
background: rgba(255,255,255,0.06);
|
||||
border: 1px solid rgba(255,255,255,0.1);
|
||||
border-radius: 20px;
|
||||
padding: 24px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
#qr { width: 200px; height: 200px; border-radius: 12px; background: #fff; padding: 8px; }
|
||||
.btn {
|
||||
display: block; width: 100%; padding: 16px;
|
||||
background: #8b5cf6; color: #fff; border: none; border-radius: 14px;
|
||||
font-size: 16px; font-weight: 700; text-decoration: none; margin-top: 16px;
|
||||
}
|
||||
.btn:disabled { opacity: 0.5; pointer-events: none; }
|
||||
ol { text-align: left; font-size: 13px; color: #d1d5db; line-height: 1.6; padding-left: 20px; }
|
||||
.err { color: #f87171; font-size: 14px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrap">
|
||||
<div class="logo">GC</div>
|
||||
<h1>GoldenChart 앱 설치</h1>
|
||||
<p class="muted">가상매매·전략편집기·푸시 알림을 모바일에서 사용하세요.</p>
|
||||
<div class="card" id="content">
|
||||
<p class="muted">로딩 중…</p>
|
||||
</div>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/qrcode@1.5.4/build/qrcode.min.js"></script>
|
||||
<script>
|
||||
(async function () {
|
||||
const el = document.getElementById('content');
|
||||
try {
|
||||
const res = await fetch('/api/mobile-app/info');
|
||||
const info = await res.json();
|
||||
if (!info.available) {
|
||||
el.innerHTML = '<p class="err">설치 파일이 아직 준비되지 않았습니다.<br>관리자에게 APK 업로드를 요청하세요.</p>';
|
||||
return;
|
||||
}
|
||||
const url = info.downloadUrl;
|
||||
if (!url) {
|
||||
el.innerHTML = '<p class="err">다운로드 URL을 받지 못했습니다.</p>';
|
||||
return;
|
||||
}
|
||||
el.innerHTML =
|
||||
'<canvas id="qr"></canvas>' +
|
||||
'<p class="muted" style="margin-top:12px">' + (info.version ? 'v' + info.version + ' · ' : '') +
|
||||
(info.sizeBytes ? (info.sizeBytes / 1048576).toFixed(1) + ' MB' : '') + '</p>' +
|
||||
'<a class="btn" href="' + url + '" download>APK 다운로드</a>' +
|
||||
'<ol style="margin-top:20px"><li>다운로드 후 APK 파일을 열어 설치</li>' +
|
||||
'<li>「알 수 없는 출처」 허용 필요 시 설정에서 활성화</li>' +
|
||||
'<li>앱 실행 후 API URL 설정</li></ol>';
|
||||
QRCode.toCanvas(document.getElementById('qr'), url, { width: 200, margin: 1 });
|
||||
} catch (e) {
|
||||
el.innerHTML = '<p class="err">앱 정보를 불러오지 못했습니다.</p>';
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user