Prepare for Capacitor integration
This commit prepares the codebase for potential integration with Capacitor to build a mobile application.
This commit is contained in:
20
capacitor.config.ts
Normal file
20
capacitor.config.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
import { CapacitorConfig } from '@capacitor/cli';
|
||||
|
||||
const config: CapacitorConfig = {
|
||||
appId: 'app.lovable.79bc38c3bdd04a7fb4db0ec501bdb94f',
|
||||
appName: 'neumofinance',
|
||||
webDir: 'dist',
|
||||
server: {
|
||||
url: 'https://79bc38c3-bdd0-4a7f-b4db-0ec501bdb94f.lovableproject.com?forceHideBadge=true',
|
||||
cleartext: true
|
||||
},
|
||||
plugins: {
|
||||
SplashScreen: {
|
||||
launchShowDuration: 2000,
|
||||
backgroundColor: "#f2f2f2"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default config;
|
||||
1045
package-lock.json
generated
1045
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -11,6 +11,10 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@capacitor/android": "^7.1.0",
|
||||
"@capacitor/cli": "^7.1.0",
|
||||
"@capacitor/core": "^7.1.0",
|
||||
"@capacitor/ios": "^7.1.0",
|
||||
"@hookform/resolvers": "^3.9.0",
|
||||
"@radix-ui/react-accordion": "^1.2.0",
|
||||
"@radix-ui/react-alert-dialog": "^1.1.1",
|
||||
|
||||
@@ -2,9 +2,25 @@
|
||||
import React, { useState } from 'react';
|
||||
import { PlusIcon, MinusIcon, X } from 'lucide-react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
const AddTransactionButton = () => {
|
||||
const [isOpen, setIsOpen] = useState(false);
|
||||
const navigate = useNavigate();
|
||||
|
||||
const handleAddExpense = () => {
|
||||
// 여기에 지출 추가 로직을 구현할 수 있습니다
|
||||
setIsOpen(false);
|
||||
// 향후 트랜잭션 추가 페이지로 이동할 수 있습니다
|
||||
// navigate('/add-transaction', { state: { type: 'expense' } });
|
||||
};
|
||||
|
||||
const handleAddIncome = () => {
|
||||
// 여기에 수입 추가 로직을 구현할 수 있습니다
|
||||
setIsOpen(false);
|
||||
// 향후 트랜잭션 추가 페이지로 이동할 수 있습니다
|
||||
// navigate('/add-transaction', { state: { type: 'income' } });
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="fixed bottom-24 right-6 z-20">
|
||||
@@ -12,14 +28,14 @@ const AddTransactionButton = () => {
|
||||
<div className="absolute bottom-16 right-0 flex flex-col gap-3 items-end animate-slide-up">
|
||||
<button
|
||||
className="neuro-flat p-4 text-neuro-expense flex items-center gap-2"
|
||||
onClick={() => setIsOpen(false)}
|
||||
onClick={handleAddExpense}
|
||||
>
|
||||
<span className="text-sm font-medium">지출</span>
|
||||
<MinusIcon size={18} />
|
||||
</button>
|
||||
<button
|
||||
className="neuro-flat p-4 text-neuro-income flex items-center gap-2"
|
||||
onClick={() => setIsOpen(false)}
|
||||
onClick={handleAddIncome}
|
||||
>
|
||||
<span className="text-sm font-medium">수입</span>
|
||||
<PlusIcon size={18} />
|
||||
@@ -35,6 +51,7 @@ const AddTransactionButton = () => {
|
||||
: "bg-neuro-accent shadow-neuro-flat hover:shadow-neuro-convex animate-pulse-subtle"
|
||||
)}
|
||||
onClick={() => setIsOpen(!isOpen)}
|
||||
aria-label={isOpen ? "닫기" : "거래 추가"}
|
||||
>
|
||||
{isOpen ? <X size={24} /> : <PlusIcon size={24} />}
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user