mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 03:53:52 +02:00
goto client-side filtering (preliminary)
This commit is contained in:
parent
25ee948662
commit
f72f8c762b
3 changed files with 11 additions and 10 deletions
|
@ -33,7 +33,6 @@ Column {
|
|||
property int stackedCardShadowHeight: 4;
|
||||
property int labelSize: 20;
|
||||
|
||||
property string metaverseServerUrl: ''; // FIXME loose this?
|
||||
property string protocol: '';
|
||||
property string actions: 'snapshot';
|
||||
// sendToScript doesn't get wired until after everything gets created. So we have to queue fillDestinations on nextTick.
|
||||
|
@ -63,10 +62,16 @@ Column {
|
|||
};
|
||||
listModelName: actions;
|
||||
listView: scroll;
|
||||
searchFilter: filter.toUpperCase().split(/\s+/).filter(identity).join(' ');
|
||||
searchItemTest: function (text, item) {
|
||||
return searchFilter.split().every(function (word) {
|
||||
return item.searchText.indexOf(word) >= 0;
|
||||
});
|
||||
}; //HRS FIXME remove when endpoint works.
|
||||
}
|
||||
|
||||
function resolveUrl(url) {
|
||||
return (url.indexOf('/') === 0) ? (metaverseServerUrl + url) : url;
|
||||
return (url.indexOf('/') === 0) ? (Account.metaverseServerURL + url) : url;
|
||||
}
|
||||
function makeModelData(data) { // create a new obj from data
|
||||
// ListModel elements will only ever have those properties that are defined by the first obj that is added.
|
||||
|
@ -101,6 +106,9 @@ Column {
|
|||
console.log('fixme makeModelData', JSON.stringify(fixme));
|
||||
return fixme;
|
||||
}
|
||||
function identity(x) {
|
||||
return x;
|
||||
}
|
||||
/* FIXME
|
||||
property var allStories: [];
|
||||
property var placeMap: ({}); // Used for making stacks.
|
||||
|
@ -172,9 +180,6 @@ Column {
|
|||
report('user stories');
|
||||
});
|
||||
}
|
||||
function identity(x) {
|
||||
return x;
|
||||
}
|
||||
function makeFilteredStoryProcessor() { // answer a function(storyData) that adds it to suggestions if it matches
|
||||
var words = filter.toUpperCase().split(/\s+/).filter(identity);
|
||||
function suggestable(story) {
|
||||
|
|
|
@ -101,10 +101,10 @@ Item {
|
|||
currentPageToRetrieve = -1;
|
||||
}
|
||||
if (searchItemTest) {
|
||||
copyOfItems = copyOfItems.concat(processed);
|
||||
if (searchFilter) {
|
||||
processed = applySearchItemTest(processed);
|
||||
}
|
||||
copyOfItems = copyOfItems.concat(processed);
|
||||
}
|
||||
if (localSort) {
|
||||
copyOfItems = copyOfItems.concat(processed);
|
||||
|
|
|
@ -34,7 +34,6 @@ StackView {
|
|||
height: parent !== null ? parent.height : undefined
|
||||
property int cardWidth: 212;
|
||||
property int cardHeight: 152;
|
||||
property string metaverseBase: addressBarDialog.metaverseServerUrl + "/api/v1/";
|
||||
property var tablet: null;
|
||||
|
||||
RootHttpRequest { id: http; }
|
||||
|
@ -322,7 +321,6 @@ StackView {
|
|||
width: parent.width;
|
||||
cardWidth: 312 + (2 * 4);
|
||||
cardHeight: 163 + (2 * 4);
|
||||
metaverseServerUrl: addressBarDialog.metaverseServerUrl;
|
||||
labelText: 'HAPPENING NOW';
|
||||
actions: 'announcement';
|
||||
filter: addressLine.text;
|
||||
|
@ -335,7 +333,6 @@ StackView {
|
|||
cardWidth: 210;
|
||||
cardHeight: 110 + messageHeight;
|
||||
messageHeight: 44;
|
||||
metaverseServerUrl: addressBarDialog.metaverseServerUrl;
|
||||
labelText: 'PLACES';
|
||||
actions: 'concurrency';
|
||||
filter: addressLine.text;
|
||||
|
@ -349,7 +346,6 @@ StackView {
|
|||
cardHeight: 75 + messageHeight + 4;
|
||||
messageHeight: 32;
|
||||
textPadding: 6;
|
||||
metaverseServerUrl: addressBarDialog.metaverseServerUrl;
|
||||
labelText: 'RECENT SNAPS';
|
||||
actions: 'snapshot';
|
||||
filter: addressLine.text;
|
||||
|
|
Loading…
Reference in a new issue