mirror of
https://github.com/immich-app/immich.git
synced 2026-07-04 03:45:59 -07:00
165bca4b0a
* feat: new feature board * wip * wip * wip * lint * lint * pr feedback * pr feedback * i18n * i18n
55 lines
1.8 KiB
Dart
55 lines
1.8 KiB
Dart
import 'package:flutter/foundation.dart';
|
|
import 'package:immich_mobile/utils/semver.dart';
|
|
|
|
class FeatureHighlight {
|
|
/// Asset path of the feature screenshot, or null to show a placeholder.
|
|
final String? image;
|
|
final String titleKey;
|
|
final String bodyKey;
|
|
final List<TargetPlatform> platform;
|
|
|
|
const FeatureHighlight({
|
|
this.image,
|
|
required this.titleKey,
|
|
required this.bodyKey,
|
|
this.platform = const [.iOS, .android],
|
|
});
|
|
|
|
bool get isVisibleOnCurrentPlatform => platform.contains(defaultTargetPlatform);
|
|
}
|
|
|
|
/// The release this batch of highlights was authored for. Content-defined:
|
|
/// bump it only when publishing a new batch, never from the running app version.
|
|
const featureMessageRelease = SemVer(major: 3, minor: 0, patch: 0);
|
|
|
|
/// Highlights relevant to the current platform.
|
|
List<FeatureHighlight> get visibleFeatureMessageHighlights =>
|
|
featureMessageHighlights.where((h) => h.isVisibleOnCurrentPlatform).toList();
|
|
|
|
const List<FeatureHighlight> featureMessageHighlights = [
|
|
FeatureHighlight(
|
|
image: 'assets/feature_message/share_quality.webp',
|
|
titleKey: 'share_quality_title',
|
|
bodyKey: 'share_quality_body',
|
|
),
|
|
FeatureHighlight(
|
|
image: 'assets/feature_message/slideshow.webp',
|
|
titleKey: 'slideshow_title',
|
|
bodyKey: 'slideshow_body',
|
|
),
|
|
FeatureHighlight(
|
|
image: 'assets/feature_message/recently_added.webp',
|
|
titleKey: 'recently_added_title',
|
|
bodyKey: 'recently_added_body',
|
|
),
|
|
|
|
FeatureHighlight(image: 'assets/feature_message/ocr.webp', titleKey: 'ocr_title', bodyKey: 'ocr_body'),
|
|
FeatureHighlight(
|
|
image: 'assets/feature_message/open_in_immich.webp',
|
|
titleKey: 'open_in_immich_title',
|
|
bodyKey: 'open_in_immich_body',
|
|
platform: [.android],
|
|
),
|
|
FeatureHighlight(titleKey: 'upload_to_album_title', bodyKey: 'upload_to_album_body'),
|
|
];
|