Migrate everything to alert system, update user.ts for OIDC updates.

This commit is contained in:
LukeGus
2025-09-02 20:17:42 -05:00
parent 38436e3cb5
commit 76be4ea340
7 changed files with 103 additions and 90 deletions

View File

@@ -21,7 +21,6 @@ import React, {useEffect, useRef, useState} from "react";
import {Switch} from "@/components/ui/switch.tsx";
import {Alert, AlertDescription} from "@/components/ui/alert.tsx";
import {createSSHHost, updateSSHHost, getSSHHosts} from '@/ui/main-axios.ts';
import {toast} from "sonner";
interface SSHHost {
id: number;
@@ -256,9 +255,8 @@ export function HostManagerHostEditor({editingHost, onFormSubmit}: SSHManagerHos
}
window.dispatchEvent(new CustomEvent('ssh-hosts:changed'));
toast.success(editingHost ? t('hosts.hostUpdated') : t('hosts.hostAdded'));
} catch (error) {
toast.error(t('errors.saveError'));
alert(t('errors.saveError'));
}
};