Skip to content

Commit e99014c

Browse files
committed
Merge branch 'dev' of https://github.com/KomodoPlatform/komodo-wallet into codex/check-if-user-is-signed-in-on-app-resume
2 parents cb6f42b + 1ff43c4 commit e99014c

File tree

51 files changed

+1132
-311
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1132
-311
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM docker.io/ubuntu:22.04
22

3-
ENV FLUTTER_VERSION="3.32.2"
3+
ENV FLUTTER_VERSION="3.32.5"
44
ENV USER="komodo"
55
ENV USER_ID=1000
66
ENV PATH=$PATH:/opt/flutter/bin

.docker/build.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,13 @@ docker build $PLATFORM_FLAG -f .docker/komodo-wallet-android.dockerfile . -t kom
4040
# Create the build directory ourselves to prevent it from being created by the Docker daemon (as root)
4141
mkdir -p ./build
4242

43+
COMMIT_HASH=$(git rev-parse --short HEAD | cut -c1-7)
44+
4345
ENV_ARGS=""
4446
ENV_VARS="GITHUB_API_PUBLIC_READONLY_TOKEN TRELLO_API_KEY \
4547
TRELLO_TOKEN TRELLO_BOARD_ID TRELLO_LIST_ID \
46-
FEEDBACK_API_KEY FEEDBACK_PRODUCTION_URL FEEDBACK_TEST_URL"
48+
FEEDBACK_API_KEY FEEDBACK_PRODUCTION_URL FEEDBACK_TEST_URL \
49+
COMMIT_HASH"
4750

4851
for VAR in $ENV_VARS; do
4952
case "$VAR" in
@@ -55,6 +58,7 @@ for VAR in $ENV_VARS; do
5558
FEEDBACK_API_KEY) VALUE=$FEEDBACK_API_KEY ;;
5659
FEEDBACK_PRODUCTION_URL) VALUE=$FEEDBACK_PRODUCTION_URL ;;
5760
FEEDBACK_TEST_URL) VALUE=$FEEDBACK_TEST_URL ;;
61+
COMMIT_HASH) VALUE=$COMMIT_HASH ;;
5862
*) VALUE= ;;
5963
esac
6064

@@ -68,4 +72,4 @@ docker run $PLATFORM_FLAG --rm -v ./build:/app/build \
6872
-u "$HOST_UID:$HOST_GID" \
6973
$ENV_ARGS \
7074
komodo/komodo-wallet:latest sh -c \
71-
"sudo chown -R komodo:komodo /app/build; flutter pub get --enforce-lockfile; flutter build web --no-pub || true; flutter build $BUILD_TARGET --config-only; flutter build $BUILD_TARGET --no-pub --$BUILD_MODE"
75+
"sudo chown -R komodo:komodo /app/build; flutter pub get --enforce-lockfile; flutter build web --no-pub || true; flutter build $BUILD_TARGET --config-only; flutter build $BUILD_TARGET --no-pub --dart-define=COMMIT_HASH=$COMMIT_HASH --$BUILD_MODE"

.docker/komodo-wallet-android.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM komodo/android-sdk:35 AS final
22

3-
ENV FLUTTER_VERSION="3.32.2"
3+
ENV FLUTTER_VERSION="3.32.5"
44
ENV HOME="/home/komodo"
55
ENV USER="komodo"
66
ENV PATH=$PATH:$HOME/flutter/bin

.github/actions/flutter-deps/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ runs:
77
uses: subosito/flutter-action@v2
88
with:
99
# NB! Keep up-to-date with the flutter version used for development
10-
flutter-version: "3.32.2"
10+
flutter-version: "3.32.5"
1111
channel: "stable"
1212

1313
- name: Prepare build directory

