mirror of
https://github.com/sct/overseerr.git
synced 2025-12-26 08:25:07 +01:00
fix: update migration script (#4065)
* fix: update migration script fix: remove insert for new entities * fix: correct migration name * fix: correct name inside migration
This commit is contained in:
@@ -24,6 +24,7 @@ const messages = defineMessages({
|
||||
browser: 'Browser',
|
||||
engine: 'Engine',
|
||||
deletesubscription: 'Delete Subscription',
|
||||
unknown: 'Unknown',
|
||||
});
|
||||
|
||||
const DeviceItem = ({ disablePushNotifications, device }: DeviceItemProps) => {
|
||||
@@ -48,12 +49,12 @@ const DeviceItem = ({ disablePushNotifications, device }: DeviceItemProps) => {
|
||||
month: 'long',
|
||||
day: 'numeric',
|
||||
})
|
||||
: 'Unknown'}
|
||||
: 'N/A'}
|
||||
</div>
|
||||
<div className="mr-2 min-w-0 truncate text-lg font-bold text-white hover:underline xl:text-xl">
|
||||
{device.userAgent
|
||||
? UAParser(device.userAgent).device.model
|
||||
: 'Unknown'}
|
||||
: intl.formatMessage(messages.unknown)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -63,9 +64,7 @@ const DeviceItem = ({ disablePushNotifications, device }: DeviceItemProps) => {
|
||||
{intl.formatMessage(messages.operatingsystem)}
|
||||
</span>
|
||||
<span className="flex truncate text-sm text-gray-300">
|
||||
{device.userAgent
|
||||
? UAParser(device.userAgent).os.name
|
||||
: 'Unknown'}
|
||||
{device.userAgent ? UAParser(device.userAgent).os.name : 'N/A'}
|
||||
</span>
|
||||
</div>
|
||||
<div className="card-field">
|
||||
@@ -75,7 +74,7 @@ const DeviceItem = ({ disablePushNotifications, device }: DeviceItemProps) => {
|
||||
<span className="flex truncate text-sm text-gray-300">
|
||||
{device.userAgent
|
||||
? UAParser(device.userAgent).browser.name
|
||||
: 'Unknown'}
|
||||
: 'N/A'}
|
||||
</span>
|
||||
</div>
|
||||
<div className="card-field">
|
||||
@@ -85,7 +84,7 @@ const DeviceItem = ({ disablePushNotifications, device }: DeviceItemProps) => {
|
||||
<span className="flex truncate text-sm text-gray-300">
|
||||
{device.userAgent
|
||||
? UAParser(device.userAgent).engine.name
|
||||
: 'Unknown'}
|
||||
: 'N/A'}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -312,15 +312,21 @@ const UserWebPushSettings = () => {
|
||||
</h3>
|
||||
<div className="section">
|
||||
{dataDevices?.length ? (
|
||||
dataDevices?.map((device, index) => (
|
||||
<div className="py-2" key={`device-list-${index}`}>
|
||||
<DeviceItem
|
||||
key={index}
|
||||
disablePushNotifications={disablePushNotifications}
|
||||
device={device}
|
||||
/>
|
||||
</div>
|
||||
))
|
||||
dataDevices
|
||||
?.sort((a, b) => {
|
||||
const dateA = a.createdAt ? new Date(a.createdAt).getTime() : 0;
|
||||
const dateB = b.createdAt ? new Date(b.createdAt).getTime() : 0;
|
||||
return dateB - dateA;
|
||||
})
|
||||
.map((device, index) => (
|
||||
<div className="py-2" key={`device-list-${index}`}>
|
||||
<DeviceItem
|
||||
key={index}
|
||||
disablePushNotifications={disablePushNotifications}
|
||||
device={device}
|
||||
/>
|
||||
</div>
|
||||
))
|
||||
) : (
|
||||
<>
|
||||
<Alert
|
||||
|
||||
@@ -1121,6 +1121,7 @@
|
||||
"components.UserProfile.UserSettings.UserNotificationSettings.UserNotificationsWebPush.subscriptiondeleted": "Subscription deleted.",
|
||||
"components.UserProfile.UserSettings.UserNotificationSettings.UserNotificationsWebPush.subscriptiondeleteerror": "Something went wrong while deleting the user subscription.",
|
||||
"components.UserProfile.UserSettings.UserNotificationSettings.UserNotificationsWebPush.type": "type",
|
||||
"components.UserProfile.UserSettings.UserNotificationSettings.UserNotificationsWebPush.unknown": "Unknown",
|
||||
"components.UserProfile.UserSettings.UserNotificationSettings.UserNotificationsWebPush.webpushhasbeendisabled": "Web push has been disabled.",
|
||||
"components.UserProfile.UserSettings.UserNotificationSettings.UserNotificationsWebPush.webpushhasbeenenabled": "Web push has been enabled.",
|
||||
"components.UserProfile.UserSettings.UserNotificationSettings.UserNotificationsWebPush.webpushsettingsfailed": "Web push notification settings failed to save.",
|
||||
|
||||
Reference in New Issue
Block a user