···
} from "../lib/client.ts";
10
-
import { getMigrationState } from "../lib/migration-state.ts";
* The migration progress component.
* @param props - The migration progress props
···
export default function MigrationProgress(props: MigrationProgressProps) {
const [token, setToken] = useState("");
20
-
const migrationState: MigrationStateInfo = getMigrationState();
const [showContinueAnyway, setShowContinueAnyway] = useState<
···
296
-
{/* Migration state alert */}
297
-
{migrationState && !migrationState.allowMigration && (
299
-
class={`p-4 rounded-lg border ${
300
-
migrationState.state === "maintenance"
301
-
? "bg-yellow-50 border-yellow-200 text-yellow-800 dark:bg-yellow-900/20 dark:border-yellow-800 dark:text-yellow-200"
302
-
: "bg-red-50 border-red-200 text-red-800 dark:bg-red-900/20 dark:border-red-800 dark:text-red-200"
305
-
<div class="flex items-center">
308
-
migrationState.state === "maintenance"
309
-
? "text-yellow-600 dark:text-yellow-400"
310
-
: "text-red-600 dark:text-red-400"
313
-
{migrationState.state === "maintenance" ? "⚠️" : "🚫"}
316
-
<h3 class="font-semibold mb-1">
317
-
{migrationState.state === "maintenance"
318
-
? "Maintenance Mode"
319
-
: "Service Unavailable"}
321
-
<p class="text-sm">{migrationState.message}</p>
{steps.map((step, index) => (
<div key={step.name} class={getStepClasses(step.status)}>