fix(desktop): Payple 배포 완료 + billing URL 환경분기 + 세션만료 버그 수정
- OPEN_BILLING: app.isPackaged 기반 dev/prod URL 분기 - CloudSyncService: stored token 없을 때 auth-changed null emit 누락 수정 - Payple Edge Functions 3개 배포 ACTIVE 확인
This commit is contained in:
parent
ad058fbd4d
commit
68881bf0d0
3 changed files with 29 additions and 7 deletions
|
|
@ -1,7 +1,7 @@
|
|||
// src/main/ipc/license-handlers.ts
|
||||
// Phase 11: 라이센스 IPC 핸들러
|
||||
|
||||
import { ipcMain, BrowserWindow, shell } from 'electron'
|
||||
import { app, ipcMain, BrowserWindow, shell } from 'electron'
|
||||
import { IPC_CHANNELS } from '@d3ro/core/ipc-channels'
|
||||
import { ipcSuccess, ipcError, ErrorCode } from '@d3ro/core/errors'
|
||||
import { getLicenseService } from '../services/LicenseService'
|
||||
|
|
@ -100,9 +100,8 @@ export function registerLicenseHandlers(): void {
|
|||
|
||||
ipcMain.handle(IPC_CHANNELS.LICENSE.OPEN_BILLING, async (_event, params: { tier: 'pro' | 'pro_plus' }) => {
|
||||
try {
|
||||
// Phase 3.2-B: 웹 결제 페이지 열기
|
||||
// 프로덕션: https://d3ro.dev/billing, 개발: NEXT_PUBLIC_SITE_URL 참조
|
||||
const billingUrl = `https://d3ro.dev/billing?tier=${params.tier}`
|
||||
const baseUrl = app.isPackaged ? 'https://d3ro.dev' : 'http://localhost:3000'
|
||||
const billingUrl = `${baseUrl}/billing?tier=${params.tier}`
|
||||
await shell.openExternal(billingUrl)
|
||||
return ipcSuccess(undefined)
|
||||
} catch (err) {
|
||||
|
|
|
|||
|
|
@ -130,6 +130,9 @@ class CloudSyncService extends EventEmitter {
|
|||
})
|
||||
this.emit('auth-changed', { user: null })
|
||||
}
|
||||
} else {
|
||||
// 저장된 토큰 없음 → 미인증 상태를 렌더러에 명시 전달
|
||||
this.emit('auth-changed', { user: null })
|
||||
}
|
||||
|
||||
logger.info('CloudSyncService initialized')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue