Files
pay/guis/mobile/SelectDefaultConfigButton.qml
T

39 lines
1.3 KiB
QML
Raw Permalink Normal View History

2024-12-23 18:44:30 +01:00
/*
* This file is part of the Flowee project
2025-06-17 21:03:26 +02:00
* Copyright (C) 2022-2025 Tom Zander <tom@flowee.org>
2024-12-23 18:44:30 +01:00
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick
TextButton {
2024-12-23 18:51:55 +01:00
pageButton: true
2024-12-23 18:44:30 +01:00
text: qsTr("Default Wallet")
visible: !portfolio.singleAccountSetup
subtext: {
2026-03-14 21:14:42 +01:00
var defaultAccount = ""
2024-12-23 18:44:30 +01:00
for (let a of portfolio.rawAccounts) {
if (a.isPrimaryAccount) {
2026-03-14 21:14:42 +01:00
defaultAccount = a.name
break
2024-12-23 18:44:30 +01:00
}
}
2025-06-17 21:03:26 +02:00
if (defaultAccount === "")
2026-03-14 21:14:42 +01:00
return ""
2024-12-23 18:44:30 +01:00
2026-03-14 21:14:42 +01:00
qsTr("%1 is used on startup").arg(defaultAccount)
2024-12-23 18:44:30 +01:00
}
2026-03-14 21:14:42 +01:00
onClicked: thePile.push("./SelectDefaultAccountPage.qml")
2024-12-23 18:44:30 +01:00
}