mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
perf: Unified deletion confirm button
This commit is contained in:
parent
2fc883dedc
commit
13f374e262
|
|
@ -7,9 +7,7 @@
|
|||
:close-on-press-escape="false"
|
||||
>
|
||||
<el-card shadow="never" class="layout-bg mb-16">
|
||||
<el-text type="info" class="color-secondary">{{
|
||||
$t('layout.apiServiceAddress')
|
||||
}}</el-text>
|
||||
<el-text type="info" class="color-secondary">{{ $t('layout.apiServiceAddress') }}</el-text>
|
||||
<p style="margin-top: 10px">
|
||||
<span class="vertical-middle lighter break-all">
|
||||
{{ apiUrl }}
|
||||
|
|
@ -113,7 +111,7 @@ function deleteApiKey(row: any) {
|
|||
`${t('views.applicationOverview.appInfo.APIKeyDialog.msgConfirm1')}: ${row.secret_key}?`,
|
||||
t(t('views.applicationOverview.appInfo.APIKeyDialog.msgConfirm2')),
|
||||
{
|
||||
confirmButtonText: t('common.delete'),
|
||||
confirmButtonText: t('common.confirm'),
|
||||
cancelButtonText: t('common.cancel'),
|
||||
confirmButtonClass: 'danger'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ export default {
|
|||
placeholder: 'Enter username to search'
|
||||
},
|
||||
delete: {
|
||||
button: 'Remove',
|
||||
confirmTitle: 'Confirm removal of member:',
|
||||
confirmMessage:
|
||||
'Removing the member will revoke their access to knowledge and APP.'
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ export default {
|
|||
placeholder: '请输入用户名搜索'
|
||||
},
|
||||
delete: {
|
||||
button: '移除',
|
||||
confirmTitle: '是否移除成员:',
|
||||
confirmMessage: '移除后将会取消成员拥有的知识库和应用权限。'
|
||||
},
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ export default {
|
|||
placeholder: '請輸入使用者名稱搜尋'
|
||||
},
|
||||
delete: {
|
||||
button: '移除',
|
||||
confirmTitle: '是否移除成員:',
|
||||
confirmMessage: '移除後將會取消成員擁有之知識庫和應用程式權限。'
|
||||
},
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ function deleteApiKey(row: any) {
|
|||
`${t('views.applicationOverview.appInfo.APIKeyDialog.msgConfirm1')}: ${row.secret_key}?`,
|
||||
t('views.applicationOverview.appInfo.APIKeyDialog.msgConfirm2'),
|
||||
{
|
||||
confirmButtonText: t('common.delete'),
|
||||
confirmButtonText: t('common.confirm'),
|
||||
cancelButtonText: t('common.cancel'),
|
||||
confirmButtonClass: 'danger'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,11 +103,10 @@ import { ref, watch } from 'vue'
|
|||
import { useRoute } from 'vue-router'
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import applicationApi from '@/api/application'
|
||||
import { MsgSuccess, MsgConfirm } from '@/utils/message'
|
||||
import { MsgSuccess } from '@/utils/message'
|
||||
import { t } from '@/locales'
|
||||
import { copyClick } from '@/utils/clipboard'
|
||||
import { ComplexPermission } from '@/utils/permission/type'
|
||||
import { first } from 'lodash'
|
||||
|
||||
const route = useRoute()
|
||||
const {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import { useRoute } from 'vue-router'
|
|||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import overviewApi from '@/api/application-overview'
|
||||
import overviewSystemApi from '@/api/system-api-key'
|
||||
import { MsgSuccess, MsgConfirm } from '@/utils/message'
|
||||
import { MsgSuccess } from '@/utils/message'
|
||||
import { t } from '@/locales'
|
||||
|
||||
const route = useRoute()
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ const deleteHandle = (item: any, cIndex: number) => {
|
|||
`${t('views.paragraph.delete.confirmTitle')}${item.title || '-'} ?`,
|
||||
t('views.paragraph.delete.confirmMessage'),
|
||||
{
|
||||
confirmButtonText: t('common.delete'),
|
||||
confirmButtonText: t('common.confirm'),
|
||||
confirmButtonClass: 'danger'
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ function deleteDataset(row: any) {
|
|||
`${t('views.dataset.delete.confirmTitle')}${row.name} ?`,
|
||||
`${t('views.dataset.delete.confirmMessage1')} ${row.application_mapping_count} ${t('views.dataset.delete.confirmMessage2')}`,
|
||||
{
|
||||
confirmButtonText: t('common.delete'),
|
||||
confirmButtonText: t('common.confirm'),
|
||||
confirmButtonClass: 'danger'
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -713,7 +713,7 @@ function deleteMulDocument() {
|
|||
`${t('views.document.delete.confirmTitle1')} ${multipleSelection.value.length} ${t('views.document.delete.confirmTitle2')}`,
|
||||
t('views.document.delete.confirmMessage'),
|
||||
{
|
||||
confirmButtonText: t('common.delete'),
|
||||
confirmButtonText: t('common.confirm'),
|
||||
confirmButtonClass: 'danger'
|
||||
}
|
||||
)
|
||||
|
|
@ -749,7 +749,7 @@ function deleteDocument(row: any) {
|
|||
`${t('views.document.delete.confirmTitle3')} ${row.name} ?`,
|
||||
`${t('views.document.delete.confirmMessage1')} ${row.paragraph_count} ${t('views.document.delete.confirmMessage2')}`,
|
||||
{
|
||||
confirmButtonText: t('common.delete'),
|
||||
confirmButtonText: t('common.confirm'),
|
||||
confirmButtonClass: 'danger'
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ function deleteFunctionLib(row: any) {
|
|||
`${t('views.functionLib.delete.confirmTitle')}${row.name} ?`,
|
||||
t('views.functionLib.delete.confirmMessage'),
|
||||
{
|
||||
confirmButtonText: t('common.delete'),
|
||||
confirmButtonText: t('common.confirm'),
|
||||
cancelButtonText: t('common.cancel'),
|
||||
confirmButtonClass: 'danger'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ function deleteMulParagraph() {
|
|||
`${t('views.document.delete.confirmTitle1')} ${multipleSelection.value.length} ${t('views.document.delete.confirmTitle2')}`,
|
||||
t('views.paragraph.delete.confirmMessage'),
|
||||
{
|
||||
confirmButtonText: t('common.delete'),
|
||||
confirmButtonText: t('common.confirm'),
|
||||
confirmButtonClass: 'danger'
|
||||
}
|
||||
)
|
||||
|
|
@ -294,7 +294,7 @@ function deleteParagraph(row: any) {
|
|||
`${t('views.paragraph.delete.confirmTitle')} ${row.title || '-'} ?`,
|
||||
t('views.paragraph.delete.confirmMessage'),
|
||||
{
|
||||
confirmButtonText: t('common.delete'),
|
||||
confirmButtonText: t('common.confirm'),
|
||||
confirmButtonClass: 'danger'
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ function deleteProblem(row: any) {
|
|||
`${t('views.problem.delete.confirmTitle')} ${row.content} ?`,
|
||||
`${t('views.problem.delete.confirmMessage1')} ${row.paragraph_count} ${t('views.problem.delete.confirmMessage2')}`,
|
||||
{
|
||||
confirmButtonText: t('common.delete'),
|
||||
confirmButtonText: t('common.confirm'),
|
||||
confirmButtonClass: 'danger'
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ function deleteMember(row: TeamMember) {
|
|||
t('views.team.delete.confirmMessage'),
|
||||
|
||||
{
|
||||
confirmButtonText: t('views.team.delete.button'),
|
||||
confirmButtonText: t('common.confirm'),
|
||||
confirmButtonClass: 'danger'
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ const deleteModel = () => {
|
|||
t('views.template.delete.confirmTitle'),
|
||||
`${t('views.template.delete.confirmMessage')}${props.model.name} ?`,
|
||||
{
|
||||
confirmButtonText: t('common.delete'),
|
||||
confirmButtonText: t('common.confirm'),
|
||||
confirmButtonClass: 'danger'
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ function deleteUserManage(row: any) {
|
|||
`${t('views.user.delete.confirmTitle')}${row.username} ?`,
|
||||
t('views.user.delete.confirmMessage'),
|
||||
{
|
||||
confirmButtonText: t('common.delete'),
|
||||
confirmButtonText: t('common.confirm'),
|
||||
confirmButtonClass: 'danger'
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ const copyNode = () => {
|
|||
}
|
||||
const deleteNode = () => {
|
||||
MsgConfirm(t('common.tip'), t('views.applicationWorkflow.delete.confirmTitle'), {
|
||||
confirmButtonText: t('common.delete'),
|
||||
confirmButtonText: t('common.confirm'),
|
||||
confirmButtonClass: 'danger'
|
||||
}).then(() => {
|
||||
props.nodeModel.graphModel.deleteNode(props.nodeModel.id)
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ export function initDefaultShortcut(lf: LogicFlow, graph: GraphModel) {
|
|||
return
|
||||
}
|
||||
MsgConfirm(t('common.tip'), t('views.applicationWorkflow.delete.confirmTitle'), {
|
||||
confirmButtonText: t('common.delete'),
|
||||
confirmButtonText: t('common.confirm'),
|
||||
confirmButtonClass: 'danger'
|
||||
}).then(() => {
|
||||
if (!keyboardOptions?.enabled) return true
|
||||
|
|
|
|||
Loading…
Reference in New Issue