1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2024-11-23 17:42:46 +01:00
TweetDuck/resources/Content/tweetdeck/globals/get_column_name.js

26 lines
685 B
JavaScript

const columnIconsToNames = {
"icon-home": "Home",
"icon-mention": "Mentions",
"icon-message": "Messages",
"icon-notifications": "Notifications",
"icon-follow": "Followers",
"icon-activity": "Activity",
"icon-favorite": "Likes",
"icon-user": "User",
"icon-search": "Search",
"icon-list": "List",
"icon-custom-timeline": "Timeline",
"icon-dataminr": "Dataminr",
"icon-play-video": "Live video",
"icon-schedule": "Scheduled"
};
/**
* Returns the display name of a column, or an empty string if the column type is unknown.
* @param {TD_Column} column
* @returns {string}
*/
export function getColumnName(column) {
return columnIconsToNames[column._tduck_icon] || "";
}