mirror of https://github.com/halo-dev/halo-admin
perf: add success toast for saving plugin and theme settings
parent
de2612da27
commit
199a6a5a9a
|
@ -3,7 +3,7 @@
|
||||||
import { inject, ref, watch } from "vue";
|
import { inject, ref, watch } from "vue";
|
||||||
|
|
||||||
// components
|
// components
|
||||||
import { VButton } from "@halo-dev/components";
|
import { Toast, VButton } from "@halo-dev/components";
|
||||||
|
|
||||||
// types
|
// types
|
||||||
import type { Ref } from "vue";
|
import type { Ref } from "vue";
|
||||||
|
@ -63,6 +63,8 @@ const handleSaveConfigMap = async () => {
|
||||||
configMap: configMapToUpdate,
|
configMap: configMapToUpdate,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Toast.success("保存成功");
|
||||||
|
|
||||||
await handleFetchSettings();
|
await handleFetchSettings();
|
||||||
configMap.value = newConfigMap;
|
configMap.value = newConfigMap;
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ import {
|
||||||
IconPhone,
|
IconPhone,
|
||||||
IconTablet,
|
IconTablet,
|
||||||
IconRefreshLine,
|
IconRefreshLine,
|
||||||
|
Toast,
|
||||||
} from "@halo-dev/components";
|
} from "@halo-dev/components";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
import { computed, markRaw, ref, watch } from "vue";
|
import { computed, markRaw, ref, watch } from "vue";
|
||||||
|
@ -163,6 +164,8 @@ const handleSaveConfigMap = async () => {
|
||||||
configMap: configMapToUpdate,
|
configMap: configMapToUpdate,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Toast.success("保存成功");
|
||||||
|
|
||||||
await handleFetchSettings();
|
await handleFetchSettings();
|
||||||
configMap.value = newConfigMap;
|
configMap.value = newConfigMap;
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { useSettingFormConvert } from "@/composables/use-setting-form";
|
||||||
import { apiClient } from "@/utils/api-client";
|
import { apiClient } from "@/utils/api-client";
|
||||||
|
|
||||||
// components
|
// components
|
||||||
import { VButton } from "@halo-dev/components";
|
import { Toast, VButton } from "@halo-dev/components";
|
||||||
|
|
||||||
// types
|
// types
|
||||||
import type { ConfigMap, Plugin, Setting } from "@halo-dev/api-client";
|
import type { ConfigMap, Plugin, Setting } from "@halo-dev/api-client";
|
||||||
|
@ -55,6 +55,8 @@ const handleSaveConfigMap = async () => {
|
||||||
configMap: configMapToUpdate,
|
configMap: configMapToUpdate,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Toast.success("保存成功");
|
||||||
|
|
||||||
await handleFetchSettings();
|
await handleFetchSettings();
|
||||||
configMap.value = newConfigMap;
|
configMap.value = newConfigMap;
|
||||||
saving.value = false;
|
saving.value = false;
|
||||||
|
|
Loading…
Reference in New Issue