Skip to content

Commit

Permalink
fix: Metadata bug (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhea-so committed May 1, 2024
2 parents 26bbf02 + 5f766a7 commit ba24351
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 1 deletion.
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.4.61",
"version": "0.4.62",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
3 changes: 3 additions & 0 deletions web/src/core/photo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 || '';
}

Expand All @@ -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 || '';
}

Expand All @@ -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 || '';
}

Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/translations/en.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"thank-you-for-your-support": "Thank you for your support",
"refresh": "Refresh",
"click-to-refresh": "Click to refresh",
"back": "Back",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/translations/ja.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"thank-you-for-your-support": "ใ”ๆ”ฏๆดใ‚ใ‚ŠใŒใจใ†ใ”ใ–ใ„ใพใ™",
"refresh": "ใƒชใƒ•ใƒฌใƒƒใ‚ทใƒฅ",
"click-to-refresh": "ใ‚ฏใƒชใƒƒใ‚ฏใ—ใฆใƒชใƒ•ใƒฌใƒƒใ‚ทใƒฅ",
"back": "ๆˆปใ‚‹",
Expand Down Expand Up @@ -41,6 +42,7 @@
"root.sponsor": "ใ‚นใƒใƒณใ‚ตใƒผ๏ผˆGitHub๏ผ‰",
"root.sponsor-kakaopay": "ใ‚นใƒใƒณใ‚ตใƒผ๏ผˆใ‚ซใ‚ซใ‚ชใƒšใ‚ค๏ผ‰",
"root.sponsor-kakaopay-description": "ๅพŒๆดใ—ใฆใ„ใŸใ ใ„ใŸ้‡‘้กใฏApple้–‹็™บ่€…ใ‚ขใ‚ซใ‚ฆใƒณใƒˆใฎๆ›ดๆ–ฐใ€้–‹็™บใซๅฝน็ซ‹ใคใ‚ณใƒผใƒ’ใƒผใฎ่ณผๅ…ฅใชใฉใซไฝฟ็”จใ•ใ‚Œใพใ™ใ€‚ๅพŒๆดๅพŒใ€ใƒ‹ใƒƒใ‚ฏใƒใƒผใƒ ใจๅพŒๆด้‡‘้กใ‚’ใƒกใƒผใƒซใซๅซใ‚ใฆใ”้€ฃ็ตกใใ ใ•ใ„ใ€‚ๅพŒๆดใ—ใฆใ„ใŸใ ใ„ใŸๆ–นใ€…ใซใฏใ€ๆ„Ÿ่ฌใฎๅฐใจใ—ใฆๅพŒๆด่€…ใƒชใ‚นใƒˆใซๅๅ‰ใ‚’ๆŽฒ่ผ‰ใ„ใŸใ—ใพใ™ใ€‚",
"root.sponsors": "ใ‚นใƒใƒณใ‚ตใƒผ",
"root.processing": "ๆฉŸๅ™จใฎไป•ๆง˜ใซใ‚ˆใฃใฆใฏใ€ๆ™‚้–“ใŒใ‹ใ‹ใ‚‹ๅ ดๅˆใŒใ‚ใ‚Šใพใ™ใ€‚",
"root.releases": "้…ๅธƒๅ†…่จณ",
"root.override-metadata": "ใƒกใ‚ฟใƒ‡ใƒผใ‚ฟใ‚’ไธŠๆ›ธใ",
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/translations/ko.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"thank-you-for-your-support": "๊ฐœ๋ฐœ์„ ์ง€์›ํ•ด์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค! ์—ฌ๋Ÿฌ๋ถ„์˜ ๋„์›€ ๋•๋ถ„์— ๊ฐœ๋ฐœ์„ ์ง€์†ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.",
"refresh": "์ƒˆ๋กœ๊ณ ์นจ",
"click-to-refresh": "์ƒˆ๋กœ๊ณ ์นจํ•˜๋ ค๋ฉด ํด๋ฆญํ•˜์„ธ์š”",
"back": "๋’ค๋กœ๊ฐ€๊ธฐ",
Expand Down Expand Up @@ -41,6 +42,7 @@
"root.sponsor": "๊นƒํ—ˆ๋ธŒ๋กœ ํ›„์›ํ•˜๊ธฐ",
"root.sponsor-kakaopay": "์นด์นด์˜คํŽ˜์ด๋กœ ํ›„์›ํ•˜๊ธฐ",
"root.sponsor-kakaopay-description": "ํ›„์›ํ•ด์ฃผ์‹  ๊ธˆ์•ก์€ Apple ๊ฐœ๋ฐœ์ž ๊ณ„์ • ์—ฐ์žฅ, ๊ฐœ๋ฐœ์— ๋„์›€์ด ๋˜๋Š” ์ปคํ”ผ ๊ตฌ๋งค ๋“ฑ์œผ๋กœ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ํ›„์› ํ›„ ๋‹‰๋„ค์ž„๊ณผ ํ›„์› ๊ธˆ์•ก์„ ์ด๋ฉ”์ผ์— ํฌํ•จํ•˜์—ฌ [email protected]์œผ๋กœ ์—ฐ๋ฝ์ฃผ์„ธ์š”. ํ›„์›ํ•ด์ฃผ์‹  ๋ถ„๋“ค์—๊ฒŒ๋Š” ๊ฐ์‚ฌ์˜ ํ‘œ์‹œ๋กœ ํ›„์›์ž ๋ชฉ๋ก์— ์ด๋ฆ„์„ ์˜ฌ๋ ค๋“œ๋ฆฝ๋‹ˆ๋‹ค.",
"root.sponsors": "ํ›„์›์ž ๋ชฉ๋ก",
"root.processing": "๊ธฐ๊ธฐ ์‚ฌ์–‘์— ๋”ฐ๋ผ ์‹œ๊ฐ„์ด ์˜ค๋ž˜ ๊ฑธ๋ฆด ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.",
"root.releases": "๋ฐฐํฌ ๋‚ด์—ญ",
"root.override-metadata": "๋ฉ”ํƒ€๋ฐ์ดํ„ฐ ๊ฐ•์ œ ๋ณ€๊ฒฝ",
Expand Down
13 changes: 13 additions & 0 deletions web/src/pages/setting/components/sponsors.list-item.tsx
Original file line number Diff line number Diff line change
@@ -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 <ListItem media={<SponsorsIcon size={26} />} title={t('root.sponsors')} link onClick={() => navigate('/sponsors')} />;
};