.github/actions/generate-assets/action.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,22 @@ inputs:
4545
runs:
4646
using: "composite"
4747
steps:
48+
- name: Determine commit hash
49+
shell: bash
50+
run: |
51+
echo "Determining commit hash..."
52+
if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
53+
# For PRs, use the HEAD of the feature branch
54+
PR_SHA=$(jq -r .pull_request.head.sha "$GITHUB_EVENT_PATH")
55+
COMMIT_HASH=${PR_SHA:0:7}
56+
echo "Detected pull_request event. Using PR HEAD SHA: $COMMIT_HASH"
57+
else
58+
# Otherwise use the current checked-out HEAD
59+
COMMIT_HASH=$(git rev-parse --short HEAD | cut -c1-7)
60+
echo "Using git HEAD SHA: $COMMIT_HASH"
61+
fi
62+
# Export for subsequent steps
63+
echo "COMMIT_HASH=$COMMIT_HASH" >> $GITHUB_ENV
4864
- name: Fetch packages and generate assets
4965
shell: bash
5066
env:
@@ -66,8 +82,7 @@ runs:
6682
unset GITHUB_API_PUBLIC_READONLY_TOKEN
6783
fi
6884
69-
# Get the current commit hash
70-
COMMIT_HASH=$(git rev-parse --short HEAD)
85+
# Now COMMIT_HASH comes from the previous step, not recalculated here.
7186
7287
# Prepare build command with feedback service credentials
7388
BUILD_CMD="${{ inputs.BUILD_COMMAND }}"

.github/workflows/mobile-builds.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
FEEDBACK_TEST_URL: ${{ secrets.FEEDBACK_TEST_URL }}
7070

7171
# Flutter build with `--no-pub` flag fails on Android due to a
72-
# known regression with the build system in 3.32.2.
72+
# known regression with the build system in 3.32.5.
7373
# https://github.com/flutter/flutter/issues/169336
7474
- name: Temporary workaround for Android build issue
7575
if: ${{ matrix.platform == 'Android' }}

.github/workflows/roll-sdk-packages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
uses: subosito/flutter-action@v2
4646
with:
4747
# NB! Keep up-to-date with the flutter version used for development
48-
flutter-version: "3.32.2"
48+
flutter-version: "3.32.5"
4949
channel: "stable"
5050

5151
- name: Determine configuration

app_theme/lib/src/dark/theme_global_dark.dart

