mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 21:19:01 +01:00 
			
		
		
		
	fix(client): global menu alignment on horizontal layout
This commit is contained in:
		
							parent
							
								
									23873b72bf
								
							
						
					
					
						commit
						13e33549c1
					
				@ -5,7 +5,7 @@ import UpdateAvailableWidget from "./update_available.js";
 | 
			
		||||
import options from "../../services/options.js";
 | 
			
		||||
 | 
			
		||||
const TPL = `
 | 
			
		||||
<div class="dropdown global-menu dropend">
 | 
			
		||||
<div class="dropdown global-menu">
 | 
			
		||||
    <style>
 | 
			
		||||
    .global-menu {
 | 
			
		||||
        width: 53px;
 | 
			
		||||
@ -259,6 +259,10 @@ export default class GlobalMenuWidget extends BasicWidget {
 | 
			
		||||
    doRender() {
 | 
			
		||||
        this.$widget = $(TPL);
 | 
			
		||||
 | 
			
		||||
        if (!this.isHorizontalLayout) {
 | 
			
		||||
            this.$widget.addClass("dropend");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        const $globalMenuButton = this.$widget.find(".global-menu-button")
 | 
			
		||||
        if (!this.isHorizontalLayout) {
 | 
			
		||||
            $globalMenuButton.prepend($(`\
 | 
			
		||||
@ -282,7 +286,9 @@ export default class GlobalMenuWidget extends BasicWidget {
 | 
			
		||||
            $globalMenuButton.toggleClass("bx bx-menu");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        this.dropdown = bootstrap.Dropdown.getOrCreateInstance(this.$widget.find("[data-bs-toggle='dropdown']"));
 | 
			
		||||
        this.dropdown = bootstrap.Dropdown.getOrCreateInstance(this.$widget.find("[data-bs-toggle='dropdown']"), {
 | 
			
		||||
            alignment: "bottom"
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
        this.$widget.find(".show-about-dialog-button").on('click', () => this.triggerCommand("openAboutDialog"));
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user