export default SponsorsListItem;
2 changes: 2 additions & 0 deletions web/src/pages/setting/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -72,6 +73,7 @@ const ExportSettingsPage = () => {
<List strongIos inset>
<SponsorListItem />
<SponsorKakaopayListItem />
<SponsorsListItem />
</List>

<List strongIos inset>
Expand Down
30 changes: 30 additions & 0 deletions web/src/pages/sponsors.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<>
<Page>
<Navbar title={t('root.sponsors')} left={<NavbarBackLink onClick={() => navigator(-1)} />} />

<BlockTitle>{t('thank-you-for-your-support')}</BlockTitle>
<Block>
<li>์ž๋ฐ”์‹œํ‹ฐ</li> {/* 2024-05-02 KakaoPay */}
<li>doer</li> {/* 2024-05-02 KakaoPay */}
<li>ํ–‰๋ณตํ•œ์‚์—๋กœ</li> {/* 2024-05-02 KakaoPay */}
<li>Conan</li> {/* 2024-05-02 KakaoPay */}
</Block>

<Block>
<p>{t('root.sponsor-kakaopay-description')}</p>
</Block>
</Page>
</>
);
};

export default SponsorsPage;
2 changes: 2 additions & 0 deletions web/src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -24,6 +25,7 @@ const Router = () => {
/>
<Route path="/privacy_policy" element={<PrivacyPolicyPage />} />
<Route path="/term_and_conditions" element={<TermAndConditionsPage />} />
<Route path="/sponsors" element={<SponsorsPage />} />
</Routes>
</BrowserRouter>
);
Expand Down

0 comments on commit ba24351

Please sign in to comment.