mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix conditional formatting and add fallback
This commit is contained in:
parent
f1b0b504dd
commit
93d63330fd
1 changed files with 8 additions and 5 deletions
|
@ -67,11 +67,14 @@ function renderPackage(pkg, installedPlugins, page) {
|
||||||
$('#developer', page).text(pkg.owner);
|
$('#developer', page).text(pkg.owner);
|
||||||
// This is a hack; the repository name and URL should be part of the global values
|
// This is a hack; the repository name and URL should be part of the global values
|
||||||
// for the plugin, not each individual version. So we just use the top (latest)
|
// for the plugin, not each individual version. So we just use the top (latest)
|
||||||
// version to get this information.
|
// version to get this information. If it's missing (no versions), then say so.
|
||||||
if (pkg.versions.length) {
|
if (pkg.versions.length) {
|
||||||
$('#repositoryName', page).text(pkg.versions[0].repositoryName);
|
$('#repositoryName', page).text(pkg.versions[0].repositoryName);
|
||||||
$('#repositoryUrl', page).text(pkg.versions[0].repositoryUrl);
|
$('#repositoryUrl', page).text(pkg.versions[0].repositoryUrl);
|
||||||
}
|
} else {
|
||||||
|
$('#repositoryName', page).text('Unknown (no versions)');
|
||||||
|
$('#repositoryUrl', page).text('Unknown (no versions)');
|
||||||
|
}
|
||||||
|
|
||||||
if (installedPlugin) {
|
if (installedPlugin) {
|
||||||
const currentVersionText = globalize.translate('MessageYouHaveVersionInstalled', '<strong>' + installedPlugin.Version + '</strong>');
|
const currentVersionText = globalize.translate('MessageYouHaveVersionInstalled', '<strong>' + installedPlugin.Version + '</strong>');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue