Skip to content

Commit 2ef0470

Browse files
tddang-linagorahoangdat
authored andcommitted
TF-3940 Fix cozy browser back issue
1 parent 6820ad1 commit 2ef0470

File tree

13 files changed

+149
-50
lines changed

13 files changed

+149
-50
lines changed

contact/pubspec.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -545,10 +545,10 @@ packages:
545545
dependency: transitive
546546
description:
547547
name: flutter_svg
548-
sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c
548+
sha256: d44bf546b13025ec7353091516f6881f1d4c633993cb109c3916c3a0159dadf1
549549
url: "https://pub.dev"
550550
source: hosted
551-
version: "2.0.9"
551+
version: "2.1.0"
552552
flutter_test:
553553
dependency: "direct dev"
554554
description: flutter
@@ -1233,26 +1233,26 @@ packages:
12331233
dependency: transitive
12341234
description:
12351235
name: vector_graphics
1236-
sha256: "0f0c746dd2d6254a0057218ff980fc7f5670fd0fcf5e4db38a490d31eed4ad43"
1236+
sha256: a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6
12371237
url: "https://pub.dev"
12381238
source: hosted
1239-
version: "1.1.9+1"
1239+
version: "1.1.19"
12401240
vector_graphics_codec:
12411241
dependency: transitive
12421242
description:
12431243
name: vector_graphics_codec
1244-
sha256: "0edf6d630d1bfd5589114138ed8fada3234deacc37966bec033d3047c29248b7"
1244+
sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146"
12451245
url: "https://pub.dev"
12461246
source: hosted
1247-
version: "1.1.9+1"
1247+
version: "1.1.13"
12481248
vector_graphics_compiler:
12491249
dependency: transitive
12501250
description:
12511251
name: vector_graphics_compiler
1252-
sha256: d24333727332d9bd20990f1483af4e09abdb9b1fc7c3db940b56ab5c42790c26
1252+
sha256: "557a315b7d2a6dbb0aaaff84d857967ce6bdc96a63dc6ee2a57ce5a6ee5d3331"
12531253
url: "https://pub.dev"
12541254
source: hosted
1255-
version: "1.1.9+1"
1255+
version: "1.1.17"
12561256
vector_math:
12571257
dependency: transitive
12581258
description:
@@ -1334,5 +1334,5 @@ packages:
13341334
source: hosted
13351335
version: "3.1.2"
13361336
sdks:
1337-
dart: ">=3.5.0 <4.0.0"
1338-
flutter: ">=3.24.0"
1337+
dart: ">=3.6.0 <4.0.0"
1338+
flutter: ">=3.27.0"

core/pubspec.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -538,10 +538,10 @@ packages:
538538
dependency: "direct main"
539539
description:
540540
name: flutter_svg
541-
sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c
541+
sha256: d44bf546b13025ec7353091516f6881f1d4c633993cb109c3916c3a0159dadf1
542542
url: "https://pub.dev"
543543
source: hosted
544-
version: "2.0.9"
544+
version: "2.1.0"
545545
flutter_test:
546546
dependency: "direct dev"
547547
description: flutter
@@ -1170,26 +1170,26 @@ packages:
11701170
dependency: transitive
11711171
description:
11721172
name: vector_graphics
1173-
sha256: "0f0c746dd2d6254a0057218ff980fc7f5670fd0fcf5e4db38a490d31eed4ad43"
1173+
sha256: a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6
11741174
url: "https://pub.dev"
11751175
source: hosted
1176-
version: "1.1.9+1"
1176+
version: "1.1.19"
11771177
vector_graphics_codec:
11781178
dependency: transitive
11791179
description:
11801180
name: vector_graphics_codec
1181-
sha256: "0edf6d630d1bfd5589114138ed8fada3234deacc37966bec033d3047c29248b7"
1181+
sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146"
11821182
url: "https://pub.dev"
11831183
source: hosted
1184-
version: "1.1.9+1"
1184+
version: "1.1.13"
11851185
vector_graphics_compiler:
11861186
dependency: transitive
11871187
description:
11881188
name: vector_graphics_compiler
1189-
sha256: d24333727332d9bd20990f1483af4e09abdb9b1fc7c3db940b56ab5c42790c26
1189+
sha256: "557a315b7d2a6dbb0aaaff84d857967ce6bdc96a63dc6ee2a57ce5a6ee5d3331"
11901190
url: "https://pub.dev"
11911191
source: hosted
1192-
version: "1.1.9+1"
1192+
version: "1.1.17"
11931193
vector_math:
11941194
dependency: transitive
11951195
description:
@@ -1271,5 +1271,5 @@ packages:
12711271
source: hosted
12721272
version: "3.1.2"
12731273
sdks:
1274-
dart: ">=3.5.0 <4.0.0"
1275-
flutter: ">=3.24.0"
1274+
dart: ">=3.6.0 <4.0.0"
1275+
flutter: ">=3.27.0"

