Skip to content

Commit

Permalink
feat(web): update website to new ui
Browse files Browse the repository at this point in the history
BREAKING CHANGE: New UI for website. Migrate from CRA to Vite.
  • Loading branch information
rhahao authored Jan 1, 2023
1 parent 8c390f5 commit ac584cf
Show file tree
Hide file tree
Showing 112 changed files with 12,109 additions and 22,297 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
}
2 changes: 0 additions & 2 deletions .env

This file was deleted.

8 changes: 3 additions & 5 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"projects": {
"default": "sws-apps",
"staging": "sws-apps-staging",
"production": "sws-apps",
"development": "sws-apps-dev"
"production": "sws2apps-tools",
"default": "sws2apps-tools"
},
"targets": {}
}
}
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
id: check_build
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b
with:
files: 'build'
files: 'dist'

- name: Deploy to Firebase
if: ${{ steps.check_build.outputs.files_exists == 'true' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/redeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
id: check_build
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b
with:
files: 'build'
files: 'dist'

- name: Deploy to Firebase
if: ${{ steps.check_build.outputs.files_exists == 'true' }}
Expand Down
44 changes: 24 additions & 20 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
build
sws2apps-api
*.local

# Editor directories and files
.idea
.DS_Store
.replit
replit.nix
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
.vscode
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"printWidth": 120
}
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"esbenp.prettier-vscode"
]
}
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascriptreact]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"prettier.printWidth": 130,
"prettier.jsxSingleQuote": true,
"prettier.singleQuote": true
}
484 changes: 249 additions & 235 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ representative at an online or offline event.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[email protected].
sws2apps.notification@gmail.com.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down
15 changes: 2 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,7 @@ We follow semantic versioning. We release patch versions for bugfixes, minor ver

## Branch Organization

We used three different branches to make production, beta and alpha releases of this website:

| branch | whats for |
| :----- | :------------------------------------------------------------------------------------------------- |
| main | production release: bug fix for the current version will be queued in this branch |
| beta | beta release, available on staging environment: new feature will be queued in this branch |
| alpha | alpha release, available on development environment: breaking change will be queued in this branch |
We only use the `main` branch.

## Bugs

Expand All @@ -40,11 +34,6 @@ If you’re only fixing a bug, it’s fine to submit a pull request right away b
- You will be working on one item at a time.
- If you do not have it yet, fork the repository. Clone it if you will work locally.
- 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)).
- Setup the environment variable .env with the following content:
```bash
GENERATE_SOURCEMAP=false
REACT_APP_VERSION=$npm_package_version
```
- Run `npm i` to install the needed dependencies

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

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

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

**When commiting your changes**, we recommend the following command to be run:
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

## Reporting a Vulnerability

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.
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.
33 changes: 17 additions & 16 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"public": "dist",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
],
"headers": [{
"source": "**",
"headers": [
{ "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'" },
{ "key": "Cache-Control", "value": "no-cache" },
{ "key": "X-Content-Type-Options", "value": "nosniff" },
{ "key": "X-Frame-Options", "value": "DENY" },
{ "key": "XSS-Protection", "value": "1; mode=block" }
]
}]
"headers": [
{
"source": "**",
"headers": [
{
"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'"
},
{ "key": "Cache-Control", "value": "no-cache" },
{ "key": "X-Content-Type-Options", "value": "nosniff" },
{ "key": "X-Frame-Options", "value": "DENY" },
{ "key": "XSS-Protection", "value": "1; mode=block" }
]
}
]
}
}
34 changes: 34 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="appLogo.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#2196f3" />
<meta name="description" content="Scheduling Workbox System: Administrator Dashboard" />
<link rel="apple-touch-icon" href="img/icon-logo192x192.png" />
<link rel="apple-touch-icon" href="img/icon-logo256x256.png" />
<link rel="apple-touch-icon" href="img/icon-logo384x384.png" />
<link rel="apple-touch-icon" href="img/icon-logo512x512.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Scheduling Workbox System (sws2apps)</title>
<style>
noscript {
display: flex;
flex-direction: column;
align-items: center;
}

noscript div {
font-family: 'Segoe UI', Tahoma, Verdana, sans-serif;
color: red;
font-weight: bold;
}
</style>
</head>
<body>
<noscript><div>Please enable JavaScript in order to use this website</div></noscript>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
Loading

0 comments on commit ac584cf

Please sign in to comment.