mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-19 13:44:20 +02:00
Checkpoint Proofs Filter in Inventory
This commit is contained in:
parent
9095df4641
commit
91b199a456
6 changed files with 57 additions and 37 deletions
|
@ -260,38 +260,50 @@ Item {
|
|||
interactive: false;
|
||||
anchors.fill: parent;
|
||||
model: filterBarModel;
|
||||
delegate: Rectangle {
|
||||
id: dropDownButton;
|
||||
color: hifi.colors.white;
|
||||
width: parent.width;
|
||||
delegate: Item {
|
||||
width: parent.width;
|
||||
height: 50;
|
||||
Rectangle {
|
||||
id: dropDownButton;
|
||||
color: hifi.colors.white;
|
||||
width: parent.width;
|
||||
height: 50;
|
||||
visible: true;
|
||||
|
||||
RalewaySemiBold {
|
||||
id: dropDownButtonText;
|
||||
text: model.displayName;
|
||||
anchors.fill: parent;
|
||||
anchors.leftMargin: 12;
|
||||
color: hifi.colors.baseGray;
|
||||
horizontalAlignment: Text.AlignLeft;
|
||||
verticalAlignment: Text.AlignVCenter;
|
||||
size: 18;
|
||||
RalewaySemiBold {
|
||||
id: dropDownButtonText;
|
||||
text: model.displayName;
|
||||
anchors.fill: parent;
|
||||
anchors.topMargin: 2;
|
||||
anchors.leftMargin: 12;
|
||||
color: hifi.colors.baseGray;
|
||||
horizontalAlignment: Text.AlignLeft;
|
||||
verticalAlignment: Text.AlignVCenter;
|
||||
size: 18;
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent;
|
||||
hoverEnabled: true;
|
||||
propagateComposedEvents: false;
|
||||
onEntered: {
|
||||
dropDownButton.color = hifi.colors.blueHighlight;
|
||||
}
|
||||
onExited: {
|
||||
dropDownButton.color = hifi.colors.white;
|
||||
}
|
||||
onClicked: {
|
||||
textField.forceActiveFocus();
|
||||
root.primaryFilter_index = index;
|
||||
dropdownContainer.visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent;
|
||||
hoverEnabled: true;
|
||||
propagateComposedEvents: false;
|
||||
onEntered: {
|
||||
dropDownButton.color = hifi.colors.blueHighlight;
|
||||
}
|
||||
onExited: {
|
||||
dropDownButton.color = hifi.colors.white;
|
||||
}
|
||||
onClicked: {
|
||||
textField.forceActiveFocus();
|
||||
root.primaryFilter_index = index;
|
||||
dropdownContainer.visible = false;
|
||||
}
|
||||
Rectangle {
|
||||
height: 2;
|
||||
width: parent.width;
|
||||
color: hifi.colors.lightGray;
|
||||
visible: model.separator
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -518,8 +518,13 @@ Rectangle {
|
|||
"filterName": "wearable"
|
||||
},
|
||||
{
|
||||
"separator" : true,
|
||||
"displayName": "Updatable",
|
||||
"filterName": "updated"
|
||||
},
|
||||
{
|
||||
"displayName": "Proofs",
|
||||
"filterName": "proofs"
|
||||
}
|
||||
]
|
||||
filterBar.primaryFilterChoices.clear();
|
||||
|
|
|
@ -152,10 +152,14 @@ void Ledger::balance(const QStringList& keys) {
|
|||
keysQuery("balance", "balanceSuccess", "balanceFailure");
|
||||
}
|
||||
|
||||
void Ledger::inventory(const QString& editionFilter, const QString& typeFilter, const QString& titleFilter, const int& page, const int& perPage) {
|
||||
void Ledger::inventory(const QString& typeFilter, const QString& titleFilter, const int& page, const int& perPage) {
|
||||
QJsonObject params;
|
||||
params["edition_filter"] = editionFilter;
|
||||
params["type_filter"] = typeFilter;
|
||||
if (typeFilter == "proofs") {
|
||||
params["edition_filter"] = "proofs";
|
||||
} else {
|
||||
params["type_filter"] = typeFilter;
|
||||
}
|
||||
|
||||
params["title_filter"] = titleFilter;
|
||||
params["page"] = page;
|
||||
params["per_page"] = perPage;
|
||||
|
|
|
@ -29,7 +29,7 @@ public:
|
|||
bool receiveAt(const QString& hfc_key, const QString& signing_key, const QByteArray& locker);
|
||||
bool receiveAt();
|
||||
void balance(const QStringList& keys);
|
||||
void inventory(const QString& editionFilter, const QString& typeFilter, const QString& titleFilter, const int& page, const int& perPage);
|
||||
void inventory(const QString& typeFilter, const QString& titleFilter, const int& page, const int& perPage);
|
||||
void history(const QStringList& keys, const int& pageNumber, const int& itemsPerPage);
|
||||
void account();
|
||||
void updateLocation(const QString& asset_id, const QString& location, const bool& alsoUpdateSiblings = false, const bool controlledFailure = false);
|
||||
|
|
|
@ -151,8 +151,7 @@ void QmlCommerce::balance() {
|
|||
}
|
||||
}
|
||||
|
||||
void QmlCommerce::inventory(const QString& editionFilter,
|
||||
const QString& typeFilter,
|
||||
void QmlCommerce::inventory(const QString& typeFilter,
|
||||
const QString& titleFilter,
|
||||
const int& page,
|
||||
const int& perPage) {
|
||||
|
@ -160,7 +159,7 @@ void QmlCommerce::inventory(const QString& editionFilter,
|
|||
auto wallet = DependencyManager::get<Wallet>();
|
||||
QStringList cachedPublicKeys = wallet->listPublicKeys();
|
||||
if (!cachedPublicKeys.isEmpty()) {
|
||||
ledger->inventory(editionFilter, typeFilter, titleFilter, page, perPage);
|
||||
ledger->inventory(typeFilter, titleFilter, page, perPage);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ protected:
|
|||
|
||||
Q_INVOKABLE void buy(const QString& assetId, int cost, const bool controlledFailure = false);
|
||||
Q_INVOKABLE void balance();
|
||||
Q_INVOKABLE void inventory(const QString& editionFilter = QString(), const QString& typeFilter = QString(), const QString& titleFilter = QString(), const int& page = 1, const int& perPage = 20);
|
||||
Q_INVOKABLE void inventory(const QString& typeFilter = QString(), const QString& titleFilter = QString(), const int& page = 1, const int& perPage = 20);
|
||||
Q_INVOKABLE void history(const int& pageNumber, const int& itemsPerPage = 100);
|
||||
Q_INVOKABLE void generateKeyPair();
|
||||
Q_INVOKABLE void account();
|
||||
|
|
Loading…
Reference in a new issue