fix(web): do not notify on patch releases (#22591)

This commit is contained in:
Jason Rasmussen
2025-10-06 12:00:37 -05:00
committed by GitHub
parent b06b8ceef6
commit 50ac27238e
4 changed files with 49 additions and 3 deletions

View File

@@ -21,6 +21,7 @@ import {
unlinkOAuthAccount,
type MemoryResponseDto,
type PersonResponseDto,
type ServerVersionResponseDto,
type SharedLinkResponseDto,
type UserResponseDto,
} from '@immich/sdk';
@@ -385,3 +386,22 @@ export function createDateFormatter(localeCode: string | undefined): DateFormatt
},
};
}
export const getReleaseType = (
current: ServerVersionResponseDto,
newVersion: ServerVersionResponseDto,
): 'major' | 'minor' | 'patch' | 'none' => {
if (current.major !== newVersion.major) {
return 'major';
}
if (current.minor !== newVersion.minor) {
return 'minor';
}
if (current.patch !== newVersion.patch) {
return 'patch';
}
return 'none';
};