betterme-mobile-clone / connect-device.html
CSNET's picture
แปลงทั้งเว็บเป็นภาษาไทย และใส่การเชื่อมต่อกับ smartwatch เพื่ออ่านค่าออกกำลังกาย และค่า health ต่างๆมาแสดงผลที
066343e verified
Raw History Blame Contribute Delete
10.4 kB
<!DOCTYPE html>
<html lang="th">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>เชื่อมต่ออุปกรณ์ - BetterMe</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Poppins', sans-serif;
background-color: #f8f9fa;
}
.gradient-bg {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.card-shadow {
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.active-tab {
border-bottom: 3px solid #667eea;
}
</style>
</head>
<body class="bg-gray-50">
<!-- Header -->
<header class="bg-white shadow-sm sticky top-0 z-10">
<div class="container mx-auto px-4 py-4 flex justify-between items-center">
<div class="flex items-center">
<button class="p-2 rounded-full text-gray-600" onclick="window.location.href='index.html'">
<i data-feather="arrow-left"></i>
</button>
<h1 class="ml-2 text-xl font-bold text-gray-800">เชื่อมต่ออุปกรณ์</h1>
</div>
</div>
</header>
<!-- Main Content -->
<main class="container mx-auto px-4 py-6">
<!-- Connection Status -->
<section class="mb-8">
<div class="bg-white rounded-xl p-6 card-shadow text-center">
<div class="w-20 h-20 rounded-full bg-gray-100 flex items-center justify-center mx-auto mb-4">
<i data-feather="watch" class="w-10 h-10 text-gray-400"></i>
</div>
<h2 class="text-xl font-bold text-gray-800 mb-2">เชื่อมต่อกับสมาร์ทวอทช์</h2>
<p class="text-gray-500 mb-6">เชื่อมต่ออุปกรณ์ของคุณเพื่อติดตามสุขภาพและกิจกรรมได้อย่างแม่นยำ</p>
<button id="connectBtn" class="w-full py-3 bg-gradient-to-r from-purple-500 to-indigo-600 text-white rounded-lg font-medium mb-4">ค้นหาอุปกรณ์</button>
<p class="text-sm text-gray-400">รองรับ Apple Watch, Fitbit, Garmin และอื่นๆ</p>
</div>
</section>
<!-- Device Info -->
<section class="mb-8">
<h3 class="text-lg font-semibold text-gray-800 mb-4">ข้อมูลที่ได้รับจากอุปกรณ์</h3>
<div class="bg-white rounded-xl p-5 card-shadow">
<div class="space-y-4">
<div class="flex items-center pb-3 border-b border-gray-100">
<div class="w-10 h-10 rounded-full bg-red-100 flex items-center justify-center text-red-500">
<i data-feather="heart"></i>
</div>
<div class="ml-4 flex-1">
<h4 class="font-medium text-gray-800">อัตราการเต้นของหัวใจ</h4>
<p class="text-sm text-gray-500">ติดตามอัตราการเต้นหัวใจแบบเรียลไทม์</p>
</div>
</div>
<div class="flex items-center pb-3 border-b border-gray-100">
<div class="w-10 h-10 rounded-full bg-blue-100 flex items-center justify-center text-blue-500">
<i data-feather="activity"></i>
</div>
<div class="ml-4 flex-1">
<h4 class="font-medium text-gray-800">กิจกรรมการเคลื่อนไหว</h4>
<p class="text-sm text-gray-500">นับก้าว แคลอรี่ และระยะทาง</p>
</div>
</div>
<div class="flex items-center pb-3 border-b border-gray-100">
<div class="w-10 h-10 rounded-full bg-green-100 flex items-center justify-center text-green-500">
<i data-feather="moon"></i>
</div>
<div class="ml-4 flex-1">
<h4 class="font-medium text-gray-800">การนอนหลับ</h4>
<p class="text-sm text-gray-500">วิเคราะห์คุณภาพการนอน</p>
</div>
</div>
<div class="flex items-center">
<div class="w-10 h-10 rounded-full bg-purple-100 flex items-center justify-center text-purple-500">
<i data-feather="droplet"></i>
</div>
<div class="ml-4 flex-1">
<h4 class="font-medium text-gray-800">ระดับออกซิเจนในเลือด</h4>
<p class="text-sm text-gray-500">ตรวจสอบ SpO2</p>
</div>
</div>
</div>
</div>
</section>
<!-- How It Works -->
<section>
<h3 class="text-lg font-semibold text-gray-800 mb-4">วิธีการเชื่อมต่อ</h3>
<div class="bg-white rounded-xl p-5 card-shadow">
<div class="flex items-start mb-6">
<div class="w-8 h-8 rounded-full bg-indigo-100 text-indigo-600 flex items-center justify-center font-bold text-sm flex-shrink-0">1</div>
<div class="ml-4">
<h4 class="font-medium text-gray-800">เปิดบลูทูธ</h4>
<p class="text-sm text-gray-500 mt-1">เปิดการตั้งค่าบลูทูธบนสมาร์ทโฟนของคุณ</p>
</div>
</div>
<div class="flex items-start mb-6">
<div class="w-8 h-8 rounded-full bg-indigo-100 text-indigo-600 flex items-center justify-center font-bold text-sm flex-shrink-0">2</div>
<div class="ml-4">
<h4 class="font-medium text-gray-800">กดปุ่มค้นหาอุปกรณ์</h4>
<p class="text-sm text-gray-500 mt-1">เลือกอุปกรณ์ที่ต้องการเชื่อมต่อจากรายการ</p>
</div>
</div>
<div class="flex items-start">
<div class="w-8 h-8 rounded-full bg-indigo-100 text-indigo-600 flex items-center justify-center font-bold text-sm flex-shrink-0">3</div>
<div class="ml-4">
<h4 class="font-medium text-gray-800">ยืนยันการเชื่อมต่อ</h4>
<p class="text-sm text-gray-500 mt-1">ทำตามขั้นตอนบนหน้าจอเพื่อเชื่อมต่ออุปกรณ์</p>
</div>
</div>
</div>
</section>
</main>
<!-- Bottom Navigation -->
<nav class="fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200">
<div class="container mx-auto px-4">
<div class="flex justify-around">
<a href="index.html" class="flex flex-col items-center py-3 text-gray-500">
<i data-feather="home" class="w-5 h-5 mb-1"></i>
<span class="text-xs">หน้าหลัก</span>
</a>
<a href="progress.html" class="flex flex-col items-center py-3 text-gray-500">
<i data-feather="bar-chart-2" class="w-5 h-5 mb-1"></i>
<span class="text-xs">ความคืบหน้า</span>
</a>
<a href="challenges.html" class="flex flex-col items-center py-3 text-gray-500">
<i data-feather="calendar" class="w-5 h-5 mb-1"></i>
<span class="text-xs">กิจกรรม</span>
</a>
<a href="profile.html" class="flex flex-col items-center py-3 text-gray-500">
<i data-feather="user" class="w-5 h-5 mb-1"></i>
<span class="text-xs">โปรไฟล์</span>
</a>
</div>
</div>
</nav>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script>
// Initialize Feather Icons
feather.replace();
// Simulate device connection
document.getElementById('connectBtn').addEventListener('click', function() {
this.innerHTML = '<span class="flex items-center justify-center"><i data-feather="loader" class="animate-spin mr-2"></i> กำลังค้นหาอุปกรณ์...</span>';
feather.replace();
setTimeout(() => {
this.innerHTML = '<i data-feather="check" class="mr-2"></i> เชื่อมต่อสำเร็จ!';
feather.replace();
this.classList.remove('bg-gradient-to-r', 'from-purple-500', 'to-indigo-600');
this.classList.add('bg-green-500');
// Show success message
alert('เชื่อมต่ออุปกรณ์สำเร็จ! ข้อมูลสุขภาพจะถูกซิงค์อัตโนมัติ');
}, 3000);
});
</script>
</body>
</html>