mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Make title of ratingbutton state-dependent
This commit is contained in:
parent
26bf0d532b
commit
9f302dbf72
2 changed files with 7 additions and 4 deletions
|
@ -88,10 +88,12 @@ import ServerConnections from '../../components/ServerConnections';
|
|||
|
||||
button.setAttribute('data-likes', (likes === null ? '' : likes));
|
||||
}
|
||||
|
||||
setTitle(button, isFavorite);
|
||||
}
|
||||
|
||||
function setTitle(button) {
|
||||
button.title = globalize.translate('Favorite');
|
||||
function setTitle(button, isFavorite) {
|
||||
button.title = isFavorite ? globalize.translate('Favorite') : globalize.translate('AddToFavorites');
|
||||
|
||||
const text = button.querySelector('.button-text');
|
||||
if (text) {
|
||||
|
@ -141,9 +143,9 @@ import ServerConnections from '../../components/ServerConnections';
|
|||
|
||||
setState(this, likes, isFavorite, false);
|
||||
bindEvents(this);
|
||||
} else {
|
||||
setTitle(this);
|
||||
}
|
||||
|
||||
setTitle(this);
|
||||
};
|
||||
|
||||
EmbyRatingButtonPrototype.detachedCallback = function () {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
"AddedOnValue": "Added {0}",
|
||||
"AdditionalNotificationServices": "Browse the plugin catalog to install additional notification services.",
|
||||
"AddToCollection": "Add to collection",
|
||||
"AddToFavorites": "Add to favorites",
|
||||
"AddToPlaylist": "Add to playlist",
|
||||
"AddToPlayQueue": "Add to play queue",
|
||||
"AgeValue": "({0} years old)",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue