mirror of
https://github.com/unraid/api.git
synced 2026-05-20 07:59:13 -05:00
feat(notifications): replace docker toast usage with nuxtui toast composable in ConnectSettings, DockerContainersTable, and RCloneOverview components
This commit is contained in:
@@ -26,6 +26,7 @@ defineOptions({
|
||||
});
|
||||
|
||||
const { connectPluginInstalled } = storeToRefs(useServerStore());
|
||||
const toast = useToast();
|
||||
|
||||
/**--------------------------------------------
|
||||
* Settings State & Form definition
|
||||
@@ -74,10 +75,12 @@ watchDebounced(
|
||||
// show a toast when the update is done
|
||||
onMutateSettingsDone((result) => {
|
||||
actualRestartRequired.value = result.data?.updateSettings?.restartRequired ?? false;
|
||||
globalThis.toast.success(t('connectSettings.updatedApiSettingsToast'), {
|
||||
toast.add({
|
||||
title: t('connectSettings.updatedApiSettingsToast'),
|
||||
description: actualRestartRequired.value
|
||||
? t('connectSettings.apiRestartingToastDescription')
|
||||
: undefined,
|
||||
color: 'success',
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -36,20 +36,22 @@ const {
|
||||
refetchQueries: [{ query: GET_RCLONE_REMOTES }],
|
||||
});
|
||||
|
||||
const toast = useToast();
|
||||
|
||||
onDeleteDone((result) => {
|
||||
const data = result?.data;
|
||||
if (data?.rclone?.deleteRCloneRemote) {
|
||||
if (window.toast) {
|
||||
window.toast.success('Remote Deleted', {
|
||||
description: 'Remote deleted successfully',
|
||||
});
|
||||
}
|
||||
toast.add({
|
||||
title: 'Remote Deleted',
|
||||
description: 'Remote deleted successfully',
|
||||
color: 'success',
|
||||
});
|
||||
} else {
|
||||
if (window.toast) {
|
||||
window.toast.error('Deletion Failed', {
|
||||
description: 'Failed to delete remote. Please try again.',
|
||||
});
|
||||
}
|
||||
toast.add({
|
||||
title: 'Deletion Failed',
|
||||
description: 'Failed to delete remote. Please try again.',
|
||||
color: 'error',
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user