Spaces:
Sleeping
Sleeping
Commit ·
f84b9c5
1
Parent(s): bb131e8
✨ Make Dashboard Responsive for Mobile & Tablet
Browse files
toothmap_frontend/src/App.jsx
CHANGED
|
@@ -2,8 +2,7 @@ import React, { useState, useRef, useEffect } from 'react';
|
|
| 2 |
import axios from 'axios';
|
| 3 |
import { UploadCloud, Activity, Loader2, ScanLine } from 'lucide-react';
|
| 4 |
|
| 5 |
-
|
| 6 |
-
const API_BASE = "";
|
| 7 |
|
| 8 |
const MODES = [
|
| 9 |
{ id: 'pipeline_yolo', label: '🦷 Full Pipeline (YOLO + FDI)', desc: 'Detect → FDI label + per-tooth segmentation mask' },
|
|
@@ -163,9 +162,9 @@ export default function App() {
|
|
| 163 |
</h1>
|
| 164 |
</header>
|
| 165 |
|
| 166 |
-
<main className="flex-1 flex overflow-hidden">
|
| 167 |
{/* Sidebar */}
|
| 168 |
-
<aside className="w-80 bg-zinc-900/40 border-r border-zinc-800/50 p-5 flex flex-col gap-4">
|
| 169 |
<div className="space-y-2">
|
| 170 |
<p className="text-xs font-semibold text-slate-500 uppercase tracking-widest mb-2">AI Mode</p>
|
| 171 |
{MODES.map(m => (
|
|
@@ -230,7 +229,7 @@ export default function App() {
|
|
| 230 |
</aside>
|
| 231 |
|
| 232 |
{/* Canvas */}
|
| 233 |
-
<section className="flex-1 bg-zinc-950/80 p-8 flex items-center justify-center overflow-auto">
|
| 234 |
{!imagePreview ? (
|
| 235 |
<div className="text-center text-zinc-600">
|
| 236 |
<UploadCloud size={64} className="mx-auto opacity-20 mb-4" />
|
|
|
|
| 2 |
import axios from 'axios';
|
| 3 |
import { UploadCloud, Activity, Loader2, ScanLine } from 'lucide-react';
|
| 4 |
|
| 5 |
+
const API_BASE = "http://127.0.0.1:8000";
|
|
|
|
| 6 |
|
| 7 |
const MODES = [
|
| 8 |
{ id: 'pipeline_yolo', label: '🦷 Full Pipeline (YOLO + FDI)', desc: 'Detect → FDI label + per-tooth segmentation mask' },
|
|
|
|
| 162 |
</h1>
|
| 163 |
</header>
|
| 164 |
|
| 165 |
+
<main className="flex-1 flex flex-col lg:flex-row overflow-auto lg:overflow-hidden">
|
| 166 |
{/* Sidebar */}
|
| 167 |
+
<aside className="w-full lg:w-80 flex-shrink-0 bg-zinc-900/40 border-b lg:border-b-0 lg:border-r border-zinc-800/50 p-5 flex flex-col gap-4 overflow-y-auto">
|
| 168 |
<div className="space-y-2">
|
| 169 |
<p className="text-xs font-semibold text-slate-500 uppercase tracking-widest mb-2">AI Mode</p>
|
| 170 |
{MODES.map(m => (
|
|
|
|
| 229 |
</aside>
|
| 230 |
|
| 231 |
{/* Canvas */}
|
| 232 |
+
<section className="flex-1 bg-zinc-950/80 p-4 lg:p-8 flex items-center justify-center overflow-auto min-h-[50vh] relative">
|
| 233 |
{!imagePreview ? (
|
| 234 |
<div className="text-center text-zinc-600">
|
| 235 |
<UploadCloud size={64} className="mx-auto opacity-20 mb-4" />
|