Skip to content

Commit

Permalink
設定リセットボタン追加
Browse files Browse the repository at this point in the history
  • Loading branch information
tegnike committed Sep 16, 2024
1 parent 2ea3984 commit 1ec7487
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
"PdfConvertSuccess": "Conversion completed",
"PdfConvertError": "Conversion failed",
"PdfConvertSubmitError": "Please make sure the PDF file, folder name, and API key are set.",
"LocalStorageReset": "Reset settings (page will be reloaded)",
"Errors": {
"EmptyAPIKey": "API key is not set",
"AIInvalidProperty": "AI service settings are incorrect",
Expand Down
1 change: 1 addition & 0 deletions locales/ja/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
"PdfConvertSuccess": "変換が完了しました",
"PdfConvertError": "変換に失敗しました",
"PdfConvertSubmitError": "PDFファイル、フォルダ名、APIキーが設定されているか確認をしてください",
"LocalStorageReset": "設定をリセットする(ページが再読み込みされます)",
"Errors": {
"EmptyAPIKey": "APIキーが設定されていません",
"AIInvalidProperty": "AIサービスの設定値が正しくありません",
Expand Down
1 change: 1 addition & 0 deletions locales/ko/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
"PdfConvertSuccess": "변환 완료",
"PdfConvertError": "변환 실패",
"PdfConvertSubmitError": "PDF 파일, 폴더 이름, API 키가 설정되어 있는지 확인하세요.",
"LocalStorageReset": "설정을 재설정합니다 (페이지가 다시 로드됩니다)",
"Errors": {
"EmptyAPIKey": "API 키가 설정되지 않았습니다",
"AIInvalidProperty": "AI 서비스 설정값이 올바르지 않습니다",
Expand Down
1 change: 1 addition & 0 deletions locales/zh/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
"PdfConvertSuccess": "转换完成",
"PdfConvertError": "转换失败",
"PdfConvertSubmitError": "请确保已设置PDF文件、文件夹名称和API密钥。",
"LocalStorageReset": "重設設定(頁面會重新載入)",
"Errors": {
"EmptyAPIKey": "API 密钥未设置",
"AIInvalidProperty": "AI 服务设置值不正确",
Expand Down
10 changes: 10 additions & 0 deletions src/components/settings/advancedSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ const AdvancedSettings = () => {

return (
<div className="my-40">
<div className="my-40 grid-cols-2">
<TextButton
onClick={() => {
settingsStore.persist.clearStorage()
window.location.reload()
}}
>
{t('LocalStorageReset')}
</TextButton>
</div>
<Disclosure>
{({ open }) => (
<>
Expand Down

0 comments on commit 1ec7487

Please sign in to comment.