From be970f3ba5e1952b48330b10c8a668ad3debd2dd Mon Sep 17 00:00:00 2001 From: ewsgit Date: Fri, 24 Apr 2026 13:07:50 +0100 Subject: [PATCH] fix crashing files on web --- .../uk.ewsgit.files/web/layout/Layout.tsx | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/applications/uk.ewsgit.files/web/layout/Layout.tsx b/applications/uk.ewsgit.files/web/layout/Layout.tsx index 16e5e57..915b065 100644 --- a/applications/uk.ewsgit.files/web/layout/Layout.tsx +++ b/applications/uk.ewsgit.files/web/layout/Layout.tsx @@ -67,16 +67,23 @@ const Layout: Component = (props) => { label: string; onClick(): void; }[]), - {type: "divider"}, - {type: "label", label: "Local"}, - { - type: "button", - icon: {type: "icon", value: FOLDER_ICON}, - label: "Local Root", - onClick() { - navigate(`/app/uk.ewsgit.files/dir?path=local:/`); + ...(appContext?.isDesktopApp ? [ + {type: "divider"}, + {type: "label", label: "Local"}, + { + type: "button", + icon: {type: "icon", value: FOLDER_ICON}, + label: "Local Root", + onClick() { + navigate(`/app/uk.ewsgit.files/dir?path=local:/`); + }, }, - }, + ] : []) as { + type: "button"; + icon: {type: "icon"; value: string}; + label: string; + onClick(): void; + }[], {type: "margin"}, { type: "button", -- 2.51.2