diff --git a/.gitignore b/.gitignore index 52cd61ad14..d039edb955 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ config.json # ide .idea +.vs # log yarn-error.log diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index f03a56ab71..c87ab0c92b 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -80,6 +80,7 @@ - [Rasmus Krämer](https://github.com/rasmuslos) - [ntarelix](https://github.com/ntarelix) - [András Maróy](https://github.com/andrasmaroy) +- [Chris-Codes-It](https://github.com/Chris-Codes-It) - [Vedant](https://github.com/viktory36) ## Emby Contributors diff --git a/package-lock.json b/package-lock.json index 9c96e2080f..1c8a294411 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@fontsource/noto-sans-kr": "5.0.17", "@fontsource/noto-sans-sc": "5.0.17", "@fontsource/noto-sans-tc": "5.0.17", - "@jellyfin/sdk": "0.0.0-unstable.202403100501", + "@jellyfin/sdk": "0.0.0-unstable.202403180216", "@loadable/component": "5.16.3", "@mui/icons-material": "5.15.11", "@mui/material": "5.15.11", @@ -3641,9 +3641,9 @@ "dev": true }, "node_modules/@jellyfin/sdk": { - "version": "0.0.0-unstable.202403100501", - "resolved": "https://registry.npmjs.org/@jellyfin/sdk/-/sdk-0.0.0-unstable.202403100501.tgz", - "integrity": "sha512-gt3wIz/bUVznwuhffPaCGED8+mttjCSyrZZ2cz2UcDMqzzjmwhp57oP0AIUS1A5YQe5RVFWi95ZKQlI5aj/x+Q==", + "version": "0.0.0-unstable.202403180216", + "resolved": "https://registry.npmjs.org/@jellyfin/sdk/-/sdk-0.0.0-unstable.202403180216.tgz", + "integrity": "sha512-YvBixS+kT/8z8xJUW3A36cYGMwYuishXYsYY+4gNBZKfJ+z9iygIMhbLybrDoZcnAc5QyiaE5SLheOVPPBNXWw==", "peerDependencies": { "axios": "^1.3.4" } @@ -25268,9 +25268,9 @@ "dev": true }, "@jellyfin/sdk": { - "version": "0.0.0-unstable.202403100501", - "resolved": "https://registry.npmjs.org/@jellyfin/sdk/-/sdk-0.0.0-unstable.202403100501.tgz", - "integrity": "sha512-gt3wIz/bUVznwuhffPaCGED8+mttjCSyrZZ2cz2UcDMqzzjmwhp57oP0AIUS1A5YQe5RVFWi95ZKQlI5aj/x+Q==", + "version": "0.0.0-unstable.202403180216", + "resolved": "https://registry.npmjs.org/@jellyfin/sdk/-/sdk-0.0.0-unstable.202403180216.tgz", + "integrity": "sha512-YvBixS+kT/8z8xJUW3A36cYGMwYuishXYsYY+4gNBZKfJ+z9iygIMhbLybrDoZcnAc5QyiaE5SLheOVPPBNXWw==", "requires": {} }, "@jest/schemas": { diff --git a/package.json b/package.json index c3344d3519..cf4b05c131 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "@fontsource/noto-sans-kr": "5.0.17", "@fontsource/noto-sans-sc": "5.0.17", "@fontsource/noto-sans-tc": "5.0.17", - "@jellyfin/sdk": "0.0.0-unstable.202403100501", + "@jellyfin/sdk": "0.0.0-unstable.202403180216", "@loadable/component": "5.16.3", "@mui/icons-material": "5.15.11", "@mui/material": "5.15.11", diff --git a/src/apps/dashboard/routes/users/index.tsx b/src/apps/dashboard/routes/users/index.tsx index 705713ff90..f758b85016 100644 --- a/src/apps/dashboard/routes/users/index.tsx +++ b/src/apps/dashboard/routes/users/index.tsx @@ -49,6 +49,7 @@ const UserProfiles: FunctionComponent = () => { const showUserMenu = (elem: HTMLElement) => { const card = dom.parentWithClass(elem, 'card'); const userId = card?.getAttribute('data-userid'); + const username = card?.getAttribute('data-username'); if (!userId) { console.error('Unexpected null user id'); @@ -106,7 +107,7 @@ const UserProfiles: FunctionComponent = () => { break; case 'delete': - deleteUser(userId); + deleteUser(userId, username); } } }).catch(() => { @@ -117,12 +118,13 @@ const UserProfiles: FunctionComponent = () => { }); }; - const deleteUser = (id: string) => { - const msg = globalize.translate('DeleteUserConfirmation'); + const deleteUser = (id: string, username?: string | null) => { + const title = username ? globalize.translate('DeleteName', username) : globalize.translate('DeleteUser'); + const text = globalize.translate('DeleteUserConfirmation'); confirm({ - title: globalize.translate('DeleteUser'), - text: msg, + title, + text, confirmText: globalize.translate('Delete'), primary: 'delete' }).then(function () { diff --git a/src/apps/dashboard/routes/users/profile.tsx b/src/apps/dashboard/routes/users/profile.tsx index 11cda31fcd..7ef62f8261 100644 --- a/src/apps/dashboard/routes/users/profile.tsx +++ b/src/apps/dashboard/routes/users/profile.tsx @@ -182,6 +182,7 @@ const UserEdit: FunctionComponent = () => { (page.querySelector('.chkDisabled') as HTMLInputElement).checked = user.Policy.IsDisabled; (page.querySelector('.chkIsHidden') as HTMLInputElement).checked = user.Policy.IsHidden; (page.querySelector('.chkEnableCollectionManagement') as HTMLInputElement).checked = user.Policy.EnableCollectionManagement; + (page.querySelector('.chkEnableSubtitleManagement') as HTMLInputElement).checked = user.Policy.EnableSubtitleManagement; (page.querySelector('.chkRemoteControlSharedDevices') as HTMLInputElement).checked = user.Policy.EnableSharedDeviceControl; (page.querySelector('.chkEnableRemoteControlOtherUsers') as HTMLInputElement).checked = user.Policy.EnableRemoteControlOfOtherUsers; (page.querySelector('.chkEnableDownloading') as HTMLInputElement).checked = user.Policy.EnableContentDownloading; @@ -240,6 +241,7 @@ const UserEdit: FunctionComponent = () => { user.Policy.EnableVideoPlaybackTranscoding = (page.querySelector('.chkEnableVideoPlaybackTranscoding') as HTMLInputElement).checked; user.Policy.EnablePlaybackRemuxing = (page.querySelector('.chkEnableVideoPlaybackRemuxing') as HTMLInputElement).checked; user.Policy.EnableCollectionManagement = (page.querySelector('.chkEnableCollectionManagement') as HTMLInputElement).checked; + user.Policy.EnableSubtitleManagement = (page.querySelector('.chkEnableSubtitleManagement') as HTMLInputElement).checked; user.Policy.ForceRemoteSourceTranscoding = (page.querySelector('.chkForceRemoteSourceTranscoding') as HTMLInputElement).checked; user.Policy.EnableContentDownloading = (page.querySelector('.chkEnableDownloading') as HTMLInputElement).checked; user.Policy.EnableRemoteAccess = (page.querySelector('.chkRemoteAccess') as HTMLInputElement).checked; @@ -392,6 +394,11 @@ const UserEdit: FunctionComponent = () => { className='chkEnableCollectionManagement' title='AllowCollectionManagement' /> +