feat: Add on/off/blurred options to the background image (#442)

Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
PartyDonut 2025-08-09 09:23:47 +02:00 committed by GitHub
parent ef6780b412
commit 715e707bb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 109 additions and 63 deletions

View file

@ -41,7 +41,9 @@ _$ClientSettingsModelImpl _$$ClientSettingsModelImplFromJson(
schemeVariant: $enumDecodeNullable(
_$DynamicSchemeVariantEnumMap, json['schemeVariant']) ??
DynamicSchemeVariant.rainbow,
backgroundPosters: json['backgroundPosters'] as bool? ?? true,
backgroundImage: $enumDecodeNullable(
_$BackgroundTypeEnumMap, json['backgroundImage']) ??
BackgroundType.blurred,
checkForUpdates: json['checkForUpdates'] as bool? ?? true,
usePosterForLibrary: json['usePosterForLibrary'] as bool? ?? false,
lastViewedUpdate: json['lastViewedUpdate'] as String?,
@ -78,7 +80,7 @@ Map<String, dynamic> _$$ClientSettingsModelImplToJson(
'showAllCollectionTypes': instance.showAllCollectionTypes,
'maxConcurrentDownloads': instance.maxConcurrentDownloads,
'schemeVariant': _$DynamicSchemeVariantEnumMap[instance.schemeVariant]!,
'backgroundPosters': instance.backgroundPosters,
'backgroundImage': _$BackgroundTypeEnumMap[instance.backgroundImage]!,
'checkForUpdates': instance.checkForUpdates,
'usePosterForLibrary': instance.usePosterForLibrary,
'lastViewedUpdate': instance.lastViewedUpdate,
@ -123,6 +125,12 @@ const _$DynamicSchemeVariantEnumMap = {
DynamicSchemeVariant.fruitSalad: 'fruitSalad',
};
const _$BackgroundTypeEnumMap = {
BackgroundType.disabled: 'disabled',
BackgroundType.enabled: 'enabled',
BackgroundType.blurred: 'blurred',
};
const _$GlobalHotKeysEnumMap = {
GlobalHotKeys.search: 'search',
GlobalHotKeys.exit: 'exit',