mirror of https://github.com/certd/certd
perf: 通知和定时器的删除按钮显示为红色更显眼
parent
6369fed5fc
commit
61ba83c775
|
@ -3,7 +3,7 @@
|
|||
<template #title>
|
||||
<div>
|
||||
{{ t("certd.edit_notification") }}
|
||||
<a-button v-if="mode === 'edit'" @click="notificationDelete()">
|
||||
<a-button v-if="mode === 'edit'" danger @click="notificationDelete()">
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
</template>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<template #title>
|
||||
<div>
|
||||
编辑任务
|
||||
<a-button v-if="editMode" @click="taskDelete()">
|
||||
<a-button v-if="editMode" danger @click="taskDelete()">
|
||||
<template #icon><DeleteOutlined /></template>
|
||||
</a-button>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<template #title>
|
||||
<div>
|
||||
{{ t("certd.editTrigger") }}
|
||||
<a-button v-if="mode === 'edit'" @click="triggerDelete()">
|
||||
<a-button v-if="mode === 'edit'" danger @click="triggerDelete()">
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
</template>
|
||||
|
|
|
@ -302,6 +302,7 @@ import { eachSteps, findStep } from "../utils";
|
|||
import { usePluginStore } from "/@/store/plugin";
|
||||
import { getCronNextTimes } from "/@/components/cron-editor/utils";
|
||||
import { useCertViewer } from "/@/views/certd/pipeline/use";
|
||||
import { useI18n } from "/@/locales";
|
||||
|
||||
export default defineComponent({
|
||||
name: "PipelineEdit",
|
||||
|
@ -339,6 +340,7 @@ export default defineComponent({
|
|||
},
|
||||
emits: ["update:modelValue", "update:editMode"],
|
||||
setup(props, ctx) {
|
||||
const { t } = useI18n();
|
||||
const currentPipeline: Ref<any> = ref({});
|
||||
const pipeline: Ref<any> = ref({});
|
||||
|
||||
|
@ -668,9 +670,19 @@ export default defineComponent({
|
|||
notificationFormRef.value.notificationView(notification, (type: string, value: any) => {});
|
||||
}
|
||||
};
|
||||
const notificationDelete = (notification: any, index: any) => {
|
||||
Modal.confirm({
|
||||
title: t("certd.confirm"),
|
||||
content: t("certd.confirm_delete_trigger"),
|
||||
async onOk() {
|
||||
pipeline.value.notifications.splice(index, 1);
|
||||
},
|
||||
});
|
||||
};
|
||||
return {
|
||||
notificationAdd,
|
||||
notificationEdit,
|
||||
notificationDelete,
|
||||
notificationFormRef,
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue