Compare commits
2 commits
89145b39cd
...
e871bc1f19
| Author | SHA1 | Date | |
|---|---|---|---|
| e871bc1f19 | |||
| c5d943a991 |
3 changed files with 18 additions and 22 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -43,3 +43,4 @@ certs
|
||||||
.obsidian
|
.obsidian
|
||||||
|
|
||||||
.claude/
|
.claude/
|
||||||
|
.playwright-mcp/
|
||||||
|
|
|
||||||
12
.mcp.json
Normal file
12
.mcp.json
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"mcpServers": {
|
||||||
|
"playwright": {
|
||||||
|
"command": "npx",
|
||||||
|
"args": [
|
||||||
|
"@playwright/mcp@latest",
|
||||||
|
"--caps",
|
||||||
|
"devtools"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import { useTimeAgo } from '@vueuse/core'
|
import { useTimeAgo } from '@vueuse/core'
|
||||||
import { DollarSign, TrendingUp, Info, FileText, Trash2, Image as ImageIcon } from 'lucide-vue-next'
|
import { DollarSign, TrendingUp, FileText, Trash2, Image as ImageIcon } from 'lucide-vue-next'
|
||||||
import { Badge } from '@/components/ui/badge'
|
import { Badge } from '@/components/ui/badge'
|
||||||
import { Button } from '@/components/ui/button'
|
import { Button } from '@/components/ui/button'
|
||||||
import { Separator } from '@/components/ui/separator'
|
import { Separator } from '@/components/ui/separator'
|
||||||
|
|
@ -16,8 +16,6 @@ const { drafts, hasDrafts, deleteDraft } = useExpenseDrafts()
|
||||||
const showAddExpense = ref(false)
|
const showAddExpense = ref(false)
|
||||||
const showAddIncome = ref(false)
|
const showAddIncome = ref(false)
|
||||||
|
|
||||||
const incomeEnabled = computed(() => import.meta.env.VITE_LIBRA_INCOME_ENABLED === 'true')
|
|
||||||
|
|
||||||
function handleExpenseSubmitted() {
|
function handleExpenseSubmitted() {
|
||||||
// Could refresh balance or show notification
|
// Could refresh balance or show notification
|
||||||
}
|
}
|
||||||
|
|
@ -67,34 +65,19 @@ function draftTimeAgo(isoDate: string) {
|
||||||
|
|
||||||
<!-- Add Income Card -->
|
<!-- Add Income Card -->
|
||||||
<button
|
<button
|
||||||
class="flex items-start gap-4 p-5 rounded-xl border bg-card text-left transition-colors"
|
class="flex items-start gap-4 p-5 rounded-xl border bg-card text-left transition-colors hover:bg-accent/50 active:bg-accent/70"
|
||||||
:class="incomeEnabled
|
@click="showAddIncome = true"
|
||||||
? 'hover:bg-accent/50 active:bg-accent/70'
|
|
||||||
: 'opacity-60 cursor-not-allowed'"
|
|
||||||
:disabled="!incomeEnabled"
|
|
||||||
@click="incomeEnabled && (showAddIncome = true)"
|
|
||||||
>
|
>
|
||||||
<div class="flex items-center justify-center w-12 h-12 rounded-full bg-green-100 dark:bg-green-900/20 shrink-0">
|
<div class="flex items-center justify-center w-12 h-12 rounded-full bg-green-100 dark:bg-green-900/20 shrink-0">
|
||||||
<TrendingUp class="w-6 h-6 text-green-600 dark:text-green-400" />
|
<TrendingUp class="w-6 h-6 text-green-600 dark:text-green-400" />
|
||||||
</div>
|
</div>
|
||||||
<div class="min-w-0 flex-1">
|
<div class="min-w-0 flex-1">
|
||||||
<div class="flex items-center gap-2">
|
<h2 class="text-lg font-semibold text-foreground">{{ t('libra.record.addIncome') }}</h2>
|
||||||
<h2 class="text-lg font-semibold text-foreground">{{ t('libra.record.addIncome') }}</h2>
|
|
||||||
<Badge v-if="!incomeEnabled" variant="secondary" class="text-xs">
|
|
||||||
{{ t('libra.record.comingSoon') }}
|
|
||||||
</Badge>
|
|
||||||
</div>
|
|
||||||
<p class="text-sm text-muted-foreground mt-0.5">{{ t('libra.record.addIncomeDescription') }}</p>
|
<p class="text-sm text-muted-foreground mt-0.5">{{ t('libra.record.addIncomeDescription') }}</p>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Info hint when income is disabled -->
|
|
||||||
<div v-if="!incomeEnabled" class="mt-4 flex items-start gap-2 p-3 rounded-lg bg-muted/50">
|
|
||||||
<Info class="w-4 h-4 text-muted-foreground mt-0.5 shrink-0" />
|
|
||||||
<p class="text-xs text-muted-foreground">{{ t('libra.income.notAvailable') }}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Drafts Section -->
|
<!-- Drafts Section -->
|
||||||
<template v-if="hasDrafts">
|
<template v-if="hasDrafts">
|
||||||
<Separator class="my-6" />
|
<Separator class="my-6" />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue