From 24b10301ab79d9804d8d6018c515663e365fa826 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sun, 16 Mar 2025 11:25:23 +0000 Subject: [PATCH 1/7] Visual edit in Lovable Edited UI in Lovable --- src/components/RecentTransactionsSection.tsx | 55 +++++--------------- 1 file changed, 14 insertions(+), 41 deletions(-) diff --git a/src/components/RecentTransactionsSection.tsx b/src/components/RecentTransactionsSection.tsx index 7266932..785077f 100644 --- a/src/components/RecentTransactionsSection.tsx +++ b/src/components/RecentTransactionsSection.tsx @@ -1,29 +1,27 @@ - import React, { useState } from 'react'; import { Transaction } from './TransactionCard'; import TransactionEditDialog from './TransactionEditDialog'; import { ChevronRight } from 'lucide-react'; import { useBudget } from '@/contexts/BudgetContext'; import { Link } from 'react-router-dom'; - interface RecentTransactionsSectionProps { transactions: Transaction[]; onUpdateTransaction?: (transaction: Transaction) => void; } - -const RecentTransactionsSection: React.FC = ({ +const RecentTransactionsSection: React.FC = ({ transactions, - onUpdateTransaction + onUpdateTransaction }) => { const [selectedTransaction, setSelectedTransaction] = useState(null); const [isDialogOpen, setIsDialogOpen] = useState(false); - const { updateTransaction, deleteTransaction } = useBudget(); - + const { + updateTransaction, + deleteTransaction + } = useBudget(); const handleTransactionClick = (transaction: Transaction) => { setSelectedTransaction(transaction); setIsDialogOpen(true); }; - const handleUpdateTransaction = (updatedTransaction: Transaction) => { if (onUpdateTransaction) { onUpdateTransaction(updatedTransaction); @@ -31,16 +29,13 @@ const RecentTransactionsSection: React.FC = ({ // 직접 컨텍스트를 통해 업데이트 updateTransaction(updatedTransaction); }; - const handleDeleteTransaction = (id: string) => { // 직접 컨텍스트를 통해 삭제 deleteTransaction(id); }; - const formatCurrency = (amount: number) => { return amount.toLocaleString('ko-KR') + '원'; }; - const getCategoryIcon = (category: string) => { switch (category) { case '식비': @@ -61,9 +56,7 @@ const RecentTransactionsSection: React.FC = ({ return '💰'; } }; - - return ( -
+ return

최근 지출

@@ -71,13 +64,7 @@ const RecentTransactionsSection: React.FC = ({
- {transactions.length > 0 ? ( - transactions.map((transaction) => ( -
handleTransactionClick(transaction)} - > + {transactions.length > 0 ? transactions.map(transaction =>
handleTransactionClick(transaction)}>
{getCategoryIcon(transaction.category)}
@@ -86,29 +73,15 @@ const RecentTransactionsSection: React.FC = ({
-

-{formatCurrency(transaction.amount)}

+

-{formatCurrency(transaction.amount)}

{transaction.category}

-
- )) - ) : ( -
+
) :
지출 내역이 없습니다 -
- )} +
}
- {selectedTransaction && ( - - )} -
- ); + {selectedTransaction && } +
; }; - -export default RecentTransactionsSection; +export default RecentTransactionsSection; \ No newline at end of file From 5c69ea36c12a19860e602cda4a4bc6366e4620cb Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sun, 16 Mar 2025 11:26:44 +0000 Subject: [PATCH 2/7] Visual edit in Lovable Edited UI in Lovable --- src/components/RecentTransactionsSection.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/RecentTransactionsSection.tsx b/src/components/RecentTransactionsSection.tsx index 785077f..0abfe37 100644 --- a/src/components/RecentTransactionsSection.tsx +++ b/src/components/RecentTransactionsSection.tsx @@ -64,7 +64,7 @@ const RecentTransactionsSection: React.FC = ({
- {transactions.length > 0 ? transactions.map(transaction =>
handleTransactionClick(transaction)}> + {transactions.length > 0 ? transactions.map(transaction =>
handleTransactionClick(transaction)} className="flex justify-between py-3 px-4 cursor-pointer hover:bg-gray-50 text-lime-600">
{getCategoryIcon(transaction.category)}
From 1c9dd41851585a4c0bc13a3ad3e00ddc3ce8caaf Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sun, 16 Mar 2025 11:27:13 +0000 Subject: [PATCH 3/7] Visual edit in Lovable Edited UI in Lovable --- src/components/RecentTransactionsSection.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/RecentTransactionsSection.tsx b/src/components/RecentTransactionsSection.tsx index 0abfe37..9ed7262 100644 --- a/src/components/RecentTransactionsSection.tsx +++ b/src/components/RecentTransactionsSection.tsx @@ -64,7 +64,7 @@ const RecentTransactionsSection: React.FC = ({
- {transactions.length > 0 ? transactions.map(transaction =>
handleTransactionClick(transaction)} className="flex justify-between py-3 px-4 cursor-pointer hover:bg-gray-50 text-lime-600"> + {transactions.length > 0 ? transactions.map(transaction =>
handleTransactionClick(transaction)} className="flex justify-between py-3 px-4 cursor-pointer hover:bg-gray-50 text-lime-700">
{getCategoryIcon(transaction.category)}
From 6320ea17d4b2c02fe0898e9e71bfe400d115e515 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sun, 16 Mar 2025 11:31:34 +0000 Subject: [PATCH 4/7] Change recent transaction title color Change the color of the transaction title in the recent transactions card on the home screen to black. --- src/components/RecentTransactionsSection.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/RecentTransactionsSection.tsx b/src/components/RecentTransactionsSection.tsx index 9ed7262..372068d 100644 --- a/src/components/RecentTransactionsSection.tsx +++ b/src/components/RecentTransactionsSection.tsx @@ -1,3 +1,4 @@ + import React, { useState } from 'react'; import { Transaction } from './TransactionCard'; import TransactionEditDialog from './TransactionEditDialog'; @@ -64,11 +65,11 @@ const RecentTransactionsSection: React.FC = ({
- {transactions.length > 0 ? transactions.map(transaction =>
handleTransactionClick(transaction)} className="flex justify-between py-3 px-4 cursor-pointer hover:bg-gray-50 text-lime-700"> + {transactions.length > 0 ? transactions.map(transaction =>
handleTransactionClick(transaction)} className="flex justify-between py-3 px-4 cursor-pointer hover:bg-gray-50">
{getCategoryIcon(transaction.category)}
-

{transaction.title}

+

{transaction.title}

{transaction.date}

@@ -84,4 +85,4 @@ const RecentTransactionsSection: React.FC = ({ {selectedTransaction && }
; }; -export default RecentTransactionsSection; \ No newline at end of file +export default RecentTransactionsSection; From e23b62aa2b9c094790b39252d7e970f205f833eb Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sun, 16 Mar 2025 12:13:29 +0000 Subject: [PATCH 5/7] Adjust card bottom margin Adds more bottom margin to the last card to prevent it from being partially hidden on mobile devices. --- src/components/RecentTransactionsSection.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/RecentTransactionsSection.tsx b/src/components/RecentTransactionsSection.tsx index 372068d..bb7300b 100644 --- a/src/components/RecentTransactionsSection.tsx +++ b/src/components/RecentTransactionsSection.tsx @@ -1,4 +1,3 @@ - import React, { useState } from 'react'; import { Transaction } from './TransactionCard'; import TransactionEditDialog from './TransactionEditDialog'; @@ -57,7 +56,7 @@ const RecentTransactionsSection: React.FC = ({ return '💰'; } }; - return
+ return

최근 지출

From 017f5615c18736fdb75beaf748fba439dee34029 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sun, 16 Mar 2025 12:16:14 +0000 Subject: [PATCH 6/7] Add bottom margin to pages Adds a bottom margin to the last card in the Transactions and Analytics pages. --- src/components/analytics/CategorySpendingList.tsx | 6 ++++-- src/pages/Analytics.tsx | 1 + src/pages/Transactions.tsx | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/analytics/CategorySpendingList.tsx b/src/components/analytics/CategorySpendingList.tsx index 30b1b73..0adb5e0 100644 --- a/src/components/analytics/CategorySpendingList.tsx +++ b/src/components/analytics/CategorySpendingList.tsx @@ -12,11 +12,13 @@ interface CategorySpending { interface CategorySpendingListProps { categories: CategorySpending[]; totalExpense: number; + className?: string; } const CategorySpendingList: React.FC = ({ categories, - totalExpense + totalExpense, + className = "" }) => { const isMobile = useIsMobile(); @@ -31,7 +33,7 @@ const CategorySpendingList: React.FC = ({ }; return ( -
+
{categories.some(cat => cat.current > 0) ? (
{categories.map((category) => ( diff --git a/src/pages/Analytics.tsx b/src/pages/Analytics.tsx index 287ae0c..2cdb0e1 100644 --- a/src/pages/Analytics.tsx +++ b/src/pages/Analytics.tsx @@ -164,6 +164,7 @@ const Analytics = () => {
diff --git a/src/pages/Transactions.tsx b/src/pages/Transactions.tsx index 9c6a96e..9887053 100644 --- a/src/pages/Transactions.tsx +++ b/src/pages/Transactions.tsx @@ -155,7 +155,7 @@ const Transactions = () => { {/* Transactions By Date */} {!isLoading && transactions.length > 0 && ( -
+
{Object.entries(groupedTransactions).map(([date, transactions]) => (
From 0e714af4106ca3ab5e913f2d2e5e8bbe988f847c Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sun, 16 Mar 2025 12:18:48 +0000 Subject: [PATCH 7/7] Implement splash screen functionality Adds a splash screen to improve the app's initial loading experience. --- android/app/build.gradle | 4 ++++ android/app/src/main/AndroidManifest.xml | 4 +++- .../java/com/lovable/zellyfinance/MainActivity.java | 13 ++++++++++++- .../src/main/res/values/ic_launcher_background.xml | 5 +++-- android/app/src/main/res/values/styles.xml | 4 +++- capacitor.config.ts | 8 +++++--- package-lock.json | 10 ++++++++++ package.json | 1 + 8 files changed, 41 insertions(+), 8 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index e63127c..01eb02e 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,3 +1,4 @@ + apply plugin: 'com.android.application' android { @@ -49,6 +50,9 @@ dependencies { androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion" androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" implementation project(':capacitor-cordova-android-plugins') + + // 스플래시 화면 플러그인 추가 + implementation "androidx.core:core-splashscreen:1.0.0" } apply from: 'capacitor.build.gradle' diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 340e7df..b467a2d 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,3 +1,4 @@ + @@ -15,7 +16,8 @@ android:label="@string/title_activity_main" android:theme="@style/AppTheme.NoActionBarLaunch" android:launchMode="singleTask" - android:exported="true"> + android:exported="true" + android:screenOrientation="portrait"> diff --git a/android/app/src/main/java/com/lovable/zellyfinance/MainActivity.java b/android/app/src/main/java/com/lovable/zellyfinance/MainActivity.java index e0fa4b1..525207d 100644 --- a/android/app/src/main/java/com/lovable/zellyfinance/MainActivity.java +++ b/android/app/src/main/java/com/lovable/zellyfinance/MainActivity.java @@ -1,5 +1,16 @@ + package com.lovable.zellyfinance; +import android.os.Bundle; import com.getcapacitor.BridgeActivity; +import com.getcapacitor.Plugin; -public class MainActivity extends BridgeActivity {} +public class MainActivity extends BridgeActivity { + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + // 스플래시 화면 처리를 위한 추가 초기화 코드 + registerPlugin(com.capacitorjs.plugins.splashscreen.SplashScreenPlugin.class); + } +} diff --git a/android/app/src/main/res/values/ic_launcher_background.xml b/android/app/src/main/res/values/ic_launcher_background.xml index c5d5899..4022158 100644 --- a/android/app/src/main/res/values/ic_launcher_background.xml +++ b/android/app/src/main/res/values/ic_launcher_background.xml @@ -1,4 +1,5 @@ + - #FFFFFF - \ No newline at end of file + #F0F4F8 + diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index be874e5..411d88b 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -1,3 +1,4 @@ + @@ -18,5 +19,6 @@ - \ No newline at end of file + diff --git a/capacitor.config.ts b/capacitor.config.ts index b6ea95f..ca21441 100644 --- a/capacitor.config.ts +++ b/capacitor.config.ts @@ -11,10 +11,12 @@ const config: CapacitorConfig = { }, plugins: { SplashScreen: { - launchShowDuration: 2000, - backgroundColor: "#f2f2f2", + launchShowDuration: 3000, // 스플래시 화면 표시 시간 3초로 증가 + backgroundColor: "#F0F4F8", // 배경색 밝은 회색으로 변경 androidScaleType: "CENTER_CROP", - showSpinner: false + showSpinner: true, // 로딩 스피너 표시 + spinnerColor: "#6BCB77", // 스피너 색상 (브랜드 색상) + androidSpinnerStyle: "large" // 안드로이드 스피너 크기 }, Keyboard: { resize: "body", diff --git a/package-lock.json b/package-lock.json index f27b1b3..fce5e07 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "@capacitor/core": "^7.1.0", "@capacitor/ios": "^7.1.0", "@capacitor/keyboard": "^7.0.0", + "@capacitor/splash-screen": "^7.0.0", "@hookform/resolvers": "^3.9.0", "@radix-ui/react-accordion": "^1.2.0", "@radix-ui/react-alert-dialog": "^1.1.1", @@ -236,6 +237,15 @@ "@capacitor/core": ">=7.0.0" } }, + "node_modules/@capacitor/splash-screen": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@capacitor/splash-screen/-/splash-screen-7.0.0.tgz", + "integrity": "sha512-y25WNRcl+MY/ltb3OZPZPpNmhVFW9270QneJY8tjY7FJc78zWEszj1cX84LJS4LeTHfHi4NcNW4y0/oewWG88A==", + "license": "MIT", + "peerDependencies": { + "@capacitor/core": ">=7.0.0" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", diff --git a/package.json b/package.json index 35a3358..3ef6b20 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "@capacitor/core": "^7.1.0", "@capacitor/ios": "^7.1.0", "@capacitor/keyboard": "^7.0.0", + "@capacitor/splash-screen": "^7.0.0", "@hookform/resolvers": "^3.9.0", "@radix-ui/react-accordion": "^1.2.0", "@radix-ui/react-alert-dialog": "^1.1.1",