Warning, /network/tokodon/src/content/ui/StandaloneComposer.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com> 0002 // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0003 0004 import QtQuick 0005 import org.kde.kirigami 2 as Kirigami 0006 import QtQuick.Controls 2 as QQC2 0007 import QtQuick.Layouts 0008 import QtQml.Models 0009 import org.kde.tokodon 0010 0011 import "./StatusComposer" 0012 import "./StatusDelegate" 0013 0014 Kirigami.ApplicationWindow { 0015 id: appwindow 0016 0017 minimumWidth: Kirigami.Units.gridUnit * 15 0018 minimumHeight: Kirigami.Units.gridUnit * 20 0019 0020 Connections { 0021 target: AccountManager 0022 0023 function onAccountsReady() { 0024 if (!AccountManager.hasAccounts) { 0025 missingAccountMessage.visible = true; 0026 } 0027 } 0028 } 0029 0030 Connections { 0031 target: Controller 0032 0033 function onOpenComposer(text) { 0034 pageStack.push(Qt.resolvedUrl("./StatusComposer/StatusComposer.qml"), { 0035 purpose: StatusComposer.New, 0036 initialText: text, 0037 closeApplicationWhenFinished: true, 0038 }); 0039 } 0040 } 0041 0042 Rectangle { 0043 anchors.fill: parent 0044 visible: !AccountManager.isReady 0045 color: Kirigami.Theme.backgroundColor 0046 0047 Kirigami.LoadingPlaceholder { 0048 anchors.centerIn: parent 0049 } 0050 } 0051 0052 Kirigami.PlaceholderMessage { 0053 id: missingAccountMessage 0054 0055 anchors.centerIn: parent 0056 width: parent.width - Kirigami.Units.gridUnit * 4 0057 0058 text: i18n("No accounts available") 0059 visible: false 0060 } 0061 }