core/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ dependencies:
3939
### Dependencies from pub.dev ###
4040
cupertino_icons: 1.0.6
4141

42-
flutter_svg: 2.0.9
42+
flutter_svg: 2.1.0
4343

4444
dio: 5.0.0
4545

cozy/lib/cozy_config_manager/cozy_config_manager_stub.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class CozyConfigManager {
2-
Future<void> injectCozyScript() async {
2+
Future<void> injectCozyScript(String cozyExternalBridgeVersion) async {
33
throw UnimplementedError('Cannot use injectCozyScript in non-web environment');
44
}
55

cozy/lib/cozy_config_manager/cozy_config_manager_web.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import 'package:linagora_design_flutter/cozy_config_manager/cozy_config_manager.
55
class CozyConfigManager {
66
bool? _isInsideCozy;
77

8-
Future<void> injectCozyScript() async {
9-
await cozy.CozyConfigManager().injectCozyScript();
8+
Future<void> injectCozyScript(String cozyExternalBridgeVersion) async {
9+
await cozy.CozyConfigManager().injectCozyScript(cozyExternalBridgeVersion);
1010
}
1111

1212
Future<void> initialize() async {

cozy/pubspec.lock

Lines changed: 99 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Generated by pub
22
# See https://dart.dev/tools/pub/glossary#lockfile
33
packages:
4+
args:
5+
dependency: transitive
6+
description:
7+
name: args
8+
sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04
9+
url: "https://pub.dev"
10+
source: hosted
11+
version: "2.7.0"
412
async:
513
dependency: transitive
614
description:
@@ -126,6 +134,14 @@ packages:
126134
url: "https://pub.dev"
127135
source: hosted
128136
version: "4.0.0"
137+
flutter_svg:
138+
dependency: transitive
139+
description:
140+
name: flutter_svg
141+
sha256: cd57f7969b4679317c17af6fd16ee233c1e60a82ed209d8a475c54fd6fd6f845
142+
url: "https://pub.dev"
143+
source: hosted
144+
version: "2.2.0"
129145
flutter_test:
130146
dependency: "direct dev"
131147
description: flutter
@@ -136,6 +152,22 @@ packages:
136152
description: flutter
137153
source: sdk
138154
version: "0.0.0"
155+
http:
156+
dependency: transitive
157+
description:
158+
name: http
159+
sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b"
160+
url: "https://pub.dev"
161+
source: hosted
162+
version: "1.4.0"
163+
http_parser:
164+
dependency: transitive
165+
description:
166+
name: http_parser
167+
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
168+
url: "https://pub.dev"
169+
source: hosted
170+
version: "4.1.2"
139171
leak_tracker:
140172
dependency: transitive
141173
description:
@@ -165,7 +197,7 @@ packages:
165197
description:
166198
path: "."
167199
ref: master
168-
resolved-ref: "083cbf597cce8bedcc7ccda76a0c49eb06a71e9e"
200+
resolved-ref: "17879a3de917152eb5473058ef2c3302d2c01f3e"
169201
url: "https://github.com/linagora/linagora-design-flutter.git"
170202
source: git
171203
version: "0.0.1"
@@ -209,6 +241,14 @@ packages:
209241
url: "https://pub.dev"
210242
source: hosted
211243
version: "1.9.0"
244+
path_parsing:
245+
dependency: transitive
246+
description:
247+
name: path_parsing
248+
sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca"
249+
url: "https://pub.dev"
250+
source: hosted
251+
version: "1.1.0"
212252
permission_handler_platform_interface:
213253
dependency: transitive
214254
description:
@@ -217,6 +257,14 @@ packages:
217257
url: "https://pub.dev"
218258
source: hosted
219259
version: "3.12.0"
260+
petitparser:
261+
dependency: transitive
262+
description:
263+
name: petitparser
264+
sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27
265+
url: "https://pub.dev"
266+
source: hosted
267+
version: "6.0.2"
220268
photo_manager:
221269
dependency: transitive
222270
description:
@@ -294,6 +342,38 @@ packages:
294342
url: "https://pub.dev"
295343
source: hosted
296344
version: "0.7.3"
345+
typed_data:
346+
dependency: transitive
347+
description:
348+
name: typed_data
349+
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
350+
url: "https://pub.dev"
351+
source: hosted
352+
version: "1.4.0"
353+
vector_graphics:
354+
dependency: transitive
355+
description:
356+
name: vector_graphics
357+
sha256: a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6
358+
url: "https://pub.dev"
359+
source: hosted
360+
version: "1.1.19"
361+
vector_graphics_codec:
362+
dependency: transitive
363+
description:
364+
name: vector_graphics_codec
365+
sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146"
366+
url: "https://pub.dev"
367+
source: hosted
368+
version: "1.1.13"
369+
vector_graphics_compiler:
370+
dependency: transitive
371+
description:
372+
name: vector_graphics_compiler
373+
sha256: "557a315b7d2a6dbb0aaaff84d857967ce6bdc96a63dc6ee2a57ce5a6ee5d3331"
374+
url: "https://pub.dev"
375+
source: hosted
376+
version: "1.1.17"
297377
vector_math:
298378
dependency: transitive
299379
description:
@@ -310,6 +390,22 @@ packages:
310390
url: "https://pub.dev"
311391
source: hosted
312392
version: "14.3.0"
393+
web:
394+
dependency: transitive
395+
description:
396+
name: web
397+
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
398+
url: "https://pub.dev"
399+
source: hosted
400+
version: "1.1.1"
401+
xml:
402+
dependency: transitive
403+
description:
404+
name: xml
405+
sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226
406+
url: "https://pub.dev"
407+
source: hosted
408+
version: "6.5.0"
313409
sdks:
314-
dart: ">=3.5.4 <4.0.0"
315-
flutter: ">=3.18.0-18.0.pre.54"
410+
dart: ">=3.6.0 <4.0.0"
411+
flutter: ">=3.27.0"

docs/adr/0061-cozy-integration-set-up.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ cozy-stack instances add tmail.localhost:8080 --passphrase cozy --apps home,stor
6868
- Apply patchs/cozy-dev-config.patch
6969
- Edit session url in jmap-dart-client to /jmap/session
7070
- isInsideCozy will be `false` if run on localhost, so in cozy_config_web.dart, return true on isInsideCozy
71-
- in `env.file`, COZY_INTEGRATION=true
71+
- in `env.file`, COZY_INTEGRATION=true and COZY_EXTERNAL_BRIDGE_VERSION=x.x.x (where x.x.x is the version of cozy-external-bridge)
7272
- `flutter run -d chrome --web-port 2023 --web-browser-flag "--disable-web-security" --profile`
7373

7474
3. Access Cozy

env.file

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ IOS_FCM=supported
88
FORWARD_WARNING_MESSAGE=
99
PLATFORM=other
1010
WS_ECHO_PING=
11-
COZY_INTEGRATION=
11+
COZY_INTEGRATION=
12+
COZY_EXTERNAL_BRIDGE_VERSION=

lib/main/utils/app_config.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,6 @@ class AppConfig {
7575
static bool get isWebSocketEchoPingEnabled => dotenv.get('WS_ECHO_PING', fallback: 'false') == 'true';
7676

7777
static bool get isCozyIntegrationEnabled => dotenv.get('COZY_INTEGRATION', fallback: 'false') == 'true';
78+
79+
static String get cozyExternalBridgeVersion => dotenv.get('COZY_EXTERNAL_BRIDGE_VERSION', fallback: '0.16.1');
7880
}

lib/main/utils/cozy_integration.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class CozyIntegration {
1111

1212
try {
1313
final cozyConfig = CozyConfigManager();
14-
await cozyConfig.injectCozyScript();
14+
await cozyConfig.injectCozyScript(AppConfig.cozyExternalBridgeVersion);
1515
await cozyConfig.initialize();
1616
} catch (e) {
1717
logError('CozyIntegration::integrateCozy:Exception = $e');

0 commit comments

Comments
 (0)