Lines changed: 47 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,6 @@ ThemeData get themeGlobalDark {
55
const Color inputBackgroundColor = Color.fromRGBO(51, 57, 72, 1);
66
const Color textColor = Color.fromRGBO(255, 255, 255, 1);
77

8-
SnackBarThemeData snackBarThemeLight() => const SnackBarThemeData(
9-
elevation: 12.0,
10-
shape: RoundedRectangleBorder(
11-
borderRadius: BorderRadius.all(Radius.circular(4)),
12-
),
13-
actionTextColor: Colors.green,
14-
behavior: SnackBarBehavior.floating,
15-
);
16-
178
OutlineInputBorder outlineBorderLight(Color lightAccentColor) =>
189
OutlineInputBorder(
1910
borderSide: BorderSide(color: lightAccentColor),
@@ -55,15 +46,32 @@ ThemeData get themeGlobalDark {
5546
fontWeight: FontWeight.w300,
5647
),
5748
labelLarge: const TextStyle(fontSize: 16.0, color: textColor),
58-
bodyLarge:
59-
TextStyle(fontSize: 14.0, color: textColor.withAlpha(128)), // 0.5 * 255
49+
bodyLarge: TextStyle(
50+
fontSize: 14.0,
51+
color: textColor.withAlpha(128),
52+
), // 0.5 * 255
6053
bodySmall: TextStyle(
6154
fontSize: 12.0,
6255
color: textColor.withAlpha(204), // 0.8 * 255
6356
fontWeight: FontWeight.w400,
6457
),
6558
);
6659

60+
SnackBarThemeData snackBarThemeLight() => SnackBarThemeData(
61+
elevation: 12.0,
62+
shape: const RoundedRectangleBorder(
63+
borderRadius: BorderRadius.all(Radius.circular(18)),
64+
),
65+
behavior: SnackBarBehavior.floating,
66+
backgroundColor: colorScheme.primaryContainer,
67+
contentTextStyle: textTheme.bodyLarge!.copyWith(
68+
color: colorScheme.onPrimaryContainer,
69+
),
70+
actionTextColor: colorScheme.onPrimaryContainer,
71+
showCloseIcon: true,
72+
closeIconColor: colorScheme.onPrimaryContainer.withAlpha(179), // 70%
73+
);
74+
6775
final customTheme = ThemeCustomDark();
6876
final theme = ThemeData(
6977
useMaterial3: false,
@@ -81,23 +89,26 @@ ThemeData get themeGlobalDark {
8189
dividerColor: const Color.fromRGBO(56, 67, 108, 1),
8290
appBarTheme: AppBarTheme(color: colorScheme.surface),
8391
iconTheme: IconThemeData(color: colorScheme.primary),
84-
progressIndicatorTheme:
85-
ProgressIndicatorThemeData(color: colorScheme.primary),
92+
progressIndicatorTheme: ProgressIndicatorThemeData(
93+
color: colorScheme.primary,
94+
),
8695
dialogTheme: const DialogThemeData(
8796
backgroundColor: Color.fromRGBO(14, 16, 27, 1),
8897
shape: RoundedRectangleBorder(
89-
borderRadius: BorderRadius.all(
90-
Radius.circular(16),
91-
),
98+
borderRadius: BorderRadius.all(Radius.circular(16)),
9299
),
93100
),
94101
canvasColor: colorScheme.surface,
95102
hintColor: const Color.fromRGBO(183, 187, 191, 1),
96103
snackBarTheme: snackBarThemeLight(),
97104
textSelectionTheme: TextSelectionThemeData(
98105
cursorColor: const Color.fromRGBO(57, 161, 238, 1),
99-
selectionColor:
100-
const Color.fromRGBO(57, 161, 238, 1).withAlpha(77), // 0.3 * 255
106+
selectionColor: const Color.fromRGBO(
107+
57,
108+
161,
109+
238,
110+
1,
111+
).withAlpha(77), // 0.3 * 255
101112
selectionHandleColor: const Color.fromRGBO(57, 161, 238, 1),
102113
),
103114
inputDecorationTheme: InputDecorationTheme(
@@ -122,12 +133,12 @@ ThemeData get themeGlobalDark {
122133
),
123134
elevatedButtonTheme: ElevatedButtonThemeData(
124135
style: ButtonStyle(
125-
backgroundColor: WidgetStateProperty.resolveWith<Color?>(
126-
(Set<WidgetState> states) {
127-
if (states.contains(WidgetState.disabled)) return Colors.grey;
128-
return colorScheme.primary;
129-
},
130-
),
136+
backgroundColor: WidgetStateProperty.resolveWith<Color?>((
137+
Set<WidgetState> states,
138+
) {
139+
if (states.contains(WidgetState.disabled)) return Colors.grey;
140+
return colorScheme.primary;
141+
}),
131142
),
132143
),
133144
segmentedButtonTheme: SegmentedButtonThemeData(
@@ -138,19 +149,14 @@ ThemeData get themeGlobalDark {
138149
foregroundColor: textColor.withAlpha(179), // 0.7 * 255
139150
selectedForegroundColor: textColor,
140151
side: BorderSide(color: colorScheme.outlineVariant),
141-
shape: RoundedRectangleBorder(
142-
borderRadius: BorderRadius.circular(8),
143-
),
152+
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
144153
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 4),
145154
),
146155
),
147156
tabBarTheme: TabBarThemeData(
148157
labelColor: textColor,
149158
indicator: UnderlineTabIndicator(
150-
borderSide: BorderSide(
151-
width: 2.0,
152-
color: colorScheme.primary,
153-
),
159+
borderSide: BorderSide(width: 2.0, color: colorScheme.primary),
154160
// Match the card's border radius
155161
insets: const EdgeInsets.symmetric(horizontal: 18),
156162
),
@@ -184,14 +190,16 @@ ThemeData get themeGlobalDark {
184190
backgroundColor: colorScheme.surface,
185191
selectedItemColor: textColor,
186192
unselectedItemColor: const Color.fromRGBO(173, 175, 198, 1),
187-
unselectedLabelStyle:
188-
const TextStyle(fontSize: 12, fontWeight: FontWeight.w600),
189-
selectedLabelStyle:
190-
const TextStyle(fontSize: 12, fontWeight: FontWeight.w700),
191-
),
192-
extensions: [
193-
customTheme,
194-
],
193+
unselectedLabelStyle: const TextStyle(
194+
fontSize: 12,
195+
fontWeight: FontWeight.w600,
196+
),
197+
selectedLabelStyle: const TextStyle(
198+
fontSize: 12,
199+
fontWeight: FontWeight.w700,
200+
),
201+
),
202+
extensions: [customTheme],
195203
);
196204

197205
// Initialize theme-dependent colors after theme creation

0 commit comments

Comments
 (0)