perf: unify the copywriting style of confirms (halo-dev/console#723)

#### What type of PR is this?

/kind improvement
/milestone 2.0

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

修改了各个删除操作提示弹框的信息,统一了文本风格。
原本存在 `是否确认删除xxx?` 和 `确定删除xxx吗?` 两种风格,统一为后一种风格。

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

```release-note
优化 Console 端确认弹框的提示文案。
```
pull/3445/head
BugKing 2022-11-28 14:20:17 +08:00 committed by GitHub
parent c21b0fdfe8
commit 00aa964fb3
15 changed files with 40 additions and 40 deletions

View File

@ -37,7 +37,7 @@ const userStore = useUserStore();
const handleLogout = () => {
Dialog.warning({
title: "是否确认退出登录",
title: "确定要退出登录吗",
onConfirm: async () => {
try {
await axios.post(`${import.meta.env.VITE_API_URL}/logout`, undefined, {

View File

@ -91,9 +91,8 @@ const onEditingModalClose = () => {
const handleDelete = (group: Group) => {
Dialog.warning({
title: "是否确认删除该分组?",
description:
"此操作将删除分组,并将分组下的附件移动至未分组,此操作无法恢复。",
title: "确定要删除该分组吗?",
description: "将删除分组,并将分组下的附件移动至未分组,该操作不可恢复。",
confirmType: "danger",
onConfirm: async () => {
// TODO:
@ -131,8 +130,8 @@ const handleDelete = (group: Group) => {
const handleDeleteWithAttachments = (group: Group) => {
Dialog.warning({
title: "是否确认删除该分组",
description: "此操作将删除分组以及分组下的所有附件,此操作无法恢复。",
title: "确定要删除该分组吗",
description: "将删除分组以及分组下的所有附件,该操作不可恢复。",
confirmType: "danger",
onConfirm: async () => {
// TODO:

View File

@ -91,7 +91,7 @@ const handleDelete = async (policy: Policy) => {
}
Dialog.warning({
title: "确定删除该策略吗?",
title: "确定删除该策略吗?",
description: "当前策略下没有已上传的附件。",
onConfirm: async () => {
await apiClient.extension.storage.policy.deletestorageHaloRunV1alpha1Policy(

View File

@ -157,7 +157,7 @@ const handleDeleteInBatch = async () => {
const handleApproveInBatch = async () => {
Dialog.warning({
title: "确定要审核通过所选评论吗?",
title: "确定要审核通过所选评论吗?",
onConfirm: async () => {
try {
const commentsToUpdate = comments.value.items.filter((comment) => {

View File

@ -57,7 +57,7 @@ provide<Ref<ListedReply | undefined>>("hoveredReply", hoveredReply);
const handleDelete = async () => {
Dialog.warning({
title: "是否确认删除该评论?",
title: "确认删除该评论",
description: "删除评论的同时会删除该评论下的所有回复,该操作不可恢复。",
confirmType: "danger",
onConfirm: async () => {

View File

@ -45,7 +45,7 @@ const quoteReply = computed(() => {
const handleDelete = async () => {
Dialog.warning({
title: "是否确认删除该回复?",
title: "确认删除该回复",
description: "该操作不可恢复。",
confirmType: "danger",
onConfirm: async () => {

View File

@ -122,7 +122,7 @@ const handleCheckAllChange = (e: Event) => {
const handleDeletePermanently = async (singlePage: SinglePage) => {
Dialog.warning({
title: "是否确认永久删除该自定义页面?",
title: "确认永久删除该自定义页面",
description: "删除之后将无法恢复",
confirmType: "danger",
onConfirm: async () => {
@ -138,7 +138,7 @@ const handleDeletePermanently = async (singlePage: SinglePage) => {
const handleDeletePermanentlyInBatch = async () => {
Dialog.warning({
title: "是否确认永久删除选中的自定义页面",
title: "确定要确认永久删除选中的自定义页面吗",
description: "删除之后将无法恢复",
confirmType: "danger",
onConfirm: async () => {
@ -159,8 +159,8 @@ const handleDeletePermanentlyInBatch = async () => {
const handleRecovery = async (singlePage: SinglePage) => {
Dialog.warning({
title: "是否确认恢复该自定义页面?",
description: "操作会将自定义页面恢复到被删除之前的状态",
title: "确认恢复该自定义页面",
description: "操作会将自定义页面恢复到被删除之前的状态",
onConfirm: async () => {
const singlePageToUpdate = cloneDeep(singlePage);
singlePageToUpdate.spec.deleted = false;
@ -177,8 +177,8 @@ const handleRecovery = async (singlePage: SinglePage) => {
const handleRecoveryInBatch = async () => {
Dialog.warning({
title: "是否确认恢复选中的自定义页面?",
description: "操作会将自定义页面恢复到被删除之前的状态",
title: "确认恢复选中的自定义页面",
description: "操作会将自定义页面恢复到被删除之前的状态",
onConfirm: async () => {
await Promise.all(
selectedPageNames.value.map((name) => {

View File

@ -215,8 +215,8 @@ const handleCheckAllChange = (e: Event) => {
const handleDelete = async (singlePage: SinglePage) => {
Dialog.warning({
title: "是否确认删除该自定义页面",
description: "操作会将自定义页面放入回收站,后续可以从回收站恢复",
title: "确定要删除该自定义页面吗",
description: "操作会将自定义页面放入回收站,后续可以从回收站恢复",
confirmType: "danger",
onConfirm: async () => {
const singlePageToUpdate = cloneDeep(singlePage);
@ -234,8 +234,8 @@ const handleDelete = async (singlePage: SinglePage) => {
const handleDeleteInBatch = async () => {
Dialog.warning({
title: "是否确认删除选中的自定义页面",
description: "操作会将自定义页面放入回收站,后续可以从回收站恢复",
title: "确定要删除选中的自定义页面吗",
description: "操作会将自定义页面放入回收站,后续可以从回收站恢复",
confirmType: "danger",
onConfirm: async () => {
await Promise.all(

View File

@ -116,7 +116,7 @@ const handleCheckAllChange = (e: Event) => {
const handleDeletePermanently = async (post: Post) => {
Dialog.warning({
title: "是否确认永久删除该文章",
title: "确定要永久删除该文章吗",
description: "删除之后将无法恢复",
confirmType: "danger",
onConfirm: async () => {
@ -130,7 +130,7 @@ const handleDeletePermanently = async (post: Post) => {
const handleDeletePermanentlyInBatch = async () => {
Dialog.warning({
title: "是否确认永久删除选中的文章",
title: "确定要永久删除选中的文章吗",
description: "删除之后将无法恢复",
confirmType: "danger",
onConfirm: async () => {
@ -149,8 +149,8 @@ const handleDeletePermanentlyInBatch = async () => {
const handleRecovery = async (post: Post) => {
Dialog.warning({
title: "是否确认恢复该文章",
description: "操作会将文章恢复到被删除之前的状态",
title: "确定要恢复该文章吗",
description: "操作会将文章恢复到被删除之前的状态",
onConfirm: async () => {
const postToUpdate = cloneDeep(post);
postToUpdate.spec.deleted = false;
@ -165,8 +165,8 @@ const handleRecovery = async (post: Post) => {
const handleRecoveryInBatch = async () => {
Dialog.warning({
title: "是否确认恢复选中的文章",
description: "操作会将文章恢复到被删除之前的状态",
title: "确定要恢复选中的文章吗",
description: "操作会将文章恢复到被删除之前的状态",
onConfirm: async () => {
await Promise.all(
selectedPostNames.value.map((name) => {

View File

@ -247,8 +247,8 @@ const handleCheckAllChange = (e: Event) => {
const handleDelete = async (post: Post) => {
Dialog.warning({
title: "是否确认删除该文章",
description: "操作会将文章放入回收站,后续可以从回收站恢复",
title: "确定要删除该文章吗",
description: "操作会将文章放入回收站,后续可以从回收站恢复",
confirmType: "danger",
onConfirm: async () => {
await apiClient.post.recyclePost({
@ -261,8 +261,8 @@ const handleDelete = async (post: Post) => {
const handleDeleteInBatch = async () => {
Dialog.warning({
title: "是否确认删除选中的文章",
description: "操作会将文章放入回收站,后续可以从回收站恢复",
title: "确定要删除选中的文章吗",
description: "操作会将文章放入回收站,后续可以从回收站恢复",
confirmType: "danger",
onConfirm: async () => {
await Promise.all(

View File

@ -27,8 +27,8 @@ const upgradeModal = ref(false);
const handleReloadTheme = async () => {
Dialog.warning({
title: "是否确认重载主题的所有配置",
description: "操作仅会重载主题配置和设置表单定义,不会删除已保存的配置。",
title: "确定要重载主题的所有配置吗",
description: "操作仅会重载主题配置和设置表单定义,不会删除已保存的配置。",
onConfirm: async () => {
try {
if (!selectedTheme?.value) {

View File

@ -108,10 +108,10 @@ const handleUninstall = async (theme: Theme, deleteExtensions?: boolean) => {
Dialog.warning({
title: `${
deleteExtensions
? "是否确认删除该主题以及对应的配置"
: "是否确认删除该主题"
? "确定要删除该主题以及对应的配置吗"
: "确定要删除该主题吗"
}`,
description: "删除后将无法恢复。",
description: "该操作不可恢复。",
onConfirm: async () => {
try {
await apiClient.extension.theme.deletethemeHaloRunV1alpha1Theme({

View File

@ -51,8 +51,8 @@ export function usePluginLifeCycle(
Dialog.warning({
title: `${
deleteExtensions
? "是否确认卸载该插件以及对应的配置"
: "是否确认卸载该插件"
? "确定要卸载该插件以及对应的配置吗"
: "确定要卸载该插件吗"
}`,
description: `${
enabled ? "当前插件还在启用状态,将在停止运行后卸载。" : ""

View File

@ -83,8 +83,8 @@ const handleCloneRole = (role: Role) => {
const handleDelete = async (role: Role) => {
Dialog.warning({
title: "是否确定删除该权限",
description: "此权限删除之后,相关联的用户将被删除角色绑定,此操作不可恢复",
title: "确定要删除该角色吗",
description: "该角色删除后,相关联的用户将被删除角色绑定,该操作不可恢复",
confirmType: "danger",
onConfirm: async () => {
try {

View File

@ -121,7 +121,8 @@ const handleDelete = async (user: User) => {
const handleDeleteInBatch = async () => {
Dialog.warning({
title: "是否确认删除选中的用户?",
title: "确定要删除选中的用户吗?",
description: "该操作不可恢复。",
confirmType: "danger",
onConfirm: async () => {
const userNamesToDelete = selectedUserNames.value.filter(