mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +08:00 
			
		
		
		
	web view fixes + disclaimer
This commit is contained in:
		
							parent
							
								
									6cb5144c09
								
							
						
					
					
						commit
						4f86d769be
					
				| @ -12,7 +12,7 @@ async function getNoteTypeItems(command) { | |||||||
|         { title: "Book", command: command, type: "book", uiIcon: "bx bx-book" }, |         { title: "Book", command: command, type: "book", uiIcon: "bx bx-book" }, | ||||||
|         { title: "Mermaid Diagram", command: command, type: "mermaid", uiIcon: "bx bx-selection" }, |         { title: "Mermaid Diagram", command: command, type: "mermaid", uiIcon: "bx bx-selection" }, | ||||||
|         { title: "Canvas", command: command, type: "canvas", uiIcon: "bx bx-pen" }, |         { title: "Canvas", command: command, type: "canvas", uiIcon: "bx bx-pen" }, | ||||||
|         { title: "Web View", command: command, type: "iframe", uiIcon: "bx bx-globe-alt" }, |         { title: "Web View", command: command, type: "web-view", uiIcon: "bx bx-globe-alt" }, | ||||||
|     ]; |     ]; | ||||||
| 
 | 
 | ||||||
|     const templateNoteIds = await server.get("search-templates"); |     const templateNoteIds = await server.get("search-templates"); | ||||||
|  | |||||||
| @ -3,10 +3,16 @@ import attributeService from "../../services/attributes.js"; | |||||||
| 
 | 
 | ||||||
| const TPL = ` | const TPL = ` | ||||||
| <div class="note-detail-web-view note-detail-printable" style="height: 100%"> | <div class="note-detail-web-view note-detail-printable" style="height: 100%"> | ||||||
|     <div class="note-detail-web-view-help alert alert-warning" style="margin: 50px; padding: 20px;"> |     <div class="note-detail-web-view-help alert alert-warning" style="margin: 50px; padding: 20px 20px 0px 20px;"> | ||||||
|         <p><strong>This help note is shown because this note of type WebView HTML doesn't have required label to function properly.</strong></p> |         <h4>Web View</h4> | ||||||
|          |          | ||||||
|         <p>Please create label with a URL address you want to embed, e.g. <code>#webViewSrc="http://www.google.com"</code></p> |         <p>Note of type Web View allow you to embed websites into Trilium.</p> | ||||||
|  | 
 | ||||||
|  |         <p>To start, please create a label with a URL address you want to embed, e.g. <code>#webViewSrc="http://www.google.com"</code></p> | ||||||
|  | 
 | ||||||
|  |         <h4>Disclaimer on the experimental status</h4> | ||||||
|  |          | ||||||
|  |         <p>Web View is an experimental note type, and it might be removed or substantially changed in the future. Web View works also only in the desktop build.</p> | ||||||
|     </div> |     </div> | ||||||
| 
 | 
 | ||||||
|     <webview class="note-detail-web-view-content"></webview> |     <webview class="note-detail-web-view-content"></webview> | ||||||
|  | |||||||
| @ -55,7 +55,7 @@ function deriveMime(type, mime) { | |||||||
|         mime = 'text/plain'; |         mime = 'text/plain'; | ||||||
|     } else if (['relation-map', 'search', 'canvas'].includes(type)) { |     } else if (['relation-map', 'search', 'canvas'].includes(type)) { | ||||||
|         mime = 'application/json'; |         mime = 'application/json'; | ||||||
|     } else if (['render', 'book', 'iframe'].includes(type)) { |     } else if (['render', 'book', 'web-view'].includes(type)) { | ||||||
|         mime = ''; |         mime = ''; | ||||||
|     } else { |     } else { | ||||||
|         mime = 'application/octet-stream'; |         mime = 'application/octet-stream'; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam