added tip of the day

This commit is contained in:
Oliver Kieselbach
2026-04-01 12:34:13 +02:00
parent 2aeaf575bc
commit f8e9cb2a70
4 changed files with 53 additions and 2 deletions
@@ -1 +1 @@
758
759
@@ -0,0 +1,48 @@
"use client";
import { useState, useEffect } from "react";
const tips = [
"Auto-set the device timezone under Settings \u2192 Agent Settings.",
"Use Analyze Rules to automatically flag enrollment issues before users report them.",
"Check the Changelog page to stay up to date with the latest platform changes.",
"Enable Diagnostics to collect custom log paths from your devices on demand.",
"The Geographic view shows where your devices are enrolling on a live map.",
"The Software Analyzer detects installed software across enrollments \u2014 find open vulnerabilities fast.",
"Use the Local Admin Analyzer to spot legitimate vs. unexpected local admin accounts.",
"Connect Teams or Slack under Notifications to get real-time enrollment alerts in your channel.",
"Share the Progress Portal link with your team \u2014 anyone can check enrollment status by serial number.",
"Missing an event in your sessions? Use Gather Rules to collect it.",
];
export default function TipOfTheDay() {
const [tip, setTip] = useState("");
useEffect(() => {
setTip(tips[Math.floor(Math.random() * tips.length)]);
}, []);
if (!tip) return null;
return (
<div className="mb-6 flex items-center justify-center gap-2 text-xs text-gray-400 dark:text-gray-500 select-none">
<svg
className="w-3.5 h-3.5 text-amber-400 shrink-0"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5.002 5.002 0 017.072 0l.548.547A3.374 3.374 0 0114.81 21H9.19a3.374 3.374 0 01-2.384-5.76l.55-.547z"
/>
</svg>
<span>
<span className="font-medium text-gray-500 dark:text-gray-400">Tip:</span>{" "}
{tip}
</span>
</div>
);
}
@@ -16,6 +16,7 @@ import { StatsCard } from "./components/StatsCards";
import { WelcomeMessage } from "./components/WelcomeMessage";
import { SessionTable } from "./components/SessionTable";
import { DeleteConfirmModal, BlockConfirmModal } from "./components/ConfirmationModals";
import TipOfTheDay from "./components/TipOfTheDay";
import { useAdminMode } from "@/hooks/useAdminMode";
import { useDeleteSession } from "./hooks/useDeleteSession";
import { useBlockDevice } from "./hooks/useBlockDevice";
@@ -679,6 +680,8 @@ export default function Home() {
/>
</div>
<TipOfTheDay />
{/* Welcome message - only show when no sessions */}
{sessions.length === 0 && <WelcomeMessage />}
File diff suppressed because one or more lines are too long