Skip to content
This repository was archived by the owner on Jan 21, 2024. It is now read-only.

Commit e3e0ddc

Browse files
authored
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 ```
1 parent fbbdd47 commit e3e0ddc

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

src/modules/interface/themes/ThemeSetting.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { inject, ref, watch } from "vue";
44
55
// components
6-
import { VButton } from "@halo-dev/components";
6+
import { Toast, VButton } from "@halo-dev/components";
77
88
// types
99
import type { Ref } from "vue";
@@ -63,6 +63,8 @@ const handleSaveConfigMap = async () => {
6363
configMap: configMapToUpdate,
6464
});
6565
66+
Toast.success("保存成功");
67+
6668
await handleFetchSettings();
6769
configMap.value = newConfigMap;
6870

src/modules/interface/themes/components/preview/ThemePreviewModal.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
IconPhone,
2222
IconTablet,
2323
IconRefreshLine,
24+
Toast,
2425
} from "@halo-dev/components";
2526
import { storeToRefs } from "pinia";
2627
import { computed, markRaw, ref, watch } from "vue";
@@ -163,6 +164,8 @@ const handleSaveConfigMap = async () => {
163164
configMap: configMapToUpdate,
164165
});
165166
167+
Toast.success("保存成功");
168+
166169
await handleFetchSettings();
167170
configMap.value = newConfigMap;
168171

src/modules/system/plugins/PluginSetting.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { useSettingFormConvert } from "@/composables/use-setting-form";
77
import { apiClient } from "@/utils/api-client";
88
99
// components
10-
import { VButton } from "@halo-dev/components";
10+
import { Toast, VButton } from "@halo-dev/components";
1111
1212
// types
1313
import type { ConfigMap, Plugin, Setting } from "@halo-dev/api-client";
@@ -55,6 +55,8 @@ const handleSaveConfigMap = async () => {
5555
configMap: configMapToUpdate,
5656
});
5757
58+
Toast.success("保存成功");
59+
5860
await handleFetchSettings();
5961
configMap.value = newConfigMap;
6062
saving.value = false;

0 commit comments

Comments
 (0)