2025-11-20 16:24:40 +09:00
|
|
|
import './bootstrap';
|
|
|
|
|
import htmx from 'htmx.org';
|
2025-12-23 08:49:07 +09:00
|
|
|
import { Capacitor } from '@capacitor/core';
|
|
|
|
|
import { PushNotifications } from '@capacitor/push-notifications';
|
2025-11-20 16:24:40 +09:00
|
|
|
|
|
|
|
|
// HTMX를 전역으로 설정
|
|
|
|
|
window.htmx = htmx;
|
2025-12-23 08:49:07 +09:00
|
|
|
|
|
|
|
|
// 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));
|
|
|
|
|
});
|
|
|
|
|
}
|