From 16374aaf1d27c814ad2aba1b286cacc7daa1ffff Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 14 Dec 2025 22:51:50 +0200 Subject: [PATCH] refactor(layout): use note.isContentAvailable() --- apps/client/src/widgets/ribbon/NoteActionsCustom.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/apps/client/src/widgets/ribbon/NoteActionsCustom.tsx b/apps/client/src/widgets/ribbon/NoteActionsCustom.tsx index 8549020bb..077094246 100644 --- a/apps/client/src/widgets/ribbon/NoteActionsCustom.tsx +++ b/apps/client/src/widgets/ribbon/NoteActionsCustom.tsx @@ -3,7 +3,6 @@ import { useContext } from "preact/hooks"; import FNote from "../../entities/fnote"; import { t } from "../../services/i18n"; import { downloadFileNote, openNoteExternally } from "../../services/open"; -import protected_session_holder from "../../services/protected_session_holder"; import ActionButton from "../react/ActionButton"; import { FormFileUploadActionButton } from "../react/FormFileUpload"; import { ParentComponent } from "../react/react_utils"; @@ -63,13 +62,11 @@ function ImageActions(props: NoteActionsCustomProps) { function UploadNewRevisionButton({ note, onChange }: NoteActionsCustomProps & { onChange: (files: FileList | null) => void; }) { - const canAccessProtectedNote = !note?.isProtected || protected_session_holder.isProtectedSessionAvailable(); - return ( ); @@ -87,13 +84,11 @@ function OpenExternallyButton({ note }: NoteActionsCustomProps) { } function DownloadFileButton({ note }: NoteActionsCustomProps) { - const canAccessProtectedNote = !note?.isProtected || protected_session_holder.isProtectedSessionAvailable(); - return ( downloadFileNote(note.noteId)} /> );