Skip to content

Commit ac584cf

Browse files
authored
feat(web): update website to new ui
BREAKING CHANGE: New UI for website. Migrate from CRA to Vite.
1 parent 8c390f5 commit ac584cf

File tree

112 files changed

+12109
-22297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+12109
-22297
lines changed

.devcontainer/devcontainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@
2828
// "customizations": {},
2929
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
3030
// "remoteUser": "root"
31-
}
31+
}

.env

-2
This file was deleted.

.firebaserc

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
{
22
"projects": {
3-
"default": "sws-apps",
4-
"staging": "sws-apps-staging",
5-
"production": "sws-apps",
6-
"development": "sws-apps-dev"
3+
"production": "sws2apps-tools",
4+
"default": "sws2apps-tools"
75
},
86
"targets": {}
9-
}
7+
}

.github/workflows/deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
id: check_build
4343
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b
4444
with:
45-
files: 'build'
45+
files: 'dist'
4646

4747
- name: Deploy to Firebase
4848
if: ${{ steps.check_build.outputs.files_exists == 'true' }}

.github/workflows/redeploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
id: check_build
4141
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b
4242
with:
43-
files: 'build'
43+
files: 'dist'
4444

4545
- name: Deploy to Firebase
4646
if: ${{ steps.check_build.outputs.files_exists == 'true' }}

.gitignore

+24-20
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
1-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2-
3-
# dependencies
4-
/node_modules
5-
/.pnp
6-
.pnp.js
7-
8-
# testing
9-
/coverage
10-
11-
# production
12-
/build
13-
14-
# misc
15-
.DS_Store
16-
.env.local
17-
.env.development.local
18-
.env.test.local
19-
.env.production.local
20-
1+
# Logs
2+
logs
3+
*.log
214
npm-debug.log*
225
yarn-debug.log*
236
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
build
14+
sws2apps-api
15+
*.local
16+
17+
# Editor directories and files
18+
.idea
19+
.DS_Store
20+
.replit
21+
replit.nix
22+
*.suo
23+
*.ntvs*
24+
*.njsproj
25+
*.sln
26+
*.sw?
27+
.vscode

.prettierrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"trailingComma": "es5",
3+
"tabWidth": 2,
4+
"semi": true,
5+
"singleQuote": true,
6+
"printWidth": 120
7+
}

.vscode/extensions.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"esbenp.prettier-vscode"
4+
]
5+
}

.vscode/settings.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"editor.defaultFormatter": "esbenp.prettier-vscode",
4+
"[javascriptreact]": {
5+
"editor.formatOnSave": true,
6+
"editor.defaultFormatter": "esbenp.prettier-vscode"
7+
},
8+
"prettier.printWidth": 130,
9+
"prettier.jsxSingleQuote": true,
10+
"prettier.singleQuote": true
11+
}

CHANGELOG.md

+249-235
Large diffs are not rendered by default.

CODE_OF_CONDUCT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ representative at an online or offline event.
6060

6161
Instances of abusive, harassing, or otherwise unacceptable behavior may be
6262
reported to the community leaders responsible for enforcement at
63-
63+
sws2apps.notification@gmail.com.
6464
All complaints will be reviewed and investigated promptly and fairly.
6565

6666
All community leaders are obligated to respect the privacy and security of the

CONTRIBUTING.md

+2-13
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,7 @@ We follow semantic versioning. We release patch versions for bugfixes, minor ver
1010

1111
## Branch Organization
1212

13-
We used three different branches to make production, beta and alpha releases of this website:
14-
15-
| branch | whats for |
16-
| :----- | :------------------------------------------------------------------------------------------------- |
17-
| main | production release: bug fix for the current version will be queued in this branch |
18-
| beta | beta release, available on staging environment: new feature will be queued in this branch |
19-
| alpha | alpha release, available on development environment: breaking change will be queued in this branch |
13+
We only use the `main` branch.
2014

2115
## Bugs
2216

@@ -40,11 +34,6 @@ If you’re only fixing a bug, it’s fine to submit a pull request right away b
4034
- You will be working on one item at a time.
4135
- If you do not have it yet, fork the repository. Clone it if you will work locally.
4236
- If you have already forked and clone the repository, make sure that it is in sync with the upstream repository ([Syncing a fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork)).
43-
- Setup the environment variable .env with the following content:
44-
```bash
45-
GENERATE_SOURCEMAP=false
46-
REACT_APP_VERSION=$npm_package_version
47-
```
4837
- Run `npm i` to install the needed dependencies
4938

