- Driver.js 라이브러리 설치 및 Vite 번들 등록 - SamOnboarding JS 모듈 작성 (가이드 정의/실행/상태저장) - 온보딩 도움말기능 관리 페이지 (데모 체험, 개발자 가이드) - RD 대시보드에 온보딩 가이드 시범 적용 - 메뉴 라우트 추가 (/rd/onboarding-guide)
23 lines
783 B
JavaScript
23 lines
783 B
JavaScript
import './bootstrap';
|
|
import htmx from 'htmx.org';
|
|
import { Capacitor } from '@capacitor/core';
|
|
import { PushNotifications } from '@capacitor/push-notifications';
|
|
import { driver } from 'driver.js';
|
|
import 'driver.js/dist/driver.css';
|
|
import { SamOnboarding } from './onboarding-guide';
|
|
|
|
// HTMX를 전역으로 설정
|
|
window.htmx = htmx;
|
|
|
|
// Driver.js + SAM 온보딩 전역 설정
|
|
window.driver = driver;
|
|
window.SamOnboarding = SamOnboarding;
|
|
|
|
// Capacitor 앱에서만 실행 (포그라운드 푸시 알림 소리)
|
|
if (Capacitor.isNativePlatform()) {
|
|
PushNotifications.addListener('pushNotificationReceived', (notification) => {
|
|
const audio = new Audio('/sounds/push_notification.wav');
|
|
audio.play().catch(e => console.log('Audio play failed:', e));
|
|
});
|
|
}
|