feat(mobile): mobile-responsive UI — bottom tab bar, bottom-sheet dialogs, PWA
All changes are gated behind max-md:/md:hidden so the >=768px desktop layout is untouched (verified with lint + build + live checks at 375px). - globals.css: one mobile block — 16px inputs (no iOS auto-zoom), units sidebar stacks above content, wizard item rows become 2-col (text fields full-width, delete button full-width), dd-panels / flow diagram / conv-form stack, larger touch targets - ui/dialog.tsx: dialogs become full-width bottom sheets on mobile (all modals inherit it); desktop keeps the centered dialog - Header: sticky on mobile only + PageLayout bottom clearance - New MobileTabBar: role-aware bottom tabs (office admin/manager, inventory PM, inventory admin); hidden on /wizard - Wizard step 4: TouchSensor (150ms delay) so touch drag works without stealing scroll - JalaliDatePicker: dropdown capped to viewport; bigger day cells and time inputs on mobile - PWA: manifest.webmanifest + 192/512 icons (scripts/gen-pwa-icons.ps1) + theme-color/manifest links in index.html - New docs/mobile-responsive.md documenting the full change set
This commit is contained in:
@@ -693,3 +693,96 @@ button:disabled {
|
||||
.ph-empty-text {
|
||||
@apply text-[13px] text-muted;
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
موبایل — فقط زیر 768px؛ دسکتاپ هرگز این استایلها را نمیبیند
|
||||
============================================================ */
|
||||
@media (max-width: 767.98px) {
|
||||
/* جلوگیری از زوم خودکار iOS: ورودیها حداقل ۱۶px */
|
||||
input:not([type="checkbox"]):not([type="radio"]),
|
||||
select,
|
||||
textarea {
|
||||
font-size: 16px !important;
|
||||
}
|
||||
|
||||
/* واحدها: سایدبار دستهها بالای پنل محتوا قرار میگیرد */
|
||||
.units-layout {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
/* ردیف اقلام ویزارد: هدر ستونها حذف (placeholderها برچسباند)؛
|
||||
فیلدهای متنی تمامعرض، عددها دوستونه، دکمهی حذف تمامعرض */
|
||||
.item-row-head {
|
||||
display: none;
|
||||
}
|
||||
.wizard-item-row {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
row-gap: 0.5rem;
|
||||
}
|
||||
.wizard-item-row > :nth-child(-n + 3) {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
.wizard-item-row > :last-child {
|
||||
grid-column: 1 / -1;
|
||||
justify-self: center;
|
||||
min-width: 44px;
|
||||
min-height: 40px;
|
||||
}
|
||||
|
||||
/* پنلهای درگاندروپ پروژهها (مرحله ۴): تکستونه */
|
||||
.dd-panels {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
/* نمودار جریان: باکسها روی هم؛ خطوط اتصال روی موبایل معنی ندارند */
|
||||
.flow-cols {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
.flow-lines {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* فرم تبدیل واحد: ستونی */
|
||||
.conv-form {
|
||||
grid-template-columns: 1fr;
|
||||
align-items: stretch;
|
||||
}
|
||||
.conv-row {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
/* اهداف لمسی بزرگتر (دستکم ~۴۰px) */
|
||||
.chip {
|
||||
padding-inline: 0.85rem;
|
||||
padding-block: 0.55rem;
|
||||
}
|
||||
.quick-chip {
|
||||
padding-block: 0.55rem;
|
||||
}
|
||||
.spec-chip {
|
||||
padding-inline: 0.65rem;
|
||||
padding-block: 0.4rem;
|
||||
}
|
||||
.dd-item {
|
||||
padding-block: 0.65rem;
|
||||
}
|
||||
.ut-cat {
|
||||
padding-block: 0.65rem;
|
||||
}
|
||||
.btn-line-file {
|
||||
padding-block: 0.6rem;
|
||||
}
|
||||
.spec-chip-x,
|
||||
.dd-tag-x,
|
||||
.inv-x,
|
||||
.ms-x,
|
||||
.variant-x,
|
||||
.file-x,
|
||||
.sup-del {
|
||||
padding: 0.4rem;
|
||||
}
|
||||
.conv-actions button {
|
||||
padding: 0.45rem;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user