diff --git a/src/components/dialog/dialog.template.html b/src/components/dialog/dialog.template.html index bee0ef7f7..6d4310c0f 100644 --- a/src/components/dialog/dialog.template.html +++ b/src/components/dialog/dialog.template.html @@ -4,12 +4,8 @@
- -
- -
+
-
-
+
diff --git a/src/components/formdialog.css b/src/components/formdialog.css index 94695f486..d7cb162e8 100644 --- a/src/components/formdialog.css +++ b/src/components/formdialog.css @@ -55,7 +55,7 @@ /* Without this emby-checkbox is able to appear on top */ z-index: 1; align-items: flex-end; - justify-content: flex-end; + justify-content: center; flex-wrap: wrap; } diff --git a/src/components/metadataEditor/personEditor.template.html b/src/components/metadataEditor/personEditor.template.html index 40b29767f..d2ad6a78d 100644 --- a/src/components/metadataEditor/personEditor.template.html +++ b/src/components/metadataEditor/personEditor.template.html @@ -7,7 +7,6 @@
-
@@ -23,6 +22,7 @@
+
${LabelPersonRoleHelp}
@@ -33,6 +33,5 @@ ${Save}
- diff --git a/src/components/prompt/prompt.template.html b/src/components/prompt/prompt.template.html index 981fa9f10..a07629ae7 100644 --- a/src/components/prompt/prompt.template.html +++ b/src/components/prompt/prompt.template.html @@ -2,12 +2,12 @@ +

-
@@ -19,7 +19,6 @@
-
diff --git a/src/controllers/dashboard/plugins/installed.js b/src/controllers/dashboard/plugins/installed.js index f03312b42..eb521c2fd 100644 --- a/src/controllers/dashboard/plugins/installed.js +++ b/src/controllers/dashboard/plugins/installed.js @@ -41,7 +41,7 @@ define(['loading', 'libraryMenu', 'dom', 'globalize', 'cardStyle', 'emby-button' html += '
'; html += '
'; html += '
'; - html += configPageUrl ? '' : ''; diff --git a/src/controllers/dashboard/plugins/repositories.js b/src/controllers/dashboard/plugins/repositories.js index cfb71284b..3b87dc17c 100644 --- a/src/controllers/dashboard/plugins/repositories.js +++ b/src/controllers/dashboard/plugins/repositories.js @@ -12,6 +12,17 @@ let repositories = []; function reloadList(page) { loading.show(); + + if (repositories.length) { + populateList({ + listElement: page.querySelector('#repositories'), + noneElement: page.querySelector('#none'), + repositories: repositories + }); + + return; + } + ApiClient.getJSON(ApiClient.getUrl('Repositories')).then(list => { repositories = list; populateList({ @@ -20,6 +31,7 @@ function reloadList(page) { repositories: repositories }); }).catch(error => { + console.error('error loading repositories'); page.querySelector('#none').classList.remove('hide'); loading.hide(); }); @@ -33,6 +45,7 @@ function saveList() { data: JSON.stringify(repositories), contentType: 'application/json' }).catch(error => { + console.error('error saving repositories'); loading.hide(); }); } @@ -58,11 +71,12 @@ function getRepositoryHtml(repository) { var html = ''; html += '
'; + html += ``; + html += ''; + html += ''; html += ''; html += ``; html += '
'; @@ -90,7 +104,11 @@ export default function(view, params) { var save = this; $('#repositories', view).on('click', '.btnDelete', function() { - repositories = repositories.splice(repositories.indexOf(this.id), 1); + var button = this; + repositories = repositories.filter(function (r) { + return r.Url !== button.id; + }); + saveList(); reloadList(save); }); @@ -138,6 +156,7 @@ export default function(view, params) { saveList(); reloadList(view); dialogHelper.close(dialog); + return false; }); dialogHelper.open(dialog); diff --git a/src/repositories.html b/src/repositories.html index e119e753d..ff3406fb9 100644 --- a/src/repositories.html +++ b/src/repositories.html @@ -12,7 +12,7 @@

${MessageNoRepositories}

-

${MessagePleaseEnsureInternetMetadata}

+

${MessageAddRepository}

diff --git a/src/strings/en-us.json b/src/strings/en-us.json index 0a6fc9aa9..06f66051d 100644 --- a/src/strings/en-us.json +++ b/src/strings/en-us.json @@ -1029,6 +1029,7 @@ "LabelRepositoryUrlHelp": "The location of the repository manifest you want to include.", "LabelRepositoryName": "Repository Name", "LabelRepositoryNameHelp": "A custom name to distinguish this repository from any others added to your server.", + "MessageAddRepository": "If you wish to add a repository, click the button next to the header and fill out the requested information.", "MessageNoCollectionsAvailable": "Collections allow you to enjoy personalized groupings of Movies, Series, and Albums. Click the + button to start creating collections.", "MessageNoGenresAvailable": "Enable some metadata providers to pull genres from the internet.", "MessageNoMovieSuggestionsAvailable": "No movie suggestions are currently available. Start watching and rating your movies, and then come back to view your recommendations.",