ช่วยเพิ่ม tab Impacts ใน Whoop ที่จะสรุปข้อมูลให้คุณในImpactsซึ่งจะแสดงการวิเคราะห์เชิงลึกว่าพฤติกรรมที่คุณบันทึกมีความสัมพันธ์กับการเปลี่ยนแปลงในการฟื้นฟู ของคุณอย่างไร เพียงแตะปุ่ม Insights ในบันทึกประจำวันเพื่อดูว่าพฤติกรรมของคุณส่งผลต่อคุณอย่างไร
Browse files- index.html +268 -5
index.html
CHANGED
|
@@ -136,6 +136,9 @@
|
|
| 136 |
<button onclick="switchTab('if-training')" class="tab-btn px-4 py-2 text-sm font-medium text-gray-600 transition-all" data-tab="if-training">
|
| 137 |
ฝึก IF
|
| 138 |
</button>
|
|
|
|
|
|
|
|
|
|
| 139 |
<button onclick="switchTab('goals')" class="tab-btn px-4 py-2 text-sm font-medium text-gray-600 transition-all" data-tab="goals">
|
| 140 |
เป้าหมาย
|
| 141 |
</button>
|
|
@@ -822,10 +825,267 @@
|
|
| 822 |
หยุดการทำ IF วันนี้
|
| 823 |
</button>
|
| 824 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 825 |
|
| 826 |
<!-- Goals Tab -->
|
| 827 |
<div id="goals" class="tab-content hidden p-4">
|
| 828 |
-
|
| 829 |
<div class="mb-4">
|
| 830 |
<h3 class="font-semibold mb-3">เป้าหมายประจำเดือน</h3>
|
| 831 |
<div class="space-y-3">
|
|
@@ -1004,7 +1264,6 @@
|
|
| 1004 |
|
| 1005 |
// Simulate real-time updates
|
| 1006 |
setInterval(updateMetrics, 5000);
|
| 1007 |
-
|
| 1008 |
// Add swipe gestures for mobile
|
| 1009 |
let touchStartX = 0;
|
| 1010 |
let touchEndX = 0;
|
|
@@ -1019,7 +1278,7 @@
|
|
| 1019 |
});
|
| 1020 |
|
| 1021 |
function handleSwipe() {
|
| 1022 |
-
const tabs = ['dashboard', 'metrics', 'insights', 'goals'];
|
| 1023 |
const currentTab = document.querySelector('.tab-content:not(.hidden)').id;
|
| 1024 |
const currentIndex = tabs.indexOf(currentTab);
|
| 1025 |
|
|
@@ -1033,7 +1292,11 @@
|
|
| 1033 |
switchTab(tabs[currentIndex - 1]);
|
| 1034 |
}
|
| 1035 |
}
|
| 1036 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1037 |
document.querySelectorAll('button').forEach(button => {
|
| 1038 |
button.addEventListener('click', () => {
|
| 1039 |
if ('vibrate' in navigator) {
|
|
@@ -1315,7 +1578,7 @@
|
|
| 1315 |
}
|
| 1316 |
// Initialize journal display
|
| 1317 |
updateJournalDisplay();
|
| 1318 |
-
|
| 1319 |
|
| 1320 |
// IF Training Functions
|
| 1321 |
let currentIFPlan = '16:8';
|
|
|
|
| 136 |
<button onclick="switchTab('if-training')" class="tab-btn px-4 py-2 text-sm font-medium text-gray-600 transition-all" data-tab="if-training">
|
| 137 |
ฝึก IF
|
| 138 |
</button>
|
| 139 |
+
<button onclick="switchTab('impacts')" class="tab-btn px-4 py-2 text-sm font-medium text-gray-600 transition-all" data-tab="impacts">
|
| 140 |
+
Impacts
|
| 141 |
+
</button>
|
| 142 |
<button onclick="switchTab('goals')" class="tab-btn px-4 py-2 text-sm font-medium text-gray-600 transition-all" data-tab="goals">
|
| 143 |
เป้าหมาย
|
| 144 |
</button>
|
|
|
|
| 825 |
หยุดการทำ IF วันนี้
|
| 826 |
</button>
|
| 827 |
</div>
|
| 828 |
+
<!-- Impacts Tab -->
|
| 829 |
+
<div id="impacts" class="tab-content hidden p-4">
|
| 830 |
+
<!-- Impact Overview Card -->
|
| 831 |
+
<div class="bg-gradient-to-br from-indigo-500 to-purple-600 rounded-xl p-4 text-white mb-4">
|
| 832 |
+
<div class="flex items-center mb-3">
|
| 833 |
+
<i data-feather="trending-up" class="w-6 h-6 mr-3"></i>
|
| 834 |
+
<div>
|
| 835 |
+
<h3 class="font-semibold text-lg">Impacts Analysis</h3>
|
| 836 |
+
<p class="text-sm opacity-90">การวิเคราะห์ผลกระทบของพฤติกรรมต่อการฟื้นตัว</p>
|
| 837 |
+
</div>
|
| 838 |
+
</div>
|
| 839 |
+
<div class="grid grid-cols-2 gap-3">
|
| 840 |
+
<div class="bg-white/20 backdrop-blur rounded-lg p-3">
|
| 841 |
+
<p class="text-2xl font-bold">+23%</p>
|
| 842 |
+
<p class="text-xs opacity-90">การเพิ่มขึ้นของ Recovery Score</p>
|
| 843 |
+
</div>
|
| 844 |
+
<div class="bg-white/20 backdrop-blur rounded-lg p-3">
|
| 845 |
+
<p class="text-2xl font-bold">8.5</p>
|
| 846 |
+
<p class="text-xs opacity-90">คะแนนความสัมพันธ์โดยรวม</p>
|
| 847 |
+
</div>
|
| 848 |
+
</div>
|
| 849 |
+
</div>
|
| 850 |
+
|
| 851 |
+
<!-- Top Positive Impacts -->
|
| 852 |
+
<div class="mb-4">
|
| 853 |
+
<h3 class="font-semibold mb-3 flex items-center">
|
| 854 |
+
<i data-feather="arrow-up-circle" class="w-4 h-4 mr-2 text-green-600"></i>
|
| 855 |
+
พฤติกรรมที่ส่งผลดีต่อการฟื้นตัว
|
| 856 |
+
</h3>
|
| 857 |
+
<div class="space-y-3">
|
| 858 |
+
<div class="bg-white rounded-xl p-4 card-shadow">
|
| 859 |
+
<div class="flex justify-between items-start mb-2">
|
| 860 |
+
<div class="flex items-center">
|
| 861 |
+
<div class="w-10 h-10 bg-green-100 rounded-full flex items-center justify-center mr-3">
|
| 862 |
+
<i data-feather="moon" class="w-5 h-5 text-green-600"></i>
|
| 863 |
+
</div>
|
| 864 |
+
<div>
|
| 865 |
+
<p class="font-medium text-sm">ไม่ใช้หน้าจอก่อนนอน</p>
|
| 866 |
+
<p class="text-xs text-gray-600">พบใน 12 จาก 14 คืนที่ฟื้นตัวดี</p>
|
| 867 |
+
</div>
|
| 868 |
+
</div>
|
| 869 |
+
<div class="text-right">
|
| 870 |
+
<span class="text-green-600 font-bold text-lg">+32%</span>
|
| 871 |
+
<p class="text-xs text-gray-500">Recovery Score</p>
|
| 872 |
+
</div>
|
| 873 |
+
</div>
|
| 874 |
+
<div class="bg-gray-50 rounded-lg p-2 mt-3">
|
| 875 |
+
<div class="flex justify-between text-xs mb-1">
|
| 876 |
+
<span>ความสัมพันธ์</span>
|
| 877 |
+
<span class="font-semibold">0.89 (สูงมาก)</span>
|
| 878 |
+
</div>
|
| 879 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
| 880 |
+
<div class="bg-green-500 h-2 rounded-full" style="width: 89%"></div>
|
| 881 |
+
</div>
|
| 882 |
+
</div>
|
| 883 |
+
</div>
|
| 884 |
+
|
| 885 |
+
<div class="bg-white rounded-xl p-4 card-shadow">
|
| 886 |
+
<div class="flex justify-between items-start mb-2">
|
| 887 |
+
<div class="flex items-center">
|
| 888 |
+
<div class="w-10 h-10 bg-green-100 rounded-full flex items-center justify-center mr-3">
|
| 889 |
+
<i data-feather="droplet" class="w-5 h-5 text-green-600"></i>
|
| 890 |
+
</div>
|
| 891 |
+
<div>
|
| 892 |
+
<p class="font-medium text-sm">อาบน้ำเย็น</p>
|
| 893 |
+
<p class="text-xs text-gray-600">ลดการอักเสบและเร่งการฟื้นตัว</p>
|
| 894 |
+
</div>
|
| 895 |
+
</div>
|
| 896 |
+
<div class="text-right">
|
| 897 |
+
<span class="text-green-600 font-bold text-lg">+28%</span>
|
| 898 |
+
<p class="text-xs text-gray-500">Sleep Quality</p>
|
| 899 |
+
</div>
|
| 900 |
+
</div>
|
| 901 |
+
<div class="bg-gray-50 rounded-lg p-2 mt-3">
|
| 902 |
+
<div class="flex justify-between text-xs mb-1">
|
| 903 |
+
<span>ความสัมพันธ์</span>
|
| 904 |
+
<span class="font-semibold">0.76 (สูง)</span>
|
| 905 |
+
</div>
|
| 906 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
| 907 |
+
<div class="bg-green-500 h-2 rounded-full" style="width: 76%"></div>
|
| 908 |
+
</div>
|
| 909 |
+
</div>
|
| 910 |
+
</div>
|
| 911 |
+
|
| 912 |
+
<div class="bg-white rounded-xl p-4 card-shadow">
|
| 913 |
+
<div class="flex justify-between items-start mb-2">
|
| 914 |
+
<div class="flex items-center">
|
| 915 |
+
<div class="w-10 h-10 bg-green-100 rounded-full flex items-center justify-center mr-3">
|
| 916 |
+
<i data-feather="book-open" class="w-5 h-5 text-green-600"></i>
|
| 917 |
+
</div>
|
| 918 |
+
<div>
|
| 919 |
+
<p class="font-medium text-sm">อ่านหนังสือบนเตียง</p>
|
| 920 |
+
<p class="text-xs text-gray-600">ช่วยผ่อนคลายก่อนนอน</p>
|
| 921 |
+
</div>
|
| 922 |
+
</div>
|
| 923 |
+
<div class="text-right">
|
| 924 |
+
<span class="text-green-600 font-bold text-lg">+21%</span>
|
| 925 |
+
<p class="text-xs text-gray-500">HRV</p>
|
| 926 |
+
</div>
|
| 927 |
+
</div>
|
| 928 |
+
<div class="bg-gray-50 rounded-lg p-2 mt-3">
|
| 929 |
+
<div class="flex justify-between text-xs mb-1">
|
| 930 |
+
<span>ความสัมพันธ์</span>
|
| 931 |
+
<span class="font-semibold">0.72 (สูง)</span>
|
| 932 |
+
</div>
|
| 933 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
| 934 |
+
<div class="bg-green-500 h-2 rounded-full" style="width: 72%"></div>
|
| 935 |
+
</div>
|
| 936 |
+
</div>
|
| 937 |
+
</div>
|
| 938 |
+
</div>
|
| 939 |
+
</div>
|
| 940 |
+
|
| 941 |
+
<!-- Negative Impacts -->
|
| 942 |
+
<div class="mb-4">
|
| 943 |
+
<h3 class="font-semibold mb-3 flex items-center">
|
| 944 |
+
<i data-feather="arrow-down-circle" class="w-4 h-4 mr-2 text-red-600"></i>
|
| 945 |
+
พฤติกรรมที่ส่งผลเสียต่อการฟื้นตัว
|
| 946 |
+
</h3>
|
| 947 |
+
<div class="space-y-3">
|
| 948 |
+
<div class="bg-white rounded-xl p-4 card-shadow">
|
| 949 |
+
<div class="flex justify-between items-start mb-2">
|
| 950 |
+
<div class="flex items-center">
|
| 951 |
+
<div class="w-10 h-10 bg-red-100 rounded-full flex items-center justify-center mr-3">
|
| 952 |
+
<i data-feather="smartphone" class="w-5 h-5 text-red-600"></i>
|
| 953 |
+
</div>
|
| 954 |
+
<div>
|
| 955 |
+
<p class="font-medium text-sm">รับประทานอาหารดึก</p>
|
| 956 |
+
<p class="text-xs text-gray-600">หลัง 21:00 น.</p>
|
| 957 |
+
</div>
|
| 958 |
+
</div>
|
| 959 |
+
<div class="text-right">
|
| 960 |
+
<span class="text-red-600 font-bold text-lg">-35%</span>
|
| 961 |
+
<p class="text-xs text-gray-500">Recovery Score</p>
|
| 962 |
+
</div>
|
| 963 |
+
</div>
|
| 964 |
+
<div class="bg-gray-50 rounded-lg p-2 mt-3">
|
| 965 |
+
<div class="flex justify-between text-xs mb-1">
|
| 966 |
+
<span>ความสัมพันธ์</span>
|
| 967 |
+
<span class="font-semibold">-0.82 (สูงมาก)</span>
|
| 968 |
+
</div>
|
| 969 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
| 970 |
+
<div class="bg-red-500 h-2 rounded-full" style="width: 82%"></div>
|
| 971 |
+
</div>
|
| 972 |
+
</div>
|
| 973 |
+
</div>
|
| 974 |
+
|
| 975 |
+
<div class="bg-white rounded-xl p-4 card-shadow">
|
| 976 |
+
<div class="flex justify-between items-start mb-2">
|
| 977 |
+
<div class="flex items-center">
|
| 978 |
+
<div class="w-10 h-10 bg-red-100 rounded-full flex items-center justify-center mr-3">
|
| 979 |
+
<i data-feather="coffee" class="w-5 h-5 text-red-600"></i>
|
| 980 |
+
</div>
|
| 981 |
+
<div>
|
| 982 |
+
<p class="font-medium text-sm">คาเฟอีนหลัง 14:00 น.</p>
|
| 983 |
+
<p class="text-xs text-gray-600">กระตุ้นระบบประสาท</p>
|
| 984 |
+
</div>
|
| 985 |
+
</div>
|
| 986 |
+
<div class="text-right">
|
| 987 |
+
<span class="text-red-600 font-bold text-lg">-28%</span>
|
| 988 |
+
<p class="text-xs text-gray-500">Sleep Quality</p>
|
| 989 |
+
</div>
|
| 990 |
+
</div>
|
| 991 |
+
<div class="bg-gray-50 rounded-lg p-2 mt-3">
|
| 992 |
+
<div class="flex justify-between text-xs mb-1">
|
| 993 |
+
<span>ความสัมพันธ์</span>
|
| 994 |
+
<span class="font-semibold">-0.74 (สูง)</span>
|
| 995 |
+
</div>
|
| 996 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
| 997 |
+
<div class="bg-red-500 h-2 rounded-full" style="width: 74%"></div>
|
| 998 |
+
</div>
|
| 999 |
+
</div>
|
| 1000 |
+
</div>
|
| 1001 |
+
</div>
|
| 1002 |
+
</div>
|
| 1003 |
+
|
| 1004 |
+
<!-- Impact Categories -->
|
| 1005 |
+
<div class="mb-4">
|
| 1006 |
+
<h3 class="font-semibold mb-3">ผลกระทบตามหมวดหมู่</h3>
|
| 1007 |
+
<div class="grid grid-cols-2 gap-3">
|
| 1008 |
+
<div class="bg-white rounded-xl p-3 card-shadow">
|
| 1009 |
+
<div class="flex items-center mb-2">
|
| 1010 |
+
<i data-feather="moon" class="w-4 h-4 text-blue-600 mr-2"></i>
|
| 1011 |
+
<span class="font-medium text-sm">การนอน</span>
|
| 1012 |
+
</div>
|
| 1013 |
+
<p class="text-lg font-bold text-blue-600">+18%</p>
|
| 1014 |
+
<p class="text-xs text-gray-600">จากพฤติกรรมที่ดี</p>
|
| 1015 |
+
</div>
|
| 1016 |
+
|
| 1017 |
+
<div class="bg-white rounded-xl p-3 card-shadow">
|
| 1018 |
+
<div class="flex items-center mb-2">
|
| 1019 |
+
<i data-feather="activity" class="w-4 h-4 text-green-600 mr-2"></i>
|
| 1020 |
+
<span class="font-medium text-sm">การออกกำลังกาย</span>
|
| 1021 |
+
</div>
|
| 1022 |
+
<p class="text-lg font-bold text-green-600">+12%</p>
|
| 1023 |
+
<p class="text-xs text-gray-600">เมื่อทำเวลาเหมาะสม</p>
|
| 1024 |
+
</div>
|
| 1025 |
+
|
| 1026 |
+
<div class="bg-white rounded-xl p-3 card-shadow">
|
| 1027 |
+
<div class="flex items-center mb-2">
|
| 1028 |
+
<i data-feather="coffee" class="w-4 h-4 text-orange-600 mr-2"></i>
|
| 1029 |
+
<span class="font-medium text-sm">โภชนาการ</span>
|
| 1030 |
+
</div>
|
| 1031 |
+
<p class="text-lg font-bold text-red-600">-15%</p>
|
| 1032 |
+
<p class="text-xs text-gray-600">จากพฤติกรรมที่ผิด</p>
|
| 1033 |
+
</div>
|
| 1034 |
+
|
| 1035 |
+
<div class="bg-white rounded-xl p-3 card-shadow">
|
| 1036 |
+
<div class="flex items-center mb-2">
|
| 1037 |
+
<i data-feather="brain" class="w-4 h-4 text-purple-600 mr-2"></i>
|
| 1038 |
+
<span class="font-medium text-sm">จิตใจ</span>
|
| 1039 |
+
</div>
|
| 1040 |
+
<p class="text-lg font-bold text-purple-600">+8%</p>
|
| 1041 |
+
<p class="text-xs text-gray-600">จากการ meditate</p>
|
| 1042 |
+
</div>
|
| 1043 |
+
</div>
|
| 1044 |
+
</div>
|
| 1045 |
+
|
| 1046 |
+
<!-- Recommendations Based on Impacts -->
|
| 1047 |
+
<div class="bg-white rounded-xl p-4 card-shadow mb-4">
|
| 1048 |
+
<h3 class="font-semibold mb-3 flex items-center">
|
| 1049 |
+
<i data-feather="lightbulb" class="w-4 h-4 mr-2 text-yellow-500"></i>
|
| 1050 |
+
คำแนะนำจากการวิเคราะห์ Impacts
|
| 1051 |
+
</h3>
|
| 1052 |
+
<div class="space-y-3">
|
| 1053 |
+
<div class="flex items-start space-x-3 p-3 bg-blue-50 rounded-lg">
|
| 1054 |
+
<div class="w-8 h-8 bg-blue-500 rounded-full flex items-center justify-center text-white text-sm font-bold flex-shrink-0">!</div>
|
| 1055 |
+
<div>
|
| 1056 |
+
<p class="font-medium text-sm text-blue-900">ระมัดระวังอาหารดึก</p>
|
| 1057 |
+
<p class="text-xs text-blue-700 mt-1">ข้อมูลแสดงว่าการทานอาหารหลัง 21:00 น. ลดคะแนนการฟื้นตัวถึง 35%</p>
|
| 1058 |
+
</div>
|
| 1059 |
+
</div>
|
| 1060 |
+
|
| 1061 |
+
<div class="flex items-start space-x-3 p-3 bg-green-50 rounded-lg">
|
| 1062 |
+
<div class="w-8 h-8 bg-green-500 rounded-full flex items-center justify-center text-white text-sm font-bold flex-shrink-0">✓</div>
|
| 1063 |
+
<div>
|
| 1064 |
+
<p class="font-medium text-sm text-green-900">ทำต่อไปเลย: ไม่ใช้หน้าจอก่อนนอน</p>
|
| 1065 |
+
<p class="text-xs text-green-700 mt-1">พฤติกรรมนี้เพิ่มคะแนนการฟื้นตัว 32% - ทำได้ดีมาก!</p>
|
| 1066 |
+
</div>
|
| 1067 |
+
</div>
|
| 1068 |
+
|
| 1069 |
+
<div class="flex items-start space-x-3 p-3 bg-yellow-50 rounded-lg">
|
| 1070 |
+
<div class="w-8 h-8 bg-yellow-500 rounded-full flex items-center justify-center text-white text-sm font-bold flex-shrink-0">→</div>
|
| 1071 |
+
<div>
|
| 1072 |
+
<p class="font-medium text-sm text-yellow-900">ลองเพิ่ม: อาบน้ำเย็น</p>
|
| 1073 |
+
<p class="text-xs text-yellow-700 mt-1">จากข้อมูลผู้ใช้รายอื่น พบว่าช่วยเพิ่มคุณภาพการนอน 28%</p>
|
| 1074 |
+
</div>
|
| 1075 |
+
</div>
|
| 1076 |
+
</div>
|
| 1077 |
+
</div>
|
| 1078 |
+
|
| 1079 |
+
<!-- View Detailed Insights Button -->
|
| 1080 |
+
<button onclick="showDetailedImpacts()" class="w-full bg-purple-100 text-purple-600 rounded-xl p-4 font-medium text-sm hover:bg-purple-200 transition-colors">
|
| 1081 |
+
<i data-feather="bar-chart-2" class="w-4 h-4 inline mr-2"></i>
|
| 1082 |
+
ดูการวิเคราะห์แบบละเอียด
|
| 1083 |
+
</button>
|
| 1084 |
+
</div>
|
| 1085 |
|
| 1086 |
<!-- Goals Tab -->
|
| 1087 |
<div id="goals" class="tab-content hidden p-4">
|
| 1088 |
+
<!-- Active Goals -->
|
| 1089 |
<div class="mb-4">
|
| 1090 |
<h3 class="font-semibold mb-3">เป้าหมายประจำเดือน</h3>
|
| 1091 |
<div class="space-y-3">
|
|
|
|
| 1264 |
|
| 1265 |
// Simulate real-time updates
|
| 1266 |
setInterval(updateMetrics, 5000);
|
|
|
|
| 1267 |
// Add swipe gestures for mobile
|
| 1268 |
let touchStartX = 0;
|
| 1269 |
let touchEndX = 0;
|
|
|
|
| 1278 |
});
|
| 1279 |
|
| 1280 |
function handleSwipe() {
|
| 1281 |
+
const tabs = ['dashboard', 'metrics', 'insights', 'if-training', 'impacts', 'goals'];
|
| 1282 |
const currentTab = document.querySelector('.tab-content:not(.hidden)').id;
|
| 1283 |
const currentIndex = tabs.indexOf(currentTab);
|
| 1284 |
|
|
|
|
| 1292 |
switchTab(tabs[currentIndex - 1]);
|
| 1293 |
}
|
| 1294 |
}
|
| 1295 |
+
|
| 1296 |
+
function showDetailedImpacts() {
|
| 1297 |
+
alert('📊 การวิเคราะห์ Impacts แบบละเอียด\n\n• วิเคราะห์ข้อมูล 30 วันล่าสุด\n• ความสัมพันธ์ระหว่างพฤติกรรมกับ HRV\n• กราฟแสดงแนวโน้มการฟื้นตัว\n• เปรียบเทียบกับข้อมูลผู้ใช้รายอื่น\n• คำแนะนำส่วนตัวแบบ AI\n\n🔍 Premium Feature - อัปเกรดเพื่อดูข้อมูลเพิ่มเติม');
|
| 1298 |
+
}
|
| 1299 |
+
// Add haptic feedback (vibration) on button clicks for mobile
|
| 1300 |
document.querySelectorAll('button').forEach(button => {
|
| 1301 |
button.addEventListener('click', () => {
|
| 1302 |
if ('vibrate' in navigator) {
|
|
|
|
| 1578 |
}
|
| 1579 |
// Initialize journal display
|
| 1580 |
updateJournalDisplay();
|
| 1581 |
+
|
| 1582 |
|
| 1583 |
// IF Training Functions
|
| 1584 |
let currentIFPlan = '16:8';
|