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
|
.venv
|
||||||
google-chrome-stable_current_amd64.deb
|
google-chrome-stable_current_amd64.deb
|
||||||
.env
|
.env
|
||||||
Frontend/android/app/.cxx/
|
Frontend/android/app/.cxx/
|
||||||
|
.DS_Store
|
||||||
@@ -4,37 +4,6 @@ networks:
|
|||||||
driver: bridge
|
driver: bridge
|
||||||
#============== MIH Containers ====================================================================
|
#============== MIH Containers ====================================================================
|
||||||
services:
|
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 ====================================================================
|
#============== Nginx Proxy Manager ====================================================================
|
||||||
mih-nginx:
|
mih-nginx:
|
||||||
container_name: mih-nginx
|
container_name: mih-nginx
|
||||||
@@ -43,7 +12,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- '80:80' # Public HTTP
|
- '80:80' # Public HTTP
|
||||||
- '443:443' # Public HTTPS
|
- '443:443' # Public HTTPS
|
||||||
- '81:81' # Admin Web Port
|
- '127.0.0.1:81:81' # Admin Web Port
|
||||||
volumes:
|
volumes:
|
||||||
- ./mih_nginx/data:/data
|
- ./mih_nginx/data:/data
|
||||||
- ./mih_nginx/letsencrypt:/etc/letsencrypt
|
- ./mih_nginx/letsencrypt:/etc/letsencrypt
|
||||||
@@ -69,8 +38,8 @@ services:
|
|||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "127.0.0.1:3000:3000"
|
||||||
- "222:22"
|
- "127.0.0.1:222:22"
|
||||||
depends_on:
|
depends_on:
|
||||||
mih-gitea-db:
|
mih-gitea-db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
@@ -99,7 +68,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- mih-db
|
- mih-db
|
||||||
ports:
|
ports:
|
||||||
- 3567:3567
|
- '127.0.0.1:3567:3567'
|
||||||
environment:
|
environment:
|
||||||
REFRESH_TOKEN_VALIDITY: '604800'
|
REFRESH_TOKEN_VALIDITY: '604800'
|
||||||
ACCESS_TOKEN_VALIDITY: '86400'
|
ACCESS_TOKEN_VALIDITY: '86400'
|
||||||
@@ -125,7 +94,7 @@ services:
|
|||||||
image: wordpress
|
image: wordpress
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 8081:80
|
- '127.0.0.1:8081:80'
|
||||||
environment:
|
environment:
|
||||||
WORDPRESS_DB_HOST: mih-wp-db
|
WORDPRESS_DB_HOST: mih-wp-db
|
||||||
WORDPRESS_DB_USER: ${WP_SQL_USER}
|
WORDPRESS_DB_USER: ${WP_SQL_USER}
|
||||||
@@ -154,7 +123,7 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ./mih_ui
|
context: ./mih_ui
|
||||||
ports:
|
ports:
|
||||||
- "83:83"
|
- "127.0.0.1:83:83"
|
||||||
networks:
|
networks:
|
||||||
- mih-network
|
- mih-network
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -166,7 +135,7 @@ services:
|
|||||||
target: builder
|
target: builder
|
||||||
container_name: mih-api-hub
|
container_name: mih-api-hub
|
||||||
ports:
|
ports:
|
||||||
- 8080:80
|
- "127.0.0.1:8080:80"
|
||||||
volumes:
|
volumes:
|
||||||
- ./mih_api_hub:/app
|
- ./mih_api_hub:/app
|
||||||
networks:
|
networks:
|
||||||
@@ -187,7 +156,7 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- mih-network
|
- mih-network
|
||||||
ports:
|
ports:
|
||||||
- '3306:3306'
|
- '127.0.0.1:3306:3306'
|
||||||
volumes:
|
volumes:
|
||||||
- ./mih_db:/var/lib/mysql
|
- ./mih_db:/var/lib/mysql
|
||||||
#============== PHP My Admin ====================================================================
|
#============== PHP My Admin ====================================================================
|
||||||
@@ -213,8 +182,8 @@ services:
|
|||||||
hostname: mih-minio
|
hostname: mih-minio
|
||||||
image: minio/minio
|
image: minio/minio
|
||||||
ports:
|
ports:
|
||||||
- '9000:9000'
|
- '127.0.0.1:9000:9000'
|
||||||
- '9001:9001'
|
- '127.0.0.1:9001:9001'
|
||||||
volumes:
|
volumes:
|
||||||
- './mih_minio:/data'
|
- './mih_minio:/data'
|
||||||
environment:
|
environment:
|
||||||
@@ -228,7 +197,7 @@ services:
|
|||||||
container_name: mih-monitor
|
container_name: mih-monitor
|
||||||
image: portainer/portainer-ce:2.20.3
|
image: portainer/portainer-ce:2.20.3
|
||||||
ports:
|
ports:
|
||||||
- 9444:9443
|
- '127.0.0.1:9444:9443'
|
||||||
volumes:
|
volumes:
|
||||||
- ./mih_monitor/data:/data
|
- ./mih_monitor/data:/data
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
@@ -240,7 +209,7 @@ services:
|
|||||||
container_name: mih-ai
|
container_name: mih-ai
|
||||||
image: ollama/ollama:latest
|
image: ollama/ollama:latest
|
||||||
ports:
|
ports:
|
||||||
- 11434:11434
|
- '127.0.0.1:11434:11434'
|
||||||
volumes:
|
volumes:
|
||||||
- ./mih_ai/ollama/ollama:/root/.ollama
|
- ./mih_ai/ollama/ollama:/root/.ollama
|
||||||
pull_policy: always
|
pull_policy: always
|
||||||
|
|||||||
3
mih_api_hub/.gitignore
vendored
3
mih_api_hub/.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
.env
|
.env
|
||||||
__pycache__/
|
__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.emailverification import EmailVerificationClaim
|
||||||
from supertokens_python.recipe.session import SessionContainer
|
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 = [
|
origins = [
|
||||||
"http://localhost",
|
"http://localhost",
|
||||||
"http://localhost:80",
|
"http://localhost:80",
|
||||||
@@ -41,7 +46,7 @@ origins = [
|
|||||||
"http://MIH-API-Hub:80",
|
"http://MIH-API-Hub:80",
|
||||||
"http://MIH-API-Hub",
|
"http://MIH-API-Hub",
|
||||||
"http://api.mzansi-innovation-hub.co.za",
|
"http://api.mzansi-innovation-hub.co.za",
|
||||||
"*",
|
"http://app.mzansi-innovation-hub.co.za",
|
||||||
]
|
]
|
||||||
|
|
||||||
init(
|
init(
|
||||||
@@ -55,7 +60,7 @@ init(
|
|||||||
supertokens_config=SupertokensConfig(
|
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.
|
# 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/",
|
connection_uri="http://mih-supertokens:3567/",
|
||||||
api_key="leatucczyixqwkqqdrhayiwzeofkltds"
|
api_key=st_api_key
|
||||||
),
|
),
|
||||||
framework='fastapi',
|
framework='fastapi',
|
||||||
recipe_list=[
|
recipe_list=[
|
||||||
|
|||||||
2
mih_ui/.gitignore
vendored
2
mih_ui/.gitignore
vendored
@@ -1,3 +1,5 @@
|
|||||||
|
.env
|
||||||
|
|
||||||
# Miscellaneous
|
# Miscellaneous
|
||||||
*.class
|
*.class
|
||||||
*.log
|
*.log
|
||||||
|
|||||||
@@ -1,48 +1,36 @@
|
|||||||
# Install Operating system and dependencies
|
# --- STAGE 1: The Builder ---
|
||||||
#FROM ubuntu:22.04
|
|
||||||
FROM debian:latest AS build-env
|
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
|
# Clone Flutter SDK
|
||||||
|
|
||||||
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
|
|
||||||
RUN git clone -b flutter-3.32-candidate.0 https://github.com/flutter/flutter.git /usr/local/flutter
|
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="/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
|
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 -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
|
EXPOSE 83
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
RUN ["chmod", "+x", "/app/server/server.sh"]
|
|
||||||
|
|
||||||
ENTRYPOINT [ "/app/server/server.sh"]
|
|
||||||
|
|
||||||
# RUN ["python3", "-u", "/app/server/MIH_web_server.py"]
|
|
||||||
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/foundation.dart';
|
||||||
import 'package:flutter/material.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_native_splash/flutter_native_splash.dart';
|
||||||
import 'package:flutter_web_plugins/url_strategy.dart'
|
import 'package:flutter_web_plugins/url_strategy.dart'
|
||||||
if (dart.library.html) '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!');
|
debugPrint('APP INSTALLED!');
|
||||||
});
|
});
|
||||||
final GoRouter appRouter = MihGoRouter().mihRouter;
|
final GoRouter appRouter = MihGoRouter().mihRouter;
|
||||||
|
await dotenv.load(fileName: ".env");
|
||||||
FlutterNativeSplash.remove();
|
FlutterNativeSplash.remove();
|
||||||
runApp(MzansiInnovationHub(
|
runApp(MzansiInnovationHub(
|
||||||
router: appRouter,
|
router: appRouter,
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import 'dart:io';
|
|||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.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_native_splash/flutter_native_splash.dart';
|
||||||
import 'package:flutter_web_plugins/url_strategy.dart'
|
import 'package:flutter_web_plugins/url_strategy.dart'
|
||||||
if (dart.library.html) '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!');
|
debugPrint('APP INSTALLED!');
|
||||||
});
|
});
|
||||||
final GoRouter appRouter = MihGoRouter().mihRouter;
|
final GoRouter appRouter = MihGoRouter().mihRouter;
|
||||||
|
await dotenv.load(fileName: ".env");
|
||||||
FlutterNativeSplash.remove();
|
FlutterNativeSplash.remove();
|
||||||
runApp(MzansiInnovationHub(
|
runApp(MzansiInnovationHub(
|
||||||
router: appRouter,
|
router: appRouter,
|
||||||
|
|||||||
@@ -2,9 +2,11 @@ import 'package:flutter/material.dart';
|
|||||||
|
|
||||||
class MihSingleChildScroll extends StatefulWidget {
|
class MihSingleChildScroll extends StatefulWidget {
|
||||||
final Widget child;
|
final Widget child;
|
||||||
|
final bool? scrollbarOn;
|
||||||
const MihSingleChildScroll({
|
const MihSingleChildScroll({
|
||||||
super.key,
|
super.key,
|
||||||
required this.child,
|
required this.child,
|
||||||
|
this.scrollbarOn,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -18,7 +20,8 @@ class _MihSingleChildScrollState extends State<MihSingleChildScroll> {
|
|||||||
bottom: false,
|
bottom: false,
|
||||||
minimum: EdgeInsets.only(bottom: 5),
|
minimum: EdgeInsets.only(bottom: 5),
|
||||||
child: ScrollConfiguration(
|
child: ScrollConfiguration(
|
||||||
behavior: ScrollConfiguration.of(context).copyWith(scrollbars: false),
|
behavior: ScrollConfiguration.of(context)
|
||||||
|
.copyWith(scrollbars: widget.scrollbarOn ?? false),
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: widget.child,
|
child: widget.child,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -94,7 +94,6 @@ class _MihAttributesState extends State<MihAttributes> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
innerHorizontalPadding: 10,
|
|
||||||
bodyItem: getBody(),
|
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";
|
"As per the terms for free use for these third party providers, the following assets require attribution";
|
||||||
|
|
||||||
return MihSingleChildScroll(
|
return MihSingleChildScroll(
|
||||||
child: Column(
|
scrollbarOn: true,
|
||||||
children: [
|
child: Padding(
|
||||||
Icon(
|
padding: const EdgeInsets.symmetric(horizontal: 10.0),
|
||||||
MihIcons.mihLogo,
|
child: Column(
|
||||||
color: MihColors.getSecondaryColor(
|
children: [
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
Icon(
|
||||||
size: 165,
|
MihIcons.mihLogo,
|
||||||
),
|
color: MihColors.getSecondaryColor(
|
||||||
const SizedBox(
|
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||||
height: 10,
|
size: 165,
|
||||||
),
|
|
||||||
SelectableText(
|
|
||||||
message,
|
|
||||||
style: const TextStyle(
|
|
||||||
fontSize: 15,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(
|
||||||
const SizedBox(
|
height: 10,
|
||||||
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"),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
SelectableText(
|
||||||
// SizedBox(
|
message,
|
||||||
// width: 500,
|
style: const TextStyle(
|
||||||
// child: Column(
|
fontSize: 15,
|
||||||
// children: [
|
fontWeight: FontWeight.bold,
|
||||||
// const SizedBox(
|
),
|
||||||
// width: double.infinity,
|
),
|
||||||
// child: Row(
|
const SizedBox(
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
height: 10,
|
||||||
// mainAxisSize: MainAxisSize.max,
|
),
|
||||||
// children: [
|
SizedBox(
|
||||||
// Flexible(
|
width: 700,
|
||||||
// child: Text(
|
child: Table(
|
||||||
// "Icon",
|
defaultVerticalAlignment: TableCellVerticalAlignment.middle,
|
||||||
// style: TextStyle(
|
columnWidths: const {
|
||||||
// fontSize: 25,
|
0: FlexColumnWidth(1),
|
||||||
// fontWeight: FontWeight.bold,
|
1: FlexColumnWidth(1),
|
||||||
// ),
|
2: FlexColumnWidth(1),
|
||||||
// ),
|
},
|
||||||
// ),
|
children: [
|
||||||
// Flexible(
|
const TableRow(
|
||||||
// child: Text(
|
children: [
|
||||||
// "Creator",
|
TableCell(
|
||||||
// style: TextStyle(
|
verticalAlignment: TableCellVerticalAlignment.middle,
|
||||||
// fontSize: 25,
|
child: Padding(
|
||||||
// fontWeight: FontWeight.bold,
|
padding: const EdgeInsets.only(bottom: 15.0),
|
||||||
// ),
|
child: Center(
|
||||||
// ),
|
child: Text(
|
||||||
// ),
|
"Resources",
|
||||||
// Flexible(
|
style: TextStyle(
|
||||||
// child: Text(
|
fontSize: 25,
|
||||||
// "Link",
|
fontWeight: FontWeight.bold,
|
||||||
// style: TextStyle(
|
),
|
||||||
// fontSize: 25,
|
),
|
||||||
// fontWeight: FontWeight.bold,
|
),
|
||||||
// ),
|
),
|
||||||
// ),
|
),
|
||||||
// ),
|
TableCell(
|
||||||
// ],
|
verticalAlignment: TableCellVerticalAlignment.middle,
|
||||||
// ),
|
child: Padding(
|
||||||
// ),
|
padding: const EdgeInsets.only(bottom: 15.0),
|
||||||
// const Padding(
|
child: Center(
|
||||||
// padding: EdgeInsets.symmetric(vertical: 10.0),
|
child: Text(
|
||||||
// child: Divider(),
|
"Creator",
|
||||||
// ),
|
style: TextStyle(
|
||||||
// displayIcon(MihIcons.mihLogo, "Tarah Meth",
|
fontSize: 25,
|
||||||
// "https://app.mzansi-innovation-hub.co.za/"),
|
fontWeight: FontWeight.bold,
|
||||||
// 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"),
|
TableCell(
|
||||||
// const SizedBox(height: 10),
|
child: Padding(
|
||||||
// displayIcon(MihIcons.mihLogo, "Test",
|
padding: const EdgeInsets.only(bottom: 15.0),
|
||||||
// "https://www.flaticon.com/free-icons/mih"),
|
child: Center(
|
||||||
// const SizedBox(height: 10),
|
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(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
MihSingleChildScroll(
|
MihSingleChildScroll(
|
||||||
|
scrollbarOn: true,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
aboutHeadings(),
|
aboutHeadings(),
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ class _MihPrivacyPolicyState extends State<MihPrivacyPolicy> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
innerHorizontalPadding: 10,
|
|
||||||
bodyItem: getBody(context),
|
bodyItem: getBody(context),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -55,9 +54,13 @@ class _MihPrivacyPolicyState extends State<MihPrivacyPolicy> {
|
|||||||
children
|
children
|
||||||
.addAll(PolicyAndTermsText().getPrivacyPolicyText(context, englishOn));
|
.addAll(PolicyAndTermsText().getPrivacyPolicyText(context, englishOn));
|
||||||
return MihSingleChildScroll(
|
return MihSingleChildScroll(
|
||||||
child: Column(
|
scrollbarOn: true,
|
||||||
mainAxisSize: MainAxisSize.max,
|
child: Padding(
|
||||||
children: children,
|
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) {
|
Widget build(BuildContext context) {
|
||||||
return MihPackageToolBody(
|
return MihPackageToolBody(
|
||||||
borderOn: false,
|
borderOn: false,
|
||||||
innerHorizontalPadding: 10,
|
|
||||||
bodyItem: getBody(context),
|
bodyItem: getBody(context),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -55,8 +54,12 @@ class _MIHTermsOfServiceState extends State<MIHTermsOfService> {
|
|||||||
children
|
children
|
||||||
.addAll(PolicyAndTermsText().getTermsOfServiceText(context, englishOn));
|
.addAll(PolicyAndTermsText().getTermsOfServiceText(context, englishOn));
|
||||||
return MihSingleChildScroll(
|
return MihSingleChildScroll(
|
||||||
child: Column(
|
scrollbarOn: true,
|
||||||
children: children,
|
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/material.dart';
|
||||||
import 'package:flutter/services.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/main.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_button.dart';
|
import 'package:mzansi_innovation_hub/mih_package_components/mih_button.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_form.dart';
|
import 'package:mzansi_innovation_hub/mih_package_components/mih_form.dart';
|
||||||
@@ -107,7 +108,7 @@ class _MihRegisterState extends State<MihRegister> {
|
|||||||
headers: {
|
headers: {
|
||||||
'Content-type': 'application/json',
|
'Content-type': 'application/json',
|
||||||
'Accept': 'application/json',
|
'Accept': 'application/json',
|
||||||
"Authorization": "leatucczyixqwkqqdrhayiwzeofkltds"
|
"Authorization": dotenv.env['SUPERTOKENS_API_KEY'] ?? "",
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
//print("response 2: ${response2.statusCode}");
|
//print("response 2: ${response2.statusCode}");
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:mzansi_innovation_hub/main.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_button.dart';
|
||||||
@@ -32,7 +33,7 @@ class MihAuthenticationServices {
|
|||||||
headers: {
|
headers: {
|
||||||
'Content-type': 'application/json',
|
'Content-type': 'application/json',
|
||||||
'Accept': 'application/json',
|
'Accept': 'application/json',
|
||||||
"Authorization": "leatucczyixqwkqqdrhayiwzeofkltds"
|
"Authorization": dotenv.env['SUPERTOKENS_API_KEY'] ?? "",
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
|
|||||||
@@ -40,11 +40,11 @@ static void my_application_activate(GApplication* application) {
|
|||||||
if (use_header_bar) {
|
if (use_header_bar) {
|
||||||
GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
|
GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
|
||||||
gtk_widget_show(GTK_WIDGET(header_bar));
|
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_header_bar_set_show_close_button(header_bar, TRUE);
|
||||||
gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
|
gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
|
||||||
} else {
|
} 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);
|
gtk_window_set_default_size(window, 1280, 720);
|
||||||
|
|||||||
@@ -670,6 +670,14 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.0"
|
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:
|
flutter_launcher_icons:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ dependencies:
|
|||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_web_plugins:
|
flutter_web_plugins:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
flutter_dotenv: ^6.0.0
|
||||||
|
|
||||||
cupertino_icons: ^1.0.8
|
cupertino_icons: ^1.0.8
|
||||||
font_awesome_flutter: ^10.7.0
|
font_awesome_flutter: ^10.7.0
|
||||||
@@ -76,6 +77,7 @@ dev_dependencies:
|
|||||||
flutter:
|
flutter:
|
||||||
uses-material-design: true
|
uses-material-design: true
|
||||||
assets:
|
assets:
|
||||||
|
- .env
|
||||||
- lib/mih_package_components/assets/images/
|
- lib/mih_package_components/assets/images/
|
||||||
- lib/mih_package_components/assets/fonts/
|
- lib/mih_package_components/assets/fonts/
|
||||||
- lib/mih_package_components/assets/images/loyalty_cards/
|
- 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