mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-13 04:13:19 +08: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";
|
import options from "../../services/options.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = `
|
||||||
<div class="dropdown global-menu dropend">
|
<div class="dropdown global-menu">
|
||||||
<style>
|
<style>
|
||||||
.global-menu {
|
.global-menu {
|
||||||
width: 53px;
|
width: 53px;
|
||||||
@ -259,6 +259,10 @@ export default class GlobalMenuWidget extends BasicWidget {
|
|||||||
doRender() {
|
doRender() {
|
||||||
this.$widget = $(TPL);
|
this.$widget = $(TPL);
|
||||||
|
|
||||||
|
if (!this.isHorizontalLayout) {
|
||||||
|
this.$widget.addClass("dropend");
|
||||||
|
}
|
||||||
|
|
||||||
const $globalMenuButton = this.$widget.find(".global-menu-button")
|
const $globalMenuButton = this.$widget.find(".global-menu-button")
|
||||||
if (!this.isHorizontalLayout) {
|
if (!this.isHorizontalLayout) {
|
||||||
$globalMenuButton.prepend($(`\
|
$globalMenuButton.prepend($(`\
|
||||||
@ -282,7 +286,9 @@ export default class GlobalMenuWidget extends BasicWidget {
|
|||||||
$globalMenuButton.toggleClass("bx bx-menu");
|
$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"));
|
this.$widget.find(".show-about-dialog-button").on('click', () => this.triggerCommand("openAboutDialog"));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user