From 5f766a74bf1c096d3b3b790f48c703137b8243fe Mon Sep 17 00:00:00 2001 From: rhea-so Date: Thu, 2 May 2024 01:54:33 +0900 Subject: [PATCH] fix: Metadata bug --- web/package.json | 2 +- web/src/core/photo.ts | 3 ++ web/src/locales/translations/en.json | 2 ++ web/src/locales/translations/ja.json | 2 ++ web/src/locales/translations/ko.json | 2 ++ .../setting/components/sponsors.list-item.tsx | 13 ++++++++ web/src/pages/setting/page.tsx | 2 ++ web/src/pages/sponsors.tsx | 30 +++++++++++++++++++ web/src/router.tsx | 2 ++ 9 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 web/src/pages/setting/components/sponsors.list-item.tsx create mode 100644 web/src/pages/sponsors.tsx diff --git a/web/package.json b/web/package.json index 18c58df..96bbf75 100644 --- a/web/package.json +++ b/web/package.json @@ -1,5 +1,5 @@ { - "version": "0.4.61", + "version": "0.4.62", "type": "module", "scripts": { "dev": "vite", diff --git a/web/src/core/photo.ts b/web/src/core/photo.ts index b0a9a80..b1e9526 100644 --- a/web/src/core/photo.ts +++ b/web/src/core/photo.ts @@ -38,6 +38,7 @@ class Photo { * @example 'SONY' */ public get make(): string { + if (localStorage.getItem('showCameraMaker') === 'false') return ''; return localStorage.getItem('overrideCameraMaker') || this.metadata.make || ''; } @@ -46,6 +47,7 @@ class Photo { * @example 'ILCE-7M3' */ public get model(): string { + if (localStorage.getItem('showCameraModel') === 'false') return ''; return localStorage.getItem('overrideCameraModel') || this.metadata.model || ''; } @@ -54,6 +56,7 @@ class Photo { * @example 'FE 24-105mm F4 G OSS' */ public get lensModel(): string { + if (localStorage.getItem('showLensModel') === 'false') return ''; return localStorage.getItem('overrideLensModel') || this.metadata.lensModel || ''; } diff --git a/web/src/locales/translations/en.json b/web/src/locales/translations/en.json index abc5c2f..108defb 100644 --- a/web/src/locales/translations/en.json +++ b/web/src/locales/translations/en.json @@ -1,4 +1,5 @@ { + "thank-you-for-your-support": "Thank you for your support", "refresh": "Refresh", "click-to-refresh": "Click to refresh", "back": "Back", @@ -41,6 +42,7 @@ "root.sponsor": "Sponsor (GitHub)", "root.sponsor-kakaopay": "Sponsor (KakaoPay)", "root.sponsor-kakaopay-description": "Your donation will be used for Apple Developer Account renewal, coffee purchase for development, etc. Please include your nickname and donation amount in the email after donation. We will list the names of donors as a token of appreciation.", + "root.sponsors": "Sponsors", "root.processing": "it may take a long time depending on device specifications.", "root.releases": "Releases", "root.override-metadata": "Override EXIF Metadata", diff --git a/web/src/locales/translations/ja.json b/web/src/locales/translations/ja.json index ebdfdc6..174842f 100644 --- a/web/src/locales/translations/ja.json +++ b/web/src/locales/translations/ja.json @@ -1,4 +1,5 @@ { + "thank-you-for-your-support": "ご支援ありがとうございます", "refresh": "リフレッシュ", "click-to-refresh": "クリックしてリフレッシュ", "back": "戻る", @@ -41,6 +42,7 @@ "root.sponsor": "スポンサー(GitHub)", "root.sponsor-kakaopay": "スポンサー(カカオペイ)", "root.sponsor-kakaopay-description": "後援していただいた金額はApple開発者アカウントの更新、開発に役立つコーヒーの購入などに使用されます。後援後、ニックネームと後援金額をメールに含めてご連絡ください。後援していただいた方々には、感謝の印として後援者リストに名前を掲載いたします。", + "root.sponsors": "スポンサー", "root.processing": "機器の仕様によっては、時間がかかる場合があります。", "root.releases": "配布内訳", "root.override-metadata": "メタデータを上書き", diff --git a/web/src/locales/translations/ko.json b/web/src/locales/translations/ko.json index 55e3e70..33b16fd 100644 --- a/web/src/locales/translations/ko.json +++ b/web/src/locales/translations/ko.json @@ -1,4 +1,5 @@ { + "thank-you-for-your-support": "개발을 지원해주셔서 감사합니다! 여러분의 도움 덕분에 개발을 지속할 수 있습니다.", "refresh": "새로고침", "click-to-refresh": "새로고침하려면 클릭하세요", "back": "뒤로가기", @@ -41,6 +42,7 @@ "root.sponsor": "깃허브로 후원하기", "root.sponsor-kakaopay": "카카오페이로 후원하기", "root.sponsor-kakaopay-description": "후원해주신 금액은 Apple 개발자 계정 연장, 개발에 도움이 되는 커피 구매 등으로 사용됩니다. 후원 후 닉네임과 후원 금액을 이메일에 포함하여 help@yuru.cam으로 연락주세요. 후원해주신 분들에게는 감사의 표시로 후원자 목록에 이름을 올려드립니다.", + "root.sponsors": "후원자 목록", "root.processing": "기기 사양에 따라 시간이 오래 걸릴 수 있습니다.", "root.releases": "배포 내역", "root.override-metadata": "메타데이터 강제 변경", diff --git a/web/src/pages/setting/components/sponsors.list-item.tsx b/web/src/pages/setting/components/sponsors.list-item.tsx new file mode 100644 index 0000000..fad4c1e --- /dev/null +++ b/web/src/pages/setting/components/sponsors.list-item.tsx @@ -0,0 +1,13 @@ +import { ListItem } from 'konsta/react'; +import { useTranslation } from 'react-i18next'; +import { useNavigate } from 'react-router-dom'; +import SponsorsIcon from '../../../icons/sponsors.icon'; + +const SponsorsListItem = () => { + const navigate = useNavigate(); + const { t } = useTranslation(); + + return } title={t('root.sponsors')} link onClick={() => navigate('/sponsors')} />; +}; + +export default SponsorsListItem; diff --git a/web/src/pages/setting/page.tsx b/web/src/pages/setting/page.tsx index 903476e..2427a0e 100644 --- a/web/src/pages/setting/page.tsx +++ b/web/src/pages/setting/page.tsx @@ -28,6 +28,7 @@ import TermAndConditionsListItem from './components/term-and-conditions.list-ite import PrivacyPolicyListItem from './components/privacy-policy.list-item'; import { useStore } from '../../store'; import SponsorKakaopayListItem from './components/sponsor-kakaopay.list-item'; +import SponsorsListItem from './components/sponsors.list-item'; const ExportSettingsPage = () => { const { t } = useTranslation(); @@ -72,6 +73,7 @@ const ExportSettingsPage = () => { + diff --git a/web/src/pages/sponsors.tsx b/web/src/pages/sponsors.tsx new file mode 100644 index 0000000..edb9f99 --- /dev/null +++ b/web/src/pages/sponsors.tsx @@ -0,0 +1,30 @@ +import { Block, BlockTitle, Navbar, NavbarBackLink, Page } from 'konsta/react'; +import { useTranslation } from 'react-i18next'; +import { useNavigate } from 'react-router-dom'; + +const SponsorsPage = () => { + const navigator = useNavigate(); + const { t } = useTranslation(); + + return ( + <> + + navigator(-1)} />} /> + + {t('thank-you-for-your-support')} + +
  • 자바시티
  • {/* 2024-05-02 KakaoPay */} +
  • doer
  • {/* 2024-05-02 KakaoPay */} +
  • 행복한삐에로
  • {/* 2024-05-02 KakaoPay */} +
  • Conan
  • {/* 2024-05-02 KakaoPay */} +
    + + +

    {t('root.sponsor-kakaopay-description')}

    +
    +
    + + ); +}; + +export default SponsorsPage; diff --git a/web/src/router.tsx b/web/src/router.tsx index 45de314..f4aaef9 100644 --- a/web/src/router.tsx +++ b/web/src/router.tsx @@ -5,6 +5,7 @@ import ExportSettingsPage from './pages/setting/page'; import ThemeSettingsPage from './pages/theme/page'; import { useStore } from './store'; import FramePage from './pages/convert/page'; +import SponsorsPage from './pages/sponsors'; const Router = () => { const { tabIndex } = useStore(); @@ -24,6 +25,7 @@ const Router = () => { /> } /> } /> + } /> );