From b8581ba3df0301268ba1b87557e71a302d69e60b Mon Sep 17 00:00:00 2001 From: wuyize Date: Fri, 7 Jul 2023 01:36:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E8=B0=83=E7=94=A8=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E7=A8=8B=E5=BA=8F=E6=89=93=E5=BC=80=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AicsKnowledgeBase/qml/component/CustomAppBar.qml | 15 +++++++++++++++ AicsKnowledgeBase/qml/page/ContentPage.qml | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/AicsKnowledgeBase/qml/component/CustomAppBar.qml b/AicsKnowledgeBase/qml/component/CustomAppBar.qml index 56ead21..6285759 100644 --- a/AicsKnowledgeBase/qml/component/CustomAppBar.qml +++ b/AicsKnowledgeBase/qml/component/CustomAppBar.qml @@ -117,6 +117,20 @@ Rectangle { Layout.rightMargin: 10 iconSource: FluentIcons.PenPalette iconSize: 14 + onClicked: { + note_menu.open() + } + FluMenu { + id: note_menu + x: parent ? (parent.width - width) / 2 : 0 + y: parent ? parent.height : 0 + FluMenuItem { + text: "收藏的笔记" + } + FluMenuItem { + text: "我的笔记" + } + } } Text { @@ -218,5 +232,6 @@ Rectangle { frameless_helper.setHitTestVisible(btn_maximize) frameless_helper.setHitTestVisible(btn_close) frameless_helper.setHitTestVisible(btn_transfer) + frameless_helper.setHitTestVisible(btn_note) } } diff --git a/AicsKnowledgeBase/qml/page/ContentPage.qml b/AicsKnowledgeBase/qml/page/ContentPage.qml index f2a72d5..7b721d5 100644 --- a/AicsKnowledgeBase/qml/page/ContentPage.qml +++ b/AicsKnowledgeBase/qml/page/ContentPage.qml @@ -66,7 +66,7 @@ FluArea { property int shareCount: 0 property int browsCount: 555 property bool isFavorite: false - property bool isDownload: false + property bool isDownload: UserData.downloadedFiles.indexOf(fileId) != -1 property double fileSize: 0 property string title: "文章标题" property list tags: ["tag 1", "tag 2", "tag 3"] @@ -249,7 +249,7 @@ FluArea { FileTransferManager.download(content_page.fileId, content_page.title) else { - + FileTransferManager.openLocalFile(content_page.title) } } }