Skip to content

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

:bug: Apply responsive horizontal padding to Protyle Lite https://github.com/siyuan-note/siyuan/issues/19372

Danield7683f7a64ef
diff --git a/app/src/assets/scss/business/_ai_agent.scss b/app/src/assets/scss/business/_ai_agent.scss
index 47edffd309..a13d53b223 100644
--- a/app/src/assets/scss/business/_ai_agent.scss
+++ b/app/src/assets/scss/business/_ai_agent.scss
@@ -1191,7 +1191,7 @@
font-size: var(--b3-font-size);
line-height: 1.6;
color: var(--b3-theme-on-background);
- padding: 0;
+ padding: 0 !important;
}
.agent-chat__composer-host .protyle-wysiwyg {
diff --git a/app/src/protyle/index.ts b/app/src/protyle/index.ts
index aa626b4341..c9f23c226d 100644
--- a/app/src/protyle/index.ts
+++ b/app/src/protyle/index.ts
@@ -432,6 +432,9 @@ export class Protyle {
if (!options.blockId) {
// 搜索页签需提前初始化
removeLoading(this.protyle);
+ if (this.protyle.lite) {
+ resize(this.protyle);
+ }
return;
}
diff --git a/app/src/protyle/ui/initUI.ts b/app/src/protyle/ui/initUI.ts
index c358e31b6f..ab8dae4956 100644
--- a/app/src/protyle/ui/initUI.ts
+++ b/app/src/protyle/ui/initUI.ts
@@ -34,7 +34,11 @@ const focusMobileAppEditor = (element: HTMLElement) => {
export const initUI = (protyle: IProtyle) => {
protyle.contentElement = document.createElement("div");
protyle.contentElement.className = "protyle-content";
- if (!isMobile() && !protyle.lite && CSS.supports("container-type", "inline-size") &&
+ if (window.siyuan.config.editor.fullWidth) {
+ protyle.contentElement.dataset.fullwidth = "true";
+ protyle.preview.element.dataset.fullwidth = "true";
+ }
+ if (!isMobile() && CSS.supports("container-type", "inline-size") &&
CSS.supports("width", "1cqi") && !protyle.options.action.includes(Constants.CB_GET_HISTORY) &&
!protyle.options.backlinkData) {
protyle.contentElement.dataset.paddingMode = "responsive";