chore: land in-progress workspace changes before 1.16.2
The tree carried uncommitted work from several areas (web push, mobile screens, admin charts, test-hygiene cleanup, CI and map docs). It is landed as one commit so the release pipeline can start from a clean tree; the desktop transcript-correction behaviour shipped in the previous commit and is unchanged here.
This commit is contained in:
parent
9c2b6a9782
commit
7fe49c437e
144 changed files with 3760 additions and 4523 deletions
|
|
@ -6,8 +6,7 @@ import { existsSync, readdirSync } from 'node:fs'
|
|||
import { dirname, join } from 'node:path'
|
||||
import { app, dialog } from 'electron'
|
||||
import { getLogger } from './LoggerService'
|
||||
import { configGet } from './ConfigService'
|
||||
import { getMainWindow } from '../windows/WindowManager'
|
||||
import { getMainWindow, getPopupTranslator } from '../windows/WindowManager'
|
||||
import { UPDATE_FEED_URL, UPDATE_POLICY_URL, versionedManifestUrl } from '../update-feed'
|
||||
import { verifyDownloadedUpdate } from '../update-signature'
|
||||
import { DEFAULT_UPDATE_POLICY, parseUpdatePolicy, type UpdatePolicy } from '../update-policy'
|
||||
|
|
@ -195,12 +194,8 @@ export function createRemotePolicySource(
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* electron dialog 기반 프롬프터.
|
||||
* TODO(i18n): 문구가 아직 ko/en 인라인이다 — update.* 키를 locale 파일에 추가한 뒤 t() 로 옮긴다.
|
||||
*/
|
||||
/** electron dialog 기반 프롬프터. 문구는 현재 앱 로케일의 update.dialog.* 키에서 가져온다. */
|
||||
export function createDialogPrompter(): UpdatePrompter {
|
||||
const isKorean = (): boolean => (configGet('language') as string | undefined)?.startsWith('ko') ?? true
|
||||
const show = async (options: Electron.MessageBoxOptions): Promise<number> => {
|
||||
const win = getMainWindow()
|
||||
const { response } =
|
||||
|
|
@ -212,22 +207,19 @@ export function createDialogPrompter(): UpdatePrompter {
|
|||
|
||||
return {
|
||||
async askConsent({ version, releaseNotes, mandatory }): Promise<ConsentAnswer> {
|
||||
const isKo = isKorean()
|
||||
const notesText = typeof releaseNotes === 'string' ? `\n\n[주요 변경사항]\n${releaseNotes}` : ''
|
||||
const mandatoryNote = mandatory
|
||||
? isKo
|
||||
? '\n\n이 업데이트는 필수입니다 (지원 종료 버전).'
|
||||
: '\n\nThis update is required (end of support).'
|
||||
: ''
|
||||
const t = getPopupTranslator()
|
||||
const notesText =
|
||||
typeof releaseNotes === 'string'
|
||||
? `\n\n${t('update.dialog.releaseNotesHeading')}\n${releaseNotes}`
|
||||
: ''
|
||||
const mandatoryNote = mandatory ? `\n\n${t('update.dialog.mandatoryNote')}` : ''
|
||||
|
||||
if (mandatory) {
|
||||
const response = await show({
|
||||
type: 'info',
|
||||
title: isKo ? '필수 업데이트' : 'Required Update',
|
||||
message: isKo
|
||||
? `D3RO Voice v${version} 업데이트가 필요합니다.${mandatoryNote}${notesText}`
|
||||
: `D3RO Voice v${version} is required.${mandatoryNote}${notesText}`,
|
||||
buttons: isKo ? ['지금 업데이트'] : ['Update Now'],
|
||||
title: t('update.dialog.requiredTitle'),
|
||||
message: `${t('update.dialog.requiredMessage', { version })}${mandatoryNote}${notesText}`,
|
||||
buttons: [t('update.dialog.updateNow')],
|
||||
defaultId: 0,
|
||||
cancelId: -1,
|
||||
})
|
||||
|
|
@ -236,13 +228,13 @@ export function createDialogPrompter(): UpdatePrompter {
|
|||
|
||||
const response = await show({
|
||||
type: 'info',
|
||||
title: isKo ? '새 버전 업데이트' : 'Software Update',
|
||||
message: isKo
|
||||
? `D3RO Voice v${version} 새 버전이 출시되었습니다. 지금 다운로드할까요?${notesText}`
|
||||
: `A new version of D3RO Voice (v${version}) is available. Would you like to download it now?${notesText}`,
|
||||
buttons: isKo
|
||||
? ['지금 다운로드', '나중에', '이 버전 건너뛰기']
|
||||
: ['Download Now', 'Later', 'Skip This Version'],
|
||||
title: t('update.dialog.availableTitle'),
|
||||
message: `${t('update.dialog.availableMessage', { version })}${notesText}`,
|
||||
buttons: [
|
||||
t('update.dialog.downloadNow'),
|
||||
t('update.dialog.later'),
|
||||
t('update.dialog.skipVersion'),
|
||||
],
|
||||
defaultId: 0,
|
||||
cancelId: 1,
|
||||
})
|
||||
|
|
@ -252,16 +244,14 @@ export function createDialogPrompter(): UpdatePrompter {
|
|||
},
|
||||
|
||||
async askRestart(version, { mandatory }): Promise<RestartAnswer> {
|
||||
const isKo = isKorean()
|
||||
const t = getPopupTranslator()
|
||||
if (mandatory) {
|
||||
// 필수 업데이트는 미룰 수 없다 — 작업을 마칠 시간만 주고, 닫아도 재시작한다.
|
||||
await show({
|
||||
type: 'warning',
|
||||
title: isKo ? '필수 업데이트 설치' : 'Required Update',
|
||||
message: isKo
|
||||
? `D3RO Voice v${version} 필수 업데이트가 준비되었습니다. 확인을 누르면 앱을 재시작하여 설치합니다.`
|
||||
: `Required update D3RO Voice v${version} is ready. The app will restart to install it when you continue.`,
|
||||
buttons: isKo ? ['지금 재시작 및 설치'] : ['Restart & Install Now'],
|
||||
title: t('update.dialog.requiredInstallTitle'),
|
||||
message: t('update.dialog.requiredRestartMessage', { version }),
|
||||
buttons: [t('update.dialog.restartInstallNow')],
|
||||
defaultId: 0,
|
||||
cancelId: 0,
|
||||
})
|
||||
|
|
@ -269,11 +259,9 @@ export function createDialogPrompter(): UpdatePrompter {
|
|||
}
|
||||
const response = await show({
|
||||
type: 'info',
|
||||
title: isKo ? '업데이트 준비 완료' : 'Update Ready',
|
||||
message: isKo
|
||||
? `D3RO Voice v${version} 다운로드가 완료되었습니다. 지금 앱을 재시작하여 설치를 완료할까요?`
|
||||
: `D3RO Voice v${version} has been downloaded. Restart now to complete installation?`,
|
||||
buttons: isKo ? ['지금 재시작 및 설치', '종료 시 자동 설치'] : ['Restart & Install Now', 'Install on Exit'],
|
||||
title: t('update.dialog.readyTitle'),
|
||||
message: t('update.dialog.readyMessage', { version }),
|
||||
buttons: [t('update.dialog.restartInstallNow'), t('update.dialog.installOnExit')],
|
||||
defaultId: 0,
|
||||
cancelId: 1,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue