diff --git a/apps/client/src/widgets/NoteDetail.tsx b/apps/client/src/widgets/NoteDetail.tsx index 44ed2ecd2..10d40cee3 100644 --- a/apps/client/src/widgets/NoteDetail.tsx +++ b/apps/client/src/widgets/NoteDetail.tsx @@ -18,6 +18,7 @@ import Image from "./type_widgets/Image"; import { ReadOnlyCode, EditableCode } from "./type_widgets/code/Code"; import Mermaid from "./type_widgets/Mermaid"; import MindMap from "./type_widgets/MindMap"; +import { AttachmentList } from "./type_widgets/Attachment"; /** * A `NoteType` altered by the note detail widget, taking into consideration whether the note is editable or not and adding special note types such as an empty one, @@ -98,6 +99,7 @@ function getCorrespondingWidget(noteType: ExtendedNoteType | undefined, props: T case "editableCode": return case "mermaid": return case "mindMap": return + case "attachmentList": return default: break; } } diff --git a/apps/client/src/widgets/react/HelpButton.tsx b/apps/client/src/widgets/react/HelpButton.tsx index 065252264..eb55b1c43 100644 --- a/apps/client/src/widgets/react/HelpButton.tsx +++ b/apps/client/src/widgets/react/HelpButton.tsx @@ -5,17 +5,18 @@ import { openInAppHelpFromUrl } from "../../services/utils"; interface HelpButtonProps { className?: string; helpPage: string; + title?: string; style?: CSSProperties; } -export default function HelpButton({ className, helpPage, style }: HelpButtonProps) { +export default function HelpButton({ className, helpPage, title, style }: HelpButtonProps) { return ( `); utils.initHelpButtons($helpButton); @@ -56,24 +38,6 @@ export default class AttachmentListTypeWidget extends TypeWidget { const noteLink = await linkService.createLink(this.noteId); // do separately to avoid race condition between empty() and .append() noteLink.addClass("use-tn-links"); - const $uploadButton = $(` - - `); - - $uploadButton.on("click", () => { - if (this.noteId) { - this.triggerCommand("showUploadAttachmentsDialog", { noteId: this.noteId }); - } - }) - - this.$linksWrapper.empty().append( - $("
").append(t("attachment_list.owning_note"), noteLink), - $(`
`).append($uploadButton, $helpButton) - ); - this.$list.empty(); this.children = []; this.renderedAttachmentIds = new Set();