Skip to content

favrotie secrets#25

Closed
ogardoni wants to merge 1 commit into
mainfrom
feature/favoriteSecrets
Closed

favrotie secrets#25
ogardoni wants to merge 1 commit into
mainfrom
feature/favoriteSecrets

Conversation

@ogardoni
Copy link
Copy Markdown
Collaborator

@ogardoni ogardoni commented Jul 8, 2025

Database Changes
Added an isFavorite boolean field to the Secret model in the Prisma schema
Created and ran migrations to update the database structure
Type Updates
Updated the SecretWithDecryptedData and related types to include the isFavorite property
Ensured consistent typing across the application
Backend Logic
Modified _secretActions.ts to include:
A toggleFavorite function to toggle the favorite status of a secret
Updated getAllSecretsWithVaults to accept a filter parameter for favorites
Refactored getFavoriteSecrets to use the new filter logic
Client-Side Logic
Created a proper TypeScript React component file favorites-client.tsx that includes:
A useFavorites hook for managing favorite-related state and actions
A FavoriteButton component for toggling favorite status
A FavoritesEmptyState component for displaying when no favorites exist
A FavoritesQuickAccess component that shows a card with the top 5 favorites
UI Components
Enhanced secrets-list.tsx with:

A star icon button to toggle favorite status in secret cards
A dropdown menu option to toggle favorites
A FavoriteSecretsList component that displays only favorite secrets
Added query keys for favorites to manage cache invalidation
Updated sidebar-vault-list.tsx to include a "Favorite Secrets" navigation button

Created a dedicated page at page.tsx to display favorite secrets

Fixed TypeScript Errors
Renamed the file from .ts to .tsx to support JSX syntax
Added proper React imports
Fixed export and import issues
The feature now allows users to:

Mark any secret as a favorite with a single click
View all their favorite secrets in a dedicated "Favorites" section
Access their most important secrets quickly from any page
Toggle the favorite status from multiple locations in the UI
All changes were made with TypeScript type safety in mind, an

@vercel
Copy link
Copy Markdown

vercel Bot commented Jul 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
password-safe ❌ Failed (Inspect) Jul 8, 2025 1:34pm

@knivram knivram closed this Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants