perf: add success toast for saving plugin and theme settings (#895)

#### What type of PR is this?

/kind improvement

#### What this PR does / why we need it:

保存主题和插件设置时,添加保存成功的反馈提示。

#### Screenshots:

<img width="803" alt="image" src="https://user-images.githubusercontent.com/21301288/221805091-60f3f20c-5524-4dea-9858-6c521cb1dfbc.png">

#### Special notes for your reviewer:

None

#### Does this PR introduce a user-facing change?


```release-note
None
```
pull/892/head^2
Ryan Wang 2 years ago committed by GitHub
parent fbbdd47d83
commit e3e0ddc95a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,7 +3,7 @@
import { inject, ref, watch } from "vue";
// components
import { VButton } from "@halo-dev/components";
import { Toast, VButton } from "@halo-dev/components";
// types
import type { Ref } from "vue";
@ -63,6 +63,8 @@ const handleSaveConfigMap = async () => {
configMap: configMapToUpdate,
});
Toast.success("保存成功");
await handleFetchSettings();
configMap.value = newConfigMap;

@ -21,6 +21,7 @@ import {
IconPhone,
IconTablet,
IconRefreshLine,
Toast,
} from "@halo-dev/components";
import { storeToRefs } from "pinia";
import { computed, markRaw, ref, watch } from "vue";
@ -163,6 +164,8 @@ const handleSaveConfigMap = async () => {
configMap: configMapToUpdate,
});
Toast.success("保存成功");
await handleFetchSettings();
configMap.value = newConfigMap;

@ -7,7 +7,7 @@ import { useSettingFormConvert } from "@/composables/use-setting-form";
import { apiClient } from "@/utils/api-client";
// components
import { VButton } from "@halo-dev/components";
import { Toast, VButton } from "@halo-dev/components";
// types
import type { ConfigMap, Plugin, Setting } from "@halo-dev/api-client";
@ -55,6 +55,8 @@ const handleSaveConfigMap = async () => {
configMap: configMapToUpdate,
});
Toast.success("保存成功");
await handleFetchSettings();
configMap.value = newConfigMap;
saving.value = false;

Loading…
Cancel
Save