Skip to content

Commit

Permalink
Merge pull request #5406 from Countly/dashboard-widgets-ui-fixes
Browse files Browse the repository at this point in the history
[Dashboard widgets] app name + notes fixes
  • Loading branch information
Cookiezaurs authored Jul 12, 2024
2 parents 53e848a + 8a4eb60 commit 2e247aa
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5005,7 +5005,9 @@
noteSortByApp[note.app_id].push(note);
});
appIds.forEach(function(appId) {
window.countlyGlobal.apps[appId].notes = noteSortByApp[appId] || [];
if (window.countlyGlobal.apps[appId]) {
window.countlyGlobal.apps[appId].notes = noteSortByApp[appId] || [];
}
});
callBack && callBack(notes);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@

return Object.keys(apps).map(function(key) {
return {
label: apps[key].name,
label: countlyCommon.unescapeHtml(apps[key].name),
value: apps[key]._id
};
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@
let image = this.getAppImage(appId);
return {
id: appId,
name: this.__getAppName(appId),
name: countlyCommon.unescapeHtml(this.__getAppName(appId)),
image: image,
avatar: this.getAppAvatar(appId, image)
};
Expand Down Expand Up @@ -1238,7 +1238,7 @@
if (image) {
return {'background-image': 'url("' + image + '")'};
}
else {
else if (this.__allApps[appId]) {
var position = (this.__allApps[appId].created_at % 12) * -100;
return {
'background-image': 'url("images/avatar-sprite.png?v2")',
Expand All @@ -1249,6 +1249,9 @@
'justify-content': 'center',
};
}
else {
return null;
}
},
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
{{ i18n("dashboards.multiple-apps-count", apps.length) }}
</span>
<div v-else class="bu-is-flex apps__single">
<div class="apps__single--avatar" :style="app.avatar">
<div v-if="app.avatar" class="apps__single--avatar bu-mr-1" :style="app.avatar">
<span v-if="!app.image" class="has-ellipsis">{{getAppInitials(app.name)}}</span>
</div>
<span class="bu-ml-1 text-small has-ellipsis bu-is-flex-shrink-1">{{app.name}}</span>
<span class="text-small has-ellipsis bu-is-flex-shrink-1">{{app.name}}</span>
</div>
</div>
</div>

0 comments on commit 2e247aa

Please sign in to comment.