From de0b3b8415aee0accd7dd1983e274365c7394554 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 1 Nov 2024 08:54:58 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/12914 --- app/src/layout/dock/Files.ts | 13 ++++++++----- app/src/mobile/dock/MobileFiles.ts | 13 ++++++++----- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/app/src/layout/dock/Files.ts b/app/src/layout/dock/Files.ts index 806eed0d8..dabfc9c8c 100644 --- a/app/src/layout/dock/Files.ts +++ b/app/src/layout/dock/Files.ts @@ -770,12 +770,15 @@ export class Files extends Model { if (!init) { return; } - if (html === "") { - this.closeElement.lastElementChild.classList.remove("fn__none"); - this.closeElement.classList.add("fn__flex-1"); - } else { + const svgElement = this.closeElement.querySelector("svg") + if (html !== "") { + this.closeElement.style.height = "30px"; + svgElement.classList.remove("b3-list-item__arrow--open"); this.closeElement.lastElementChild.classList.add("fn__none"); - this.closeElement.classList.remove("fn__flex-1"); + } else { + this.closeElement.style.height = "40%"; + svgElement.classList.add("b3-list-item__arrow--open"); + this.closeElement.lastElementChild.classList.remove("fn__none"); } } diff --git a/app/src/mobile/dock/MobileFiles.ts b/app/src/mobile/dock/MobileFiles.ts index e8bd75ddc..bd45b87ec 100644 --- a/app/src/mobile/dock/MobileFiles.ts +++ b/app/src/mobile/dock/MobileFiles.ts @@ -322,12 +322,15 @@ export class MobileFiles extends Model { if (!init) { return; } - if (html === "") { - this.closeElement.lastElementChild.classList.remove("fn__none"); - this.closeElement.classList.add("fn__flex-1"); - } else { + const svgElement = this.closeElement.querySelector("svg") + if (html !== "") { + this.closeElement.style.height = "30px"; + svgElement.classList.remove("b3-list-item__arrow--open"); this.closeElement.lastElementChild.classList.add("fn__none"); - this.closeElement.classList.remove("fn__flex-1"); + } else { + this.closeElement.style.height = "40%"; + svgElement.classList.add("b3-list-item__arrow--open"); + this.closeElement.lastElementChild.classList.remove("fn__none"); } }