From f8cb51737667c1302026cb02bcb085e767557d7b Mon Sep 17 00:00:00 2001 From: Claus Vium Date: Fri, 25 Jan 2019 22:43:26 +0100 Subject: [PATCH 01/11] Add download menu option to media items --- .../emby-webcomponents/multiselect/multiselect.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bower_components/emby-webcomponents/multiselect/multiselect.js b/src/bower_components/emby-webcomponents/multiselect/multiselect.js index 764247c50..9e58e8b0f 100644 --- a/src/bower_components/emby-webcomponents/multiselect/multiselect.js +++ b/src/bower_components/emby-webcomponents/multiselect/multiselect.js @@ -211,11 +211,11 @@ define(['browser', 'appStorage', 'apphost', 'loading', 'connectionManager', 'glo } if (user.Policy.EnableContentDownloading && appHost.supports('filedownload')) { - //items.push({ - // name: Globalize.translate('ButtonDownload'), - // id: 'download', - // ironIcon: 'file-download' - //}); + menuItems.push({ + name: Globalize.translate('ButtonDownload'), + id: 'download', + ironIcon: 'file-download' + }); } if (user.Policy.EnableContentDownloading && appHost.supports('sync')) { @@ -629,4 +629,4 @@ define(['browser', 'appStorage', 'apphost', 'loading', 'connectionManager', 'glo }); }; }; -}); \ No newline at end of file +}); From 2339b57479b558214a829aa0e44cfdb870e75b9c Mon Sep 17 00:00:00 2001 From: Claus Vium Date: Sun, 27 Jan 2019 19:32:43 +0100 Subject: [PATCH 02/11] Remove unused Connect related from the frontend --- .../emby-connect/connecthelper.js | 219 ------------------ src/components/guestinviter/guestinviter.js | 58 ----- .../guestinviter/guestinviter.template.html | 36 --- src/scripts/useredit.js | 2 +- src/scripts/wizarduserpage.js | 5 +- 5 files changed, 3 insertions(+), 317 deletions(-) delete mode 100644 src/bower_components/emby-webcomponents/emby-connect/connecthelper.js delete mode 100644 src/components/guestinviter/guestinviter.js delete mode 100644 src/components/guestinviter/guestinviter.template.html diff --git a/src/bower_components/emby-webcomponents/emby-connect/connecthelper.js b/src/bower_components/emby-webcomponents/emby-connect/connecthelper.js deleted file mode 100644 index 054070a44..000000000 --- a/src/bower_components/emby-webcomponents/emby-connect/connecthelper.js +++ /dev/null @@ -1,219 +0,0 @@ -define(['globalize', 'apphost', 'loading', 'alert', 'emby-linkbutton'], function (globalize, appHost, loading, alert) { - 'use strict'; - - function resolvePromise() { - return Promise.resolve(); - } - - function rejectPromise() { - return Promise.reject(); - } - - function showNewUserInviteMessage(result) { - - if (!result.IsNewUserInvitation && !result.IsPending) { - - // It was immediately approved - return Promise.resolve(); - } - - var message = result.IsNewUserInvitation ? - globalize.translate('sharedcomponents#MessageInvitationSentToNewUser', result.GuestDisplayName) : - globalize.translate('sharedcomponents#MessageInvitationSentToUser', result.GuestDisplayName); - - return alert({ - - text: message, - title: globalize.translate('sharedcomponents#HeaderInvitationSent') - - }).then(resolvePromise, resolvePromise); - } - - function inviteGuest(options) { - - var apiClient = options.apiClient; - - loading.show(); - - // Add/Update connect info - return apiClient.ajax({ - - type: "POST", - url: apiClient.getUrl('Connect/Invite'), - dataType: 'json', - data: options.guestOptions || {} - - }).then(function (result) { - - loading.hide(); - return showNewUserInviteMessage(result); - - }, function (response) { - - loading.hide(); - - var statusCode = response ? response.status : 0; - - if (statusCode === 502) { - return showConnectServerUnreachableErrorMessage().then(rejectPromise, rejectPromise); - } - else if (statusCode === 404) { - // User doesn't exist - return alert({ - text: globalize.translate('sharedcomponents#GuestUserNotFound') - }).then(rejectPromise, rejectPromise); - - } else if ((statusCode || 0) >= 500) { - - // Unable to reach connect server ? - return alert({ - text: globalize.translate('sharedcomponents#ErrorReachingEmbyConnect') - }).then(rejectPromise, rejectPromise); - - } else { - - // status 400 = account not activated - - // General error - return showGuestGeneralErrorMessage().then(rejectPromise, rejectPromise); - } - }); - } - - function showGuestGeneralErrorMessage() { - - var html; - - if (appHost.supports('externallinks')) { - html = globalize.translate('sharedcomponents#ErrorAddingGuestAccount1', 'https://emby.media/connect'); - html += '

' + globalize.translate('sharedcomponents#ErrorAddingGuestAccount2', 'apps@emby.media'); - } - - var text = globalize.translate('sharedcomponents#ErrorAddingGuestAccount1', 'https://emby.media/connect'); - text += '\n\n' + globalize.translate('sharedcomponents#ErrorAddingGuestAccount2', 'apps@emby.media'); - - return alert({ - text: text, - html: html - }); - } - - function showConnectServerUnreachableErrorMessage() { - - var text = globalize.translate('sharedcomponents#ErrorConnectServerUnreachable', 'https://connect.emby.media'); - - return alert({ - text: text - }); - } - - function showLinkUserErrorMessage(username, statusCode) { - - var html; - var text; - - if (statusCode === 502) { - return showConnectServerUnreachableErrorMessage(); - } - else if (username) { - - if (appHost.supports('externallinks')) { - html = globalize.translate('sharedcomponents#ErrorAddingEmbyConnectAccount1', 'https://emby.media/connect'); - html += '

' + globalize.translate('sharedcomponents#ErrorAddingEmbyConnectAccount2', 'apps@emby.media'); - } - - text = globalize.translate('sharedcomponents#ErrorAddingEmbyConnectAccount1', 'https://emby.media/connect'); - text += '\n\n' + globalize.translate('sharedcomponents#ErrorAddingEmbyConnectAccount2', 'apps@emby.media'); - - } else { - html = text = globalize.translate('sharedcomponents#DefaultErrorMessage'); - } - - return alert({ - text: text, - html: html - }); - } - - function updateUserLink(apiClient, user, newConnectUsername) { - var currentConnectUsername = user.ConnectUserName || ''; - var enteredConnectUsername = newConnectUsername; - - var linkUrl = apiClient.getUrl('Users/' + user.Id + '/Connect/Link'); - - if (currentConnectUsername && !enteredConnectUsername) { - - // Remove connect info - // Add/Update connect info - return apiClient.ajax({ - - type: "DELETE", - url: linkUrl - - }).then(function () { - - return alert({ - text: globalize.translate('sharedcomponents#MessageEmbyAccontRemoved'), - title: globalize.translate('sharedcomponents#HeaderEmbyAccountRemoved'), - - }).catch(resolvePromise); - - }, function (response) { - - var statusCode = response ? response.status : 0; - - if (statusCode === 502) { - return showConnectServerUnreachableErrorMessage().then(rejectPromise); - } - - return alert({ - text: globalize.translate('sharedcomponents#ErrorRemovingEmbyConnectAccount') - - }).then(rejectPromise); - }); - - } - else if (currentConnectUsername !== enteredConnectUsername) { - - // Add/Update connect info - return apiClient.ajax({ - type: "POST", - url: linkUrl, - data: { - ConnectUsername: enteredConnectUsername - }, - dataType: 'json' - - }).then(function (result) { - - var msgKey = result.IsPending ? 'sharedcomponents#MessagePendingEmbyAccountAdded' : 'sharedcomponents#MessageEmbyAccountAdded'; - - return alert({ - text: globalize.translate(msgKey), - title: globalize.translate('sharedcomponents#HeaderEmbyAccountAdded'), - - }).catch(resolvePromise); - - }, function (response) { - - var statusCode = response ? response.status : 0; - - if (statusCode === 502) { - return showConnectServerUnreachableErrorMessage().then(rejectPromise); - } - - return showLinkUserErrorMessage('.', statusCode).then(rejectPromise); - }); - - } else { - return Promise.reject(); - } - } - - return { - inviteGuest: inviteGuest, - updateUserLink: updateUserLink, - showLinkUserErrorMessage: showLinkUserErrorMessage, - showConnectServerUnreachableErrorMessage: showConnectServerUnreachableErrorMessage - }; -}); \ No newline at end of file diff --git a/src/components/guestinviter/guestinviter.js b/src/components/guestinviter/guestinviter.js deleted file mode 100644 index c5a076b1d..000000000 --- a/src/components/guestinviter/guestinviter.js +++ /dev/null @@ -1,58 +0,0 @@ -define(["dialogHelper", "loading", "require", "emby-input", "emby-button", "emby-checkbox", "paper-icon-button-light", "formDialogStyle", "emby-linkbutton"], function(dialogHelper, loading, require) { - "use strict"; - - function renderLibrarySharingList(context, result) { - var folderHtml = ""; - folderHtml += result.Items.map(function(i) { - var currentHtml = ""; - return currentHtml += '" - }).join(""), context.querySelector(".librarySharingList").innerHTML = folderHtml - } - - function inviteUser(dlg) { - loading.show(); - var shareExcludes = Array.prototype.filter.call(dlg.querySelectorAll(".chkShareFolder"), function(i) { - return i.checked - }).map(function(i) { - return i.getAttribute("data-folderid") - }); - require(["connectHelper"], function(connectHelper) { - connectHelper.inviteGuest({ - apiClient: ApiClient, - guestOptions: { - ConnectUsername: dlg.querySelector("#txtConnectUsername").value, - EnabledLibraries: shareExcludes.join(","), - SendingUserId: Dashboard.getCurrentUserId(), - EnableLiveTv: !1 - } - }).then(function() { - loading.hide(), dlg.submitted = !0, dialogHelper.close(dlg) - }) - }) - } - return { - show: function() { - return new Promise(function(resolve, reject) { - require(["text!./guestinviter.template.html"], function(template) { - var dlg = dialogHelper.createDialog({ - removeOnClose: !0, - size: "small" - }); - dlg.classList.add("ui-body-a"), dlg.classList.add("background-theme-a"), dlg.classList.add("formDialog"); - var html = ""; - html += Globalize.translateDocument(template), dlg.innerHTML = html, dialogHelper.open(dlg), dlg.addEventListener("close", function() { - dlg.submitted ? resolve() : reject() - }), dlg.querySelector(".btnCancel").addEventListener("click", function(e) { - dialogHelper.close(dlg) - }), dlg.querySelector("form").addEventListener("submit", function(e) { - return inviteUser(dlg), e.preventDefault(), !1 - }), ApiClient.getJSON(ApiClient.getUrl("Library/MediaFolders", { - IsHidden: !1 - })).then(function(result) { - renderLibrarySharingList(dlg, result) - }) - }) - }) - } - } -}); \ No newline at end of file diff --git a/src/components/guestinviter/guestinviter.template.html b/src/components/guestinviter/guestinviter.template.html deleted file mode 100644 index 0c4ea3914..000000000 --- a/src/components/guestinviter/guestinviter.template.html +++ /dev/null @@ -1,36 +0,0 @@ -
- -

- ${HeaderInviteUser} -

-
-
-
-
- -
- -
-
${LabelConnectGuestUserNameHelp}
- -
-
- -

${HeaderShareMediaFolders}

-
- -
- -

${MessageGuestSharingPermissionsHelp}

-
- -
- -
-
-
-
\ No newline at end of file diff --git a/src/scripts/useredit.js b/src/scripts/useredit.js index 6201646dc..709b2557c 100644 --- a/src/scripts/useredit.js +++ b/src/scripts/useredit.js @@ -28,7 +28,7 @@ define(["jQuery", "loading", "libraryMenu", "fnchecked"], function($, loading, l IsHidden: !1 })).then(function(folders) { loadDeleteFolders(page, user, folders.Items) - }), user.Policy.IsDisabled ? $(".disabledUserBanner", page).show() : $(".disabledUserBanner", page).hide(), "Guest" == user.ConnectLinkType ? ($("#fldConnectInfo", page).hide(), $("#txtUserName", page).prop("disabled", "disabled")) : ($("#txtUserName", page).prop("disabled", "").removeAttr("disabled"), $("#fldConnectInfo", page).show()), $(".lnkEditUserPreferences", page).attr("href", "mypreferencesmenu.html?userId=" + user.Id), libraryMenu.setTitle(user.Name), page.querySelector(".username").innerHTML = user.Name, $("#txtUserName", page).val(user.Name), $("#txtConnectUserName", page).val(currentUser.ConnectUserName), $("#chkIsAdmin", page).checked(user.Policy.IsAdministrator), $("#chkDisabled", page).checked(user.Policy.IsDisabled), $("#chkIsHidden", page).checked(user.Policy.IsHidden), $("#chkRemoteControlSharedDevices", page).checked(user.Policy.EnableSharedDeviceControl), $("#chkEnableRemoteControlOtherUsers", page).checked(user.Policy.EnableRemoteControlOfOtherUsers), $("#chkEnableDownloading", page).checked(user.Policy.EnableContentDownloading), $("#chkManageLiveTv", page).checked(user.Policy.EnableLiveTvManagement), $("#chkEnableLiveTvAccess", page).checked(user.Policy.EnableLiveTvAccess), $("#chkEnableMediaPlayback", page).checked(user.Policy.EnableMediaPlayback), $("#chkEnableAudioPlaybackTranscoding", page).checked(user.Policy.EnableAudioPlaybackTranscoding), $("#chkEnableVideoPlaybackTranscoding", page).checked(user.Policy.EnableVideoPlaybackTranscoding), $("#chkEnableVideoPlaybackRemuxing", page).checked(user.Policy.EnablePlaybackRemuxing), $("#chkRemoteAccess", page).checked(null == user.Policy.EnableRemoteAccess || user.Policy.EnableRemoteAccess), $("#chkEnableSyncTranscoding", page).checked(user.Policy.EnableSyncTranscoding), $("#chkEnableConversion", page).checked(user.Policy.EnableMediaConversion || !1), $("#chkEnableSharing", page).checked(user.Policy.EnablePublicSharing), $("#txtRemoteClientBitrateLimit", page).val(user.Policy.RemoteClientBitrateLimit / 1e6 || ""), loading.hide() + }), user.Policy.IsDisabled ? $(".disabledUserBanner", page).show() : $(".disabledUserBanner", page).hide(), "Guest" == user.ConnectLinkType ? ($("#fldConnectInfo", page).hide(), $("#txtUserName", page).prop("disabled", "disabled")) : ($("#txtUserName", page).prop("disabled", "").removeAttr("disabled"), $("#fldConnectInfo", page).show()), $(".lnkEditUserPreferences", page).attr("href", "mypreferencesmenu.html?userId=" + user.Id), libraryMenu.setTitle(user.Name), page.querySelector(".username").innerHTML = user.Name, $("#txtUserName", page).val(user.Name), $("#chkIsAdmin", page).checked(user.Policy.IsAdministrator), $("#chkDisabled", page).checked(user.Policy.IsDisabled), $("#chkIsHidden", page).checked(user.Policy.IsHidden), $("#chkRemoteControlSharedDevices", page).checked(user.Policy.EnableSharedDeviceControl), $("#chkEnableRemoteControlOtherUsers", page).checked(user.Policy.EnableRemoteControlOfOtherUsers), $("#chkEnableDownloading", page).checked(user.Policy.EnableContentDownloading), $("#chkManageLiveTv", page).checked(user.Policy.EnableLiveTvManagement), $("#chkEnableLiveTvAccess", page).checked(user.Policy.EnableLiveTvAccess), $("#chkEnableMediaPlayback", page).checked(user.Policy.EnableMediaPlayback), $("#chkEnableAudioPlaybackTranscoding", page).checked(user.Policy.EnableAudioPlaybackTranscoding), $("#chkEnableVideoPlaybackTranscoding", page).checked(user.Policy.EnableVideoPlaybackTranscoding), $("#chkEnableVideoPlaybackRemuxing", page).checked(user.Policy.EnablePlaybackRemuxing), $("#chkRemoteAccess", page).checked(null == user.Policy.EnableRemoteAccess || user.Policy.EnableRemoteAccess), $("#chkEnableSyncTranscoding", page).checked(user.Policy.EnableSyncTranscoding), $("#chkEnableConversion", page).checked(user.Policy.EnableMediaConversion || !1), $("#chkEnableSharing", page).checked(user.Policy.EnablePublicSharing), $("#txtRemoteClientBitrateLimit", page).val(user.Policy.RemoteClientBitrateLimit / 1e6 || ""), loading.hide() } function onSaveComplete(page, user) { diff --git a/src/scripts/wizarduserpage.js b/src/scripts/wizarduserpage.js index 9ada1b724..77a5a945e 100644 --- a/src/scripts/wizarduserpage.js +++ b/src/scripts/wizarduserpage.js @@ -28,10 +28,9 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em data: { Name: form.querySelector("#txtUsername").value }, - url: apiClient.getUrl("Startup/User"), - dataType: "json" + url: apiClient.getUrl("Startup/User") }).then(onUpdateUserComplete, function(response) { - response && response.status; + console.log(response); }) } From a72fce15a6d76224495c6e5e9f74cb2850774715 Mon Sep 17 00:00:00 2001 From: Justin Suess Date: Mon, 28 Jan 2019 20:03:54 -0600 Subject: [PATCH 03/11] Added frontend support for a password field on setup --- src/scripts/wizarduserpage.js | 12 ++++++++++-- src/strings/en-GB.json | 1 + src/strings/en-US.json | 1 + src/wizardstart.html | 2 +- src/wizarduser.html | 7 +++++++ 5 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/scripts/wizarduserpage.js b/src/scripts/wizarduserpage.js index 9ada1b724..dac1abf91 100644 --- a/src/scripts/wizarduserpage.js +++ b/src/scripts/wizarduserpage.js @@ -26,7 +26,9 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em apiClient.ajax({ type: "POST", data: { - Name: form.querySelector("#txtUsername").value + Name: form.querySelector("#txtUsername").value, + Password: form.querySelector("#txtManualPassword").value + }, url: apiClient.getUrl("Startup/User"), dataType: "json" @@ -36,7 +38,12 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em } function onSubmit(e) { - return submit(this), e.preventDefault(), !1 + + var form = this; + return form.querySelector("#txtManualPassword").value != form.querySelector("#txtPasswordConfirm").value ? require(["toast"], function(toast) { + toast(Globalize.translate("PasswordMatchError")) + }) : submit(this), e.preventDefault(), !1 + } function onViewShow() { @@ -45,6 +52,7 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em apiClient = getApiClient(); apiClient.getJSON(apiClient.getUrl("Startup/User")).then(function(user) { page.querySelector("#txtUsername").value = user.Name || "", loading.hide() + page.querySelector("#txtManualPassword").value = user.Password || "", loading.hide() }) } return function(view, params) { diff --git a/src/strings/en-GB.json b/src/strings/en-GB.json index ac8a0354d..e710f1e81 100644 --- a/src/strings/en-GB.json +++ b/src/strings/en-GB.json @@ -82,6 +82,7 @@ "LabelUrl": "URL:", "LabelZipCode": "Post Code:", "LabelffmpegPathHelp": "The path to the ffmpeg application file or folder containing ffmpeg.", + "LeaveBlankToNotSetAPassword": "This field can be left blank.", "LinkApi": "API", "MessageConfirmRevokeApiKey": "Are you sure you wish to revoke this API key? The application's connection to Jellyfin Server will be abruptly terminated.", "MessageForgotPasswordFileExpiration": "The reset PIN will expire at {0}.", diff --git a/src/strings/en-US.json b/src/strings/en-US.json index c4c13fa25..43b3098d3 100644 --- a/src/strings/en-US.json +++ b/src/strings/en-US.json @@ -1028,6 +1028,7 @@ "LanNetworksHelp": "Comma separated list of IP addresses or IP/netmask entries for networks that will be considered on local network when enforcing bandwidth restrictions. If set, all other IP addresses will be considered to be on the external network and will be subject to the external bandwidth restrictions. If left blank, only the server's subnet is considered to be on the local network.", "LatestFromLibrary": "Latest {0}", "LearnHowToCreateSynologyShares": "Learn how to share folders in Synology.", + "LeaveBlankToNotSetAPassword": "This field can be left blank.", "LetterButtonAbbreviation": "A", "LibraryAccessHelp": "Select the media folders to share with this user. Administrators will be able to edit all folders using the metadata manager.", "LinkApi": "Api", diff --git a/src/wizardstart.html b/src/wizardstart.html index a144b8cd1..723afa2ae 100644 --- a/src/wizardstart.html +++ b/src/wizardstart.html @@ -29,4 +29,4 @@ - \ No newline at end of file + diff --git a/src/wizarduser.html b/src/wizarduser.html index 0df4d3bc0..26064d32f 100644 --- a/src/wizarduser.html +++ b/src/wizarduser.html @@ -16,6 +16,13 @@
${MoreUsersCanBeAddedLater}
+
+ +
${LeaveBlankToNotSetAPassword}
+
+
+ +
From 3b7c7536301d1e0670f1db3141c54dd513059b5e Mon Sep 17 00:00:00 2001 From: Justin Suess Date: Mon, 28 Jan 2019 20:13:08 -0600 Subject: [PATCH 04/11] Adding RazeLighter777 to the list of contributors --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 4cadf33ac..6ae333bde 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -18,6 +18,7 @@ - [ViXXoR](https://github.com/ViXXoR) - [nkmerrill] (https://github.com/nkmerrill) - [TtheCreator] (https://github.com/Tthecreator) + - [RazeLighter777](https://github.com/RazeLighter777) # Emby Contributors From a62d70fc780e97ce2abfe1b06e277f4230e3841c Mon Sep 17 00:00:00 2001 From: Justin Suess Date: Mon, 28 Jan 2019 20:19:08 -0600 Subject: [PATCH 05/11] Changed the optional message to be more clear --- src/strings/en-GB.json | 2 +- src/strings/en-US.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/strings/en-GB.json b/src/strings/en-GB.json index e710f1e81..4b6068f5c 100644 --- a/src/strings/en-GB.json +++ b/src/strings/en-GB.json @@ -82,7 +82,7 @@ "LabelUrl": "URL:", "LabelZipCode": "Post Code:", "LabelffmpegPathHelp": "The path to the ffmpeg application file or folder containing ffmpeg.", - "LeaveBlankToNotSetAPassword": "This field can be left blank.", + "LeaveBlankToNotSetAPassword": "Optional - leave blank to set no password", "LinkApi": "API", "MessageConfirmRevokeApiKey": "Are you sure you wish to revoke this API key? The application's connection to Jellyfin Server will be abruptly terminated.", "MessageForgotPasswordFileExpiration": "The reset PIN will expire at {0}.", diff --git a/src/strings/en-US.json b/src/strings/en-US.json index 43b3098d3..049f0c68e 100644 --- a/src/strings/en-US.json +++ b/src/strings/en-US.json @@ -1028,7 +1028,7 @@ "LanNetworksHelp": "Comma separated list of IP addresses or IP/netmask entries for networks that will be considered on local network when enforcing bandwidth restrictions. If set, all other IP addresses will be considered to be on the external network and will be subject to the external bandwidth restrictions. If left blank, only the server's subnet is considered to be on the local network.", "LatestFromLibrary": "Latest {0}", "LearnHowToCreateSynologyShares": "Learn how to share folders in Synology.", - "LeaveBlankToNotSetAPassword": "This field can be left blank.", + "LeaveBlankToNotSetAPassword": "Optional - leave blank to set no password", "LetterButtonAbbreviation": "A", "LibraryAccessHelp": "Select the media folders to share with this user. Administrators will be able to edit all folders using the metadata manager.", "LinkApi": "Api", From 52010486b92705bbc6bf2490f0db1b89c7611ff3 Mon Sep 17 00:00:00 2001 From: Justin Suess Date: Tue, 29 Jan 2019 05:57:03 -0600 Subject: [PATCH 06/11] addressed suggested changes in pull request. --- src/scripts/wizarduserpage.js | 22 +++++++++++++--------- src/strings/en-GB.json | 1 - 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/scripts/wizarduserpage.js b/src/scripts/wizarduserpage.js index dac1abf91..97b3dd615 100644 --- a/src/scripts/wizarduserpage.js +++ b/src/scripts/wizarduserpage.js @@ -27,8 +27,7 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em type: "POST", data: { Name: form.querySelector("#txtUsername").value, - Password: form.querySelector("#txtManualPassword").value - + Password: form.querySelector("#txtManualPassword").value }, url: apiClient.getUrl("Startup/User"), dataType: "json" @@ -38,12 +37,16 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em } function onSubmit(e) { - var form = this; - return form.querySelector("#txtManualPassword").value != form.querySelector("#txtPasswordConfirm").value ? require(["toast"], function(toast) { - toast(Globalize.translate("PasswordMatchError")) - }) : submit(this), e.preventDefault(), !1 - + if (form.querySelector("#txtManualPassword").value != form.querySelector("#txtPasswordConfirm").value) { + require(["toast"], function(toast) { + toast(Globalize.translate("PasswordMatchError")); + }); + } else { + submit(form); + } + e.preventDefault(); + return false; } function onViewShow() { @@ -51,8 +54,9 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em var page = this, apiClient = getApiClient(); apiClient.getJSON(apiClient.getUrl("Startup/User")).then(function(user) { - page.querySelector("#txtUsername").value = user.Name || "", loading.hide() - page.querySelector("#txtManualPassword").value = user.Password || "", loading.hide() + page.querySelector("#txtUsername").value = user.Name || "", + page.querySelector("#txtManualPassword").value = user.Password || "", + loading.hide() }) } return function(view, params) { diff --git a/src/strings/en-GB.json b/src/strings/en-GB.json index 4b6068f5c..ac8a0354d 100644 --- a/src/strings/en-GB.json +++ b/src/strings/en-GB.json @@ -82,7 +82,6 @@ "LabelUrl": "URL:", "LabelZipCode": "Post Code:", "LabelffmpegPathHelp": "The path to the ffmpeg application file or folder containing ffmpeg.", - "LeaveBlankToNotSetAPassword": "Optional - leave blank to set no password", "LinkApi": "API", "MessageConfirmRevokeApiKey": "Are you sure you wish to revoke this API key? The application's connection to Jellyfin Server will be abruptly terminated.", "MessageForgotPasswordFileExpiration": "The reset PIN will expire at {0}.", From d37919cbf0c2be6acbcb37f9311bb4fd7cb7e3c5 Mon Sep 17 00:00:00 2001 From: Justin Suess Date: Tue, 29 Jan 2019 05:58:03 -0600 Subject: [PATCH 07/11] Fixed syntax error in en-GB.json --- src/strings/en-GB.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/strings/en-GB.json b/src/strings/en-GB.json index ac8a0354d..6e92b7757 100644 --- a/src/strings/en-GB.json +++ b/src/strings/en-GB.json @@ -122,5 +122,5 @@ "XmlTvMovieCategoriesHelp": "Programmes with these categories will be displayed as movies. Separate multiple with '|'.", "XmlTvNewsCategoriesHelp": "Programmes with these categories will be displayed as news programmes. Separate multiple with '|'.", "XmlTvPathHelp": "A path to an XML TV file. Jellyfin will read this file and periodically check it for updates. You are responsible for creating and updating the file.", - "XmlTvSportsCategoriesHelp": "Programmes with these categories will be displayed as sports programmes. Separate multiple with '|'.", + "XmlTvSportsCategoriesHelp": "Programmes with these categories will be displayed as sports programmes. Separate multiple with '|'." } From ba0c888960d467e93b3fc3b2cacb4a3b47ebeadf Mon Sep 17 00:00:00 2001 From: Claus Vium Date: Tue, 29 Jan 2019 11:38:57 -0600 Subject: [PATCH 08/11] Update src/scripts/wizarduserpage.js Co-Authored-By: RazeLighter777 --- src/scripts/wizarduserpage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/wizarduserpage.js b/src/scripts/wizarduserpage.js index 97b3dd615..5cc36cc8b 100644 --- a/src/scripts/wizarduserpage.js +++ b/src/scripts/wizarduserpage.js @@ -55,7 +55,7 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em apiClient = getApiClient(); apiClient.getJSON(apiClient.getUrl("Startup/User")).then(function(user) { page.querySelector("#txtUsername").value = user.Name || "", - page.querySelector("#txtManualPassword").value = user.Password || "", + page.querySelector("#txtManualPassword").value = user.Password || ""; loading.hide() }) } From 1d7854541b7786c9059acdae12c8177d9bf07ad6 Mon Sep 17 00:00:00 2001 From: Claus Vium Date: Tue, 29 Jan 2019 11:39:11 -0600 Subject: [PATCH 09/11] Update src/scripts/wizarduserpage.js Co-Authored-By: RazeLighter777 --- src/scripts/wizarduserpage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/wizarduserpage.js b/src/scripts/wizarduserpage.js index 5cc36cc8b..2fe055332 100644 --- a/src/scripts/wizarduserpage.js +++ b/src/scripts/wizarduserpage.js @@ -56,7 +56,7 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em apiClient.getJSON(apiClient.getUrl("Startup/User")).then(function(user) { page.querySelector("#txtUsername").value = user.Name || "", page.querySelector("#txtManualPassword").value = user.Password || ""; - loading.hide() + loading.hide(); }) } return function(view, params) { From 94bab172f02c1d6d9d7329fb7c3e4d1d105514f6 Mon Sep 17 00:00:00 2001 From: Claus Vium Date: Tue, 29 Jan 2019 11:39:27 -0600 Subject: [PATCH 10/11] Update src/scripts/wizarduserpage.js Co-Authored-By: RazeLighter777 --- src/scripts/wizarduserpage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripts/wizarduserpage.js b/src/scripts/wizarduserpage.js index 2fe055332..039962eda 100644 --- a/src/scripts/wizarduserpage.js +++ b/src/scripts/wizarduserpage.js @@ -54,7 +54,7 @@ define(["loading", "globalize", "dashboardcss", "emby-input", "emby-button", "em var page = this, apiClient = getApiClient(); apiClient.getJSON(apiClient.getUrl("Startup/User")).then(function(user) { - page.querySelector("#txtUsername").value = user.Name || "", + page.querySelector("#txtUsername").value = user.Name || ""; page.querySelector("#txtManualPassword").value = user.Password || ""; loading.hide(); }) From 3f0323fc7c771520b1967cbe0ff3ba45bf473253 Mon Sep 17 00:00:00 2001 From: dkanada Date: Thu, 31 Jan 2019 18:30:53 +0900 Subject: [PATCH 11/11] update british strings --- .../emby-webcomponents/strings/en-gb.json | 22 +---- src/strings/en-GB.json | 85 ------------------- 2 files changed, 1 insertion(+), 106 deletions(-) diff --git a/src/bower_components/emby-webcomponents/strings/en-gb.json b/src/bower_components/emby-webcomponents/strings/en-gb.json index 43bbaac67..de7b74afb 100644 --- a/src/bower_components/emby-webcomponents/strings/en-gb.json +++ b/src/bower_components/emby-webcomponents/strings/en-gb.json @@ -1,21 +1,12 @@ { - "AndroidUnlockRestoreHelp": "To restore your previous purchase, please ensure you're signed into the device with the same Google (or Amazon) account that originally made the purchase. Make sure the app store is enabled and not restricted by any parental controls, and ensure you have an active Internet connection. You'll only have to do this once to restore your previous purchase.", "CinemaModeConfigurationHelp": "Cinema mode brings the theatre experience straight to your living room with the ability to play trailers and custom intros before the main feature.", "ColorPrimaries": "Colour primaries", "ColorSpace": "Colour space", "ColorTransfer": "Colour transfer", "EnableColorCodedBackgrounds": "Enable colour-coded backgrounds", - "ErrorAddingGuestAccount2": "If you're still having an issue, please send an e-mail to {0}, and include your e-mail address as well as theirs.", - "ErrorAddingJellyfinConnectAccount2": "If you're still having an issue, please send an e-mail to {0} from the e-mail address used with the Jellyfin account.", - "ErrorConnectServerUnreachable": "There was an error performing the requested operation. Your server is unable to contact our Jellyfin Connect Server at {0}. Please ensure your server has an active Internet connection and that the communications are being allowed by any firewall or security software you have installed.", - "ErrorReachingJellyfinConnect": "There was an error reaching the Jellyfin Connect server. Please ensure you have an active Internet connection and try again.", - "ErrorRemovingJellyfinConnectAccount": "There was an error removing the Jellyfin Connect account. Please ensure you have an active Internet connection and try again.", "Favorite": "Favourite", "Favorites": "Favourites", - "GuestUserNotFound": "User not found. Please ensure the name is correct and try again. Alternatively, try entering their e-mail address.", "HDPrograms": "HD programmes", - "HeaderEnabledFieldsHelp": "Untick a field to lock it and prevent its data from being changed.", - "HeaderExternalIds": "External IDs:", "HeaderFavoriteAlbums": "Favourite Albums", "HeaderFavoriteArtists": "Favourite Artists", "HeaderFavoriteCollections": "Favourite Collections", @@ -26,23 +17,12 @@ "HeaderFavoriteShows": "Favourite Shows", "HeaderFavoriteSongs": "Favourite Songs", "HeaderFavoriteVideos": "Favourite Videos", - "HeaderWaitingForWifi": "Waiting for Wi-Fi", - "LabelDateTimeLocale": "Date/time locale:", - "LabelSelectFolderGroupsHelp": "Folders that are unticked will be displayed by themselves in their own view.", "LabelTextBackgroundColor": "Text background colour:", "LabelTextColor": "Text colour:", "LabelWindowBackgroundColor": "Text background colour:", - "LabelYear": "Year", - "MessageInvitationSentToNewUser": "An email has been sent to {0}, inviting them to sign up with Jellyfin.", - "MessagePendingJellyfinAccountAdded": "The Jellyfin account has been added to this user. An e-mail will be sent to the owner of the account. The invitation will need to be confirmed by clicking a link within the e-mail.", "MessageWeDidntRecognizeCommand": "We're sorry, we didn't recognise that command.", "NewCollectionHelp": "Collections allow you to create personalised groupings of movies and other library content.", "PlaceFavoriteChannelsAtBeginning": "Place favourite channels at the beginning", "PlaybackErrorNotAllowed": "You're currently not authorised to play this content. Please contact your system administrator for details.", - "PleaseEnterNameOrId": "Please enter a name or an external ID.", - "Programs": "Programmes", - "SeriesDisplayOrderHelp": "Order episodes by air date, DVD order, or absolute numbering.", - "SubtitleAppearanceSettingsDisclaimer": "These settings will not apply to graphical subtitles (PGS, DVD, etc.) or subtitles that have their own styles embedded (ASS/SSA).", - "SyncUnwatchedVideosOnlyHelp": "Only unwatched videos will be downloaded and videos will be removed from the device as they are watched.", - "WifiRequiredToDownload": "A Wi-Fi connection is required to continue downloading.", + "Programs": "Programmes" } diff --git a/src/strings/en-GB.json b/src/strings/en-GB.json index 6e92b7757..e56d50693 100644 --- a/src/strings/en-GB.json +++ b/src/strings/en-GB.json @@ -1,25 +1,9 @@ { "AdditionalNotificationServices": "Browse the plugin catalogue to install additional notification services.", - "AllowOnTheFlySubtitleExtractionHelp": "Embedded subtitles can be extracted from videos and delivered to Jellyfin apps in plain text in order to help prevent video transcoding. On some systems, this can take a long time and cause video playback to stall during the extraction process. Disable this to have embedded subtitles burned in with video transcoding when they are not natively supported by the client device.", - "AllowRemoteAccessHelp": "If unticked, all remote connections will be blocked.", "BrowsePluginCatalogMessage": "Browse our plugin catalogue to view available plugins.", - "ButtonConfigurePinCode": "Configure PIN code", - "ButtonResetEasyPassword": "Reset easy PIN code", - "ButtonSignOut": "Sign out", - "DefaultCameraUploadPathHelp": "Select a custom upload path. If left blank, a default folder will be used. If using a custom path, it will also need to be added as a library in Jellyfin library setup.", "DefaultMetadataLangaugeDescription": "These are your defaults and can be customised on a per-library basis.", - "EasyPasswordHelp": "Your easy PIN code is used for offline access with supported Jellyfin apps, and can also be used for easy in-network sign in.", - "ErrorAddingJellyfinConnectAccount2": "If you're still having a problem, please send an e-mail to {0}.", - "ErrorGettingTvLineups": "There was an error downloading TV lineups. Please ensure your information is correct and try again.", - "ExtractChapterImagesHelp": "Extracting chapter images will allow Jellyfin apps to display graphical scene selection menus. The process can be slow, CPU-intensive and may require several gigabytes of space. It runs when videos are discovered, and also as a nightly scheduled task. The schedule is configurable in the scheduled tasks area. It is not recommended to run this task during peak usage hours.", - "FileReadCancelled": "The file read has been cancelled.", - "HeaderApiKey": "API Key", - "HeaderApiKeys": "API Keys", - "HeaderApiKeysHelp": "External applications are required to have an API key in order to communicate with Jellyfin Server. Keys are issued by logging in with an Jellyfin account, or by manually granting the application a key.", "HeaderBlockItemsWithNoRating": "Block items with no or unrecognised rating information:", "HeaderBrandingHelp": "Customise the appearance of Jellyfin to fit the needs of your group or organisation.", - "HeaderConfirmRevokeApiKey": "Revoke API Key", - "HeaderEasyPinCode": "Easy PIN Code", "HeaderFavoriteAlbums": "Favourite Albums", "HeaderFavoriteArtists": "Favourite Artists", "HeaderFavoriteEpisodes": "Favourite Episodes", @@ -28,92 +12,24 @@ "HeaderFavoriteShows": "Favourite Shows", "HeaderFavoriteSongs": "Favourite Songs", "HeaderFavoriteVideos": "Favourite Videos", - "HeaderHttpHeaders": "HTTP Headers", - "HeaderNewApiKey": "New API Key", - "HeaderPinCodeReset": "Reset PIN Code", "HeaderResponseProfileHelp": "Response profiles provide a way to customise information sent to the device when playing certain kinds of media.", - "HeaderToAccessPleaseEnterEasyPinCode": "To access, please enter your easy PIN code", - "HttpsRequiresCert": "To enable HTTPS for external connections, you will need to supply a trusted SSL certificate, such as Let's Encrypt.", "ImportFavoriteChannelsHelp": "If enabled, only channels that are marked as favourite on the tuner device will be imported.", - "InviteAnJellyfinConnectUser": "Add a user by sending an e-mail invitation.", - "JellyfinIntroDownloadMessage": "To download and install the free Jellyfin Server, visit {0}.", - "JellyfinIntroDownloadMessageWithoutLink": "To download and install the free Jellyfin Server, visit the Jellyfin website.", - "LabelBindToLocalNetworkAddressHelp": "Optional. Override the local IP address to bind the HTTP server to. If left empty, the server will bind to all available addresses. Changing this value requires restarting Jellyfin Server.", - "LabelCameraUploadPathHelp": "Select a custom upload path. This will override any default settings set in the Camera Upload section. If left blank, a default folder will be used. If using a custom path, it will also need to be added as a library in Jellyfin library setup.", - "LabelConnectGuestUserName": "Their Jellyfin Connect e-mail address or user name:", - "LabelCustomCertificatePath": "Custom SSL certificate path:", "LabelCustomizeOptionsPerMediaType": "Customise for media type:", "LabelDateAddedBehavior": "Date added behaviour for new content:", - "LabelDisplayMissingEpisodesWithinSeasons": "Display missing episodes within series", - "LabelEasyPinCode": "Easy PIN code:", - "LabelEnableDlnaServer": "Enable DLNA server", - "LabelEnableThisTunerHelp": "Untick to prevent importing channels from this tuner.", - "LabelExternalDDNSHelp": "If you have a dynamic DNS, enter it here. Jellyfin apps will use it when connecting remotely. This field is required when used with a custom SSL certificate. Example: mydomain.com.", - "LabelFanartApiKey": "Personal API key:", - "LabelFileOrUrl": "File or URL:", - "LabelH264Crf": "H.264 encoding CRF:", - "LabelH264EncodingPreset": "H.264 encoding preset:", - "LabelHttpsPort": "Local HTTPS port number:", - "LabelHttpsPortHelp": "The TCP port number that Jellyfin's HTTPS server should bind to.", "LabelImportOnlyFavoriteChannels": "Restrict to channels marked as favourite", - "LabelInNetworkSignInWithEasyPassword": "Enable in-network sign in with my easy PIN code", - "LabelInNetworkSignInWithEasyPasswordHelp": "If enabled, you'll be able to use your easy PIN code to sign in to Jellyfin apps from inside your home network. Your regular password will only be needed away from home. If the PIN code is left blank, you won't need a password within your home network.", - "LabelIpAddressValue": "IP address: {0}", - "LabelKodiMetadataDateFormatHelp": "All dates within nfos will be read and written to using this format.", "LabelKodiMetadataUserHelp": "Enable this to save watch data to Nfo files for other applications to utilise.", - "LabelLocalHttpServerPortNumber": "Local HTTP port number:", - "LabelLocalHttpServerPortNumberHelp": "The TCP port number that Jellyfin's HTTP server should bind to.", - "LabelManufacturerUrl": "Manufacturer URL", - "LabelMaxBitrateHelp": "Specify a max bitrate in bandwidth constrained environments, or if the device imposes its own limit.", - "LabelModelUrl": "Model URL", - "LabelNewUserNameHelp": "Usernames can contain letters (a-z), numbers (0-9), dashes (-), underscores (_), apostrophes ('), and full stops (.)", - "LabelOptionalM3uUrl": "M3U URL (optional):", - "LabelPasswordRecoveryPinCode": "PIN code:", - "LabelPinCode": "PIN code:", - "LabelPublicHttpPort": "Public HTTP port number:", - "LabelPublicHttpPortHelp": "The public port number that should be mapped to the local HTTP port.", - "LabelPublicHttpsPort": "Public HTTPS port number:", - "LabelPublicHttpsPortHelp": "The public port number that should be mapped to the local HTTPS port.", - "LabelRemoteClientBitrateLimitHelp": "An optional per-stream bitrate limit for all out of network devices. This is useful to prevent devices from requesting a higher bitrate than your Internet connection can handle. This may result in increased CPU load on your server in order to transcode videos on the fly to a lower bitrate.", - "LabelRunningOnPort": "Running on HTTP port {0}.", - "LabelRunningOnPorts": "Running on HTTP port {0}, and HTTPS port {1}.", - "LabelSkipIfAudioTrackPresentHelp": "Untick this to ensure all videos have subtitles, regardless of audio language.", - "LabelUnairedMissingEpisodesWithinSeasons": "Display unaired episodes within series", - "LabelUrl": "URL:", - "LabelZipCode": "Post Code:", - "LabelffmpegPathHelp": "The path to the ffmpeg application file or folder containing ffmpeg.", - "LinkApi": "API", - "MessageConfirmRevokeApiKey": "Are you sure you wish to revoke this API key? The application's connection to Jellyfin Server will be abruptly terminated.", - "MessageForgotPasswordFileExpiration": "The reset PIN will expire at {0}.", - "MessageInvalidForgotPasswordPin": "An invalid or expired PIN was entered. Please try again.", "MessageNoCollectionsAvailable": "Collections allow you to enjoy personalised groupings of Movies, Series, Albums, Books and Games. Click the + button to start creating Collections.", - "MessagePluginInstallDisclaimer": "Plugins built by Jellyfin community members are a great way to enhance your Jellyfin experience with additional features and benefits. Before installing, please be aware of the effects they may have on your Jellyfin Server, such as longer library scans, additional background processing and decreased system stability.", "NoNewDevicesFound": "No new devices found. To add a new tuner, close this dialogue and enter the device information manually.", - "OptionAllowRemoteSharedDevicesHelp": "DLNA devices are considered shared until a user begins controlling it.", "OptionBlockLiveTvPrograms": "Live TV Programmes", "OptionEnableExternalContentInSuggestionsHelp": "Allow internet trailers and live TV programmes to be included within suggested content.", "OptionEnableFullSpeedConversionHelp": "By default, sync conversion is performed at a low speed to minimise resource consumption.", "OptionEnableTranscodingThrottleHelp": "Throttling will automatically adjust transcoding speed in order to minimise server CPU utilisation during playback.", "OptionFavorite": "Favourites", "OptionIgnoreTranscodeByteRangeRequestsHelp": "If enabled, these requests will be honoured but will ignore the byte range header.", - "OptionMissingTvdbId": "Missing TheTVDB ID", - "OptionProtocolHls": "HTTP Live Streaming", - "OptionProtocolHttp": "HTTP", - "OptionRequirePerfectSubtitleMatchHelp": "Requiring a perfect match will filter subtitles to include only those that have been tested and verified with your exact video file. Unticking this will increase the likelihood of subtitles being downloaded and will increase the chances of mistimed or incorrect subtitle text.", - "PinCodeResetComplete": "The PIN code has been reset.", - "PinCodeResetConfirmation": "Are you sure you wish to reset the PIN code?", - "PluginInstalledMessage": "The plug-in has been successfully installed. Jellyfin Server will need to be restarted for changes to take effect.", - "PluginTabAppClassic": "Jellyfin for Windows Media Centre", "Programs": "Programmes", - "RequireHttps": "Require HTTPS for external connections", - "RequireHttpsHelp": "If enabled, connections over HTTP will be redirected to HTTPS.", - "ServerRestartNeededAfterPluginInstall": "Jellyfin Server will need to be restarted after installing a plug-in.", - "SetupFFmpegHelp": "Jellyfin may require a library or application to convert certain media types. There are many different applications available, however, Jellyfin has been tested to work with FFmpeg. Jellyfin is in no way affiliated with FFmpeg, its ownership, code or distribution.", - "SubtitleDownloadInstructions": "To manage subtitle downloading, click on a library in Jellyfin library setup and edit the subtitle downloading settings.", "SynologyUpdateInstructions": "Please login to DSM and go to Package Centre to update.", "TabCatalog": "Catalogue", "TabFavorites": "Favourites", - "UserAgentHelp": "Supply a custom user-agent HTTP header, if necessary.", "ViewTypeMusicFavoriteAlbums": "Favourite Albums", "ViewTypeMusicFavoriteArtists": "Favourite Artists", "ViewTypeMusicFavoriteSongs": "Favourite Songs", @@ -121,6 +37,5 @@ "XmlTvKidsCategoriesHelp": "Programmes with these categories will be displayed as programmes for children. Separate multiple with '|'.", "XmlTvMovieCategoriesHelp": "Programmes with these categories will be displayed as movies. Separate multiple with '|'.", "XmlTvNewsCategoriesHelp": "Programmes with these categories will be displayed as news programmes. Separate multiple with '|'.", - "XmlTvPathHelp": "A path to an XML TV file. Jellyfin will read this file and periodically check it for updates. You are responsible for creating and updating the file.", "XmlTvSportsCategoriesHelp": "Programmes with these categories will be displayed as sports programmes. Separate multiple with '|'." }