mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	better sizing of search pane
This commit is contained in:
		| @@ -166,11 +166,27 @@ div.ui-tooltip { | |||||||
|  |  | ||||||
| #tree { | #tree { | ||||||
|     overflow: auto; |     overflow: auto; | ||||||
|     flex-grow: 100; |     flex-grow: 1; | ||||||
|     flex-shrink: 100; |     flex-shrink: 1; | ||||||
|  |     flex-basis: 60%; | ||||||
|     margin-top: 10px; |     margin-top: 10px; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | #search-results { | ||||||
|  |     padding: 0 5px 5px 15px; | ||||||
|  |     flex-basis: 40%; | ||||||
|  |     flex-grow: 1; | ||||||
|  |     flex-shrink: 1; | ||||||
|  |     margin-top: 10px; | ||||||
|  |     display: none; | ||||||
|  |     overflow: auto; | ||||||
|  |     border-bottom: 2px solid #ddd; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | #search-results ul { | ||||||
|  |     padding: 5px 5px 5px 15px; | ||||||
|  | } | ||||||
|  |  | ||||||
| /* | /* | ||||||
| * .electron-in-page-search-window is a class specified to default | * .electron-in-page-search-window is a class specified to default | ||||||
| * <webview> element for search window. | * <webview> element for search window. | ||||||
| @@ -366,12 +382,4 @@ div.ui-tooltip { | |||||||
|  |  | ||||||
| #note-path-list .current a { | #note-path-list .current a { | ||||||
|     font-weight: bold; |     font-weight: bold; | ||||||
| } |  | ||||||
|  |  | ||||||
| #search-results { |  | ||||||
|     padding: 0 5px 5px 15px; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| #search-results ul { |  | ||||||
|     padding: 5px 5px 5px 15px; |  | ||||||
| } | } | ||||||
| @@ -63,7 +63,7 @@ function findNotes(query) { | |||||||
|                 continue; |                 continue; | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             const title = getNoteTitleForParent(noteId, parentNoteId).toLowerCase(); |             const title = getNoteTitle(noteId, parentNoteId).toLowerCase(); | ||||||
|             const foundTokens = []; |             const foundTokens = []; | ||||||
|  |  | ||||||
|             for (const token of tokens) { |             for (const token of tokens) { | ||||||
| @@ -116,7 +116,7 @@ function search(noteId, tokens, path, results) { | |||||||
|             continue; |             continue; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         const title = getNoteTitleForParent(noteId, parentNoteId); |         const title = getNoteTitle(noteId, parentNoteId); | ||||||
|         const foundTokens = []; |         const foundTokens = []; | ||||||
|  |  | ||||||
|         for (const token of tokens) { |         for (const token of tokens) { | ||||||
| @@ -136,7 +136,7 @@ function search(noteId, tokens, path, results) { | |||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
| function getNoteTitleForParent(noteId, parentNoteId) { | function getNoteTitle(noteId, parentNoteId) { | ||||||
|     const prefix = prefixes[noteId + '-' + parentNoteId]; |     const prefix = prefixes[noteId + '-' + parentNoteId]; | ||||||
|  |  | ||||||
|     let title = noteTitles[noteId]; |     let title = noteTitles[noteId]; | ||||||
| @@ -159,7 +159,7 @@ function getNoteTitleForPath(path) { | |||||||
|     let parentNoteId = 'root'; |     let parentNoteId = 'root'; | ||||||
|  |  | ||||||
|     for (const noteId of path) { |     for (const noteId of path) { | ||||||
|         const title = getNoteTitleForParent(noteId, parentNoteId); |         const title = getNoteTitle(noteId, parentNoteId); | ||||||
|  |  | ||||||
|         titles.push(title); |         titles.push(title); | ||||||
|         parentNoteId = noteId; |         parentNoteId = noteId; | ||||||
|   | |||||||
| @@ -81,7 +81,7 @@ | |||||||
|           </div> |           </div> | ||||||
|         </div> |         </div> | ||||||
|  |  | ||||||
|         <div id="search-results" style="flex-shrink: 10; flex-grow: 10; margin-top: 10px; display: none; overflow: auto; border-bottom: 2px solid #ddd"> |         <div id="search-results"> | ||||||
|           <strong>Search results:</strong> |           <strong>Search results:</strong> | ||||||
|  |  | ||||||
|           <ul id="search-results-inner"> |           <ul id="search-results-inner"> | ||||||
| @@ -91,7 +91,7 @@ | |||||||
|           </ul> |           </ul> | ||||||
|         </div> |         </div> | ||||||
|  |  | ||||||
|         <div id="tree" style="flex-shrink: 10; flex-grow: 10;"></div> |         <div id="tree"></div> | ||||||
|       </div> |       </div> | ||||||
|  |  | ||||||
|       <div style="grid-area: title;"> |       <div style="grid-area: title;"> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user