mirror of
https://github.com/zadam/trilium.git
synced 2025-12-13 10:54:25 +01:00
fix(ribbon): attribute details not shown in new layout
This commit is contained in:
parent
c4f483c250
commit
e556c090ff
@ -12,6 +12,7 @@ import shortcutService from "../../services/shortcuts.js";
|
|||||||
import appContext from "../../components/app_context.js";
|
import appContext from "../../components/app_context.js";
|
||||||
import type { Attribute } from "../../services/attribute_parser.js";
|
import type { Attribute } from "../../services/attribute_parser.js";
|
||||||
import { focusSavedElement, saveFocusedElement } from "../../services/focus.js";
|
import { focusSavedElement, saveFocusedElement } from "../../services/focus.js";
|
||||||
|
import { isExperimentalFeatureEnabled } from "../../services/experimental_features.js";
|
||||||
|
|
||||||
const TPL = /*html*/`
|
const TPL = /*html*/`
|
||||||
<div class="attr-detail tn-tool-dialog">
|
<div class="attr-detail tn-tool-dialog">
|
||||||
@ -309,6 +310,8 @@ interface SearchRelatedResponse {
|
|||||||
count: number;
|
count: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isNewLayout = isExperimentalFeatureEnabled("new-layout");
|
||||||
|
|
||||||
export default class AttributeDetailWidget extends NoteContextAwareWidget {
|
export default class AttributeDetailWidget extends NoteContextAwareWidget {
|
||||||
private $title!: JQuery<HTMLElement>;
|
private $title!: JQuery<HTMLElement>;
|
||||||
private $inputName!: JQuery<HTMLElement>;
|
private $inputName!: JQuery<HTMLElement>;
|
||||||
@ -579,6 +582,13 @@ export default class AttributeDetailWidget extends NoteContextAwareWidget {
|
|||||||
.css("top", y - offset.top + 70)
|
.css("top", y - offset.top + 70)
|
||||||
.css("max-height", outerHeight + y > height - 50 ? height - y - 50 : 10000);
|
.css("max-height", outerHeight + y > height - 50 ? height - y - 50 : 10000);
|
||||||
|
|
||||||
|
if (isNewLayout) {
|
||||||
|
this.$widget
|
||||||
|
.css("top", "unset")
|
||||||
|
.css("bottom", 70)
|
||||||
|
.css("max-height", "80vh");
|
||||||
|
}
|
||||||
|
|
||||||
if (focus === "name") {
|
if (focus === "name") {
|
||||||
this.$inputName.trigger("focus").trigger("select");
|
this.$inputName.trigger("focus").trigger("select");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user