Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Users can now create agents (and interact with what's been cached) while offline #706

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"@reduxjs/toolkit": "^1.8.5",
"@sentry/react": "^7.12.1",
"@sentry/tracing": "^7.12.1",
"@testing-library/react": "^13.4.0",
"@types/react-table": "^7.7.12",
"bootstrap": "5.2.1",
"date-fns": "^2.29.3",
Expand All @@ -18,12 +19,16 @@
"i18next": "^22.4.10",
"i18next-browser-languagedetector": "^6.1.5",
"i18next-http-backend": "^1.4.1",
"idb": "^7.1.1",
"moment": "^2.29.4",
"msw": "^0.47.2",
"react": "^18.2.0",
"react-bootstrap": "^2.6.0",
"react-dom": "^18.2.0",
"react-hook-form": "7.35.0",
"react-i18next": "^12.1.5",
"react-modal-hook": "^3.0.2",
"react-moment": "^1.1.2",
"react-phone-input-2": "^2.15.1",
"react-redux": "^8.0.2",
"react-router-dom": "6.3.0",
Expand All @@ -38,9 +43,9 @@
"yup": "^0.32.9"
},
"scripts": {
"start": "vite",
"start": "esbuild --outfile=public/sw.js --bundle public/sw.ts && workbox injectManifest workbox-config.js && vite",
"analyze": "source-map-explorer 'build/static/js/*.js'",
"build": "tsc && vite build",
"build": "esbuild --outfile=public/sw.js --bundle public/sw.ts && workbox injectManifest workbox-config.js && tsc && vite build",
"predeploy:staging": "tsc && vite build --mode staging",
"predeploy:production": "tsc && vite build",
"deploy:staging": "aws s3 sync ./dist s3://<< replace-with-s3-bucket-name >> --profile shift3 --delete",
Expand Down Expand Up @@ -77,6 +82,7 @@
"@typescript-eslint/eslint-plugin": "^5.50.0",
"@typescript-eslint/parser": "^5.50.0",
"@vitejs/plugin-react": "^3.1.0",
"esbuild": "^0.17.8",
"eslint": "^8.23.1",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
Expand All @@ -101,7 +107,12 @@
"typescript-plugin-styled-components": "^2.0.0",
"vite": "^4.1.1",
"vite-plugin-node-polyfills": "^0.7.0",
"vite-tsconfig-paths": "^4.0.5"
"vite-tsconfig-paths": "^4.0.5",
"workbox-background-sync": "^6.5.4",
"workbox-cli": "^6.5.4",
"workbox-precaching": "^6.5.4",
"workbox-routing": "^6.5.4",
"workbox-strategies": "^6.5.4"
},
"lint-staged": {
"*!(*spec).(ts|tsx)": "eslint --max-warnings 0 --fix"
Expand Down
7 changes: 7 additions & 0 deletions public/bootstrap.bundle.min.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions public/bootstrap.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"sizes": "512x512"
}
],
"start_url": ".",
"start_url": "/index.html",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
Expand Down
69 changes: 69 additions & 0 deletions public/offline.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="React Boilerplate" content="BWTC React Boilerplate App" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="stylesheet" href="%PUBLIC_URL%/bootstrap.min.css"/>
<script src="%PUBLIC_URL%/bootstrap.bundle.min.js"></script>
<title>React Boilerplate</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root">
<style>
body,
html {
margin: 0;
padding: 0;
}
* {
box-sizing: border-box;
}

.preload-container {
text-align: center;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
display: flex;
flex-direction: column;
height: 100%;
}

.preload-child {
margin: auto;
align-items: center;
display: flex;
flex-direction: column;
}

.loader {
border: 0.3em solid blue; /* 3/4 spinner */
border-top: 0.3em solid rgba(255, 255, 255, 0.2); /* 1/4 spinner */
border-radius: 50%;
width: 4em;
height: 4em;
animation: spin 1.1s linear infinite;
}

@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style>
<h5 class="text-center">We're sorry, this page hasn't been cached yet :/</h5>
<p class="text-center">But why don't you try one of our <a href="/">other pages</a>?</p>
</div>
</body>
</html>
Loading