feat(ui): modals close only via Esc/X/cancel; standard 3:1 form cover processing
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue';
|
||||
import { useEscClose } from '@/lib/modal-stack';
|
||||
import { matchesSearch } from '@/lib/search';
|
||||
import TableColumnsMenu from '@/components/TableColumnsMenu.vue';
|
||||
import axios from 'axios';
|
||||
@@ -290,6 +291,9 @@ function askRemove(row: MessageAutomationRuleDto) {
|
||||
pendingDelete.value = row;
|
||||
}
|
||||
|
||||
useEscClose(() => fieldsSheet.value, () => { fieldsSheet.value = false; });
|
||||
useEscClose(() => pendingDelete.value, () => cancelRemove());
|
||||
|
||||
function cancelRemove() {
|
||||
pendingDelete.value = null;
|
||||
}
|
||||
@@ -1050,7 +1054,7 @@ onUnmounted(() => {
|
||||
</form>
|
||||
|
||||
<div v-if="fieldsSheet" class="sheet-layer">
|
||||
<button class="dim" type="button" aria-label="بستن" @click="fieldsSheet = false" />
|
||||
<div class="dim" aria-hidden="true" />
|
||||
<section class="sheet" role="dialog" aria-modal="true" aria-label="فهرست فیلدها">
|
||||
<header>
|
||||
<h3>فهرست فیلدهای پویا</h3>
|
||||
@@ -1158,7 +1162,7 @@ onUnmounted(() => {
|
||||
</div>
|
||||
|
||||
<div v-if="pendingDelete" class="sheet-layer">
|
||||
<button class="dim" type="button" aria-label="انصراف" @click="cancelRemove" />
|
||||
<div class="dim" aria-hidden="true" />
|
||||
<section class="confirm-box" role="dialog" aria-modal="true" aria-labelledby="delete-confirm-title">
|
||||
<h3 id="delete-confirm-title">حذف قانون</h3>
|
||||
<p>آیا از حذف مطمئن هستید؟</p>
|
||||
|
||||
Reference in New Issue
Block a user