iOS 이미지 저장 응답 구조 수정 및 로컬라이제이션 추가
- SaveImageResponse 인터페이스 수정: success/error 필드 제거, message 필드 추가
- 네이티브는 {success: true, data: {filePath, message}} 형태로 응답하지만
appBridge.sendMessage는 response.data만 반환하므로 인터페이스를 실제 반환값에 맞춤
- 이미지 저장 성공 체크 로직을 result?.success에서 result?.filePath로 변경
- 이미지 저장 관련 로컬라이제이션 키 추가 (imageSaved, imageSaveFailed, imageGenerationFailed)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -68,12 +68,12 @@ export const CashReceiptSample = ({
|
||||
mimeType: 'image/png'
|
||||
});
|
||||
|
||||
if (result?.success) {
|
||||
if (result?.filePath) {
|
||||
snackBar(t('common.imageSaved'), function(){
|
||||
onClickToClose();
|
||||
});
|
||||
} else {
|
||||
throw new Error(result?.error || 'Failed to save image');
|
||||
throw new Error('Failed to save image');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Native image save failed:', error);
|
||||
|
||||
@@ -59,12 +59,12 @@ export const DepositReceiptSample = ({
|
||||
mimeType: 'image/png'
|
||||
});
|
||||
|
||||
if (result?.success) {
|
||||
if (result?.filePath) {
|
||||
snackBar(t('common.imageSaved'), () => {
|
||||
onClickToClose();
|
||||
});
|
||||
} else {
|
||||
throw new Error(result?.error || 'Failed to save image');
|
||||
throw new Error('Failed to save image');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Native image save failed:', error);
|
||||
|
||||
@@ -60,12 +60,12 @@ export const TaxInvoiceSample = ({
|
||||
mimeType: 'image/png'
|
||||
});
|
||||
|
||||
if (result?.success) {
|
||||
if (result?.filePath) {
|
||||
snackBar(t('common.imageSaved'), function(){
|
||||
onClickToClose();
|
||||
});
|
||||
} else {
|
||||
throw new Error(result?.error || 'Failed to save image');
|
||||
throw new Error('Failed to save image');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Native image save failed:', error);
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
"image": "Image",
|
||||
"request": "Request",
|
||||
"imageRequested": "Image has been requested.",
|
||||
"imageSaved": "Image has been saved.",
|
||||
"imageSaveFailed": "Failed to save image.",
|
||||
"imageGenerationFailed": "Failed to generate image.",
|
||||
"selectDownloadMethod": "Select Download Method",
|
||||
"filter": "Filter",
|
||||
"download": "Download",
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
"image": "이미지",
|
||||
"request": "요청",
|
||||
"imageRequested": "이미지가 요청되었습니다.",
|
||||
"imageSaved": "이미지가 저장되었습니다.",
|
||||
"imageSaveFailed": "이미지 저장에 실패했습니다.",
|
||||
"imageGenerationFailed": "이미지 생성에 실패했습니다.",
|
||||
"selectDownloadMethod": "다운로드 방법 선택",
|
||||
"filter": "필터",
|
||||
"download": "다운로드",
|
||||
|
||||
@@ -130,7 +130,6 @@ export interface SaveImageRequest {
|
||||
}
|
||||
|
||||
export interface SaveImageResponse {
|
||||
success: boolean;
|
||||
filePath?: string; // 저장된 파일 경로
|
||||
error?: string;
|
||||
message?: string; // 성공/실패 메시지
|
||||
}
|
||||
Reference in New Issue
Block a user