Changesets · Branches · Tags · Compare
| Changeset | 8a1033cc1793a214e5c0d3bcc924b24b05c2e36c7eb1fd5a0aa0ae925711e31b |
|---|---|
| Author | Iida <iidam@qunie.local> · 2026-05-27 19:19 +09:00 |
| Committer | Iida <iidam@qunie.local> · 2026-05-27 19:19 +09:00 |
| Parents | ef132afed5cd |
7 files changed
added src/app/api/cctv/japan.ts +45 −0
| @@ -0,0 +1,45 @@ | ||
| 1 | +import type { CctvCamera } from './types'; | |
| 2 | + | |
| 3 | +const JAPAN_CAMERAS: CctvCamera[] = [ | |
| 4 | + { | |
| 5 | + id: 'jp-shibuya-crossing', | |
| 6 | + lat: 35.6595, lng: 139.7005, | |
| 7 | + name: 'Shibuya Scramble Crossing', | |
| 8 | + city: 'Tokyo', country: 'Japan', | |
| 9 | + stream_url: 'https://www.youtube.com/embed/HpdO5Kq3o7Y?autoplay=1&mute=1', | |
| 10 | + stream_type: 'iframe', | |
| 11 | + source: 'ANN News / YouTube', | |
| 12 | + }, | |
| 13 | + { | |
| 14 | + id: 'jp-tokyo-tower', | |
| 15 | + lat: 35.6586, lng: 139.7454, | |
| 16 | + name: 'Tokyo Tower Live Cam', | |
| 17 | + city: 'Tokyo', country: 'Japan', | |
| 18 | + stream_url: 'https://www.youtube.com/embed/cbJ03Xk_eLQ?autoplay=1&mute=1', | |
| 19 | + stream_type: 'iframe', | |
| 20 | + source: 'YouTube', | |
| 21 | + }, | |
| 22 | + { | |
| 23 | + id: 'jp-mt-fuji', | |
| 24 | + lat: 35.3606, lng: 138.7274, | |
| 25 | + name: 'Mt. Fuji Live', | |
| 26 | + city: 'Shizuoka/Yamanashi', country: 'Japan', | |
| 27 | + stream_url: 'https://www.youtube.com/embed/5aLh8R2HqOQ?autoplay=1&mute=1', | |
| 28 | + stream_type: 'iframe', | |
| 29 | + source: 'YouTube', | |
| 30 | + }, | |
| 31 | + { | |
| 32 | + id: 'jp-osaka-dotonbori', | |
| 33 | + lat: 34.6687, lng: 135.5013, | |
| 34 | + name: 'Dotonbori Live Cam', | |
| 35 | + city: 'Osaka', country: 'Japan', | |
| 36 | + stream_url: 'https://www.youtube.com/embed/m6J9w94oBXY?autoplay=1&mute=1', | |
| 37 | + stream_type: 'iframe', | |
| 38 | + source: 'YouTube', | |
| 39 | + } | |
| 40 | +]; | |
| 41 | + | |
| 42 | +export async function fetchJapanCameras(): Promise<CctvCamera[]> { | |
| 43 | + // Static cameras don't need a fetch, we just return them wrapped in a Promise | |
| 44 | + return JAPAN_CAMERAS; | |
| 45 | +} |
modified src/app/api/cctv/route.ts +4 −0
| @@ -7,6 +7,7 @@ | ||
| 7 | 7 | import { fetchTurkeyCameras } from './turkey'; |
| 8 | 8 | import { fetchRomaniaCameras } from './romania'; |
| 9 | 9 | import { fetchAustraliaCameras } from './australia'; |
| 10 | +import { fetchJapanCameras } from './japan'; | |
| 10 | 11 | |
| 11 | 12 | /** |
| 12 | 13 | * OSIRIS — Worldwide CCTV Camera API v2 |
| @@ -323,6 +324,9 @@ | ||
| 323 | 324 | if (inRomania) regions.push('romania'); |
| 324 | 325 | if (inTurkey) regions.push('turkey'); |
| 325 | 326 | |
| 327 | + // Japan | |
| 328 | + if (lat > 24 && lat < 46 && lng > 122 && lng < 154) regions.push('japan'); | |
| 329 | + | |
| 326 | 330 | // Asia (includes Middle East, SE Asia, overriding parts of china but that's ok they can both load) |
| 327 | 331 | if ((lat > -10 && lat < 60 && lng > 60 && lng < 150)) regions.push('asia'); |
| 328 | 332 | // Australia explicitly |
modified src/app/api/maritime/route.ts +15 −0
| @@ -16,6 +16,19 @@ | ||
| 16 | 16 | { name: 'Busan', country: 'KR', lat: 35.10, lng: 129.04, type: 'container', volume: '22.7M TEU', rank: 6 }, |
| 17 | 17 | { name: 'Qingdao', country: 'CN', lat: 36.07, lng: 120.38, type: 'container', volume: '22.0M TEU', rank: 7 }, |
| 18 | 18 | { name: 'Rotterdam', country: 'NL', lat: 51.90, lng: 4.50, type: 'container', volume: '14.5M TEU', rank: 8 }, |
| 19 | + { name: 'Tokyo', country: 'JP', lat: 35.61, lng: 139.79, type: 'container', volume: '4.5M TEU' }, | |
| 20 | + { name: 'Yokohama', country: 'JP', lat: 35.45, lng: 139.66, type: 'container', volume: '2.9M TEU' }, | |
| 21 | + { name: 'Kobe', country: 'JP', lat: 34.67, lng: 135.21, type: 'container', volume: '2.8M TEU' }, | |
| 22 | + { name: 'Nagoya', country: 'JP', lat: 35.08, lng: 136.87, type: 'container', volume: '2.6M TEU' }, | |
| 23 | + { name: 'Osaka', country: 'JP', lat: 34.63, lng: 135.41, type: 'container', volume: '2.1M TEU' }, | |
| 24 | + { name: 'Hakata (Fukuoka)', country: 'JP', lat: 33.60, lng: 130.40, type: 'container', volume: '0.9M TEU' }, | |
| 25 | + { name: 'Kitakyushu', country: 'JP', lat: 33.91, lng: 130.93, type: 'container', volume: '0.5M TEU' }, | |
| 26 | + { name: 'Shimizu', country: 'JP', lat: 35.00, lng: 138.50, type: 'container', volume: '0.5M TEU' }, | |
| 27 | + { name: 'Tomakomai', country: 'JP', lat: 42.63, lng: 141.63, type: 'container', volume: '0.4M TEU' }, | |
| 28 | + { name: 'Niigata', country: 'JP', lat: 37.95, lng: 139.06, type: 'container', volume: '0.2M TEU' }, | |
| 29 | + { name: 'Sendai', country: 'JP', lat: 38.27, lng: 141.02, type: 'container', volume: '0.2M TEU' }, | |
| 30 | + { name: 'Mizushima', country: 'JP', lat: 34.50, lng: 133.72, type: 'energy', volume: 'Industrial' }, | |
| 31 | + { name: 'Yokkaichi', country: 'JP', lat: 34.95, lng: 136.65, type: 'energy', volume: 'Industrial' }, | |
| 19 | 32 | { name: 'Dubai (Jebel Ali)', country: 'AE', lat: 25.01, lng: 55.06, type: 'container', volume: '14.0M TEU', rank: 9 }, |
| 20 | 33 | { name: 'Port Klang', country: 'MY', lat: 2.99, lng: 101.39, type: 'container', volume: '13.2M TEU', rank: 10 }, |
| 21 | 34 | { name: 'Antwerp', country: 'BE', lat: 51.30, lng: 4.40, type: 'container', volume: '12.0M TEU', rank: 11 }, |
| @@ -103,6 +116,8 @@ | ||
| 103 | 116 | APIKey: apiKey, |
| 104 | 117 | // Target specific high-value SCM areas to ensure data delivery on free tier |
| 105 | 118 | BoundingBoxes: [ |
| 119 | + // Tokyo Bay | |
| 120 | + [[34.8, 139.5], [35.7, 140.2]], | |
| 106 | 121 | // Hormuz |
| 107 | 122 | [[25.0, 54.0], [27.5, 57.5]], |
| 108 | 123 | // Suez Canal |
modified src/app/api/news/route.ts +2 −1
| @@ -36,7 +36,8 @@ | ||
| 36 | 36 | 'iran': [32.427, 53.688], 'lebanon': [33.854, 35.862], 'syria': [34.802, 38.996], |
| 37 | 37 | 'yemen': [15.552, 48.516], 'china': [35.861, 104.195], 'taiwan': [23.697, 120.960], |
| 38 | 38 | 'north korea': [40.339, 127.510], 'south korea': [35.907, 127.766], |
| 39 | - 'japan': [36.204, 138.252], 'afghanistan': [33.939, 67.709], 'pakistan': [30.375, 69.345], | |
| 39 | + 'japan': [36.204, 138.252], 'tokyo': [35.689, 139.692], 'osaka': [34.693, 135.502], 'okinawa': [26.212, 127.681], 'hokkaido': [43.061, 141.354], | |
| 40 | + 'afghanistan': [33.939, 67.709], 'pakistan': [30.375, 69.345], | |
| 40 | 41 | 'india': [20.593, 78.962], 'sudan': [12.862, 30.217], 'nigeria': [9.082, 8.675], |
| 41 | 42 | 'egypt': [26.820, 30.802], 'libya': [26.335, 17.228], 'somalia': [5.152, 46.199], |
| 42 | 43 | 'ethiopia': [9.145, 40.489], 'venezuela': [7.119, -66.589], 'mexico': [23.634, -102.552], |
modified src/components/LiveAlerts.tsx +8 −4
| @@ -4,7 +4,7 @@ | ||
| 4 | 4 | import { motion, AnimatePresence } from 'framer-motion'; |
| 5 | 5 | import { |
| 6 | 6 | ChevronDown, ChevronUp, MapPin, ExternalLink, AlertTriangle, |
| 7 | - Newspaper, Clock, Radio, | |
| 7 | + Newspaper, Clock, Radio, Maximize2, Minimize2 | |
| 8 | 8 | } from 'lucide-react'; |
| 9 | 9 | |
| 10 | 10 | interface LiveAlertsProps { |
| @@ -23,6 +23,7 @@ | ||
| 23 | 23 | |
| 24 | 24 | export default function LiveAlerts({ data, onLocate, onWatchFeed }: LiveAlertsProps) { |
| 25 | 25 | const [expanded, setExpanded] = useState(true); |
| 26 | + const [maximized, setMaximized] = useState(false); | |
| 26 | 27 | const [filter, setFilter] = useState<'all' | 'news' | 'quakes' | 'feeds'>('all'); |
| 27 | 28 | |
| 28 | 29 | // Built-in live feeds — verified video IDs (synced with /api/live-news) |
| @@ -115,7 +116,7 @@ | ||
| 115 | 116 | initial={{ opacity: 0, x: 20 }} |
| 116 | 117 | animate={{ opacity: 1, x: 0 }} |
| 117 | 118 | transition={{ delay: 0.5, duration: 0.6 }} |
| 118 | - className="glass-panel flex flex-col overflow-hidden pointer-events-auto" | |
| 119 | + className={`glass-panel flex flex-col overflow-hidden pointer-events-auto resize-y min-h-[200px] transition-all duration-300 ${maximized ? 'fixed inset-4 z-[9999] bg-[#0a0a09]/95 backdrop-blur-3xl' : ''}`} | |
| 119 | 120 | > |
| 120 | 121 | <button |
| 121 | 122 | onClick={() => setExpanded(!expanded)} |
| @@ -129,6 +130,9 @@ | ||
| 129 | 130 | </div> |
| 130 | 131 | <div className="flex items-center gap-2"> |
| 131 | 132 | <div className="w-1.5 h-1.5 rounded-full bg-[#FF4081] animate-osiris-pulse" /> |
| 133 | + <button onClick={(e) => { e.stopPropagation(); setMaximized(!maximized); if (!expanded && !maximized) setExpanded(true); }} className="hover:text-white transition-colors" title={maximized ? "Restore" : "Maximize"}> | |
| 134 | + {maximized ? <Minimize2 className="w-3 h-3 text-[var(--text-muted)]" /> : <Maximize2 className="w-3 h-3 text-[var(--text-muted)]" />} | |
| 135 | + </button> | |
| 132 | 136 | {expanded ? <ChevronUp className="w-3.5 h-3.5 text-[var(--text-muted)]" /> : <ChevronDown className="w-3.5 h-3.5 text-[var(--text-muted)]" />} |
| 133 | 137 | </div> |
| 134 | 138 | </button> |
| @@ -140,7 +144,7 @@ | ||
| 140 | 144 | animate={{ height: 'auto', opacity: 1 }} |
| 141 | 145 | exit={{ height: 0, opacity: 0 }} |
| 142 | 146 | transition={{ duration: 0.2 }} |
| 143 | - className="overflow-hidden px-2 pb-2" | |
| 147 | + className="overflow-hidden px-2 pb-2 flex flex-col flex-1 h-full min-h-0" | |
| 144 | 148 | > |
| 145 | 149 | {/* Filters */} |
| 146 | 150 | <div className="flex gap-1 mb-2"> |
| @@ -156,7 +160,7 @@ | ||
| 156 | 160 | </div> |
| 157 | 161 | |
| 158 | 162 | {/* Alert List */} |
| 159 | - <div className="space-y-0.5 max-h-[180px] overflow-y-auto styled-scrollbar"> | |
| 163 | + <div className="space-y-0.5 overflow-y-auto styled-scrollbar flex-1 pb-4"> | |
| 160 | 164 | {filtered.map((alert, i) => { |
| 161 | 165 | const Icon = getIcon(alert.type); |
| 162 | 166 | const sevColor = RISK_COLORS[alert.severity] || '#FFD700'; |
modified src/components/MarketsPanel.tsx +3 −2
| @@ -4,7 +4,7 @@ | ||
| 4 | 4 | import { motion, AnimatePresence } from 'framer-motion'; |
| 5 | 5 | import { |
| 6 | 6 | TrendingUp, TrendingDown, ChevronDown, ChevronUp, BarChart3, |
| 7 | - Zap, Shield, Droplets, Gem, Bitcoin, LineChart, | |
| 7 | + Zap, Shield, Droplets, Gem, Bitcoin, LineChart, Maximize2, Minimize2 | |
| 8 | 8 | } from 'lucide-react'; |
| 9 | 9 | |
| 10 | 10 | interface MarketsPanelProps { data: any; spaceWeather?: any; } |
| @@ -37,6 +37,7 @@ | ||
| 37 | 37 | |
| 38 | 38 | export default function MarketsPanel({ data, spaceWeather }: MarketsPanelProps) { |
| 39 | 39 | const [expanded, setExpanded] = useState(true); |
| 40 | + const [maximized, setMaximized] = useState(false); | |
| 40 | 41 | const [activeSection, setActiveSection] = useState('stocks'); |
| 41 | 42 | const markets = data.markets || {}; |
| 42 | 43 | |
| @@ -103,7 +104,7 @@ | ||
| 103 | 104 | )} |
| 104 | 105 | |
| 105 | 106 | {/* Ticker List */} |
| 106 | - <div className="space-y-0.5 max-h-[200px] overflow-y-auto styled-scrollbar"> | |
| 107 | + <div className="space-y-0.5 overflow-y-auto styled-scrollbar mt-2"> | |
| 107 | 108 | {markets[activeSection] && Object.entries(markets[activeSection]).map(([name, d]) => ( |
| 108 | 109 | <Ticker key={name} name={name} data={d} /> |
| 109 | 110 | ))} |
modified src/components/ScmPanel.tsx +4 −3
| @@ -2,7 +2,7 @@ | ||
| 2 | 2 | |
| 3 | 3 | import { useState } from 'react'; |
| 4 | 4 | import { motion, AnimatePresence } from 'framer-motion'; |
| 5 | -import { Target, ChevronDown, ChevronUp, AlertTriangle, Ship, Anchor, AlertCircle } from 'lucide-react'; | |
| 5 | +import { Target, ChevronDown, ChevronUp, AlertTriangle, Ship, Anchor, AlertCircle, Maximize2, Minimize2 } from 'lucide-react'; | |
| 6 | 6 | |
| 7 | 7 | interface ScmPanelProps { |
| 8 | 8 | data: any; |
| @@ -10,6 +10,7 @@ | ||
| 10 | 10 | |
| 11 | 11 | export default function ScmPanel({ data }: ScmPanelProps) { |
| 12 | 12 | const [expanded, setExpanded] = useState(true); |
| 13 | + const [maximized, setMaximized] = useState(false); | |
| 13 | 14 | |
| 14 | 15 | const suppliers = data.scm_suppliers || []; |
| 15 | 16 | const criticalSuppliers = suppliers.filter((s: any) => s.risk_level === 'CRITICAL' || s.risk_level === 'HIGH'); |
| @@ -41,8 +42,8 @@ | ||
| 41 | 42 | |
| 42 | 43 | <AnimatePresence> |
| 43 | 44 | {expanded && ( |
| 44 | - <motion.div initial={{ height: 0, opacity: 0 }} animate={{ height: 'auto', opacity: 1 }} exit={{ height: 0, opacity: 0 }} transition={{ duration: 0.2 }} className="overflow-hidden"> | |
| 45 | - <div className="space-y-3 mt-2 max-h-[250px] overflow-y-auto styled-scrollbar pr-1"> | |
| 45 | + <motion.div initial={{ height: 0, opacity: 0 }} animate={{ height: 'auto', opacity: 1 }} exit={{ height: 0, opacity: 0 }} transition={{ duration: 0.2 }} className="overflow-hidden flex flex-col flex-1 min-h-0"> | |
| 46 | + <div className="space-y-3 mt-2 overflow-y-auto styled-scrollbar pr-1 flex-1 pb-4"> | |
| 46 | 47 | |
| 47 | 48 | {/* Market Alerts */} |
| 48 | 49 | {marketAlerts.length > 0 && ( |