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/.vscode/settings.json b/.vscode/settings.json index c54aff90bb..d2b2caa950 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { "editor.codeActionsOnSave": { - "source.fixAll.eslint": true + "source.fixAll.eslint": "explicit" }, "eslint.format.enable": true, "editor.formatOnSave": false diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index f30c32b359..467d17caae 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) ## Emby Contributors diff --git a/package-lock.json b/package-lock.json index 767a198c1a..1f0e3f5ec9 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.202403040506", + "@jellyfin/sdk": "0.0.0-unstable.202403150501", "@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.202403040506", - "resolved": "https://registry.npmjs.org/@jellyfin/sdk/-/sdk-0.0.0-unstable.202403040506.tgz", - "integrity": "sha512-B+i1Mpn10AC0Ks+PIVXCRcpuy7E50bsPy9AYmEt2rgfOpnAJ9qjGqyFligGI8l391NMtv/p0XJd7NUsApHU1Lg==", + "version": "0.0.0-unstable.202403150501", + "resolved": "https://registry.npmjs.org/@jellyfin/sdk/-/sdk-0.0.0-unstable.202403150501.tgz", + "integrity": "sha512-FdKAHgeS+c+Ps77nlYIgPI/GHY6Xi6LDaobse0+B180p3lItXi0Uarr3i8wtoHdu5B/C7R28LoXoNJUPwsGCqg==", "peerDependencies": { "axios": "^1.3.4" } @@ -25268,9 +25268,9 @@ "dev": true }, "@jellyfin/sdk": { - "version": "0.0.0-unstable.202403040506", - "resolved": "https://registry.npmjs.org/@jellyfin/sdk/-/sdk-0.0.0-unstable.202403040506.tgz", - "integrity": "sha512-B+i1Mpn10AC0Ks+PIVXCRcpuy7E50bsPy9AYmEt2rgfOpnAJ9qjGqyFligGI8l391NMtv/p0XJd7NUsApHU1Lg==", + "version": "0.0.0-unstable.202403150501", + "resolved": "https://registry.npmjs.org/@jellyfin/sdk/-/sdk-0.0.0-unstable.202403150501.tgz", + "integrity": "sha512-FdKAHgeS+c+Ps77nlYIgPI/GHY6Xi6LDaobse0+B180p3lItXi0Uarr3i8wtoHdu5B/C7R28LoXoNJUPwsGCqg==", "requires": {} }, "@jest/schemas": { diff --git a/package.json b/package.json index b7a307ec1d..984e7b1790 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.202403040506", + "@jellyfin/sdk": "0.0.0-unstable.202403150501", "@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' /> +