Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Metadata bug #235

Merged
merged 1 commit into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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