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, onMounted, ref, watch } from 'vue';
|
||||
import { useEscClose } from '@/lib/modal-stack';
|
||||
import { matchesSearch } from '@/lib/search';
|
||||
import TableColumnsMenu from '@/components/TableColumnsMenu.vue';
|
||||
import { PAGE_SIZE_OPTIONS, usePageSize } from '@/lib/pageSize';
|
||||
@@ -81,6 +82,7 @@ const pageSize = usePageSize('invoices', 10);
|
||||
const selected = ref<Set<string>>(new Set());
|
||||
const menuId = ref<string | null>(null);
|
||||
const filterSheet = ref(false);
|
||||
useEscClose(() => filterSheet.value, () => { filterSheet.value = false; });
|
||||
const addOpen = ref(false);
|
||||
const invoiceModal = ref<{ kind: 'invoice' | 'credit' | 'quote' } | null>(null);
|
||||
|
||||
@@ -617,10 +619,10 @@ onMounted(load);
|
||||
/>
|
||||
</UiModal>
|
||||
|
||||
<div v-if="filterSheet" class="sheet-backdrop" @click="filterSheet = false">
|
||||
<div class="sheet" @click.stop>
|
||||
<div v-if="filterSheet" class="sheet-backdrop">
|
||||
<div class="sheet" role="dialog" aria-modal="true" aria-label="فیلترها">
|
||||
<header>
|
||||
<button type="button" class="icon-btn" @click="filterSheet = false">
|
||||
<button type="button" class="icon-btn" aria-label="بستن (Esc)" title="بستن (Esc)" @click="filterSheet = false">
|
||||
<UiIcon name="x" :size="18" />
|
||||
</button>
|
||||
<button type="button" class="link" @click="clearFilters">حذف همه</button>
|
||||
|
||||
Reference in New Issue
Block a user