Compare commits
8 Commits
tester-bra
...
V.1.2.5
| Author | SHA1 | Date | |
|---|---|---|---|
| eb93714022 | |||
| 071612a521 | |||
| 726a60ad25 | |||
| b897986c1f | |||
| 7d4d7fc713 | |||
| 91075255f4 | |||
| 5c2f19dcc4 | |||
| 58aebbeabe |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -10,4 +10,5 @@ Mzansi_Mail/
|
||||
.venv
|
||||
google-chrome-stable_current_amd64.deb
|
||||
.env
|
||||
Frontend/android/app/.cxx/
|
||||
Frontend/android/app/.cxx/
|
||||
.DS_Store
|
||||
@@ -4,37 +4,6 @@ networks:
|
||||
driver: bridge
|
||||
#============== MIH Containers ====================================================================
|
||||
services:
|
||||
#============== Nginx Proxy Server Old ====================================================================
|
||||
# nginx:
|
||||
# container_name: nginx
|
||||
# restart: unless-stopped
|
||||
# image: nginx
|
||||
# ports:
|
||||
# - 80:80
|
||||
# - 443:443
|
||||
# volumes:
|
||||
# - ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
||||
# - certbotConf:/etc/letsencrypt
|
||||
# - certbotChall:/var/www/certbot
|
||||
# depends_on:
|
||||
# - mih-ux
|
||||
# networks:
|
||||
# - mih-network
|
||||
# profiles: [ 'prod' ]
|
||||
#============== Cert Bot Old ====================================================================
|
||||
# certbot:
|
||||
# image: certbot/certbot
|
||||
# container_name: certbot
|
||||
# volumes:
|
||||
# - certbotConf:/etc/letsencrypt
|
||||
# - certbotChall:/var/www/certbot
|
||||
# #command: certonly --test-cert --webroot -w /var/www/certbot --force-renewal --email yasienmeth@gmail.com -d mzansi-innovation-hub.co.za -d www.mzansi-innovation-hub.co.za --agree-tos
|
||||
# command: certonly --webroot -w /var/www/certbot --force-renewal --email ${CERTBOT_EMAIL} -d ${CERTBOT_APP_DOMAIN} -d ${CERTBOT_API_DOMAIN} -d ${CERTBOT_STORAGE_DOMAIN} -d ${CERTBOT_MONITOR_DOMAIN} -d ${CERTBOT_AI_DOMAIN} --agree-tos
|
||||
# networks:
|
||||
# - mih-network
|
||||
# depends_on:
|
||||
# - nginx
|
||||
# profiles: [ 'withCert' ]
|
||||
#============== Nginx Proxy Manager ====================================================================
|
||||
mih-nginx:
|
||||
container_name: mih-nginx
|
||||
@@ -43,7 +12,7 @@ services:
|
||||
ports:
|
||||
- '80:80' # Public HTTP
|
||||
- '443:443' # Public HTTPS
|
||||
- '81:81' # Admin Web Port
|
||||
- '127.0.0.1:81:81' # Admin Web Port
|
||||
volumes:
|
||||
- ./mih_nginx/data:/data
|
||||
- ./mih_nginx/letsencrypt:/etc/letsencrypt
|
||||
@@ -69,8 +38,8 @@ services:
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "222:22"
|
||||
- "127.0.0.1:3000:3000"
|
||||
- "127.0.0.1:222:22"
|
||||
depends_on:
|
||||
mih-gitea-db:
|
||||
condition: service_healthy
|
||||
@@ -99,7 +68,7 @@ services:
|
||||
depends_on:
|
||||
- mih-db
|
||||
ports:
|
||||
- 3567:3567
|
||||
- '127.0.0.1:3567:3567'
|
||||
environment:
|
||||
REFRESH_TOKEN_VALIDITY: '604800'
|
||||
ACCESS_TOKEN_VALIDITY: '86400'
|
||||
@@ -125,7 +94,7 @@ services:
|
||||
image: wordpress
|
||||
restart: always
|
||||
ports:
|
||||
- 8081:80
|
||||
- '127.0.0.1:8081:80'
|
||||
environment:
|
||||
WORDPRESS_DB_HOST: mih-wp-db
|
||||
WORDPRESS_DB_USER: ${WP_SQL_USER}
|
||||
@@ -154,7 +123,7 @@ services:
|
||||
build:
|
||||
context: ./mih_ui
|
||||
ports:
|
||||
- "83:83"
|
||||
- "127.0.0.1:83:83"
|
||||
networks:
|
||||
- mih-network
|
||||
depends_on:
|
||||
@@ -166,7 +135,7 @@ services:
|
||||
target: builder
|
||||
container_name: mih-api-hub
|
||||
ports:
|
||||
- 8080:80
|
||||
- "127.0.0.1:8080:80"
|
||||
volumes:
|
||||
- ./mih_api_hub:/app
|
||||
networks:
|
||||
@@ -187,7 +156,7 @@ services:
|
||||
networks:
|
||||
- mih-network
|
||||
ports:
|
||||
- '3306:3306'
|
||||
- '127.0.0.1:3306:3306'
|
||||
volumes:
|
||||
- ./mih_db:/var/lib/mysql
|
||||
#============== PHP My Admin ====================================================================
|
||||
@@ -213,8 +182,8 @@ services:
|
||||
hostname: mih-minio
|
||||
image: minio/minio
|
||||
ports:
|
||||
- '9000:9000'
|
||||
- '9001:9001'
|
||||
- '127.0.0.1:9000:9000'
|
||||
- '127.0.0.1:9001:9001'
|
||||
volumes:
|
||||
- './mih_minio:/data'
|
||||
environment:
|
||||
@@ -228,7 +197,7 @@ services:
|
||||
container_name: mih-monitor
|
||||
image: portainer/portainer-ce:2.20.3
|
||||
ports:
|
||||
- 9444:9443
|
||||
- '127.0.0.1:9444:9443'
|
||||
volumes:
|
||||
- ./mih_monitor/data:/data
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
@@ -240,7 +209,7 @@ services:
|
||||
container_name: mih-ai
|
||||
image: ollama/ollama:latest
|
||||
ports:
|
||||
- 11434:11434
|
||||
- '127.0.0.1:11434:11434'
|
||||
volumes:
|
||||
- ./mih_ai/ollama/ollama:/root/.ollama
|
||||
pull_policy: always
|
||||
|
||||
3
mih_api_hub/.gitignore
vendored
3
mih_api_hub/.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
.env
|
||||
__pycache__/
|
||||
temp*.pdf
|
||||
temp*.pdf
|
||||
.DS_Store
|
||||
@@ -1,28 +0,0 @@
|
||||
# from supertokens_python import init, InputAppInfo, SupertokensConfig
|
||||
# from supertokens_python.recipe import emailpassword, session, dashboard
|
||||
|
||||
# init(
|
||||
# app_info=InputAppInfo(
|
||||
# app_name="MIH_API_HUB",
|
||||
# api_domain="http://localhost:8080/",
|
||||
# website_domain="http://mzansi-innovation-hub.co.za",
|
||||
# api_base_path="/auth",
|
||||
# website_base_path="/auth"
|
||||
# ),
|
||||
# supertokens_config=SupertokensConfig(
|
||||
# # https://try.supertokens.com is for demo purposes. Replace this with the address of your core instance (sign up on supertokens.com), or self host a core.
|
||||
# connection_uri="supertokens:3567/",
|
||||
# api_key="leatucczyixqwkqqdrhayiwzeofkltds"
|
||||
# ),
|
||||
# framework='fastapi',
|
||||
# recipe_list=[
|
||||
# # SuperTokens.init(),
|
||||
# session.init(), # initializes session features
|
||||
# emailpassword.init(),
|
||||
# dashboard.init(admins=[
|
||||
# "yasienmeth@gmail.com",
|
||||
# ],
|
||||
# )
|
||||
# ],
|
||||
# mode='wsgi' # use wsgi instead of asgi if you are running using gunicorn
|
||||
# )
|
||||
@@ -34,6 +34,11 @@ from supertokens_python.recipe.session.framework.fastapi import verify_session
|
||||
from supertokens_python.recipe.emailverification import EmailVerificationClaim
|
||||
from supertokens_python.recipe.session import SessionContainer
|
||||
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
st_api_key = os.getenv("SUPERTOKENS_API_KEY")
|
||||
origins = [
|
||||
"http://localhost",
|
||||
"http://localhost:80",
|
||||
@@ -41,7 +46,7 @@ origins = [
|
||||
"http://MIH-API-Hub:80",
|
||||
"http://MIH-API-Hub",
|
||||
"http://api.mzansi-innovation-hub.co.za",
|
||||
"*",
|
||||
"http://app.mzansi-innovation-hub.co.za",
|
||||
]
|
||||
|
||||
init(
|
||||
@@ -55,7 +60,7 @@ init(
|
||||
supertokens_config=SupertokensConfig(
|
||||
# https://try.supertokens.com is for demo purposes. Replace this with the address of your core instance (sign up on supertokens.com), or self host a core.
|
||||
connection_uri="http://mih-supertokens:3567/",
|
||||
api_key="leatucczyixqwkqqdrhayiwzeofkltds"
|
||||
api_key=st_api_key
|
||||
),
|
||||
framework='fastapi',
|
||||
recipe_list=[
|
||||
|
||||
2
mih_ui/.gitignore
vendored
2
mih_ui/.gitignore
vendored
@@ -1,3 +1,5 @@
|
||||
.env
|
||||
|
||||
# Miscellaneous
|
||||
*.class
|
||||
*.log
|
||||
|
||||
@@ -1,48 +1,36 @@
|
||||
# Install Operating system and dependencies
|
||||
#FROM ubuntu:22.04
|
||||
# --- STAGE 1: The Builder ---
|
||||
FROM debian:latest AS build-env
|
||||
|
||||
#ENV DEBIAN_FRONTEND=noninteractive
|
||||
# Install necessary dependencies for Flutter
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl git wget unzip libglu1-mesa fonts-droid-fallback python3 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN apt-get update --fix-missing
|
||||
|
||||
RUN apt-get install -y curl git wget unzip gdb libstdc++6 libglu1-mesa fonts-droid-fallback
|
||||
# RUN apt-get install -y curl git wget unzip libgconf-2-4 gdb libstdc++6 libglu1-mesa fonts-droid-fallback
|
||||
RUN apt-get install python3 -y
|
||||
|
||||
# download Flutter SDK from Flutter Github repo
|
||||
# Clone Flutter SDK
|
||||
RUN git clone -b flutter-3.32-candidate.0 https://github.com/flutter/flutter.git /usr/local/flutter
|
||||
# RUN git clone -b stable https://github.com/flutter/flutter.git /usr/local/flutter
|
||||
|
||||
# Set flutter environment path
|
||||
ENV PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PATH}"
|
||||
#ENV PATH "$PATH:/home/developer/flutter/bin"
|
||||
|
||||
RUN flutter doctor -v
|
||||
|
||||
# Enable flutter web
|
||||
RUN flutter channel flutter-3.32-candidate.0
|
||||
# RUN flutter channel stable
|
||||
RUN flutter config --enable-web
|
||||
|
||||
# Copy files to container and build
|
||||
RUN mkdir /app/
|
||||
COPY . /app/
|
||||
|
||||
# Build the Flutter web app
|
||||
WORKDIR /app
|
||||
# RUN flutter upgrade
|
||||
COPY . .
|
||||
RUN flutter config --enable-web
|
||||
RUN flutter build web --release -t ./lib/main_prod.dart
|
||||
# RUN flutter build web --release --web-renderer canvaskit -t ./lib/main_prod.dart
|
||||
|
||||
# --- STAGE 2: The Final Production Image ---
|
||||
FROM nginx:alpine
|
||||
|
||||
# RUN cd ..
|
||||
# Copy built files from the first stage
|
||||
COPY --from=build-env /app/build/web /usr/share/nginx/html
|
||||
|
||||
# WORKDIR /app/build/web/
|
||||
# Create the Nginx config inside the Dockerfile to handle SPA routing
|
||||
RUN echo 'server { \
|
||||
listen 83; \
|
||||
location / { \
|
||||
root /usr/share/nginx/html; \
|
||||
index index.html; \
|
||||
try_files $uri $uri/ /index.html; \
|
||||
} \
|
||||
}' > /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 83
|
||||
|
||||
RUN ["chmod", "+x", "/app/server/server.sh"]
|
||||
|
||||
ENTRYPOINT [ "/app/server/server.sh"]
|
||||
|
||||
# RUN ["python3", "-u", "/app/server/MIH_web_server.py"]
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
File diff suppressed because one or more lines are too long
@@ -2,6 +2,7 @@ import 'dart:io';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'package:flutter_native_splash/flutter_native_splash.dart';
|
||||
import 'package:flutter_web_plugins/url_strategy.dart'
|
||||
if (dart.library.html) 'package:flutter_web_plugins/url_strategy.dart';
|
||||
@@ -42,6 +43,7 @@ void main() async {
|
||||
debugPrint('APP INSTALLED!');
|
||||
});
|
||||
final GoRouter appRouter = MihGoRouter().mihRouter;
|
||||
await dotenv.load(fileName: ".env");
|
||||
FlutterNativeSplash.remove();
|
||||
runApp(MzansiInnovationHub(
|
||||
router: appRouter,
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'dart:io';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'package:flutter_native_splash/flutter_native_splash.dart';
|
||||
import 'package:flutter_web_plugins/url_strategy.dart'
|
||||
if (dart.library.html) 'package:flutter_web_plugins/url_strategy.dart';
|
||||
@@ -33,6 +34,7 @@ void main() async {
|
||||
debugPrint('APP INSTALLED!');
|
||||
});
|
||||
final GoRouter appRouter = MihGoRouter().mihRouter;
|
||||
await dotenv.load(fileName: ".env");
|
||||
FlutterNativeSplash.remove();
|
||||
runApp(MzansiInnovationHub(
|
||||
router: appRouter,
|
||||
|
||||
@@ -2,9 +2,11 @@ import 'package:flutter/material.dart';
|
||||
|
||||
class MihSingleChildScroll extends StatefulWidget {
|
||||
final Widget child;
|
||||
final bool? scrollbarOn;
|
||||
const MihSingleChildScroll({
|
||||
super.key,
|
||||
required this.child,
|
||||
this.scrollbarOn,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -18,7 +20,8 @@ class _MihSingleChildScrollState extends State<MihSingleChildScroll> {
|
||||
bottom: false,
|
||||
minimum: EdgeInsets.only(bottom: 5),
|
||||
child: ScrollConfiguration(
|
||||
behavior: ScrollConfiguration.of(context).copyWith(scrollbars: false),
|
||||
behavior: ScrollConfiguration.of(context)
|
||||
.copyWith(scrollbars: widget.scrollbarOn ?? false),
|
||||
child: SingleChildScrollView(
|
||||
child: widget.child,
|
||||
),
|
||||
|
||||
@@ -94,7 +94,6 @@ class _MihAttributesState extends State<MihAttributes> {
|
||||
Widget build(BuildContext context) {
|
||||
return MihPackageToolBody(
|
||||
borderOn: false,
|
||||
innerHorizontalPadding: 10,
|
||||
bodyItem: getBody(),
|
||||
);
|
||||
}
|
||||
@@ -108,179 +107,184 @@ class _MihAttributesState extends State<MihAttributes> {
|
||||
"As per the terms for free use for these third party providers, the following assets require attribution";
|
||||
|
||||
return MihSingleChildScroll(
|
||||
child: Column(
|
||||
children: [
|
||||
Icon(
|
||||
MihIcons.mihLogo,
|
||||
color: MihColors.getSecondaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
size: 165,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
SelectableText(
|
||||
message,
|
||||
style: const TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.bold,
|
||||
scrollbarOn: true,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Icon(
|
||||
MihIcons.mihLogo,
|
||||
color: MihColors.getSecondaryColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
size: 165,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
SizedBox(
|
||||
width: 700,
|
||||
child: Table(
|
||||
defaultVerticalAlignment: TableCellVerticalAlignment.middle,
|
||||
columnWidths: const {
|
||||
0: FlexColumnWidth(1),
|
||||
1: FlexColumnWidth(1),
|
||||
2: FlexColumnWidth(1),
|
||||
},
|
||||
children: [
|
||||
const TableRow(
|
||||
children: [
|
||||
TableCell(
|
||||
verticalAlignment: TableCellVerticalAlignment.middle,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 15.0),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"Resources",
|
||||
style: TextStyle(
|
||||
fontSize: 25,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
TableCell(
|
||||
verticalAlignment: TableCellVerticalAlignment.middle,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 15.0),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"Creator",
|
||||
style: TextStyle(
|
||||
fontSize: 25,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
TableCell(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 15.0),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"Link",
|
||||
style: TextStyle(
|
||||
fontSize: 25,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
displayIcon(MihIcons.mihRing, "Tarah Meth",
|
||||
"https://www.linkedin.com/in/tarah-meth-3b6309254/"),
|
||||
displayIcon(MihIcons.mihLogo, "Tarah Meth",
|
||||
"https://www.linkedin.com/in/tarah-meth-3b6309254/"),
|
||||
displayIcon(MihIcons.mzansiAi, "Ollama", "https://ollama.com/"),
|
||||
displayIcon(MihIcons.mzansiWallet, "Freepik",
|
||||
"https://www.flaticon.com/free-icon/wallet-passes-app_3884407?term=wallet&page=1&position=21&origin=search&related_id=3884407"),
|
||||
displayIcon(MihIcons.patientProfile, "RaftelDesign",
|
||||
"https://www.flaticon.com/free-icon/patient_2376100?term=medication&page=1&position=6&origin=search&related_id=2376100"),
|
||||
displayIcon(MihIcons.patientProfile, "Srip",
|
||||
"https://www.flaticon.com/free-icon/hospital_1233930?term=medical+snake&page=1&position=7&origin=search&related_id=1233930"),
|
||||
displayIcon(MihIcons.calendar, "Freepik",
|
||||
"https://www.flaticon.com/free-icon/calendar_2278049?term=calendar&page=1&position=5&origin=search&related_id=2278049"),
|
||||
displayIcon(MihIcons.calculator, "Freepik",
|
||||
"https://www.flaticon.com/free-icon/calculator_2374409?term=calculator&page=1&position=20&origin=search&related_id=2374409"),
|
||||
displayIcon(MihIcons.aboutMih, "Chanut",
|
||||
"https://www.flaticon.com/free-icon/info_151776?term=about&page=1&position=8&origin=search&related_id=151776"),
|
||||
displayIcon(MihIcons.personalProfile, "Freepik",
|
||||
"https://www.flaticon.com/free-icon/user_1077063?term=profile&page=1&position=6&origin=search&related_id=1077063"),
|
||||
displayIcon(MihIcons.businessProfile, "Gravisio",
|
||||
"https://www.flaticon.com/free-icon/contractor_11813336?term=company+profile&page=1&position=2&origin=search&related_id=11813336"),
|
||||
displayIcon(MihIcons.patientManager, "Vector Tank",
|
||||
"https://www.flaticon.com/free-icon/doctor_10215061?term=doctor&page=1&position=73&origin=search&related_id=10215061"),
|
||||
displayIcon(MihIcons.profileSetup, "Freepik",
|
||||
"https://www.flaticon.com/free-icon/add-user_748137?term=profile+add&page=1&position=1&origin=search&related_id=748137"),
|
||||
displayIcon(MihIcons.businessSetup, "kerismaker",
|
||||
"https://www.flaticon.com/free-icon/business_13569850?term=company+add&page=1&position=25&origin=search&related_id=13569850"),
|
||||
displayIcon(MihIcons.calculator, "fawazahmed0",
|
||||
"https://github.com/fawazahmed0/exchange-api"),
|
||||
displayIcon(MihIcons.iDontKnow, "Freepik",
|
||||
"https://www.flaticon.com/free-icon/i-dont-know_5359909?term=i+dont+know&page=1&position=7&origin=search&related_id=5359909"),
|
||||
],
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
),
|
||||
// SizedBox(
|
||||
// width: 500,
|
||||
// child: Column(
|
||||
// children: [
|
||||
// const SizedBox(
|
||||
// width: double.infinity,
|
||||
// child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// Flexible(
|
||||
// child: Text(
|
||||
// "Icon",
|
||||
// style: TextStyle(
|
||||
// fontSize: 25,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Flexible(
|
||||
// child: Text(
|
||||
// "Creator",
|
||||
// style: TextStyle(
|
||||
// fontSize: 25,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Flexible(
|
||||
// child: Text(
|
||||
// "Link",
|
||||
// style: TextStyle(
|
||||
// fontSize: 25,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// const Padding(
|
||||
// padding: EdgeInsets.symmetric(vertical: 10.0),
|
||||
// child: Divider(),
|
||||
// ),
|
||||
// displayIcon(MihIcons.mihLogo, "Tarah Meth",
|
||||
// "https://app.mzansi-innovation-hub.co.za/"),
|
||||
// const SizedBox(height: 10),
|
||||
// displayIcon(MihIcons.mihLogo, "Test",
|
||||
// "https://www.flaticon.com/free-icons/mih"),
|
||||
// const SizedBox(height: 10),
|
||||
// displayIcon(MihIcons.mihLogo, "Test",
|
||||
// "https://www.flaticon.com/free-icons/mih"),
|
||||
// const SizedBox(height: 10),
|
||||
// displayIcon(MihIcons.mihLogo, "Test",
|
||||
// "https://www.flaticon.com/free-icons/mih"),
|
||||
// const SizedBox(height: 10),
|
||||
// ],
|
||||
// ),
|
||||
// )
|
||||
],
|
||||
SelectableText(
|
||||
message,
|
||||
style: const TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
SizedBox(
|
||||
width: 700,
|
||||
child: Table(
|
||||
defaultVerticalAlignment: TableCellVerticalAlignment.middle,
|
||||
columnWidths: const {
|
||||
0: FlexColumnWidth(1),
|
||||
1: FlexColumnWidth(1),
|
||||
2: FlexColumnWidth(1),
|
||||
},
|
||||
children: [
|
||||
const TableRow(
|
||||
children: [
|
||||
TableCell(
|
||||
verticalAlignment: TableCellVerticalAlignment.middle,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 15.0),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"Resources",
|
||||
style: TextStyle(
|
||||
fontSize: 25,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
TableCell(
|
||||
verticalAlignment: TableCellVerticalAlignment.middle,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 15.0),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"Creator",
|
||||
style: TextStyle(
|
||||
fontSize: 25,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
TableCell(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 15.0),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"Link",
|
||||
style: TextStyle(
|
||||
fontSize: 25,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
displayIcon(MihIcons.mihRing, "Tarah Meth",
|
||||
"https://www.linkedin.com/in/tarah-meth-3b6309254/"),
|
||||
displayIcon(MihIcons.mihLogo, "Tarah Meth",
|
||||
"https://www.linkedin.com/in/tarah-meth-3b6309254/"),
|
||||
displayIcon(
|
||||
MihIcons.mzansiAi, "Ollama", "https://ollama.com/"),
|
||||
displayIcon(MihIcons.mzansiWallet, "Freepik",
|
||||
"https://www.flaticon.com/free-icon/wallet-passes-app_3884407?term=wallet&page=1&position=21&origin=search&related_id=3884407"),
|
||||
displayIcon(MihIcons.patientProfile, "RaftelDesign",
|
||||
"https://www.flaticon.com/free-icon/patient_2376100?term=medication&page=1&position=6&origin=search&related_id=2376100"),
|
||||
displayIcon(MihIcons.patientProfile, "Srip",
|
||||
"https://www.flaticon.com/free-icon/hospital_1233930?term=medical+snake&page=1&position=7&origin=search&related_id=1233930"),
|
||||
displayIcon(MihIcons.calendar, "Freepik",
|
||||
"https://www.flaticon.com/free-icon/calendar_2278049?term=calendar&page=1&position=5&origin=search&related_id=2278049"),
|
||||
displayIcon(MihIcons.calculator, "Freepik",
|
||||
"https://www.flaticon.com/free-icon/calculator_2374409?term=calculator&page=1&position=20&origin=search&related_id=2374409"),
|
||||
displayIcon(MihIcons.aboutMih, "Chanut",
|
||||
"https://www.flaticon.com/free-icon/info_151776?term=about&page=1&position=8&origin=search&related_id=151776"),
|
||||
displayIcon(MihIcons.personalProfile, "Freepik",
|
||||
"https://www.flaticon.com/free-icon/user_1077063?term=profile&page=1&position=6&origin=search&related_id=1077063"),
|
||||
displayIcon(MihIcons.businessProfile, "Gravisio",
|
||||
"https://www.flaticon.com/free-icon/contractor_11813336?term=company+profile&page=1&position=2&origin=search&related_id=11813336"),
|
||||
displayIcon(MihIcons.patientManager, "Vector Tank",
|
||||
"https://www.flaticon.com/free-icon/doctor_10215061?term=doctor&page=1&position=73&origin=search&related_id=10215061"),
|
||||
displayIcon(MihIcons.profileSetup, "Freepik",
|
||||
"https://www.flaticon.com/free-icon/add-user_748137?term=profile+add&page=1&position=1&origin=search&related_id=748137"),
|
||||
displayIcon(MihIcons.businessSetup, "kerismaker",
|
||||
"https://www.flaticon.com/free-icon/business_13569850?term=company+add&page=1&position=25&origin=search&related_id=13569850"),
|
||||
displayIcon(MihIcons.calculator, "fawazahmed0",
|
||||
"https://github.com/fawazahmed0/exchange-api"),
|
||||
displayIcon(MihIcons.iDontKnow, "Freepik",
|
||||
"https://www.flaticon.com/free-icon/i-dont-know_5359909?term=i+dont+know&page=1&position=7&origin=search&related_id=5359909"),
|
||||
],
|
||||
),
|
||||
),
|
||||
// SizedBox(
|
||||
// width: 500,
|
||||
// child: Column(
|
||||
// children: [
|
||||
// const SizedBox(
|
||||
// width: double.infinity,
|
||||
// child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// Flexible(
|
||||
// child: Text(
|
||||
// "Icon",
|
||||
// style: TextStyle(
|
||||
// fontSize: 25,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Flexible(
|
||||
// child: Text(
|
||||
// "Creator",
|
||||
// style: TextStyle(
|
||||
// fontSize: 25,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Flexible(
|
||||
// child: Text(
|
||||
// "Link",
|
||||
// style: TextStyle(
|
||||
// fontSize: 25,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// const Padding(
|
||||
// padding: EdgeInsets.symmetric(vertical: 10.0),
|
||||
// child: Divider(),
|
||||
// ),
|
||||
// displayIcon(MihIcons.mihLogo, "Tarah Meth",
|
||||
// "https://app.mzansi-innovation-hub.co.za/"),
|
||||
// const SizedBox(height: 10),
|
||||
// displayIcon(MihIcons.mihLogo, "Test",
|
||||
// "https://www.flaticon.com/free-icons/mih"),
|
||||
// const SizedBox(height: 10),
|
||||
// displayIcon(MihIcons.mihLogo, "Test",
|
||||
// "https://www.flaticon.com/free-icons/mih"),
|
||||
// const SizedBox(height: 10),
|
||||
// displayIcon(MihIcons.mihLogo, "Test",
|
||||
// "https://www.flaticon.com/free-icons/mih"),
|
||||
// const SizedBox(height: 10),
|
||||
// ],
|
||||
// ),
|
||||
// )
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -777,6 +777,7 @@ class _MihInfoState extends State<MihInfo> {
|
||||
return Stack(
|
||||
children: [
|
||||
MihSingleChildScroll(
|
||||
scrollbarOn: true,
|
||||
child: Column(
|
||||
children: [
|
||||
aboutHeadings(),
|
||||
|
||||
@@ -19,7 +19,6 @@ class _MihPrivacyPolicyState extends State<MihPrivacyPolicy> {
|
||||
Widget build(BuildContext context) {
|
||||
return MihPackageToolBody(
|
||||
borderOn: false,
|
||||
innerHorizontalPadding: 10,
|
||||
bodyItem: getBody(context),
|
||||
);
|
||||
}
|
||||
@@ -55,9 +54,13 @@ class _MihPrivacyPolicyState extends State<MihPrivacyPolicy> {
|
||||
children
|
||||
.addAll(PolicyAndTermsText().getPrivacyPolicyText(context, englishOn));
|
||||
return MihSingleChildScroll(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: children,
|
||||
scrollbarOn: true,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: children,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ class _MIHTermsOfServiceState extends State<MIHTermsOfService> {
|
||||
Widget build(BuildContext context) {
|
||||
return MihPackageToolBody(
|
||||
borderOn: false,
|
||||
innerHorizontalPadding: 10,
|
||||
bodyItem: getBody(context),
|
||||
);
|
||||
}
|
||||
@@ -55,8 +54,12 @@ class _MIHTermsOfServiceState extends State<MIHTermsOfService> {
|
||||
children
|
||||
.addAll(PolicyAndTermsText().getTermsOfServiceText(context, englishOn));
|
||||
return MihSingleChildScroll(
|
||||
child: Column(
|
||||
children: children,
|
||||
scrollbarOn: true,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||
child: Column(
|
||||
children: children,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'package:mzansi_innovation_hub/main.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_button.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_form.dart';
|
||||
@@ -107,7 +108,7 @@ class _MihRegisterState extends State<MihRegister> {
|
||||
headers: {
|
||||
'Content-type': 'application/json',
|
||||
'Accept': 'application/json',
|
||||
"Authorization": "leatucczyixqwkqqdrhayiwzeofkltds"
|
||||
"Authorization": dotenv.env['SUPERTOKENS_API_KEY'] ?? "",
|
||||
},
|
||||
);
|
||||
//print("response 2: ${response2.statusCode}");
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:mzansi_innovation_hub/main.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_button.dart';
|
||||
@@ -32,7 +33,7 @@ class MihAuthenticationServices {
|
||||
headers: {
|
||||
'Content-type': 'application/json',
|
||||
'Accept': 'application/json',
|
||||
"Authorization": "leatucczyixqwkqqdrhayiwzeofkltds"
|
||||
"Authorization": dotenv.env['SUPERTOKENS_API_KEY'] ?? "",
|
||||
},
|
||||
);
|
||||
if (response.statusCode == 200) {
|
||||
|
||||
@@ -40,11 +40,11 @@ static void my_application_activate(GApplication* application) {
|
||||
if (use_header_bar) {
|
||||
GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
|
||||
gtk_widget_show(GTK_WIDGET(header_bar));
|
||||
gtk_header_bar_set_title(header_bar, "patient_manager");
|
||||
gtk_header_bar_set_title(header_bar, "MIH App - Mzansi Innovation Hub");
|
||||
gtk_header_bar_set_show_close_button(header_bar, TRUE);
|
||||
gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
|
||||
} else {
|
||||
gtk_window_set_title(window, "patient_manager");
|
||||
gtk_window_set_title(window, "MIH App - Mzansi Innovation Hub");
|
||||
}
|
||||
|
||||
gtk_window_set_default_size(window, 1280, 720);
|
||||
|
||||
@@ -670,6 +670,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.3.0"
|
||||
flutter_dotenv:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_dotenv
|
||||
sha256: d4130c4a43e0b13fefc593bc3961f2cb46e30cb79e253d4a526b1b5d24ae1ce4
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.0.0"
|
||||
flutter_launcher_icons:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
||||
@@ -12,6 +12,7 @@ dependencies:
|
||||
sdk: flutter
|
||||
flutter_web_plugins:
|
||||
sdk: flutter
|
||||
flutter_dotenv: ^6.0.0
|
||||
|
||||
cupertino_icons: ^1.0.8
|
||||
font_awesome_flutter: ^10.7.0
|
||||
@@ -76,6 +77,7 @@ dev_dependencies:
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
assets:
|
||||
- .env
|
||||
- lib/mih_package_components/assets/images/
|
||||
- lib/mih_package_components/assets/fonts/
|
||||
- lib/mih_package_components/assets/images/loyalty_cards/
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# Inspired by https://gist.github.com/jtangelder/e445e9a7f5e31c220be6
|
||||
# Python3 http.server for Single Page Application
|
||||
|
||||
import urllib.parse
|
||||
import http.server
|
||||
import socketserver
|
||||
import re
|
||||
from pathlib import Path
|
||||
port = 83
|
||||
HOST = ('', port)
|
||||
pattern = re.compile('.png|.jpg|.jpeg|.js|.css|.ico|.gif|.svg|.ico', re.IGNORECASE)
|
||||
|
||||
|
||||
class Handler(http.server.SimpleHTTPRequestHandler):
|
||||
def do_GET(self):
|
||||
url_parts = urllib.parse.urlparse(self.path)
|
||||
request_file_path = Path(url_parts.path.strip("/"))
|
||||
|
||||
ext = request_file_path.suffix
|
||||
if not request_file_path.is_file() and not pattern.match(ext):
|
||||
self.path = 'index.html'
|
||||
|
||||
return http.server.SimpleHTTPRequestHandler.do_GET(self)
|
||||
|
||||
|
||||
httpd = socketserver.TCPServer(HOST, Handler)
|
||||
print(f"Starting Web App Server on pot: {port}")
|
||||
httpd.serve_forever()
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Define the port
|
||||
PORT=83
|
||||
|
||||
# Check if the port is in use and release it if necessary.
|
||||
# echo "Checking if port $PORT is in use..."
|
||||
# if [ "$(lsof -t -i :$PORT)" ]; then
|
||||
# echo "Port $PORT is in use. Stopping the process on that port..."
|
||||
# fuser -k -n tcp $PORT
|
||||
# fi
|
||||
|
||||
# Switch to the web construction directory
|
||||
cd /app/build/web/
|
||||
|
||||
# Start the web server on the specified port
|
||||
#python3 -m http.server 83
|
||||
python3 -u ../../server/MIH_web_server.py
|
||||
Reference in New Issue
Block a user