diff --git a/src/App.jsx b/src/App.jsx
index 28ead85..985d70f 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -3,9 +3,31 @@ import {
Send, Menu, X, ChevronLeft, ChevronRight, Bot, User, Paperclip, Camera, Video,
MessageSquare, Newspaper, FileText, CheckCircle2, Circle, AlertTriangle,
Info, Plus, LogOut, UploadCloud, Image as ImageIcon, ShieldCheck,
- Sparkles, Signal, Wifi, BatteryFull
+ Sparkles
} from 'lucide-react';
+// Branded gradient + icon header images, generated inline so news always
+// shows a header image without depending on an external image host.
+const newsImg = (from, to, icon) => `data:image/svg+xml,${encodeURIComponent(
+ ``
+)}`;
+
+const NEWS_IMG_APD = newsImg('#fbbf24', '#d97706',
+ '');
+const NEWS_IMG_FIRE = newsImg('#38bdf8', '#0369a1',
+ '');
+const NEWS_IMG_AWARD = newsImg('#34d399', '#0d9488',
+ '');
+const NEWS_IMG_DEFAULT = newsImg('#10b981', '#047857',
+ '');
+
const NEWS_ITEMS = [
{
id: 1,
@@ -15,10 +37,10 @@ const NEWS_ITEMS = [
type: "warning",
summary: "Kewajiban penggunaan helm keselamatan (Safety Helmet) Kelas E terbaru.",
content: "Berdasarkan evaluasi keselamatan semester pertama, manajemen menetapkan bahwa mulai 1 Juli 2026, seluruh personel yang memasuki area operasional zona kuning dan merah wajib menggunakan Helm Keselamatan (Safety Helmet) Kelas E dengan pelindung benturan samping.\n\nPedoman lengkap telah diperbarui dalam dokumen Sistem Manajemen HSSE. Harap seluruh pekerja dan kontraktor menyesuaikan dengan standar terbaru ini. Inspeksi akan diperketat mulai bulan depan.",
- image: "https://images.unsplash.com/photo-1541888081-3642eb657736?auto=format&fit=crop&q=80&w=400&h=200",
+ image: NEWS_IMG_APD,
carousel: [
- { url: "https://images.unsplash.com/photo-1504328345606-18bbc8c9d7d1?auto=format&fit=crop&q=80&w=400&h=300", caption: "Helm standar kelas E" },
- { url: "https://images.unsplash.com/photo-1581092160562-40aa08e78837?auto=format&fit=crop&q=80&w=400&h=300", caption: "Inspeksi kepatuhan di lapangan" }
+ { url: NEWS_IMG_APD, caption: "Helm standar kelas E" },
+ { url: NEWS_IMG_APD, caption: "Inspeksi kepatuhan di lapangan" }
]
},
{
@@ -29,9 +51,9 @@ const NEWS_ITEMS = [
type: "info",
summary: "Jadwal dan rute evakuasi untuk simulasi hari Jumat.",
content: "Sebagai bagian dari kesiapsiagaan tanggap darurat, simulasi evakuasi kebakaran (Fire Drill) akan dilaksanakan pada:\n\nHari/Tanggal: Jumat, 26 Juni 2026\nWaktu: 09.00 WIB - Selesai\nLokasi: Seluruh area Gedung Utama dan Fasilitas Produksi A\n\nMohon seluruh personel berpartisipasi aktif dan mengikuti arahan dari Floor Warden di masing-masing lantai.",
- image: "https://images.unsplash.com/photo-1614064506922-442cd26588a5?auto=format&fit=crop&q=80&w=400&h=200",
+ image: NEWS_IMG_FIRE,
carousel: [
- { url: "https://images.unsplash.com/photo-1542385151-efd9000785a0?auto=format&fit=crop&q=80&w=400&h=300", caption: "Rute dan titik kumpul evakuasi" }
+ { url: NEWS_IMG_FIRE, caption: "Rute dan titik kumpul evakuasi" }
]
},
{
@@ -42,9 +64,9 @@ const NEWS_ITEMS = [
type: "success",
summary: "Fasilitas Produksi B berhasil mencapai 1 juta jam kerja aman.",
content: "Apresiasi setinggi-tingginya kepada seluruh tim di Fasilitas Produksi B atas pencapaian luar biasa: 1 Juta Jam Kerja Tanpa Kecelakaan Kerja (Zero LTI) yang tercapai pada pertengahan tahun 2026 ini.\n\nPencapaian ini adalah bukti komitmen kita bersama terhadap budaya HSSE 'Safety First'. Mari kita pertahankan dan tingkatkan kinerja keselamatan di seluruh area operasi.",
- image: "https://images.unsplash.com/photo-1581092580497-e0d23cbdf1dc?auto=format&fit=crop&q=80&w=400&h=200",
+ image: NEWS_IMG_AWARD,
carousel: [
- { url: "https://images.unsplash.com/photo-1504917595217-d4dc5ebe6122?auto=format&fit=crop&q=80&w=400&h=300", caption: "Penghargaan Tim Produksi B" }
+ { url: NEWS_IMG_AWARD, caption: "Penghargaan Tim Produksi B" }
]
}
];
@@ -124,13 +146,6 @@ export default function App() {
// State for Admin/Contributor Popup
const [showInfoPopup, setShowInfoPopup] = useState(false);
- // Live clock for the device status bar
- const [clock, setClock] = useState(new Date());
- useEffect(() => {
- const t = setInterval(() => setClock(new Date()), 30000);
- return () => clearInterval(t);
- }, []);
-
const chatContainerRef = useRef(null);
useEffect(() => {
@@ -282,7 +297,7 @@ export default function App() {
type: newsType,
summary: newsForm.summary,
content: newsForm.summary,
- image: newsForm.headerImage || "https://images.unsplash.com/photo-1504917595217-d4dc5ebe6122?auto=format&fit=crop&q=80&w=400&h=200",
+ image: newsForm.headerImage || NEWS_IMG_DEFAULT,
carousel: newsForm.carousel.filter(item => item.url) // Hanya simpan lampiran yang telah diisi foto
};
@@ -292,20 +307,6 @@ export default function App() {
setActiveTab('news');
};
- const clockLabel = clock.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
-
- // ---- Device status bar (top of the phone frame) ----
- const StatusBar = ({ dark = false }) => (
-