FIX - TASKER STARTUP: автовосстановление после запуска backend
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
import { useTheme } from "next-themes";
|
||||
import { Button } from "@plane/propel/button";
|
||||
// assets
|
||||
import maintenanceModeDarkModeImage from "@/app/assets/instance/maintenance-mode-dark.svg?url";
|
||||
import maintenanceModeLightModeImage from "@/app/assets/instance/maintenance-mode-light.svg?url";
|
||||
@@ -12,8 +13,18 @@ import maintenanceModeLightModeImage from "@/app/assets/instance/maintenance-mod
|
||||
import DefaultLayout from "@/layouts/default-layout";
|
||||
// components
|
||||
import { MaintenanceMessage } from "@/plane-web/components/instance";
|
||||
import type { TMaintenanceReason } from "@/plane-web/components/instance";
|
||||
|
||||
export function MaintenanceView() {
|
||||
type TMaintenanceViewProps = {
|
||||
autoRetry?: boolean;
|
||||
isRetrying?: boolean;
|
||||
reason?: TMaintenanceReason;
|
||||
statusCode?: number;
|
||||
onRetry?: () => void;
|
||||
};
|
||||
|
||||
export function MaintenanceView(props: TMaintenanceViewProps) {
|
||||
const { autoRetry = false, isRetrying = false, reason = "unavailable", statusCode, onRetry } = props;
|
||||
// hooks
|
||||
const { resolvedTheme } = useTheme();
|
||||
// derived values
|
||||
@@ -31,7 +42,20 @@ export function MaintenanceView() {
|
||||
/>
|
||||
</div>
|
||||
<div className="relative mt-4 flex w-full flex-col gap-4">
|
||||
<MaintenanceMessage />
|
||||
<MaintenanceMessage autoRetry={autoRetry} reason={reason} statusCode={statusCode} />
|
||||
{onRetry && (
|
||||
<div className="flex justify-start">
|
||||
<Button
|
||||
variant="primary"
|
||||
size="lg"
|
||||
className="nodedc-error-primary"
|
||||
loading={isRetrying}
|
||||
onClick={onRetry}
|
||||
>
|
||||
Проверить сейчас
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</DefaultLayout>
|
||||
|
||||
Reference in New Issue
Block a user