perf: Add confirmation dialog before syncing platform protocols

This commit is contained in:
w940853815
2025-11-04 15:04:40 +08:00
committed by wrd
parent 8d69418613
commit 4db8edce98

View File

@@ -143,7 +143,20 @@ export default {
disabled: !this.canEdit
},
callbacks: Object.freeze({
click: () => {
click: async () => {
try {
await this.$confirm(
this.$t('overwriteProtocolsAndPortsMsg'),
this.$t('Confirm'),
{
confirmButtonText: this.$t('Confirm'),
cancelButtonText: this.$t('Cancel'),
type: 'warning'
}
)
} catch (e) {
return
}
const data = { platform_id: this.object.id }
this.$axios.post(
'/api/v1/assets/assets/sync-platform-protocols/', data).then(res => {