mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	use icons instead of text links for header actions
This commit is contained in:
		
							parent
							
								
									ad878c078e
								
							
						
					
					
						commit
						bf9bfe920a
					
				@ -62,14 +62,19 @@ const RIGHT_PANE_CSS = `
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#right-pane .widget-header-action {
 | 
			
		||||
    color: var(--link-color) !important;
 | 
			
		||||
    cursor: pointer;
 | 
			
		||||
    color: var(--main-text-color) !important;
 | 
			
		||||
    text-decoration: none;
 | 
			
		||||
    font-size: large;
 | 
			
		||||
    position: relative;
 | 
			
		||||
    top: 2px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#right-pane .widget-help {
 | 
			
		||||
    color: var(--muted-text-color);
 | 
			
		||||
    position: relative;
 | 
			
		||||
    top: 2px;
 | 
			
		||||
    font-size: large;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#right-pane .widget-help.no-link:hover {
 | 
			
		||||
@ -82,6 +87,7 @@ const RIGHT_PANE_CSS = `
 | 
			
		||||
    color: var(--main-text-color) !important;
 | 
			
		||||
    position: relative;
 | 
			
		||||
    top: 2px;
 | 
			
		||||
    font-size: large;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#right-pane .widget-toggle-button:hover {
 | 
			
		||||
 | 
			
		||||
@ -77,13 +77,7 @@ export default class CollapsibleWidget extends TabAwareWidget {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        this.$headerActions = this.$widget.find('.widget-header-actions');
 | 
			
		||||
        let headerActions = this.headerActions;
 | 
			
		||||
 | 
			
		||||
        if (headerActions.length > 0) {
 | 
			
		||||
            headerActions = ["(", ...headerActions, ")"];
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        this.$headerActions.append(...headerActions);
 | 
			
		||||
        this.$headerActions.append(this.headerActions);
 | 
			
		||||
 | 
			
		||||
        this.initialized = this.doRenderBody();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -24,7 +24,11 @@ export default class LinkMapWidget extends CollapsibleWidget {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    get headerActions() {
 | 
			
		||||
        const $showFullButton = $("<a>").append("show full").addClass('widget-header-action');
 | 
			
		||||
        const $showFullButton = $("<a>")
 | 
			
		||||
            .addClass("bx bx-map-alt")
 | 
			
		||||
            .addClass('widget-header-action')
 | 
			
		||||
            .attr('title', 'Show full link map');
 | 
			
		||||
 | 
			
		||||
        $showFullButton.on('click', async () => {
 | 
			
		||||
            const linkMapDialog = await import("../../dialogs/link_map.js");
 | 
			
		||||
            linkMapDialog.showDialog();
 | 
			
		||||
 | 
			
		||||
@ -21,7 +21,11 @@ class NoteRevisionsWidget extends CollapsibleWidget {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    get headerActions() {
 | 
			
		||||
        const $showFullButton = $("<a>").append("show dialog").addClass('widget-header-action');
 | 
			
		||||
        const $showFullButton = $("<a>")
 | 
			
		||||
            .addClass("bx bx-list-ul")
 | 
			
		||||
            .addClass('widget-header-action')
 | 
			
		||||
            .attr('title', 'Show Note revisions dialog');
 | 
			
		||||
        
 | 
			
		||||
        $showFullButton.on('click', async () => {
 | 
			
		||||
            const attributesDialog = await import("../../dialogs/note_revisions.js");
 | 
			
		||||
            attributesDialog.showCurrentNoteRevisions(this.noteId);
 | 
			
		||||
 | 
			
		||||
@ -15,7 +15,11 @@ export default class WhatLinksHereWidget extends CollapsibleWidget {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    get headerActions() {
 | 
			
		||||
        const $showFullButton = $("<a>").append("show link map").addClass('widget-header-action');
 | 
			
		||||
        const $showFullButton = $("<a>")
 | 
			
		||||
            .addClass("bx bx-map-alt")
 | 
			
		||||
            .addClass('widget-header-action')
 | 
			
		||||
            .attr('title', 'Show full link map');
 | 
			
		||||
 | 
			
		||||
        $showFullButton.on('click', async () => {
 | 
			
		||||
            const linkMapDialog = await import("../../dialogs/link_map.js");
 | 
			
		||||
            linkMapDialog.showDialog();
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user