mirror of
				https://github.com/karl0ss/homepage.git
				synced 2025-11-04 00:10:57 +00:00 
			
		
		
		
	Enhancement: add bookmarks description option (#2034)
This commit is contained in:
		
							parent
							
								
									3534a8be35
								
							
						
					
					
						commit
						2730fef54c
					
				@ -5,7 +5,7 @@ import { SettingsContext } from "utils/contexts/settings";
 | 
			
		||||
import ResolvedIcon from "components/resolvedicon";
 | 
			
		||||
 | 
			
		||||
export default function Item({ bookmark }) {
 | 
			
		||||
  const { hostname } = new URL(bookmark.href);
 | 
			
		||||
  const description = bookmark.description ?? new URL(bookmark.href).hostname;
 | 
			
		||||
  const { settings } = useContext(SettingsContext);
 | 
			
		||||
 | 
			
		||||
  return (
 | 
			
		||||
@ -30,7 +30,7 @@ export default function Item({ bookmark }) {
 | 
			
		||||
          </div>
 | 
			
		||||
          <div className="flex-1 flex items-center justify-between rounded-r-md bookmark-text">
 | 
			
		||||
            <div className="flex-1 grow pl-3 py-2 text-xs bookmark-name">{bookmark.name}</div>
 | 
			
		||||
            <div className="px-2 py-2 truncate text-theme-500 dark:text-theme-300 text-xs bookmark-hostname">{hostname}</div>
 | 
			
		||||
            <div className="px-2 py-2 truncate text-theme-500 dark:text-theme-300 text-xs bookmark-description">{description}</div>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
      </a>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user