mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 23:16:20 +02:00
basic minority-report scroll (fixed initial data, but infinite cards)
This commit is contained in:
parent
ed811d0431
commit
ff17761769
1 changed files with 7 additions and 7 deletions
|
@ -66,6 +66,7 @@ Window {
|
||||||
width: (3 * cardWidth) + (2 * hifi.layout.spacing);
|
width: (3 * cardWidth) + (2 * hifi.layout.spacing);
|
||||||
height: cardHeight;
|
height: cardHeight;
|
||||||
spacing: hifi.layout.spacing;
|
spacing: hifi.layout.spacing;
|
||||||
|
clip: true;
|
||||||
anchors {
|
anchors {
|
||||||
bottom: backgroundImage.top;
|
bottom: backgroundImage.top;
|
||||||
bottomMargin: 2 * hifi.layout.spacing;
|
bottomMargin: 2 * hifi.layout.spacing;
|
||||||
|
@ -245,7 +246,7 @@ Window {
|
||||||
if (!domainsBaseUrl) {
|
if (!domainsBaseUrl) {
|
||||||
var domainsOptions = [
|
var domainsOptions = [
|
||||||
'open', // published hours handle now
|
'open', // published hours handle now
|
||||||
'active', // has at least one person connected. FIXME: really want any place that is verified accessible.
|
// fixme hrs restore 'active', // has at least one person connected. FIXME: really want any place that is verified accessible.
|
||||||
// FIXME: really want places I'm allowed in, not just open ones.
|
// FIXME: really want places I'm allowed in, not just open ones.
|
||||||
'restriction=open', // Not by whitelist, etc. FIXME: If logged in, add hifi to the restriction options, in order to include places that require login.
|
'restriction=open', // Not by whitelist, etc. FIXME: If logged in, add hifi to the restriction options, in order to include places that require login.
|
||||||
// FIXME add maturity
|
// FIXME add maturity
|
||||||
|
@ -276,7 +277,8 @@ Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
function filterChoicesByText() {
|
function filterChoicesByText() {
|
||||||
function fill1(targetIndex, data) {
|
function fill1(targetIndex) {
|
||||||
|
var data = filtered[targetIndex];
|
||||||
if (!data) {
|
if (!data) {
|
||||||
if (targetIndex < suggestions.count) {
|
if (targetIndex < suggestions.count) {
|
||||||
suggestions.remove(targetIndex);
|
suggestions.remove(targetIndex);
|
||||||
|
@ -301,9 +303,7 @@ Window {
|
||||||
return text.indexOf(word) >= 0;
|
return text.indexOf(word) >= 0;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
fill1(0, filtered[0]);
|
for (var index in filtered) { fill1(index); }
|
||||||
fill1(1, filtered[1]);
|
|
||||||
fill1(2, filtered[2]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function fillDestinations() {
|
function fillDestinations() {
|
||||||
|
@ -316,13 +316,13 @@ Window {
|
||||||
var here = AddressManager.hostname; // don't show where we are now.
|
var here = AddressManager.hostname; // don't show where we are now.
|
||||||
allDomains = domains.filter(function (domain) { return domain.name !== here; });
|
allDomains = domains.filter(function (domain) { return domain.name !== here; });
|
||||||
// Whittle down suggestions to those that have at least one user, and try to get pictures.
|
// Whittle down suggestions to those that have at least one user, and try to get pictures.
|
||||||
suggestionChoices = allDomains.filter(function (domain) { return domain.online_users; });
|
suggestionChoices = allDomains.filter(function (domain) { return true/*fixme hrs restore domain.online_users*/; });
|
||||||
asyncEach(domains, addPictureToDomain, function (error) {
|
asyncEach(domains, addPictureToDomain, function (error) {
|
||||||
if (error) {
|
if (error) {
|
||||||
console.log('place picture query failed:', error);
|
console.log('place picture query failed:', error);
|
||||||
}
|
}
|
||||||
// Whittle down more by requiring a picture.
|
// Whittle down more by requiring a picture.
|
||||||
suggestionChoices = suggestionChoices.filter(function (domain) { return domain.lobby; });
|
// fixme hrs restore suggestionChoices = suggestionChoices.filter(function (domain) { return domain.lobby; });
|
||||||
filterChoicesByText();
|
filterChoicesByText();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue