2023-03-20 12:29:05 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
import AppLayouts.Profile.controls 1.0
|
2024-02-28 12:19:14 +00:00
|
|
|
import AppLayouts.Wallet 1.0
|
|
|
|
|
|
|
|
import StatusQ.Core.Theme 0.1
|
2023-03-20 12:29:05 +00:00
|
|
|
|
2024-03-03 16:34:08 +00:00
|
|
|
import StatusQ 0.1
|
|
|
|
|
2023-03-20 12:29:05 +00:00
|
|
|
ProfileShowcasePanel {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
property string currentWallet
|
|
|
|
|
2024-02-15 17:26:05 +00:00
|
|
|
emptyInShowcasePlaceholderText: qsTr("Accounts here will show on your profile")
|
|
|
|
emptyHiddenPlaceholderText: qsTr("Accounts here will be hidden from your profile")
|
2024-03-03 16:34:08 +00:00
|
|
|
emptySearchPlaceholderText: qsTr("No accounts matching search")
|
|
|
|
searchPlaceholderText: qsTr("Search account name or address")
|
2024-02-29 09:07:35 +00:00
|
|
|
delegate: ProfileShowcasePanelDelegate {
|
2024-02-28 12:19:14 +00:00
|
|
|
title: model ? model.name : ""
|
2024-03-13 11:10:36 +00:00
|
|
|
secondaryTitle: WalletUtils.addressToDisplay(model ? model.address ?? "" : "",
|
|
|
|
model ? model.preferredSharingChainShortNames ?? "" : "",
|
|
|
|
true,
|
|
|
|
containsMouse)
|
2024-02-28 12:19:14 +00:00
|
|
|
hasEmoji: model && !!model.emoji
|
|
|
|
hasIcon: !hasEmoji
|
|
|
|
icon.name: hasEmoji ? model.emoji : "filled-account"
|
|
|
|
icon.color: model && model.colorId ? Utils.getColorForId(model.colorId) : Theme.palette.primaryColor3
|
2024-03-04 22:07:09 +00:00
|
|
|
highlighted: model ? model.address === root.currentWallet : false
|
2023-03-20 12:29:05 +00:00
|
|
|
}
|
2024-04-19 09:46:23 +00:00
|
|
|
filter: FastExpressionFilter {
|
|
|
|
readonly property string lowerCaseSearchText: root.searcherText.toLowerCase()
|
|
|
|
expression: {
|
|
|
|
lowerCaseSearchText
|
|
|
|
return (address.toLowerCase().includes(lowerCaseSearchText) ||
|
|
|
|
name.toLowerCase().includes(lowerCaseSearchText) ||
|
|
|
|
preferredSharingChainShortNames.toLowerCase().includes(lowerCaseSearchText))
|
|
|
|
}
|
|
|
|
expectedRoles: ["address", "name", "preferredSharingChainShortNames"]
|
|
|
|
}
|
2023-03-20 12:29:05 +00:00
|
|
|
}
|