Warning, /pim/merkuro/src/mail/qml/actions/NewFolderAction.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2023 Aakarsh MJ <mj.akarsh@gmail.com> 0002 // SPDX-License-Identifier: GPL-2.0-or-later 0003 0004 import QtQuick 2.15 0005 import QtQuick.Controls 2.15 as QQC2 0006 import QtQuick.Layouts 1.15 0007 import org.kde.kirigami 2.19 as Kirigami 0008 import org.kde.merkuro.mail 1.0 0009 0010 Kirigami.Action { 0011 required property var index 0012 0013 readonly property Component newFolderDialogComponent: Component { 0014 id: newFolderDialogComponent 0015 0016 Kirigami.PromptDialog { 0017 id: newFolderDialog 0018 title: i18n("New Folder") 0019 standardButtons: Kirigami.Dialog.NoButton 0020 0021 customFooterActions: [ 0022 Kirigami.Action { 0023 text: i18n("Create Folder") 0024 icon.name: "dialog-ok" 0025 onTriggered: { 0026 MailManager.addCollection(index, newFolderName.text); 0027 newFolderDialog.close(); 0028 } 0029 }, 0030 Kirigami.Action { 0031 text: i18n("Cancel") 0032 icon.name: "dialog-cancel" 0033 onTriggered: newFolderDialog.close() 0034 } 0035 ] 0036 0037 QQC2.TextField { 0038 id: newFolderName 0039 placeholderText: i18n("Folder Name...") 0040 } 0041 } 0042 } 0043 0044 onTriggered: { 0045 const dialog = newFolderDialogComponent.createObject(applicationWindow()); 0046 dialog.open(); 0047 } 0048 }