mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 14:37:46 +02:00
image url, in anticipation of having it in details
This commit is contained in:
parent
b4a43db025
commit
8708e2ac2b
1 changed files with 14 additions and 4 deletions
|
@ -48,7 +48,7 @@ Window {
|
||||||
|
|
||||||
function goCard(card) {
|
function goCard(card) {
|
||||||
if (useFeed) {
|
if (useFeed) {
|
||||||
storyCard.imageUrl = card.imageUrl; //"http://howard-stearns.github.io/models/images/dancing-avatars.jpg";
|
storyCard.imageUrl = card.imageUrl;
|
||||||
storyCard.userName = card.userName;
|
storyCard.userName = card.userName;
|
||||||
storyCard.placeName = card.placeName;
|
storyCard.placeName = card.placeName;
|
||||||
storyCard.actionPhrase = card.actionPhrase;
|
storyCard.actionPhrase = card.actionPhrase;
|
||||||
|
@ -96,7 +96,7 @@ Window {
|
||||||
userName: model.username;
|
userName: model.username;
|
||||||
placeName: model.place_name;
|
placeName: model.place_name;
|
||||||
hifiUrl: model.place_name + model.path;
|
hifiUrl: model.place_name + model.path;
|
||||||
imageUrl: model.thumbnail_url; // This is wrong, but it will have to wait.
|
imageUrl: model.image_url;
|
||||||
thumbnail: model.thumbnail_url;
|
thumbnail: model.thumbnail_url;
|
||||||
action: model.action;
|
action: model.action;
|
||||||
timestamp: model.created_at;
|
timestamp: model.created_at;
|
||||||
|
@ -325,14 +325,24 @@ Window {
|
||||||
// So here we make sure that we have all the properties we need, regardless of whether it is a place data or user story.
|
// So here we make sure that we have all the properties we need, regardless of whether it is a place data or user story.
|
||||||
var name = optionalPlaceName || data.place_name,
|
var name = optionalPlaceName || data.place_name,
|
||||||
tags = data.tags || [data.action, data.username],
|
tags = data.tags || [data.action, data.username],
|
||||||
description = data.description || "";
|
description = data.description || "",
|
||||||
|
thumbnail_url = data.thumbnail_url || "",
|
||||||
|
image_url = thumbnail_url;
|
||||||
|
if (data.details) {
|
||||||
|
try {
|
||||||
|
image_url = JSON.parse(data.details).image_url || thumbnail_url;
|
||||||
|
} catch (e) {
|
||||||
|
console.log(name, "has bad details", data.details);
|
||||||
|
}
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
place_name: name,
|
place_name: name,
|
||||||
username: data.username || "",
|
username: data.username || "",
|
||||||
path: data.path || "",
|
path: data.path || "",
|
||||||
created_at: data.created_at || "",
|
created_at: data.created_at || "",
|
||||||
action: data.action || "",
|
action: data.action || "",
|
||||||
thumbnail_url: data.thumbnail_url || "",
|
thumbnail_url: thumbnail_url,
|
||||||
|
image_url: image_url,
|
||||||
|
|
||||||
tags: tags,
|
tags: tags,
|
||||||
description: description,
|
description: description,
|
||||||
|
|
Loading…
Reference in a new issue