mirror of
https://github.com/ManInDark/HabitTrove.git
synced 2026-03-10 20:39:50 +01:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
79c264f06d
|
@@ -18,7 +18,7 @@ import { DESKTOP_DISPLAY_ITEM_COUNT } from '@/lib/constants'
|
||||
import { Habit, WishlistItemType } from '@/lib/types'
|
||||
import { cn, d2t, getNow, getTodayInTimezone, isHabitDue, isSameDate, isTaskOverdue, t2d } from '@/lib/utils'
|
||||
import { useAtom } from 'jotai'
|
||||
import { AlertTriangle, ArrowRight, ChevronDown, ChevronUp, Circle, CircleCheck, Coins, Pin, Plus } from 'lucide-react';
|
||||
import { AlertTriangle, ArrowRight, ChevronDown, ChevronUp, Circle, CircleCheck, Coins, Pin, Plus } from 'lucide-react'
|
||||
import { useTranslations } from 'next-intl'
|
||||
import Link from 'next/link'
|
||||
import { useState } from 'react'
|
||||
@@ -409,7 +409,7 @@ export default function DailyOverview({
|
||||
<CardContent>
|
||||
<div className="space-y-6">
|
||||
{/* Tasks Section */}
|
||||
{habits.some(habit => habit.isTask === true) && (
|
||||
{dailyTasks.length > 0 && (
|
||||
<ItemSection
|
||||
title={t('dailyTasksTitle')}
|
||||
items={dailyTasks}
|
||||
@@ -421,16 +421,16 @@ export default function DailyOverview({
|
||||
)}
|
||||
|
||||
{/* Habits Section */}
|
||||
<ItemSection
|
||||
{dailyHabits.length > 0 && <ItemSection
|
||||
title={t('dailyHabitsTitle')}
|
||||
items={dailyHabits}
|
||||
emptyMessage={t('noHabitsDueTodayMessage')}
|
||||
isTask={false}
|
||||
viewLink="/habits"
|
||||
addNewItem={() => setModalConfig({ isOpen: true, isTask: false })}
|
||||
/>
|
||||
/>}
|
||||
|
||||
<div className="space-y-2">
|
||||
{sortedWishlistItems.length > 0 && <div className="space-y-2">
|
||||
<div className="flex items-center justify-between mb-2">
|
||||
<h3 className="font-semibold">{t('wishlistGoalsTitle')}</h3>
|
||||
<Badge variant="secondary">
|
||||
@@ -538,6 +538,10 @@ export default function DailyOverview({
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
{dailyHabits.length === 0 && dailyTasks.length === 0 && sortedWishlistItems.length === 0 && <>
|
||||
{t("emptyAll")}
|
||||
</>}
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
@@ -48,7 +48,8 @@
|
||||
"deleteHabitDialogTitle": "Elimina hàbit",
|
||||
"confirmDeleteDialogMessage": "Estàs segur que vols eliminar \"{name}\"? Aquesta acció no es pot desfer.",
|
||||
"deleteButton": "Elimina",
|
||||
"overdueTooltip": "Vençut"
|
||||
"overdueTooltip": "Vençut",
|
||||
"emptyAll": "Res a fer."
|
||||
},
|
||||
"HabitContextMenuItems": {
|
||||
"startPomodoro": "Inicia Pomodoro",
|
||||
|
||||
@@ -48,7 +48,8 @@
|
||||
"deleteHabitDialogTitle": "Gewohnheit löschen",
|
||||
"confirmDeleteDialogMessage": "Sind Sie sicher, dass Sie \"{name}\" löschen möchten? Diese Aktion kann nicht rückgängig gemacht werden.",
|
||||
"deleteButton": "Löschen",
|
||||
"overdueTooltip": "Überfällig"
|
||||
"overdueTooltip": "Überfällig",
|
||||
"emptyAll": "Nichts zu tun."
|
||||
},
|
||||
"HabitContextMenuItems": {
|
||||
"startPomodoro": "Pomodoro starten",
|
||||
|
||||
@@ -48,7 +48,8 @@
|
||||
"deleteHabitDialogTitle": "Delete Habit",
|
||||
"confirmDeleteDialogMessage": "Are you sure you want to delete \"{name}\"? This action cannot be undone.",
|
||||
"deleteButton": "Delete",
|
||||
"overdueTooltip": "Overdue"
|
||||
"overdueTooltip": "Overdue",
|
||||
"emptyAll": "Nothing to do."
|
||||
},
|
||||
"HabitContextMenuItems": {
|
||||
"startPomodoro": "Start Pomodoro",
|
||||
|
||||
@@ -48,7 +48,8 @@
|
||||
"deleteHabitDialogTitle": "Eliminar hábito",
|
||||
"confirmDeleteDialogMessage": "¿Estás seguro de que quieres eliminar \"{name}\"? Esta acción no se puede deshacer.",
|
||||
"deleteButton": "Eliminar",
|
||||
"overdueTooltip": "Vencido"
|
||||
"overdueTooltip": "Vencido",
|
||||
"emptyAll": "Nada que hacer."
|
||||
},
|
||||
"HabitContextMenuItems": {
|
||||
"startPomodoro": "Iniciar Pomodoro",
|
||||
|
||||
@@ -48,7 +48,8 @@
|
||||
"deleteHabitDialogTitle": "Supprimer l'habitude",
|
||||
"confirmDeleteDialogMessage": "Êtes-vous sûr de vouloir supprimer \"{name}\" ? Cette action est irréversible.",
|
||||
"deleteButton": "Supprimer",
|
||||
"overdueTooltip": "En retard"
|
||||
"overdueTooltip": "En retard",
|
||||
"emptyAll": "Rien à faire."
|
||||
},
|
||||
"HabitContextMenuItems": {
|
||||
"startPomodoro": "Démarrer Pomodoro",
|
||||
|
||||
@@ -48,7 +48,8 @@
|
||||
"deleteHabitDialogTitle": "習慣を削除",
|
||||
"confirmDeleteDialogMessage": "\"{name}\"を削除してもよろしいですか?この操作は元に戻せません。",
|
||||
"deleteButton": "削除",
|
||||
"overdueTooltip": "期限超過"
|
||||
"overdueTooltip": "期限超過",
|
||||
"emptyAll": "何もする事はありません。"
|
||||
},
|
||||
"HabitContextMenuItems": {
|
||||
"startPomodoro": "ポモドーロを開始",
|
||||
|
||||
@@ -48,7 +48,8 @@
|
||||
"deleteHabitDialogTitle": "습관 삭제",
|
||||
"confirmDeleteDialogMessage": "정말로 \"{name}\"을(를) 삭제하시겠습니까? 이 작업은 되돌릴 수 없습니다.",
|
||||
"deleteButton": "삭제",
|
||||
"overdueTooltip": "기한이 지남"
|
||||
"overdueTooltip": "기한이 지남",
|
||||
"emptyAll": "할 일이 없어요."
|
||||
},
|
||||
"HabitContextMenuItems": {
|
||||
"startPomodoro": "뽀모도로 시작",
|
||||
|
||||
@@ -48,7 +48,8 @@
|
||||
"deleteHabitDialogTitle": "Удалить привычку",
|
||||
"confirmDeleteDialogMessage": "Вы уверены, что хотите удалить \"{name}\"? Это действие нельзя отменить.",
|
||||
"deleteButton": "Удалить",
|
||||
"overdueTooltip": "Просрочено"
|
||||
"overdueTooltip": "Просрочено",
|
||||
"emptyAll": "Делать нечего."
|
||||
},
|
||||
"HabitContextMenuItems": {
|
||||
"startPomodoro": "Начать помидорку",
|
||||
|
||||
@@ -48,7 +48,8 @@
|
||||
"deleteHabitDialogTitle": "删除习惯",
|
||||
"confirmDeleteDialogMessage": "确定要删除\"{name}\"吗?此操作无法撤消。",
|
||||
"deleteButton": "删除",
|
||||
"overdueTooltip": "逾期"
|
||||
"overdueTooltip": "逾期",
|
||||
"emptyAll": "无事可做。"
|
||||
},
|
||||
"HabitContextMenuItems": {
|
||||
"startPomodoro": "开始番茄钟",
|
||||
|
||||
Reference in New Issue
Block a user