- @capacitor/local-notifications 추가, src/native/reminders.js - 매일 설정 시각(기본 21시) 가계부 미기록 시 알림(오늘 기록하면 오늘자 제외, 7일 롤링) - 구독 해지 상태 만료 3일 전 알림 - 설정에 알림 받기 토글 + 시간 선택(앱에서만), 권한 요청 - 앱 시작/홈/내역에서 스케줄 보정 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+13
-1
@@ -10,6 +10,7 @@ import SignupModal from '@/components/SignupModal.vue'
|
||||
import WebOnlyNotice from '@/components/WebOnlyNotice.vue'
|
||||
import AppDialog from '@/components/ui/AppDialog.vue'
|
||||
import { Capacitor } from '@capacitor/core'
|
||||
import { reminders } from '@/native/reminders'
|
||||
import { useAuthStore } from '@/stores/auth'
|
||||
import { useUiStore } from '@/stores/ui'
|
||||
import { demo, exitDemo } from '@/demo'
|
||||
@@ -51,7 +52,18 @@ onMounted(() => {
|
||||
window.addEventListener('premium:required', onPremiumRequired)
|
||||
ui.loadSignupEnabled() // 회원가입 허용 여부 선로딩(랜딩/로그인 가입 버튼에 반영)
|
||||
// 로그인 상태면 전체 프로필(아바타·포인트) 최신화 — 재로그인 없이 헤더 아바타 반영
|
||||
if (auth.isAuthenticated) auth.refreshProfile()
|
||||
if (auth.isAuthenticated) {
|
||||
auth.refreshProfile().then(() => {
|
||||
if (reminders.isNative()) {
|
||||
reminders.scheduleExpiryReminder({
|
||||
premium: auth.isPremium,
|
||||
autoRenew: !!auth.user?.planAutoRenew,
|
||||
expiresAt: auth.user?.planExpiresAt,
|
||||
})
|
||||
}
|
||||
})
|
||||
if (reminders.isNative()) reminders.scheduleEntryReminder(false) // 오늘 기록 여부는 홈/내역에서 보정
|
||||
}
|
||||
})
|
||||
onUnmounted(() => {
|
||||
window.removeEventListener('auth:unauthorized', onUnauthorized)
|
||||
|
||||
Reference in New Issue
Block a user