mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-01 20:52:27 +08:00
feat(launch_bar): display popups at the bottom on horizontal layout
This commit is contained in:
parent
4eb435aeea
commit
4c05c8ab5e
@ -3,14 +3,14 @@ import { Tooltip, Dropdown } from "bootstrap";
|
|||||||
type PopoverPlacement = Tooltip.PopoverPlacement;
|
type PopoverPlacement = Tooltip.PopoverPlacement;
|
||||||
|
|
||||||
const TPL = /*html*/`
|
const TPL = /*html*/`
|
||||||
<div class="dropdown right-dropdown-widget dropend">
|
<div class="dropdown right-dropdown-widget">
|
||||||
<button type="button" data-bs-toggle="dropdown"
|
<button type="button" data-bs-toggle="dropdown"
|
||||||
aria-haspopup="true" aria-expanded="false"
|
aria-haspopup="true" aria-expanded="false"
|
||||||
class="bx right-dropdown-button launcher-button"></button>
|
class="bx right-dropdown-button launcher-button"></button>
|
||||||
|
|
||||||
<div class="tooltip-trigger"></div>
|
<div class="tooltip-trigger"></div>
|
||||||
|
|
||||||
<div class="dropdown-menu dropdown-menu-right"></div>
|
<div class="dropdown-menu"></div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -40,7 +40,11 @@ export default class RightDropdownButtonWidget extends BasicWidget {
|
|||||||
doRender() {
|
doRender() {
|
||||||
this.$widget = $(TPL);
|
this.$widget = $(TPL);
|
||||||
this.$dropdownMenu = this.$widget.find(".dropdown-menu");
|
this.$dropdownMenu = this.$widget.find(".dropdown-menu");
|
||||||
this.dropdown = Dropdown.getOrCreateInstance(this.$widget.find("[data-bs-toggle='dropdown']")[0]);
|
this.dropdown = Dropdown.getOrCreateInstance(this.$widget.find("[data-bs-toggle='dropdown']")[0], {
|
||||||
|
popperConfig: {
|
||||||
|
placement: this.settings.titlePlacement,
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
this.$tooltip = this.$widget.find(".tooltip-trigger").attr("title", this.title);
|
this.$tooltip = this.$widget.find(".tooltip-trigger").attr("title", this.title);
|
||||||
this.tooltip = new Tooltip(this.$tooltip[0], {
|
this.tooltip = new Tooltip(this.$tooltip[0], {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user