fix deep link to privacy policy and update docker file with lastest container for ollama, portainer and api-hub
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:go_router/go_router.dart';
|
|||||||
import 'package:mzansi_innovation_hub/mih_packages/mih_file_viewer/components/mih_print_prevew.dart';
|
import 'package:mzansi_innovation_hub/mih_packages/mih_file_viewer/components/mih_print_prevew.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_objects/arguments.dart';
|
import 'package:mzansi_innovation_hub/mih_objects/arguments.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_package_components/Example/package_test.dart';
|
import 'package:mzansi_innovation_hub/mih_package_components/Example/package_test.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_providers/about_mih_provider.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_providers/mzansi_directory_provider.dart';
|
import 'package:mzansi_innovation_hub/mih_providers/mzansi_directory_provider.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_packages/about_mih/about_mih.dart';
|
import 'package:mzansi_innovation_hub/mih_packages/about_mih/about_mih.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_packages/access_review/mih_access.dart';
|
import 'package:mzansi_innovation_hub/mih_packages/access_review/mih_access.dart';
|
||||||
@@ -79,6 +80,8 @@ class MihGoRouter {
|
|||||||
"/${MihGoRouterPaths.aboutMih}",
|
"/${MihGoRouterPaths.aboutMih}",
|
||||||
"/${MihGoRouterPaths.businessProfileView}/:business_id",
|
"/${MihGoRouterPaths.businessProfileView}/:business_id",
|
||||||
"/${MihGoRouterPaths.mzansiProfileView}/:username",
|
"/${MihGoRouterPaths.mzansiProfileView}/:username",
|
||||||
|
MihGoRouterPaths.privacyPolicyExternal,
|
||||||
|
MihGoRouterPaths.termsOfServiceExternal,
|
||||||
];
|
];
|
||||||
KenLogger.success(
|
KenLogger.success(
|
||||||
"Redirect Check: ${state.fullPath}, isUserSignedIn: $isUserSignedIn");
|
"Redirect Check: ${state.fullPath}, isUserSignedIn: $isUserSignedIn");
|
||||||
@@ -88,6 +91,8 @@ class MihGoRouter {
|
|||||||
if (isUserSignedIn &&
|
if (isUserSignedIn &&
|
||||||
unauthenticatedPaths.contains(state.fullPath) &&
|
unauthenticatedPaths.contains(state.fullPath) &&
|
||||||
state.fullPath != "/${MihGoRouterPaths.aboutMih}" &&
|
state.fullPath != "/${MihGoRouterPaths.aboutMih}" &&
|
||||||
|
state.fullPath != MihGoRouterPaths.privacyPolicyExternal &&
|
||||||
|
state.fullPath != MihGoRouterPaths.termsOfServiceExternal &&
|
||||||
state.fullPath !=
|
state.fullPath !=
|
||||||
"/${MihGoRouterPaths.mzansiProfileView}/:username" &&
|
"/${MihGoRouterPaths.mzansiProfileView}/:username" &&
|
||||||
state.fullPath !=
|
state.fullPath !=
|
||||||
@@ -132,6 +137,32 @@ class MihGoRouter {
|
|||||||
return MihAuthPasswordReset(token: token);
|
return MihAuthPasswordReset(token: token);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
GoRoute(
|
||||||
|
name: "mihPrivacyPolicy",
|
||||||
|
path: MihGoRouterPaths.privacyPolicyExternal,
|
||||||
|
builder: (BuildContext context, GoRouterState state) {
|
||||||
|
KenLogger.success("MihGoRouter: provacyPolicy");
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
if (context.mounted) {
|
||||||
|
context.read<AboutMihProvider>().setToolIndex(1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return AboutMih();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
GoRoute(
|
||||||
|
name: "mihTermsOfService",
|
||||||
|
path: MihGoRouterPaths.termsOfServiceExternal,
|
||||||
|
builder: (BuildContext context, GoRouterState state) {
|
||||||
|
KenLogger.success("MihGoRouter: termsOfService");
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
if (context.mounted) {
|
||||||
|
context.read<AboutMihProvider>().setToolIndex(2);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return AboutMih();
|
||||||
|
},
|
||||||
|
),
|
||||||
// ========================== MIH Home ==================================
|
// ========================== MIH Home ==================================
|
||||||
GoRoute(
|
GoRoute(
|
||||||
name: "mihHome",
|
name: "mihHome",
|
||||||
|
|||||||
@@ -114,10 +114,6 @@ class MihTheme {
|
|||||||
mode;
|
mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
String getLatestVersion() {
|
|
||||||
return latestVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
ThemeData getThemeData() {
|
ThemeData getThemeData() {
|
||||||
return getData(mode == "Dark");
|
return getData(mode == "Dark");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ class _AboutMihState extends State<AboutMih> {
|
|||||||
context.goNamed(
|
context.goNamed(
|
||||||
'mihHome',
|
'mihHome',
|
||||||
);
|
);
|
||||||
|
context.read<AboutMihProvider>().setToolIndex(0);
|
||||||
FocusScope.of(context).unfocus();
|
FocusScope.of(context).unfocus();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -4,12 +4,14 @@ import 'package:mih_package_toolkit/mih_package_toolkit.dart';
|
|||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_objects/profile_link.dart';
|
import 'package:mzansi_innovation_hub/mih_objects/profile_link.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_profile_links.dart';
|
import 'package:mzansi_innovation_hub/mih_package_components/mih_profile_links.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_providers/about_mih_provider.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_business_details_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_business_details_services.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_install_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_install_services.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_services/mih_user_services.dart';
|
import 'package:mzansi_innovation_hub/mih_services/mih_user_services.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
import 'package:redacted/redacted.dart';
|
import 'package:redacted/redacted.dart';
|
||||||
import 'package:share_plus/share_plus.dart';
|
import 'package:share_plus/share_plus.dart';
|
||||||
@@ -341,7 +343,7 @@ class _MihInfoState extends State<MihInfo> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget aboutHeadings() {
|
Widget aboutHeadings(AboutMihProvider aboutProvider) {
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@@ -365,7 +367,7 @@ class _MihInfoState extends State<MihInfo> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"MIH App Version: ${MzansiInnovationHub.of(context)!.theme.getLatestVersion()}",
|
"MIH App Version: ${aboutProvider.version}",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontWeight: FontWeight.normal,
|
fontWeight: FontWeight.normal,
|
||||||
@@ -852,21 +854,27 @@ class _MihInfoState extends State<MihInfo> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return Consumer(builder: (
|
||||||
backgroundColor: MihColors.primary(),
|
BuildContext context,
|
||||||
borderOn: false,
|
AboutMihProvider aboutProvider,
|
||||||
bodyItem: getBody(),
|
Widget? child,
|
||||||
);
|
) {
|
||||||
|
return MihPackageToolBody(
|
||||||
|
backgroundColor: MihColors.primary(),
|
||||||
|
borderOn: false,
|
||||||
|
bodyItem: getBody(aboutProvider),
|
||||||
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget getBody() {
|
Widget getBody(AboutMihProvider aboutProvider) {
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
MihSingleChildScroll(
|
MihSingleChildScroll(
|
||||||
scrollbarOn: true,
|
scrollbarOn: true,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
aboutHeadings(),
|
aboutHeadings(aboutProvider),
|
||||||
communityCounter(),
|
communityCounter(),
|
||||||
callToActionsButtons(),
|
callToActionsButtons(),
|
||||||
// mihDivider(),
|
// mihDivider(),
|
||||||
|
|||||||
@@ -237,15 +237,8 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
WidgetsBinding.instance
|
|
||||||
.addPostFrameCallback((_) async {
|
|
||||||
context
|
|
||||||
.read<AboutMihProvider>()
|
|
||||||
.setToolIndex(1);
|
|
||||||
});
|
|
||||||
context.goNamed(
|
context.goNamed(
|
||||||
"aboutMih",
|
"mihPrivacyPolicy",
|
||||||
extra: true,
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@@ -268,15 +261,8 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
WidgetsBinding.instance
|
|
||||||
.addPostFrameCallback((_) async {
|
|
||||||
context
|
|
||||||
.read<AboutMihProvider>()
|
|
||||||
.setToolIndex(2);
|
|
||||||
});
|
|
||||||
context.goNamed(
|
context.goNamed(
|
||||||
"aboutMih",
|
"mihTermsOfService",
|
||||||
extra: true,
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import 'package:flutter/foundation.dart';
|
|||||||
|
|
||||||
class AboutMihProvider extends ChangeNotifier {
|
class AboutMihProvider extends ChangeNotifier {
|
||||||
int toolIndex;
|
int toolIndex;
|
||||||
|
String version = "1.2.7";
|
||||||
|
|
||||||
AboutMihProvider({
|
AboutMihProvider({
|
||||||
this.toolIndex = 0,
|
this.toolIndex = 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user