More Bug Fixes

This commit is contained in:
2026-01-25 17:40:26 +00:00
parent 64b62c2a74
commit 6afbfd793a
2 changed files with 2 additions and 83 deletions

View File

@@ -119,17 +119,6 @@
}
}
function processResult(data: any, imageUri: string) {
analyzing = false;
if (!data) {
displayTitle = "Scan Failed";
alternatives = [];
showResult = true;
resultTranslateY = 0;
typeText();
}, 1200);
}
function processResult(data: any, imageUri: string) {
analyzing = false;
if (!data) {
@@ -534,33 +523,6 @@
margin: 4px 0;
}
.alt-price {
color: #9ca3af;
margin: 0;
font-size: 13px;
}
.report-btn {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
margin: 32px auto 0;
padding: 14px 24px;
background: rgba(239, 68, 68, 0.1);
border: 1px solid rgba(239, 68, 68, 0.2);
border-radius: 16px;
cursor: pointer;
color: #f87171;
font-weight: 700;
font-size: 15px;
width: 100%;
}
.report-btn:active {
background: rgba(239, 68, 68, 0.2);
}
.upload-placeholder {
display: flex;
flex-direction: column;

View File

@@ -2,49 +2,6 @@
import { onMount } from "svelte";
import Icon from "@iconify/svelte";
const scanHistory = [
{
id: 1,
name: "Plastic Water Bottle",
date: "Today, 10:45 AM",
severity: "High",
image: "/water-bottle.png",
impact: "Negative Impact",
},
{
id: 2,
name: "Organic Banana",
date: "Yesterday, 3:20 PM",
severity: "Low",
image: "/banana.png",
impact: "Positive Choice",
},
{
id: 3,
name: "Aluminum Soda Can",
date: "Mon, 12:15 PM",
severity: "Low",
image: "/soda-can.png",
impact: "Recyclable",
},
{
id: 4,
name: "Takeout Container",
date: "Sun, 8:30 PM",
severity: "Medium",
image: "/container.png",
impact: "Mixed Materials",
},
{
id: 5,
name: "Shampoo Bottle",
date: "Sat, 11:00 AM",
severity: "High",
image: "/shampoo.png",
impact: "High Plastic",
},
];
interface ScanItem {
id: string;
name: string;
@@ -60,7 +17,7 @@
let scanHistory = $state<ScanItem[]>([]);
let selectedScan = $state<ScanItem | null>(null);
let userId = $state("");
let fileInput: HTMLInputElement;
let fileInput: HTMLInputElement | undefined;
let isScanning = $state(false);
onMount(() => {
@@ -112,7 +69,7 @@
}
function triggerScan() {
if (isScanning) return;
if (isScanning || !fileInput) return;
fileInput.click();
}