5039
## Sending a Pull Request (PR)
@@ -53,7 +42,7 @@ We are monitoring for pull requests. We will review your pull request and either
5342

5443
**Before submitting a PR**, please make sure the following is done:
5544

56-
- Run `npm start`, and test if the changes you are proposing are working correctly.
45+
- Run `npm dev`, and test if the changes you are proposing are working correctly.
5746
- Run `npm build`, to check if the application build correctly.
5847

5948
**When commiting your changes**, we recommend the following command to be run:

SECURITY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
## Reporting a Vulnerability
44

5-
You can report a vulnerability by contacting us via email at [email protected]. We will try to do our best to respond you and handle the matter as soon as possible.
5+
You can report a vulnerability by contacting us via email at sws2apps.notification@gmail.com. We will try to do our best to respond you and handle the matter as soon as possible.

firebase.json

+17-16
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
{
22
"hosting": {
3-
"public": "build",
4-
"ignore": [
5-
"firebase.json",
6-
"**/.*",
7-
"**/node_modules/**"
8-
],
3+
"public": "dist",
4+
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
95
"rewrites": [
106
{
117
"source": "**",
128
"destination": "/index.html"
139
}
1410
],
15-
"headers": [{
16-
"source": "**",
17-
"headers": [
18-
{ "key": "Content-Security-Policy", "value": "default-src 'self'; img-src 'self' data:; script-src 'self' https://fpnpmcdn.net; connect-src 'self' data: https://sws2apps-api.onrender.com https://*.fpapi.io https://api.fpjs.io o https://*.fptls.com; prefetch-src https://*.fpapi.io https://api.fpjs.io https://*.fptls.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' data: https://fonts.gstatic.com; base-uri 'self'; form-action 'self'; object-src 'none'; frame-ancestors 'none'" },
19-
{ "key": "Cache-Control", "value": "no-cache" },
20-
{ "key": "X-Content-Type-Options", "value": "nosniff" },
21-
{ "key": "X-Frame-Options", "value": "DENY" },
22-
{ "key": "XSS-Protection", "value": "1; mode=block" }
23-
]
24-
}]
11+
"headers": [
12+
{
13+
"source": "**",
14+
"headers": [
15+
{
16+
"key": "Content-Security-Policy",
17+
"value": "default-src 'self'; img-src 'self' data:; script-src 'self' https://fpnpmcdn.net; connect-src 'self' data: https://sws2apps-api.onrender.com https://*.fpapi.io https://api.fpjs.io o https://*.fptls.com; prefetch-src https://*.fpapi.io https://api.fpjs.io https://*.fptls.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' data: https://fonts.gstatic.com; base-uri 'self'; form-action 'self'; object-src 'none'; frame-ancestors 'none'"
18+
},
19+
{ "key": "Cache-Control", "value": "no-cache" },
20+
{ "key": "X-Content-Type-Options", "value": "nosniff" },
21+
{ "key": "X-Frame-Options", "value": "DENY" },
22+
{ "key": "XSS-Protection", "value": "1; mode=block" }
23+
]
24+
}
25+
]
2526
}
2627
}

index.html

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="appLogo.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="theme-color" content="#2196f3" />
8+
<meta name="description" content="Scheduling Workbox System: Administrator Dashboard" />
9+
<link rel="apple-touch-icon" href="img/icon-logo192x192.png" />
10+
<link rel="apple-touch-icon" href="img/icon-logo256x256.png" />
11+
<link rel="apple-touch-icon" href="img/icon-logo384x384.png" />
12+
<link rel="apple-touch-icon" href="img/icon-logo512x512.png" />
13+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
14+
<title>Scheduling Workbox System (sws2apps)</title>
15+
<style>
16+
noscript {
17+
display: flex;
18+
flex-direction: column;
19+
align-items: center;
20+
}
21+
22+
noscript div {
23+
font-family: 'Segoe UI', Tahoma, Verdana, sans-serif;
24+
color: red;
25+
font-weight: bold;
26+
}
27+
</style>
28+
</head>
29+
<body>
30+
<noscript><div>Please enable JavaScript in order to use this website</div></noscript>
31+
<div id="root"></div>
32+
<script type="module" src="/src/main.jsx"></script>
33+
</body>
34+
</html>

0 commit comments

Comments
 (0)