mirror of
https://github.com/ManInDark/HabitTrove.git
synced 2026-01-21 06:34:30 +01:00
Merge Tag v0.2.19
This commit is contained in:
@@ -1,5 +1,13 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## Version 0.2.19
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
* settings button not working
|
||||||
|
* fixed delete dialog modal blocks page interaction (#149)
|
||||||
|
* disable submit button when frequency is invaid
|
||||||
|
|
||||||
## Version 0.2.18
|
## Version 0.2.18
|
||||||
|
|
||||||
### Improved
|
### Improved
|
||||||
|
|||||||
@@ -306,7 +306,7 @@ export default function AddEditHabitModal({ onClose, onSave, habit, isTask }: Ad
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<DialogFooter>
|
<DialogFooter>
|
||||||
<Button type="submit">
|
<Button type="submit" disabled={!!errorMessage}>
|
||||||
{habit
|
{habit
|
||||||
? t('saveChangesButton')
|
? t('saveChangesButton')
|
||||||
: t(isTask ? 'addTaskButton' : 'addHabitButton')}
|
: t(isTask ? 'addTaskButton' : 'addHabitButton')}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ interface HabitItemProps {
|
|||||||
|
|
||||||
const renderUserAvatars = (habit: Habit, currentUser: User | null, usersData: { users: User[] }) => {
|
const renderUserAvatars = (habit: Habit, currentUser: User | null, usersData: { users: User[] }) => {
|
||||||
if (!habit.userIds || habit.userIds.length <= 1) return null;
|
if (!habit.userIds || habit.userIds.length <= 1) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex -space-x-2 ml-2 flex-shrink-0">
|
<div className="flex -space-x-2 ml-2 flex-shrink-0">
|
||||||
{habit.userIds?.filter((u) => u !== currentUser?.id).map(userId => {
|
{habit.userIds?.filter((u) => u !== currentUser?.id).map(userId => {
|
||||||
@@ -107,11 +107,13 @@ export default function HabitItem({ habit, onEdit, onDelete }: HabitItemProps) {
|
|||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent className="flex-1">
|
<CardContent className="flex-1">
|
||||||
<p className={`text-sm ${habit.archived ? 'text-gray-400 dark:text-gray-500' : 'text-gray-500'}`}>
|
<p className={`text-sm ${habit.archived ? 'text-gray-400 dark:text-gray-500' : 'text-gray-500'}`}>
|
||||||
{t('whenLabel', { frequency: convertMachineReadableFrequencyToHumanReadable({
|
{t('whenLabel', {
|
||||||
frequency: habit.frequency,
|
frequency: convertMachineReadableFrequencyToHumanReadable({
|
||||||
isRecurRule: pathname.includes("habits"),
|
frequency: habit.frequency,
|
||||||
timezone: settings.system.timezone
|
isRecurRule: pathname.includes("habits"),
|
||||||
})})}
|
timezone: settings.system.timezone
|
||||||
|
})
|
||||||
|
})}
|
||||||
</p>
|
</p>
|
||||||
<div className="flex items-center mt-2">
|
<div className="flex items-center mt-2">
|
||||||
<Coins className={`h-4 w-4 mr-1 ${habit.archived ? 'text-gray-400 dark:text-gray-500' : 'text-yellow-400'}`} />
|
<Coins className={`h-4 w-4 mr-1 ${habit.archived ? 'text-gray-400 dark:text-gray-500' : 'text-yellow-400'}`} />
|
||||||
@@ -184,7 +186,7 @@ export default function HabitItem({ habit, onEdit, onDelete }: HabitItemProps) {
|
|||||||
<span className="ml-2">{t('editButton')}</span>
|
<span className="ml-2">{t('editButton')}</span>
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
<DropdownMenu>
|
<DropdownMenu modal={false}>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<Button variant="ghost" size="sm" className="h-8 w-8 p-0">
|
<Button variant="ghost" size="sm" className="h-8 w-8 p-0">
|
||||||
<MoreVertical className="h-4 w-4" />
|
<MoreVertical className="h-4 w-4" />
|
||||||
|
|||||||
@@ -110,17 +110,18 @@ export function Profile() {
|
|||||||
</div>
|
</div>
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuItem className="cursor-pointer px-2 py-1.5" asChild>
|
<DropdownMenuItem className="cursor-pointer px-2 py-1.5" asChild>
|
||||||
<div className="flex items-center justify-between w-full">
|
{/* need the Link element to be the direct child of the DropdownMenuItem, since we are using asChild here */}
|
||||||
|
<Link
|
||||||
|
href="/settings"
|
||||||
|
aria-label={t('settingsLink')}
|
||||||
|
className="flex items-center justify-between w-full"
|
||||||
|
onClick={() => setOpen(false)} // Ensure dropdown closes on click
|
||||||
|
>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Settings className="h-4 w-4" />
|
<Settings className="h-4 w-4" />
|
||||||
<Link
|
<span>{t('settingsLink')}</span>
|
||||||
href="/settings"
|
|
||||||
aria-label={t('settingsLink')}
|
|
||||||
>
|
|
||||||
<span>{t('settingsLink')}</span>
|
|
||||||
</Link>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Link>
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuItem className="cursor-pointer px-2 py-1.5" onClick={() => {
|
<DropdownMenuItem className="cursor-pointer px-2 py-1.5" onClick={() => {
|
||||||
setOpen(false); // Close the dropdown
|
setOpen(false); // Close the dropdown
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ export default function WishlistItem({
|
|||||||
<span className="ml-2">{t('editButton')}</span>
|
<span className="ml-2">{t('editButton')}</span>
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
<DropdownMenu>
|
<DropdownMenu modal={false}>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<Button variant="ghost" size="sm" className="h-8 w-8 p-0">
|
<Button variant="ghost" size="sm" className="h-8 w-8 p-0">
|
||||||
<MoreVertical className="h-4 w-4" />
|
<MoreVertical className="h-4 w-4" />
|
||||||
@@ -165,7 +165,7 @@ export default function WishlistItem({
|
|||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuSeparator className="sm:hidden" />
|
<DropdownMenuSeparator className="sm:hidden" />
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
className="text-red-600 focus:text-red-600 dark:text-red-400 dark:focus:text-red-400 cursor-pointer"
|
className="text-red-600 focus:text-red-600 dark:text-red-400 dark:focus:text-red-400"
|
||||||
onClick={onDelete}
|
onClick={onDelete}
|
||||||
disabled={!canWrite}
|
disabled={!canWrite}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const DialogOverlay = React.forwardRef<
|
|||||||
<DialogPrimitive.Overlay
|
<DialogPrimitive.Overlay
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:pointer-events-none",
|
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
|
|||||||
@@ -423,6 +423,7 @@
|
|||||||
"cancel": "Abbrechen"
|
"cancel": "Abbrechen"
|
||||||
},
|
},
|
||||||
"useCoins": {
|
"useCoins": {
|
||||||
|
"addedCoinsDescription": "{amount} Münzen hinzugefügt",
|
||||||
"invalidAmountTitle": "Ungültiger Betrag",
|
"invalidAmountTitle": "Ungültiger Betrag",
|
||||||
"invalidAmountDescription": "Bitte geben Sie eine gültige positive Zahl ein",
|
"invalidAmountDescription": "Bitte geben Sie eine gültige positive Zahl ein",
|
||||||
"successTitle": "Erfolg",
|
"successTitle": "Erfolg",
|
||||||
|
|||||||
@@ -408,6 +408,7 @@
|
|||||||
"notEnoughCoinsDescription": "You need {coinsNeeded} more coins to redeem this reward."
|
"notEnoughCoinsDescription": "You need {coinsNeeded} more coins to redeem this reward."
|
||||||
},
|
},
|
||||||
"useCoins": {
|
"useCoins": {
|
||||||
|
"addedCoinsDescription": "Added {amount} coins",
|
||||||
"invalidAmountTitle": "Invalid amount",
|
"invalidAmountTitle": "Invalid amount",
|
||||||
"invalidAmountDescription": "Please enter a valid positive number",
|
"invalidAmountDescription": "Please enter a valid positive number",
|
||||||
"successTitle": "Success",
|
"successTitle": "Success",
|
||||||
|
|||||||
@@ -423,6 +423,7 @@
|
|||||||
"cancel": "Cancelar"
|
"cancel": "Cancelar"
|
||||||
},
|
},
|
||||||
"useCoins": {
|
"useCoins": {
|
||||||
|
"addedCoinsDescription": "Se añadieron {amount} monedas",
|
||||||
"invalidAmountTitle": "Cantidad inválida",
|
"invalidAmountTitle": "Cantidad inválida",
|
||||||
"invalidAmountDescription": "Por favor ingresa un número positivo válido",
|
"invalidAmountDescription": "Por favor ingresa un número positivo válido",
|
||||||
"successTitle": "Éxito",
|
"successTitle": "Éxito",
|
||||||
|
|||||||
@@ -423,6 +423,7 @@
|
|||||||
"cancel": "Annuler"
|
"cancel": "Annuler"
|
||||||
},
|
},
|
||||||
"useCoins": {
|
"useCoins": {
|
||||||
|
"addedCoinsDescription": "{amount} pièces ajoutées",
|
||||||
"invalidAmountTitle": "Montant invalide",
|
"invalidAmountTitle": "Montant invalide",
|
||||||
"invalidAmountDescription": "Veuillez entrer un nombre positif valide",
|
"invalidAmountDescription": "Veuillez entrer un nombre positif valide",
|
||||||
"successTitle": "Succès",
|
"successTitle": "Succès",
|
||||||
|
|||||||
@@ -423,6 +423,7 @@
|
|||||||
"cancel": "キャンセル"
|
"cancel": "キャンセル"
|
||||||
},
|
},
|
||||||
"useCoins": {
|
"useCoins": {
|
||||||
|
"addedCoinsDescription": "{amount}コインを追加しました",
|
||||||
"invalidAmountTitle": "無効な値です",
|
"invalidAmountTitle": "無効な値です",
|
||||||
"invalidAmountDescription": "有効な正の数を入力してください",
|
"invalidAmountDescription": "有効な正の数を入力してください",
|
||||||
"successTitle": "成功しました",
|
"successTitle": "成功しました",
|
||||||
|
|||||||
@@ -423,6 +423,7 @@
|
|||||||
"cancel": "Отмена"
|
"cancel": "Отмена"
|
||||||
},
|
},
|
||||||
"useCoins": {
|
"useCoins": {
|
||||||
|
"addedCoinsDescription": "Добавлено {amount} монет",
|
||||||
"invalidAmountTitle": "Неверная сумма",
|
"invalidAmountTitle": "Неверная сумма",
|
||||||
"invalidAmountDescription": "Пожалуйста, введите положительное число",
|
"invalidAmountDescription": "Пожалуйста, введите положительное число",
|
||||||
"successTitle": "Успех",
|
"successTitle": "Успех",
|
||||||
|
|||||||
@@ -423,6 +423,7 @@
|
|||||||
"cancel": "取消"
|
"cancel": "取消"
|
||||||
},
|
},
|
||||||
"useCoins": {
|
"useCoins": {
|
||||||
|
"addedCoinsDescription": "已添加 {amount} 个金币",
|
||||||
"invalidAmountTitle": "无效金额",
|
"invalidAmountTitle": "无效金额",
|
||||||
"invalidAmountDescription": "请输入有效的正数",
|
"invalidAmountDescription": "请输入有效的正数",
|
||||||
"successTitle": "成功",
|
"successTitle": "成功",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "habittrove",
|
"name": "habittrove",
|
||||||
"version": "0.2.18",
|
"version": "0.2.19",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev --turbopack",
|
"dev": "next dev --turbopack",
|
||||||
|
|||||||
Reference in New Issue
Block a user