perbaiki web dan mobile history

This commit is contained in:
rijalhabibullah 2026-05-11 01:31:44 +07:00
parent 633113dce4
commit e67063281b
11 changed files with 37 additions and 18 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 MiB

View File

@ -82,15 +82,22 @@ class _HistoryScreenState extends State<HistoryScreen> {
),
),
const SizedBox(height: 6),
Text('Kelas: ${item.predictedClass}'),
Text('Confidence: ${item.confidence}'),
Text(
'Lokasi: ${item.locationAddress ?? 'Alamat tidak terdeteksi'}',
_infoRow(
icon: Icons.label,
text: 'Kelas: ${item.predictedClass}',
),
const SizedBox(height: 6),
Text(
_formatTimestamp(item.createdAt),
style: const TextStyle(color: Colors.black54),
_infoRow(
icon: Icons.bar_chart,
text: 'Confidence: ${item.confidence}',
),
_infoRow(
icon: Icons.location_on,
text:
'Lokasi: ${item.locationAddress ?? 'Alamat tidak terdeteksi'}',
),
_infoRow(
icon: Icons.calendar_today,
text: _formatTimestamp(item.createdAt),
),
],
),
@ -111,4 +118,18 @@ class _HistoryScreenState extends State<HistoryScreen> {
final minute = twoDigits(value.minute);
return '$day-$month-$year $hour:$minute';
}
Widget _infoRow({required IconData icon, required String text}) {
return Padding(
padding: const EdgeInsets.only(bottom: 4),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(icon, size: 16, color: Colors.black54),
const SizedBox(width: 6),
Expanded(child: Text(text)),
],
),
);
}
}

View File

@ -35,7 +35,7 @@ class _LoginScreenState extends State<LoginScreen> {
try {
final response = await http
.post(
Uri.parse('https://gobony-wedgy-cathi.ngrok-free.dev/api/mobile/login'),
Uri.parse('http://192.168.18.23:8000/api/mobile/login'),
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',

View File

@ -45,7 +45,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
try {
final response = await http
.post(
Uri.parse('https://gobony-wedgy-cathi.ngrok-free.dev/api/mobile/register'),
Uri.parse('http://192.168.18.23:8000/api/mobile/register'),
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 906 KiB

View File

@ -10,14 +10,12 @@
body { font-family: 'Plus Jakarta Sans', sans-serif; }
</style>
</head>
<body class="flex items-center justify-center min-h-screen bg-cover bg-center relative"
style="background-image: url('https://images.unsplash.com/photo-1536617621572-1d5f1e6269a0?q=80&w=2070&auto=format&fit=crop');">
<body class="flex items-center justify-end min-h-screen bg-cover bg-center relative"
style="background-image: url('/images/padi.png'); background-attachment: fixed;">
<div class="absolute inset-0 bg-black/50 backdrop-blur-[2px]"></div>
<div class="relative z-10 w-full max-w-md px-6">
<div class="relative z-10 w-full max-w-md px-6 mr-16">
<div class="bg-white/90 backdrop-blur-md rounded-3xl shadow-2xl overflow-hidden border border-white/50">
<div class="bg-white/40 backdrop-blur-md rounded-3xl shadow-2xl overflow-hidden border border-white/50">
<div class="pt-8 pb-6 text-center">
<h1 class="text-3xl font-bold text-emerald-800 mb-1">Sistem Pakar Padi</h1>
@ -55,8 +53,8 @@ class="w-full bg-emerald-600 hover:bg-emerald-700 text-white font-bold py-3.5 ro
</form>
</div>
<div class="bg-gray-50/50 px-8 py-4 border-t border-gray-100 text-center">
<p class="text-xs text-gray-400">
<div class="bg-white/40 px-8 py-4 border-t border-gray-100 text-center">
<p class="text-xs text-gray-600">
&copy; 2025 Ahmad Rizal Habibullah
</p>
</div>