Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

🎨 Setting: Set the default value of `item.direction` (#11214)

Frostime2770bb3126cd
diff --git a/app/src/plugin/Setting.ts b/app/src/plugin/Setting.ts
index 6d30421e0d..c90d2f997c 100644
--- a/app/src/plugin/Setting.ts
+++ b/app/src/plugin/Setting.ts
@@ -49,6 +49,9 @@ export class Setting {
actionElement = item.createActionElement();
}
const tagName = actionElement?.classList.contains("b3-switch")?"label":"div";
+ if (item.direction === undefined) {
+ item.direction = ["TEXTAREA"].includes(actionElement.tagName) ? 'row' : 'column';
+ }
if (item.direction === "row") {
html = `<${tagName} class="b3-label">
<div class="fn__block">