fix(admin): make action surfaces tappable and simplify version display
This commit is contained in:
@@ -2357,33 +2357,41 @@ class _AdminScreenState extends ConsumerState<AdminScreen> {
|
||||
scale: isFocused ? 1.01 : 1.0,
|
||||
duration: const Duration(milliseconds: 140),
|
||||
curve: Curves.easeOutCubic,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 140),
|
||||
curve: Curves.easeOutCubic,
|
||||
padding: EdgeInsets.all(isFocused ? 5 * s : 0),
|
||||
decoration: BoxDecoration(
|
||||
color: isFocused
|
||||
? SacredColors.surfaceContainerLow.withValues(alpha: 0.96)
|
||||
: Colors.transparent,
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(SacredRadii.lg),
|
||||
child: InkWell(
|
||||
onTap: onActivate,
|
||||
borderRadius: BorderRadius.circular(SacredRadii.lg),
|
||||
border: Border.all(
|
||||
color: isFocused
|
||||
? SacredColors.primary.withValues(alpha: 0.95)
|
||||
: Colors.transparent,
|
||||
width: isFocused ? 3 : 0,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 140),
|
||||
curve: Curves.easeOutCubic,
|
||||
padding: EdgeInsets.all(isFocused ? 5 * s : 0),
|
||||
decoration: BoxDecoration(
|
||||
color: isFocused
|
||||
? SacredColors.surfaceContainerLow.withValues(alpha: 0.96)
|
||||
: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(SacredRadii.lg),
|
||||
border: Border.all(
|
||||
color: isFocused
|
||||
? SacredColors.primary.withValues(alpha: 0.95)
|
||||
: Colors.transparent,
|
||||
width: isFocused ? 3 : 0,
|
||||
),
|
||||
boxShadow: isFocused
|
||||
? [
|
||||
BoxShadow(
|
||||
color: SacredColors.primary.withValues(alpha: 0.28),
|
||||
blurRadius: 24 * s,
|
||||
spreadRadius: 2 * s,
|
||||
),
|
||||
]
|
||||
: null,
|
||||
),
|
||||
child: ExcludeFocus(
|
||||
child: builder?.call(isFocused) ?? child!,
|
||||
),
|
||||
),
|
||||
boxShadow: isFocused
|
||||
? [
|
||||
BoxShadow(
|
||||
color: SacredColors.primary.withValues(alpha: 0.28),
|
||||
blurRadius: 24 * s,
|
||||
spreadRadius: 2 * s,
|
||||
),
|
||||
]
|
||||
: null,
|
||||
),
|
||||
child: ExcludeFocus(
|
||||
child: builder?.call(isFocused) ?? child!,
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -2420,32 +2428,40 @@ class _AdminScreenState extends ConsumerState<AdminScreen> {
|
||||
scale: isFocused ? 1.01 : 1.0,
|
||||
duration: const Duration(milliseconds: 140),
|
||||
curve: Curves.easeOutCubic,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 140),
|
||||
curve: Curves.easeOutCubic,
|
||||
padding: EdgeInsets.all(isFocused ? 5 * s : 0),
|
||||
decoration: BoxDecoration(
|
||||
color: isFocused
|
||||
? SacredColors.surfaceContainerLow.withValues(alpha: 0.96)
|
||||
: Colors.transparent,
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(SacredRadii.lg),
|
||||
child: InkWell(
|
||||
onTap: onActivate,
|
||||
borderRadius: BorderRadius.circular(SacredRadii.lg),
|
||||
border: Border.all(
|
||||
color: isFocused
|
||||
? SacredColors.primary.withValues(alpha: 0.95)
|
||||
: Colors.transparent,
|
||||
width: isFocused ? 3 : 0,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 140),
|
||||
curve: Curves.easeOutCubic,
|
||||
padding: EdgeInsets.all(isFocused ? 5 * s : 0),
|
||||
decoration: BoxDecoration(
|
||||
color: isFocused
|
||||
? SacredColors.surfaceContainerLow.withValues(alpha: 0.96)
|
||||
: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(SacredRadii.lg),
|
||||
border: Border.all(
|
||||
color: isFocused
|
||||
? SacredColors.primary.withValues(alpha: 0.95)
|
||||
: Colors.transparent,
|
||||
width: isFocused ? 3 : 0,
|
||||
),
|
||||
boxShadow: isFocused
|
||||
? [
|
||||
BoxShadow(
|
||||
color: SacredColors.primary.withValues(alpha: 0.28),
|
||||
blurRadius: 24 * s,
|
||||
spreadRadius: 2 * s,
|
||||
),
|
||||
]
|
||||
: null,
|
||||
),
|
||||
child: builder != null ? builder(isFocused) : child!,
|
||||
),
|
||||
boxShadow: isFocused
|
||||
? [
|
||||
BoxShadow(
|
||||
color: SacredColors.primary.withValues(alpha: 0.28),
|
||||
blurRadius: 24 * s,
|
||||
spreadRadius: 2 * s,
|
||||
),
|
||||
]
|
||||
: null,
|
||||
),
|
||||
child: builder != null ? builder(isFocused) : child!,
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -2481,33 +2497,41 @@ class _AdminScreenState extends ConsumerState<AdminScreen> {
|
||||
scale: isFocused ? 1.01 : 1.0,
|
||||
duration: const Duration(milliseconds: 140),
|
||||
curve: Curves.easeOutCubic,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 140),
|
||||
curve: Curves.easeOutCubic,
|
||||
padding: EdgeInsets.all(isFocused ? 5 * s : 0),
|
||||
decoration: BoxDecoration(
|
||||
color: isFocused
|
||||
? SacredColors.surfaceContainerLow.withValues(alpha: 0.96)
|
||||
: Colors.transparent,
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(SacredRadii.lg),
|
||||
child: InkWell(
|
||||
onTap: onActivate,
|
||||
borderRadius: BorderRadius.circular(SacredRadii.lg),
|
||||
border: Border.all(
|
||||
color: isFocused
|
||||
? SacredColors.primary.withValues(alpha: 0.95)
|
||||
: Colors.transparent,
|
||||
width: isFocused ? 3 : 0,
|
||||
child: AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 140),
|
||||
curve: Curves.easeOutCubic,
|
||||
padding: EdgeInsets.all(isFocused ? 5 * s : 0),
|
||||
decoration: BoxDecoration(
|
||||
color: isFocused
|
||||
? SacredColors.surfaceContainerLow.withValues(alpha: 0.96)
|
||||
: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(SacredRadii.lg),
|
||||
border: Border.all(
|
||||
color: isFocused
|
||||
? SacredColors.primary.withValues(alpha: 0.95)
|
||||
: Colors.transparent,
|
||||
width: isFocused ? 3 : 0,
|
||||
),
|
||||
boxShadow: isFocused
|
||||
? [
|
||||
BoxShadow(
|
||||
color: SacredColors.primary.withValues(alpha: 0.28),
|
||||
blurRadius: 24 * s,
|
||||
spreadRadius: 2 * s,
|
||||
),
|
||||
]
|
||||
: null,
|
||||
),
|
||||
child: ExcludeFocus(
|
||||
child: builder?.call(isFocused) ?? child!,
|
||||
),
|
||||
),
|
||||
boxShadow: isFocused
|
||||
? [
|
||||
BoxShadow(
|
||||
color: SacredColors.primary.withValues(alpha: 0.28),
|
||||
blurRadius: 24 * s,
|
||||
spreadRadius: 2 * s,
|
||||
),
|
||||
]
|
||||
: null,
|
||||
),
|
||||
child: ExcludeFocus(
|
||||
child: builder?.call(isFocused) ?? child!,
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -3822,7 +3846,7 @@ class _AdminScreenState extends ConsumerState<AdminScreen> {
|
||||
SizedBox(height: 20 * s),
|
||||
_buildStatusRow(
|
||||
'Versi Saat Ini',
|
||||
currentVersion?.displayLabel ?? 'Memuat versi...',
|
||||
currentVersion?.versionName ?? 'Memuat versi...',
|
||||
HugeIcons.strokeRoundedPackage,
|
||||
s,
|
||||
),
|
||||
@@ -3850,7 +3874,7 @@ class _AdminScreenState extends ConsumerState<AdminScreen> {
|
||||
SizedBox(height: 20 * s),
|
||||
_buildStatusRow(
|
||||
'Versi Remote',
|
||||
'${remote.latestVersion}+${remote.versionCode}',
|
||||
remote.latestVersion,
|
||||
HugeIcons.strokeRoundedPackage,
|
||||
s,
|
||||
),
|
||||
@@ -3985,7 +4009,10 @@ class _AdminScreenState extends ConsumerState<AdminScreen> {
|
||||
if (result.updateAvailable) {
|
||||
final remote = result.remote;
|
||||
if (remote == null) return 'Update tersedia';
|
||||
return 'Update tersedia ke ${remote.latestVersion}+${remote.versionCode}';
|
||||
if (remote.latestVersion == result.current.versionName) {
|
||||
return 'Update build tersedia untuk versi ${remote.latestVersion}';
|
||||
}
|
||||
return 'Update tersedia ke ${remote.latestVersion}';
|
||||
}
|
||||
return 'Versi ini sudah terbaru';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user