mirror of
https://github.com/SirBlobby/Hoya26.git
synced 2026-02-04 03:34:34 -05:00
More Bug Fixes
This commit is contained in:
@@ -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) {
|
function processResult(data: any, imageUri: string) {
|
||||||
analyzing = false;
|
analyzing = false;
|
||||||
if (!data) {
|
if (!data) {
|
||||||
@@ -534,33 +523,6 @@
|
|||||||
margin: 4px 0;
|
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 {
|
.upload-placeholder {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@@ -2,49 +2,6 @@
|
|||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
import Icon from "@iconify/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 {
|
interface ScanItem {
|
||||||
id: string;
|
id: string;
|
||||||
name: string;
|
name: string;
|
||||||
@@ -60,7 +17,7 @@
|
|||||||
let scanHistory = $state<ScanItem[]>([]);
|
let scanHistory = $state<ScanItem[]>([]);
|
||||||
let selectedScan = $state<ScanItem | null>(null);
|
let selectedScan = $state<ScanItem | null>(null);
|
||||||
let userId = $state("");
|
let userId = $state("");
|
||||||
let fileInput: HTMLInputElement;
|
let fileInput: HTMLInputElement | undefined;
|
||||||
let isScanning = $state(false);
|
let isScanning = $state(false);
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
@@ -112,7 +69,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function triggerScan() {
|
function triggerScan() {
|
||||||
if (isScanning) return;
|
if (isScanning || !fileInput) return;
|
||||||
fileInput.click();
|
fileInput.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user