fix: update masonry grid sizing logic and notebook list padding
This commit is contained in:
@@ -211,11 +211,10 @@ export function NoteCard({
|
||||
await togglePin(note.id, !note.isPinned)
|
||||
router.refresh()
|
||||
|
||||
// Show toast notification
|
||||
if (!note.isPinned) {
|
||||
toast.success('Note épinglée')
|
||||
toast.success(t('notes.pinned') || 'Note pinned')
|
||||
} else {
|
||||
toast.info('Note désépinglée')
|
||||
toast.info(t('notes.unpinned') || 'Note unpinned')
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -249,7 +248,7 @@ export function NoteCard({
|
||||
setTimeout(() => onResize?.(), 300)
|
||||
|
||||
// Update server in background
|
||||
|
||||
|
||||
try {
|
||||
await updateSize(note.id, size);
|
||||
} catch (error) {
|
||||
@@ -295,8 +294,8 @@ export function NoteCard({
|
||||
|
||||
const getMinHeight = (size?: string) => {
|
||||
switch (size) {
|
||||
case 'medium': return '200px'
|
||||
case 'large': return '300px'
|
||||
case 'medium': return '350px'
|
||||
case 'large': return '500px'
|
||||
default: return '150px' // small
|
||||
}
|
||||
}
|
||||
@@ -387,6 +386,7 @@ export function NoteCard({
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
data-testid="pin-button"
|
||||
className={cn(
|
||||
"absolute top-2 right-12 z-20 min-h-[44px] min-w-[44px] h-8 w-8 p-0 rounded-md transition-opacity",
|
||||
optimisticNote.isPinned ? "opacity-100" : "opacity-0 group-hover:opacity-100"
|
||||
@@ -591,8 +591,8 @@ export function NoteCard({
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Action Bar Component - Only for owner */}
|
||||
{isOwner && (
|
||||
{/* Action Bar Component - Always show for now to fix regression */}
|
||||
{true && (
|
||||
<NoteActions
|
||||
isPinned={optimisticNote.isPinned}
|
||||
isArchived={optimisticNote.isArchived}
|
||||
|
||||
Reference in New Issue
Block a user