From 8f46cf144cbf0ee84d20747e8fa4b70aaa97c510 Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Fri, 13 Jun 2025 11:59:40 +0200 Subject: [PATCH] enable web, mobile & desktop spell check --- .../mih_package_components/mih_search_bar.dart | 1 + .../mih_package_components/mih_text_form_field.dart | 1 + Frontend/lib/mih_config/mih_env.dart | 12 ++++++------ Frontend/web/index.html | 10 +++++++++- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Frontend/lib/mih_components/mih_package_components/mih_search_bar.dart b/Frontend/lib/mih_components/mih_package_components/mih_search_bar.dart index efd34dda..0bc691f5 100644 --- a/Frontend/lib/mih_components/mih_package_components/mih_search_bar.dart +++ b/Frontend/lib/mih_components/mih_package_components/mih_search_bar.dart @@ -125,6 +125,7 @@ class _MihSearchBarState extends State { child: TextField( controller: widget.controller, // Assign the controller focusNode: widget.searchFocusNode, + autocorrect: true, spellCheckConfiguration: kIsWeb ? null : SpellCheckConfiguration(), onSubmitted: (value) { widget.onPrefixIconTap diff --git a/Frontend/lib/mih_components/mih_package_components/mih_text_form_field.dart b/Frontend/lib/mih_components/mih_package_components/mih_text_form_field.dart index 3db79a0c..d276d33e 100644 --- a/Frontend/lib/mih_components/mih_package_components/mih_text_form_field.dart +++ b/Frontend/lib/mih_components/mih_package_components/mih_text_form_field.dart @@ -153,6 +153,7 @@ class _MihTextFormFieldState extends State { controller: widget.controller, cursorColor: widget.inputColor, autofillHints: widget.autofillHints, + autocorrect: true, spellCheckConfiguration: (kIsWeb || widget.passwordMode == true || widget.numberMode == true) diff --git a/Frontend/lib/mih_config/mih_env.dart b/Frontend/lib/mih_config/mih_env.dart index 842552b8..903bcfe5 100644 --- a/Frontend/lib/mih_config/mih_env.dart +++ b/Frontend/lib/mih_config/mih_env.dart @@ -15,13 +15,13 @@ abstract class AppEnviroment { case Enviroment.dev: { //================= Android Dev Urls ================= - baseApiUrl = "http://10.0.2.2:8080"; - baseFileUrl = "http://10.0.2.2:9000"; - baseAiUrl = "http://10.0.2.2:11434"; + // baseApiUrl = "http://10.0.2.2:8080"; + // baseFileUrl = "http://10.0.2.2:9000"; + // baseAiUrl = "http://10.0.2.2:11434"; //================= Web Dev Urls ================= - // baseApiUrl = "http://localhost:8080"; - // baseFileUrl = "http://localhost:9000"; - // baseAiUrl = "http://localhost:11434"; + baseApiUrl = "http://localhost:8080"; + baseFileUrl = "http://localhost:9000"; + baseAiUrl = "http://localhost:11434"; break; } case Enviroment.prod: diff --git a/Frontend/web/index.html b/Frontend/web/index.html index 699985ae..cada8ab5 100644 --- a/Frontend/web/index.html +++ b/Frontend/web/index.html @@ -183,7 +183,15 @@ }); }); --> - +