mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2026-10-26 16:45:18 +00:00
Backport pull request #8347 from jellyfin-web/release-12.z
Fix Delete All device deletion
Original-merge: ee1ccf88a0
Merged-by: thornbill <thornbill@users.noreply.github.com>
Backported-by: thornbill <thornbill@users.noreply.github.com>
This commit is contained in:
1 parent
614fa468a8
commit
3658ea420c
2 files changed
+5
-3
No files matched your search
@@ -111,6 +111,7 @@
|
||||
- [Alex Dickens](https://github.com/alex-dicko)
|
||||
- [shindouj](https://github.com/shindouj)
|
||||
- [TheDreadPirate](https://github.com/thedreaddpirate)
|
||||
- [bymoxb](https://github.com/bymoxb)
|
||||
|
||||
## Emby Contributors
|
||||
|
||||
|
||||
@@ -96,7 +96,8 @@ export const Component = () => {
|
||||
if (devices) {
|
||||
Promise
|
||||
.all(devices.map(item => {
|
||||
if (api && item.Id && api.deviceInfo.id === item.Id) {
|
||||
const isCurrentDevice = api && item.Id && api.deviceInfo.id === item.Id;
|
||||
if (item.Id && !isCurrentDevice) {
|
||||
return deleteDevice.mutateAsync({ id: [item.Id] });
|
||||
}
|
||||
return Promise.resolve();
|
||||
@@ -208,7 +209,7 @@ export const Component = () => {
|
||||
}
|
||||
},
|
||||
renderRowActions: ({ row, table }) => {
|
||||
const isDeletable = api && row.original.Id && api.deviceInfo.id === row.original.Id;
|
||||
const isCurrentDevice = api && row.original.Id && api.deviceInfo.id === row.original.Id;
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
@@ -227,7 +228,7 @@ export const Component = () => {
|
||||
</IconButton>
|
||||
</Tooltip>
|
||||
{/* Don't include Tooltip when disabled */}
|
||||
{isDeletable ? (
|
||||
{isCurrentDevice ? (
|
||||
<IconButton
|
||||
color='error'
|
||||
disabled
|
||||
|
||||
Reference in new issue
Block a user