Bỏ qua, đến nội dung

@digiforce-nc/plugin-digiforce-mobile

Plugin hỗ trợ mobile — tối ưu giao diện và trải nghiệm Digiforce cho thiết bị di động, bao gồm mobile layout, PWA, push notification và native app support.

Plugin này làm gì?

Giao diện desktop không phù hợp trên màn hình nhỏ. Plugin cung cấp mobile-optimized experience: layout responsive, bottom navigation, touch-friendly controls, PWA support (offline, add to home), và tích hợp push notification — biến Digiforce thành ứng dụng mobile native-like.

Sáu tính năng chính

#Tính năngChi tiết
1Mobile layoutLayout tối ưu cho màn hình nhỏ, tự detect viewport
2Bottom navigationThanh điều hướng dưới cùng (thay sidebar desktop)
3Touch gesturesSwipe left/right, pull-to-refresh, long press menu
4PWAProgressive Web App: offline cache, add to home screen, app-like UX
5Responsive formsForm tự điều chỉnh layout: stacked fields, larger touch targets
6Push notificationThông báo đẩy qua browser notification API

Kiến trúc

Phát hiện và chuyển đổi layout

PWA Service Worker

Tính năngChi tiết
Cache strategyNetwork-first cho API, cache-first cho static assets
OfflineHiển thị cached data khi mất mạng, queue request để sync lại
Install promptHiển thị "Add to Home Screen" khi user truy cập thường xuyên
Background syncSync queued data khi có mạng trở lại

Push notification flow

Thành phần client

Thành phầnMô tả
MobileLayoutLayout wrapper cho mobile (thay thế desktop layout)
BottomNavBarThanh điều hướng dưới cùng với icon + label
MobileFormRendererRender form tối ưu cho mobile (stacked, larger inputs)
PullToRefreshComponent kéo xuống để refresh danh sách
SwipeNavigatorĐiều hướng bằng swipe gesture
PWAInstallPromptPrompt cài đặt PWA lên home screen

Dependencies

PackageVai trò
@digiforce-nc/clientClient UI framework
@digiforce-nc/serverServer framework (push notification API)

Mục lục chi tiết

(Xem trang tổng quan ở trên)