--
This commit is contained in:
parent
8fcc733093
commit
231adbe93f
123 changed files with 16683 additions and 62496 deletions
69
.gitignore
vendored
69
.gitignore
vendored
|
|
@ -1,69 +0,0 @@
|
|||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
jspm_packages/
|
||||
|
||||
# TypeScript v1 declaration files
|
||||
typings/
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
||||
|
||||
# next.js build output
|
||||
.next
|
||||
|
||||
**/.DS_Store
|
||||
|
||||
dist/
|
||||
dist/**
|
||||
|
||||
**/.autoenv.zsh
|
||||
**/.env
|
||||
15
backend/.dockerignore
Normal file
15
backend/.dockerignore
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
node_modules
|
||||
npm-debug.log
|
||||
|
||||
.idea/
|
||||
.DS_Store
|
||||
.vscode
|
||||
|
||||
dist/
|
||||
debug.log
|
||||
|
||||
.env
|
||||
|
||||
.dockerignore
|
||||
.gitignore
|
||||
Dockerfile
|
||||
3
backend/.gitignore
vendored
Normal file
3
backend/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
node_modules
|
||||
dist
|
||||
.env
|
||||
27
backend/Dockerfile
Normal file
27
backend/Dockerfile
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
FROM node:14 AS builder
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build-ts
|
||||
|
||||
FROM node:14-alpine AS server
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
RUN chown -R node:node /usr/src/app
|
||||
|
||||
USER node
|
||||
EXPOSE 5000
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm install --production
|
||||
|
||||
COPY --from=0 /usr/src/app/dist dist
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
CMD ["node", "dist/server.js"]
|
||||
1723
backend/package-lock.json
generated
Normal file
1723
backend/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
50
backend/package.json
Normal file
50
backend/package.json
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
"name": "geolosys-configurator-backend",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "npm run serve",
|
||||
"build": "npm run build-ts",
|
||||
"serve": "node dist/server.js",
|
||||
"watch-node": "nodemon dist/server.js",
|
||||
"watch": "concurrently -k -p \"[{name}]\" -n \"TypeScript,Node\" -c \"cyan.bold,green.bold\" \"npm run watch-ts\" \"npm run watch-node\"",
|
||||
"build-ts": "tsc",
|
||||
"watch-ts": "tsc -w",
|
||||
"serve-debug": "nodemon --inspect dist/server.js",
|
||||
"debug": "npm run build && npm run watch-debug",
|
||||
"watch-debug": "concurrently -k -p \"[{name}]\" -n \"TypeScript,Node\" -c \"cyan.bold,green.bold\" \"npm run watch-ts\" \"npm run serve-debug\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/oitsjustjose/Blog.git"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
"url": "https://github.com/oitsjustjose/Blog/issues"
|
||||
},
|
||||
"homepage": "https://github.com/oitsjustjose/Blog#readme",
|
||||
"dependencies": {
|
||||
"@types/bcrypt": "^3.0.0",
|
||||
"@types/body-parser": "^1.19.0",
|
||||
"@types/cors": "^2.8.8",
|
||||
"@types/express": "^4.17.6",
|
||||
"@types/jsonwebtoken": "^8.5.0",
|
||||
"@types/mongoose": "^5.7.23",
|
||||
"@types/shortid": "0.0.29",
|
||||
"bcrypt": "^5.0.0",
|
||||
"body-parser": "^1.19.0",
|
||||
"concurrently": "^5.3.0",
|
||||
"cors": "^2.8.5",
|
||||
"dotenv": "^8.2.0",
|
||||
"express": "^4.17.1",
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
"moment": "^2.29.1",
|
||||
"mongoose": "^5.9.18",
|
||||
"shortid": "^2.2.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^3.9.5"
|
||||
}
|
||||
}
|
||||
35
backend/src/app.ts
Normal file
35
backend/src/app.ts
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
import * as bodyParser from 'body-parser'
|
||||
import cors from 'cors'
|
||||
import express from 'express'
|
||||
import { loginPostHandler } from './app/controllers/loginPostHandler'
|
||||
import { registerPostHandler } from './app/controllers/registerPostHandler'
|
||||
import { configGetHandler, configGetSpecificHandler } from './app/controllers/configGetHandler'
|
||||
import { configPutHandler } from './app/controllers/configPutHandler'
|
||||
import { UserModel } from './app/db/user.schema'
|
||||
import { auth } from './app/middleware'
|
||||
|
||||
interface AuthReq {
|
||||
user: UserModel | null
|
||||
}
|
||||
|
||||
declare global {
|
||||
namespace Express {
|
||||
interface Request extends AuthReq { }
|
||||
}
|
||||
}
|
||||
|
||||
const app = express()
|
||||
|
||||
app.use(cors())
|
||||
app.use(bodyParser.json())
|
||||
app.use(bodyParser.urlencoded({
|
||||
extended: true
|
||||
}))
|
||||
|
||||
app.get('/api/configs', auth, configGetHandler)
|
||||
app.put('/api/configs', auth, configPutHandler)
|
||||
app.get('/api/configs/:id', configGetSpecificHandler)
|
||||
app.post('/api/users/login', loginPostHandler)
|
||||
app.post('/api/users/register', registerPostHandler)
|
||||
|
||||
export default app
|
||||
20
backend/src/app/controllers/configGetHandler.ts
Normal file
20
backend/src/app/controllers/configGetHandler.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { Request, Response } from 'express'
|
||||
import ConfigSchema from '../db/config.schema'
|
||||
|
||||
export const configGetHandler = async (req: Request, res: Response) => {
|
||||
try {
|
||||
return res.json(req.user?.configs)
|
||||
} catch (ex) {
|
||||
console.error(ex)
|
||||
return res.status(500).send({ error: ex })
|
||||
}
|
||||
}
|
||||
|
||||
export const configGetSpecificHandler = async (req: Request, res: Response) => {
|
||||
try {
|
||||
return res.json(await ConfigSchema.findById(req.params.id))
|
||||
} catch (ex) {
|
||||
console.error(ex)
|
||||
return res.status(500).send({ error: ex })
|
||||
}
|
||||
}
|
||||
18
backend/src/app/controllers/configPutHandler.ts
Normal file
18
backend/src/app/controllers/configPutHandler.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { Request, Response } from 'express'
|
||||
import ConfigSchema from '../db/config.schema'
|
||||
|
||||
export const configPutHandler = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const config = new ConfigSchema()
|
||||
config.json = req.body.json
|
||||
await config.save()
|
||||
|
||||
req.user?.configs.push(config._id)
|
||||
await req.user.save()
|
||||
|
||||
return res.status(200).send(config)
|
||||
} catch (ex) {
|
||||
console.error(ex)
|
||||
return res.status(500).send({ error: ex })
|
||||
}
|
||||
}
|
||||
31
backend/src/app/controllers/loginPostHandler.ts
Normal file
31
backend/src/app/controllers/loginPostHandler.ts
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import { Request, Response } from 'express'
|
||||
import * as jwt from 'jsonwebtoken'
|
||||
import UserSchema, { UserModel } from '../db/user.schema'
|
||||
import moment from 'moment'
|
||||
|
||||
export const loginPostHandler = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const user: UserModel | null = await UserSchema.findOne({
|
||||
username: req.body.username
|
||||
})
|
||||
|
||||
if (!user) {
|
||||
return res.status(404).send("User not found")
|
||||
}
|
||||
|
||||
if (!user.validPassword(req.body.password)) {
|
||||
return res.status(404).send("Password for User was Incorrect")
|
||||
}
|
||||
|
||||
const token = jwt.sign({
|
||||
_id: user._id,
|
||||
username: user.username,
|
||||
expiresAt: moment().add(1, 'day').toISOString()
|
||||
}, process.env.JWT_SECRET as string)
|
||||
|
||||
return res.status(200).send(token)
|
||||
} catch (ex) {
|
||||
console.error(ex)
|
||||
return res.status(500).send({ error: ex })
|
||||
}
|
||||
}
|
||||
34
backend/src/app/controllers/registerPostHandler.ts
Normal file
34
backend/src/app/controllers/registerPostHandler.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import { Request, Response } from 'express'
|
||||
import UserSchema from '../db/user.schema'
|
||||
import * as jwt from 'jsonwebtoken'
|
||||
import moment from 'moment'
|
||||
|
||||
export const registerPostHandler = async (req: Request, res: Response) => {
|
||||
try {
|
||||
const exUser = await UserSchema.findOne({
|
||||
'username': req.body.username
|
||||
})
|
||||
|
||||
if (exUser) {
|
||||
return res.status(409).send("USERNAME ALREADY EXISTS")
|
||||
}
|
||||
|
||||
const user = new UserSchema()
|
||||
user.username = req.body.username
|
||||
user.password = user.generateHash(req.body.password)
|
||||
user.configs = Array()
|
||||
await user.save()
|
||||
|
||||
// Log the user in
|
||||
const token = jwt.sign({
|
||||
_id: user._id,
|
||||
username: user.username,
|
||||
expiresAt: moment().add(1, 'day').toISOString()
|
||||
}, process.env.JWT_SECRET as string)
|
||||
|
||||
return res.status(200).send(token)
|
||||
} catch (ex) {
|
||||
console.error(ex)
|
||||
return res.status(500).send({ error: ex })
|
||||
}
|
||||
}
|
||||
|
|
@ -2,17 +2,16 @@ import { Document, model, Schema, Types } from 'mongoose'
|
|||
import shortid from 'shortid'
|
||||
|
||||
const ConfigSchema = new Schema({
|
||||
json: Object,
|
||||
shortid: {
|
||||
_id: {
|
||||
type: String,
|
||||
unique: true,
|
||||
default: shortid.generate
|
||||
}
|
||||
},
|
||||
json: Object
|
||||
})
|
||||
|
||||
export type ConfigModel = Document & {
|
||||
_id: string,
|
||||
json: object,
|
||||
shortid: string
|
||||
}
|
||||
|
||||
export default model<ConfigModel>('configs', ConfigSchema, 'configs')
|
||||
|
|
@ -26,10 +26,10 @@ UserSchema.methods.changePassword = function (password: string, newPassword: str
|
|||
export type UserModel = Document & {
|
||||
username: string,
|
||||
password: string,
|
||||
configs: Array<String>,
|
||||
generateHash: Function,
|
||||
validPassword: Function,
|
||||
changePassword: Function
|
||||
configs: string[],
|
||||
generateHash: (password: string) => string,
|
||||
validPassword: (password: string) => string,
|
||||
changePassword: (password: string, newPassword: string) => void
|
||||
}
|
||||
|
||||
export default model<UserModel>('users', UserSchema, 'users')
|
||||
32
backend/src/app/middleware.ts
Normal file
32
backend/src/app/middleware.ts
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import { NextFunction, Request, Response } from 'express'
|
||||
import * as jwt from 'jsonwebtoken'
|
||||
import UserSchema from './db/user.schema'
|
||||
import moment from 'moment'
|
||||
|
||||
export const auth = async (req: Request, res: Response, next: NextFunction) => {
|
||||
const token = req.header('auth-token')
|
||||
|
||||
if (!token) {
|
||||
return res.status(403).send('Access Denied')
|
||||
}
|
||||
|
||||
try {
|
||||
const { _id, expiresAt } = (jwt.verify(token, process.env.JWT_SECRET as string) as { _id: string, expiresAt: string })
|
||||
|
||||
if (moment(moment()).isAfter(expiresAt)) {
|
||||
return res.status(400).send('Token expired')
|
||||
}
|
||||
|
||||
const user = await UserSchema.findById(_id)
|
||||
|
||||
if (!user) {
|
||||
return res.status(404).send("User not found")
|
||||
} else {
|
||||
req.user = user
|
||||
}
|
||||
|
||||
next()
|
||||
} catch (err) {
|
||||
return res.status(400).send(`Invalid Token: ${err}`)
|
||||
}
|
||||
}
|
||||
8
backend/src/db.ts
Normal file
8
backend/src/db.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import mongoose from 'mongoose'
|
||||
|
||||
export default async () => {
|
||||
await mongoose.connect(`mongodb://${process.env.MONGO_URI}/Blog`, {
|
||||
useNewUrlParser: true,
|
||||
useUnifiedTopology: true
|
||||
})
|
||||
}
|
||||
13
backend/src/server.ts
Normal file
13
backend/src/server.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { config as LoadDotenv } from 'dotenv'
|
||||
import app from './app'
|
||||
import connectDB from './db'
|
||||
|
||||
if(process.env.NODE_ENV !== "production") {
|
||||
LoadDotenv()
|
||||
}
|
||||
|
||||
connectDB()
|
||||
|
||||
const port = process.env.PORT || 3000
|
||||
|
||||
app.listen(port, () => console.log(`Listening at http://127.0.0.1:${port}`))
|
||||
29
backend/tsconfig.json
Normal file
29
backend/tsconfig.json
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"target": "es2017",
|
||||
"noImplicitAny": true,
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"sourceMap": true,
|
||||
"outDir": "dist",
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"*": [
|
||||
"node_modules/*"
|
||||
]
|
||||
},
|
||||
"lib": [
|
||||
"es2019"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*",
|
||||
"src/types.d.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"test/**/*"
|
||||
]
|
||||
}
|
||||
5
frontend/.dockerignore
Normal file
5
frontend/.dockerignore
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
build/**
|
||||
.idea/
|
||||
node_modules/
|
||||
vs_code/
|
||||
Dockerfile
|
||||
33
frontend/.eslintrc.json
Normal file
33
frontend/.eslintrc.json
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"cypress/globals": true,
|
||||
"es6": true,
|
||||
"jest": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:react/recommended",
|
||||
"airbnb"
|
||||
],
|
||||
"globals": {
|
||||
"Atomics": "readonly",
|
||||
"SharedArrayBuffer": "readonly"
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaFeatures": {
|
||||
"jsx": true
|
||||
},
|
||||
"ecmaVersion": 11,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": [
|
||||
"cypress",
|
||||
"react"
|
||||
],
|
||||
"rules": {
|
||||
"import/no-cycle" : 0,
|
||||
"no-unused-expressions": 0,
|
||||
"react/jsx-props-no-spreading": 0,
|
||||
"react/prop-types": 0
|
||||
}
|
||||
}
|
||||
23
frontend/.gitignore
vendored
Normal file
23
frontend/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# 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
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
60
frontend/Dockerfile
Normal file
60
frontend/Dockerfile
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
FROM node:14-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN npm install --production
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
##
|
||||
|
||||
FROM node:14-alpine AS server
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
RUN npm install -g serve
|
||||
|
||||
RUN apk add postgresql-client
|
||||
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
COPY --from=builder /app/build ./build
|
||||
|
||||
ENV PORT=3001
|
||||
|
||||
EXPOSE 3001
|
||||
USER node
|
||||
CMD ["serve", "-s", "build"]
|
||||
|
||||
|
||||
|
||||
# FROM node:14 AS builder
|
||||
|
||||
# WORKDIR /usr/src/app
|
||||
|
||||
# COPY package*.json ./
|
||||
# RUN npm install --production
|
||||
|
||||
# COPY . .
|
||||
|
||||
# RUN npm run build
|
||||
|
||||
# FROM node:14-alpine AS server
|
||||
|
||||
# WORKDIR /usr/src/app
|
||||
|
||||
# USER node
|
||||
# EXPOSE 3001
|
||||
|
||||
# COPY package*.json ./
|
||||
# COPY --from=builder /usr/src/app/build ./build
|
||||
|
||||
|
||||
# RUN npm install -g serve
|
||||
|
||||
# ENV NODE_ENV=production
|
||||
|
||||
# CMD ["serve", "-s", "build"]
|
||||
68
frontend/README.md
Normal file
68
frontend/README.md
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
||||
|
||||
## Available Scripts
|
||||
|
||||
In the project directory, you can run:
|
||||
|
||||
### `npm start`
|
||||
|
||||
Runs the app in the development mode.<br />
|
||||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
||||
|
||||
The page will reload if you make edits.<br />
|
||||
You will also see any lint errors in the console.
|
||||
|
||||
### `npm test`
|
||||
|
||||
Launches the test runner in the interactive watch mode.<br />
|
||||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
||||
|
||||
### `npm run build`
|
||||
|
||||
Builds the app for production to the `build` folder.<br />
|
||||
It correctly bundles React in production mode and optimizes the build for the best performance.
|
||||
|
||||
The build is minified and the filenames include the hashes.<br />
|
||||
Your app is ready to be deployed!
|
||||
|
||||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
||||
|
||||
### `npm run eject`
|
||||
|
||||
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
|
||||
|
||||
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
||||
|
||||
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
||||
|
||||
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
||||
|
||||
## Learn More
|
||||
|
||||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
||||
|
||||
To learn React, check out the [React documentation](https://reactjs.org/).
|
||||
|
||||
### Code Splitting
|
||||
|
||||
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
|
||||
|
||||
### Analyzing the Bundle Size
|
||||
|
||||
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
|
||||
|
||||
### Making a Progressive Web App
|
||||
|
||||
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
|
||||
|
||||
### Advanced Configuration
|
||||
|
||||
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
|
||||
|
||||
### Deployment
|
||||
|
||||
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
|
||||
|
||||
### `npm run build` fails to minify
|
||||
|
||||
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
|
||||
13916
frontend/package-lock.json
generated
Normal file
13916
frontend/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
53
frontend/package.json
Normal file
53
frontend/package.json
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
"name": "geolosys-configurator-frontend",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.32",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.15.1",
|
||||
"@fortawesome/react-fontawesome": "^0.1.11",
|
||||
"@testing-library/jest-dom": "^4.2.4",
|
||||
"@testing-library/react": "^9.5.0",
|
||||
"@testing-library/user-event": "^7.2.1",
|
||||
"axios": "^0.20.0",
|
||||
"bootstrap": "^4.5.2",
|
||||
"eslint": "^6.6.0",
|
||||
"eslint-config-airbnb": "^18.2.0",
|
||||
"eslint-plugin-cypress": "^2.11.2",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"eslint-plugin-jsx-a11y": "^6.3.1",
|
||||
"eslint-plugin-react": "^7.21.4",
|
||||
"eslint-plugin-react-hooks": "^4.1.2",
|
||||
"jwt-decode": "^3.0.0",
|
||||
"react": "^16.13.1",
|
||||
"react-bootstrap": "^1.3.0",
|
||||
"react-dom": "^16.13.1",
|
||||
"react-redux": "^7.2.1",
|
||||
"react-router-dom": "^5.2.0",
|
||||
"react-scripts": "3.4.3",
|
||||
"react-transition-group": "^4.4.1",
|
||||
"redux": "^4.0.5"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "PORT=5000 react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "react-app"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"proxy": "http://localhost:3000"
|
||||
}
|
||||
20
frontend/public/index.html
Normal file
20
frontend/public/index.html
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="%PUBLIC_URL%/logo.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<meta name="description" content="A configuration tool for setting up Geolosys" />
|
||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo.png" />
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||
<title>Geolosys Configurator</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 84 KiB |
15
frontend/public/manifest.json
Normal file
15
frontend/public/manifest.json
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"short_name": "Geolosys Configurator",
|
||||
"name": "A configuration tool for setting up Geolosys",
|
||||
"icons": [
|
||||
{
|
||||
"src": "logo.png",
|
||||
"type": "image/png",
|
||||
"sizes": "1024x1024"
|
||||
}
|
||||
],
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#ffffff"
|
||||
}
|
||||
3
frontend/public/robots.txt
Normal file
3
frontend/public/robots.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# https://www.robotstxt.org/robotstxt.html
|
||||
User-agent: *
|
||||
Disallow:
|
||||
27
frontend/src/App.jsx
Normal file
27
frontend/src/App.jsx
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import 'bootstrap/dist/css/bootstrap.min.css';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { Provider } from 'react-redux';
|
||||
import { BrowserRouter as Router, Route } from 'react-router-dom';
|
||||
import LoadAuth from './auth/load';
|
||||
import RequiresAuth from './components/modules/Auth';
|
||||
import NavBar from './components/modules/NavBar';
|
||||
import Dashboard from './components/view/Dashboard';
|
||||
import Posts from './components/view/Posts';
|
||||
import store from './redux/store';
|
||||
|
||||
export default () => {
|
||||
LoadAuth();
|
||||
|
||||
ReactDOM.render(
|
||||
<Provider store={store}>
|
||||
<Router>
|
||||
<NavBar />
|
||||
<div style={{ paddingTop: `${3.5}em` }} />
|
||||
<Route exact path="/" component={Posts} />
|
||||
<RequiresAuth exact path="/manage" component={Dashboard} />
|
||||
</Router>
|
||||
</Provider>,
|
||||
document.getElementById('root'),
|
||||
);
|
||||
};
|
||||
13
frontend/src/auth/load.js
Normal file
13
frontend/src/auth/load.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/* eslint-disable no-underscore-dangle */
|
||||
import jwtDecode from 'jwt-decode';
|
||||
import store from '../redux/store';
|
||||
import setAuthToken from '../axios/AuthToken';
|
||||
|
||||
export default () => {
|
||||
const token = window.localStorage.getItem('auth-token');
|
||||
if (token) {
|
||||
const user = jwtDecode(token);
|
||||
store.dispatch({ type: 'SET_USER', user });
|
||||
setAuthToken(token);
|
||||
}
|
||||
};
|
||||
9
frontend/src/auth/logout.js
Normal file
9
frontend/src/auth/logout.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import setAuthToken from '../axios/AuthToken';
|
||||
import store from '../redux/store';
|
||||
|
||||
export default () => {
|
||||
localStorage.removeItem('auth-token');
|
||||
setAuthToken(null);
|
||||
store.dispatch({ type: 'CLEAR_USER' });
|
||||
window.location.reload();
|
||||
};
|
||||
9
frontend/src/axios/AuthToken.js
Normal file
9
frontend/src/axios/AuthToken.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import axios from 'axios';
|
||||
|
||||
export default (token) => {
|
||||
if (token) {
|
||||
axios.defaults.headers.common['auth-token'] = token;
|
||||
} else {
|
||||
delete axios.defaults.headers.common['auth-token'];
|
||||
}
|
||||
};
|
||||
20
frontend/src/axios/Login.js
Normal file
20
frontend/src/axios/Login.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/* eslint-disable no-underscore-dangle */
|
||||
import axios from 'axios';
|
||||
import jwtDecode from 'jwt-decode';
|
||||
import store from '../redux/store';
|
||||
import setAuthToken from './AuthToken';
|
||||
|
||||
export default (data) => {
|
||||
const path = '/api/users/login';
|
||||
|
||||
return axios.post(path, data)
|
||||
.then((resp) => {
|
||||
const token = resp.data;
|
||||
localStorage.setItem('auth-token', token);
|
||||
|
||||
const user = jwtDecode(token);
|
||||
store.dispatch({ type: 'SET_USER', user: user._doc });
|
||||
|
||||
setAuthToken(token);
|
||||
});
|
||||
};
|
||||
33
frontend/src/components/modules/NavBar.jsx
Normal file
33
frontend/src/components/modules/NavBar.jsx
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import { faSignOutAlt } from '@fortawesome/free-solid-svg-icons';
|
||||
import React from 'react';
|
||||
import { Nav, Navbar, NavItem } from 'react-bootstrap';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import NavLinkItem from './NavLinkItem';
|
||||
import store from '../../redux/store';
|
||||
import LogOut from '../../auth/logout';
|
||||
|
||||
export default () => (
|
||||
<Navbar expand="lg" collapseOnSelect bg="dark" variant="dark" fixed="top">
|
||||
<Navbar.Brand>Geolosys Configurator</Navbar.Brand>
|
||||
<Navbar.Toggle aria-controls="responsive-navbar-nav" />
|
||||
<Navbar.Collapse>
|
||||
<Nav className="mr-auto">
|
||||
<NavLinkItem name="Blog" dest="/" icon={faBook} />
|
||||
{store.getState().isAuthenticated && (
|
||||
<div>
|
||||
<NavLinkItem name="Your Configs" dest="/manage" icon={faEdit} />
|
||||
<NavItem style={{ cursor: 'pointer' }} onClick={LogOut}>
|
||||
<div className="nav-link nav-sign-out">
|
||||
<span>
|
||||
<FontAwesomeIcon icon={faSignOutAlt} />
|
||||
{' '}
|
||||
Sign Out
|
||||
</span>
|
||||
</div>
|
||||
</NavItem>
|
||||
</div>
|
||||
)}
|
||||
</Nav>
|
||||
</Navbar.Collapse>
|
||||
</Navbar>
|
||||
);
|
||||
18
frontend/src/components/modules/NavLinkItem.jsx
Normal file
18
frontend/src/components/modules/NavLinkItem.jsx
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import React from 'react';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
import { NavItem } from 'react-bootstrap';
|
||||
|
||||
export default ({
|
||||
name, dest, icon,
|
||||
}) => (
|
||||
<NavItem>
|
||||
<NavLink exact className="nav-link" activeClassName="nav-link active" to={dest}>
|
||||
<span>
|
||||
{icon && (<FontAwesomeIcon icon={icon} />)}
|
||||
{' '}
|
||||
{name}
|
||||
</span>
|
||||
</NavLink>
|
||||
</NavItem>
|
||||
);
|
||||
21
frontend/src/components/modules/Notification.jsx
Normal file
21
frontend/src/components/modules/Notification.jsx
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import React from 'react';
|
||||
import { Modal } from 'react-bootstrap';
|
||||
|
||||
export default ({
|
||||
title, contents, show, onHide,
|
||||
}) => (
|
||||
<Modal
|
||||
show={show}
|
||||
onHide={onHide}
|
||||
>
|
||||
<Modal.Header closeButton>
|
||||
<Modal.Title className="text-center">
|
||||
{title}
|
||||
</Modal.Title>
|
||||
</Modal.Header>
|
||||
|
||||
<Modal.Body>
|
||||
{contents}
|
||||
</Modal.Body>
|
||||
</Modal>
|
||||
);
|
||||
90
frontend/src/components/view/Login.jsx
Normal file
90
frontend/src/components/view/Login.jsx
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import { Button, Container, Form } from 'react-bootstrap';
|
||||
import { connect } from 'react-redux';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faSignInAlt } from '@fortawesome/free-solid-svg-icons';
|
||||
import { CSSTransition } from 'react-transition-group';
|
||||
import postLogin from '../../axios/Login';
|
||||
import Notification from '../modules/Notification';
|
||||
|
||||
const LoginComponent = ({
|
||||
isAuthenticated,
|
||||
}) => {
|
||||
const [state, setState] = useState({
|
||||
username: null,
|
||||
password: null,
|
||||
});
|
||||
|
||||
const [error, setError] = useState(null);
|
||||
|
||||
useEffect(() => {
|
||||
if (isAuthenticated) {
|
||||
window.location.reload();
|
||||
}
|
||||
}, [isAuthenticated]);
|
||||
|
||||
const submit = (evt) => {
|
||||
evt.preventDefault();
|
||||
|
||||
postLogin(state).catch((ex) => {
|
||||
setError(`${ex.response.data}`);
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<CSSTransition classNames="react-router" appear in timeout={300}>
|
||||
<div>
|
||||
<div className="v-center">
|
||||
<Container
|
||||
className="mx-auto perfect-width"
|
||||
>
|
||||
<h2 className="text-center">
|
||||
Admin Login
|
||||
</h2>
|
||||
<Form onSubmit={submit}>
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Username
|
||||
</Form.Label>
|
||||
<Form.Control
|
||||
type="text"
|
||||
onChange={(evt) => { setState({ ...state, username: evt.target.value }); }}
|
||||
/>
|
||||
</Form.Group>
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Password
|
||||
</Form.Label>
|
||||
<Form.Control
|
||||
type="password"
|
||||
onChange={(evt) => { setState({ ...state, password: evt.target.value }); }}
|
||||
/>
|
||||
</Form.Group>
|
||||
|
||||
<Button
|
||||
type="submit"
|
||||
>
|
||||
<FontAwesomeIcon icon={faSignInAlt} />
|
||||
{' '}
|
||||
Log In
|
||||
</Button>
|
||||
</Form>
|
||||
</Container>
|
||||
</div>
|
||||
<Notification
|
||||
title="Failed to Log In"
|
||||
contents={error}
|
||||
show={!!error}
|
||||
onHide={() => setError(null)}
|
||||
/>
|
||||
</div>
|
||||
</CSSTransition>
|
||||
);
|
||||
};
|
||||
|
||||
const mapStateToProps = (state) => ({
|
||||
isAuthenticated: state.isAuthenticated,
|
||||
user: state.user,
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps)(LoginComponent);
|
||||
7
frontend/src/index.js
Normal file
7
frontend/src/index.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import RenderApp from './App';
|
||||
import './css/App.css';
|
||||
import * as serviceWorker from './serviceWorker';
|
||||
|
||||
RenderApp();
|
||||
|
||||
serviceWorker.unregister();
|
||||
36
frontend/src/redux/reducers.js
Normal file
36
frontend/src/redux/reducers.js
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
const defaultState = {
|
||||
isAuthenticated: false,
|
||||
user: null,
|
||||
posts: null,
|
||||
editingPost: null,
|
||||
// editingPost: {
|
||||
// id: null,
|
||||
// title: null,
|
||||
// contents: null,
|
||||
// },
|
||||
};
|
||||
|
||||
export default function reducer(
|
||||
state = defaultState,
|
||||
action,
|
||||
) {
|
||||
switch (action.type) {
|
||||
case 'SET_USER':
|
||||
return {
|
||||
...state,
|
||||
user: {
|
||||
...action.user,
|
||||
},
|
||||
isAuthenticated: true,
|
||||
};
|
||||
case 'CLEAR_USER':
|
||||
return {
|
||||
...state,
|
||||
user: null,
|
||||
isAuthenticated: false,
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
||||
10
frontend/src/redux/store.js
Normal file
10
frontend/src/redux/store.js
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { createStore } from 'redux';
|
||||
import reducer from './reducers';
|
||||
|
||||
// TODO: This should only initialize for development
|
||||
// eslint-disable-next-line no-underscore-dangle
|
||||
const enhancer = window.__REDUX_DEVTOOLS_EXTENSION__
|
||||
// eslint-disable-next-line no-underscore-dangle
|
||||
&& window.__REDUX_DEVTOOLS_EXTENSION__();
|
||||
|
||||
export default createStore(reducer, enhancer);
|
||||
141
frontend/src/serviceWorker.js
Normal file
141
frontend/src/serviceWorker.js
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
// This optional code is used to register a service worker.
|
||||
// register() is not called by default.
|
||||
|
||||
// This lets the app load faster on subsequent visits in production, and gives
|
||||
// it offline capabilities. However, it also means that developers (and users)
|
||||
// will only see deployed updates on subsequent visits to a page, after all the
|
||||
// existing tabs open on the page have been closed, since previously cached
|
||||
// resources are updated in the background.
|
||||
|
||||
// To learn more about the benefits of this model and instructions on how to
|
||||
// opt-in, read https://bit.ly/CRA-PWA
|
||||
|
||||
const isLocalhost = Boolean(
|
||||
window.location.hostname === 'localhost' ||
|
||||
// [::1] is the IPv6 localhost address.
|
||||
window.location.hostname === '[::1]' ||
|
||||
// 127.0.0.0/8 are considered localhost for IPv4.
|
||||
window.location.hostname.match(
|
||||
/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
|
||||
)
|
||||
);
|
||||
|
||||
export function register(config) {
|
||||
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
|
||||
// The URL constructor is available in all browsers that support SW.
|
||||
const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);
|
||||
if (publicUrl.origin !== window.location.origin) {
|
||||
// Our service worker won't work if PUBLIC_URL is on a different origin
|
||||
// from what our page is served on. This might happen if a CDN is used to
|
||||
// serve assets; see https://github.com/facebook/create-react-app/issues/2374
|
||||
return;
|
||||
}
|
||||
|
||||
window.addEventListener('load', () => {
|
||||
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;
|
||||
|
||||
if (isLocalhost) {
|
||||
// This is running on localhost. Let's check if a service worker still exists or not.
|
||||
checkValidServiceWorker(swUrl, config);
|
||||
|
||||
// Add some additional logging to localhost, pointing developers to the
|
||||
// service worker/PWA documentation.
|
||||
navigator.serviceWorker.ready.then(() => {
|
||||
console.log(
|
||||
'This web app is being served cache-first by a service ' +
|
||||
'worker. To learn more, visit https://bit.ly/CRA-PWA'
|
||||
);
|
||||
});
|
||||
} else {
|
||||
// Is not localhost. Just register service worker
|
||||
registerValidSW(swUrl, config);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function registerValidSW(swUrl, config) {
|
||||
navigator.serviceWorker
|
||||
.register(swUrl)
|
||||
.then(registration => {
|
||||
registration.onupdatefound = () => {
|
||||
const installingWorker = registration.installing;
|
||||
if (installingWorker == null) {
|
||||
return;
|
||||
}
|
||||
installingWorker.onstatechange = () => {
|
||||
if (installingWorker.state === 'installed') {
|
||||
if (navigator.serviceWorker.controller) {
|
||||
// At this point, the updated precached content has been fetched,
|
||||
// but the previous service worker will still serve the older
|
||||
// content until all client tabs are closed.
|
||||
console.log(
|
||||
'New content is available and will be used when all ' +
|
||||
'tabs for this page are closed. See https://bit.ly/CRA-PWA.'
|
||||
);
|
||||
|
||||
// Execute callback
|
||||
if (config && config.onUpdate) {
|
||||
config.onUpdate(registration);
|
||||
}
|
||||
} else {
|
||||
// At this point, everything has been precached.
|
||||
// It's the perfect time to display a
|
||||
// "Content is cached for offline use." message.
|
||||
console.log('Content is cached for offline use.');
|
||||
|
||||
// Execute callback
|
||||
if (config && config.onSuccess) {
|
||||
config.onSuccess(registration);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error during service worker registration:', error);
|
||||
});
|
||||
}
|
||||
|
||||
function checkValidServiceWorker(swUrl, config) {
|
||||
// Check if the service worker can be found. If it can't reload the page.
|
||||
fetch(swUrl, {
|
||||
headers: { 'Service-Worker': 'script' },
|
||||
})
|
||||
.then(response => {
|
||||
// Ensure service worker exists, and that we really are getting a JS file.
|
||||
const contentType = response.headers.get('content-type');
|
||||
if (
|
||||
response.status === 404 ||
|
||||
(contentType != null && contentType.indexOf('javascript') === -1)
|
||||
) {
|
||||
// No service worker found. Probably a different app. Reload the page.
|
||||
navigator.serviceWorker.ready.then(registration => {
|
||||
registration.unregister().then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
});
|
||||
} else {
|
||||
// Service worker found. Proceed as normal.
|
||||
registerValidSW(swUrl, config);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
console.log(
|
||||
'No internet connection found. App is running in offline mode.'
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
export function unregister() {
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.ready
|
||||
.then(registration => {
|
||||
registration.unregister();
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error.message);
|
||||
});
|
||||
}
|
||||
}
|
||||
45
gulpfile.js
45
gulpfile.js
|
|
@ -1,45 +0,0 @@
|
|||
const { dest, src, task, watch } = require('gulp');
|
||||
const { createProject } = require('gulp-typescript');
|
||||
|
||||
const tsconf = createProject('tsconfig.json');
|
||||
|
||||
/**
|
||||
* @param {String} dir
|
||||
*/
|
||||
const copy = (dir) => {
|
||||
return src([`${dir}/**/*`]).pipe(dest(dir.replace('src', 'dist')));
|
||||
};
|
||||
|
||||
const build = () => {
|
||||
return src('src/**/*.ts').pipe(tsconf()).js.pipe(dest('dist'));
|
||||
};
|
||||
|
||||
task('build', () => {
|
||||
copy('src/public');
|
||||
copy('src/app/views');
|
||||
return build();
|
||||
});
|
||||
|
||||
task('copy', () => {
|
||||
copy('src/public');
|
||||
return copy('src/app/views');
|
||||
});
|
||||
|
||||
task('default', () => {
|
||||
let space = String();
|
||||
|
||||
for (let _ = 0; _ < process.stdout.columns; _++) {
|
||||
space += "-";
|
||||
}
|
||||
|
||||
console.log(space);
|
||||
console.error("No default task has been created");
|
||||
console.log(space);
|
||||
});
|
||||
|
||||
task('watch', () => {
|
||||
return watch(['src/public/**/*', 'src/app/views/**/*'], () => {
|
||||
copy('src/public');
|
||||
return copy('src/app/views');
|
||||
});
|
||||
});
|
||||
7
license.md
Normal file
7
license.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
Copyright <2020> <Jose Stovall>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
3910
package-lock.json
generated
3910
package-lock.json
generated
File diff suppressed because it is too large
Load diff
46
package.json
46
package.json
|
|
@ -1,46 +0,0 @@
|
|||
{
|
||||
"name": "geolosys_config_generator",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/oitsjustjose/Geolosys-Config-Generator.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/bcrypt": "^3.0.0",
|
||||
"@types/body-parser": "^1.19.0",
|
||||
"@types/cookie-session": "^2.0.39",
|
||||
"@types/dotenv": "^8.2.0",
|
||||
"@types/ejs": "^3.0.4",
|
||||
"@types/express": "^4.17.6",
|
||||
"@types/express-ws": "^3.0.0",
|
||||
"@types/mongoose": "^5.7.21",
|
||||
"@types/passport": "^1.0.3",
|
||||
"@types/passport-local": "^1.0.33",
|
||||
"@types/shortid": "0.0.29",
|
||||
"bcrypt": "^5.0.0",
|
||||
"body-parser": "^1.19.0",
|
||||
"cookie-session": "^1.4.0",
|
||||
"dotenv": "^8.2.0",
|
||||
"ejs": "^3.1.3",
|
||||
"express": "^4.17.1",
|
||||
"express-ws": "^4.0.0",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-typescript": "^6.0.0-alpha.1",
|
||||
"mongoose": "^5.9.13",
|
||||
"passport": "^0.4.1",
|
||||
"passport-local": "^1.0.0",
|
||||
"shortid": "^2.2.15",
|
||||
"typescript": "^3.9.3"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
"url": "https://github.com/oitsjustjose/Geolosys-Config-Generator/issues"
|
||||
},
|
||||
"homepage": "https://github.com/oitsjustjose/Geolosys-Config-Generator#readme"
|
||||
}
|
||||
85
src/app.ts
85
src/app.ts
|
|
@ -1,85 +0,0 @@
|
|||
import { json as bpjson, urlencoded } from 'body-parser'
|
||||
import session from 'cookie-session'
|
||||
import { config as InitEnv } from 'dotenv'
|
||||
import express from 'express'
|
||||
import mongoose from 'mongoose'
|
||||
import passport from 'passport'
|
||||
import { Strategy as LocalStrategy } from 'passport-local'
|
||||
import path from 'path'
|
||||
import UserDB, { UserModel } from './app/models/user.model'
|
||||
import * as Routes from './app/routes/routes'
|
||||
import * as Logging from './app/utils/logs'
|
||||
|
||||
InitEnv()
|
||||
|
||||
declare global {
|
||||
namespace Express {
|
||||
interface User extends UserModel { }
|
||||
}
|
||||
}
|
||||
|
||||
const app = express()
|
||||
|
||||
app.set('json spaces', 2)
|
||||
|
||||
app.set('view engine', 'ejs')
|
||||
app.set('views', path.join(__dirname, './app/views'))
|
||||
|
||||
app.use(express.static(__dirname + '/public'))
|
||||
app.use(bpjson())
|
||||
app.use(urlencoded({
|
||||
extended: true
|
||||
}))
|
||||
app.use(session({
|
||||
secret: '16ed0626a1d2b5-kc6zy6e8',
|
||||
}))
|
||||
|
||||
mongoose.connect(`mongodb://${process.env.MONGO_URI}/GeolosysConfigGen`, {
|
||||
useNewUrlParser: true,
|
||||
useUnifiedTopology: true,
|
||||
}).then(() => {
|
||||
console.log('DB Connected')
|
||||
}).catch((ex) => {
|
||||
console.log('DB Connection Failed')
|
||||
console.error(ex)
|
||||
process.exit(1)
|
||||
})
|
||||
|
||||
app.use(passport.initialize())
|
||||
app.use(passport.session())
|
||||
passport.use(new LocalStrategy((username: string, password: string, callback: Function) => {
|
||||
UserDB.findOne({
|
||||
'username': username
|
||||
}, (err, user) => {
|
||||
if (err) {
|
||||
return callback(err)
|
||||
} else if (!user) {
|
||||
return callback(null, false)
|
||||
} else if (!user.validPassword(password)) {
|
||||
return callback(null, false)
|
||||
}
|
||||
return callback(null, user)
|
||||
})
|
||||
}))
|
||||
|
||||
passport.serializeUser((user: UserModel, callback: Function) => {
|
||||
callback(null, user.id)
|
||||
})
|
||||
|
||||
passport.deserializeUser((id: mongoose.Types.ObjectId, callback: Function) => {
|
||||
UserDB.findById(id, (err, user) => {
|
||||
callback(err, user)
|
||||
})
|
||||
})
|
||||
|
||||
Routes.init(app, passport)
|
||||
|
||||
if (app.get('env') == 'production') {
|
||||
Logging.init(`${__dirname}/..`)
|
||||
}
|
||||
|
||||
const port = process.env.PORT
|
||||
|
||||
app.listen(port, () => {
|
||||
process.stdout.write(`Listening on port ${port}\n`)
|
||||
})
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
import { Application } from "express"
|
||||
import { PassportStatic } from "passport"
|
||||
import UserDB from '../models/user.model'
|
||||
|
||||
export const init = (app: Application, passport: PassportStatic) => {
|
||||
app.get('/login', (req, res) => {
|
||||
if (req.isAuthenticated()) {
|
||||
res.redirect('/')
|
||||
} else {
|
||||
if (req.query.origin) {
|
||||
req.session!.returnTo = req.query.origin
|
||||
}
|
||||
res.render('login')
|
||||
}
|
||||
})
|
||||
|
||||
app.get('/logout', (req, res) => {
|
||||
req.logout()
|
||||
res.redirect('/login')
|
||||
})
|
||||
|
||||
app.post('/login', passport.authenticate('local', {
|
||||
failureRedirect: '/login?error'
|
||||
}), async (req, res) => {
|
||||
/* Don't keep the pass reset id if the user can log in... */
|
||||
if (req.session?.returnTo) {
|
||||
res.redirect(req.session.returnTo)
|
||||
} else {
|
||||
res.redirect('/')
|
||||
}
|
||||
})
|
||||
|
||||
app.get('/register', async (req, res) => {
|
||||
res.render('register')
|
||||
})
|
||||
|
||||
app.post('/register', async (req, res) => {
|
||||
const exUser = await UserDB.findOne({
|
||||
'username': req.body.username
|
||||
})
|
||||
if (exUser) {
|
||||
res.redirect('/register?exists')
|
||||
} else {
|
||||
let user = new UserDB()
|
||||
user.username = req.body.username
|
||||
user.password = user.generateHash(req.body.password)
|
||||
user.configs = Array()
|
||||
await user.save()
|
||||
|
||||
req.logIn(user, () => {
|
||||
res.redirect('/')
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
import { Application } from "express"
|
||||
import { PassportStatic } from "passport"
|
||||
import shortid from 'shortid'
|
||||
import ConfigDB from '../models/config.model'
|
||||
import * as Auth from './auth'
|
||||
|
||||
export const init = (app: Application, passport: PassportStatic) => {
|
||||
app.get('/', async (req, res) => {
|
||||
res.render('home', {
|
||||
user: req.isAuthenticated && req.user ? req.user : null
|
||||
})
|
||||
})
|
||||
|
||||
app.put('/', async (req, res) => {
|
||||
try {
|
||||
const conf = new ConfigDB()
|
||||
conf.json = req.body.json
|
||||
|
||||
await conf.save()
|
||||
|
||||
if (req.isAuthenticated() && req.user) {
|
||||
req.user.configs.push(
|
||||
conf.shortid
|
||||
)
|
||||
await req.user.save()
|
||||
}
|
||||
res.status(200).send(conf)
|
||||
} catch (ex) {
|
||||
res.status(500).send({
|
||||
error: ex
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
app.get('/configs', async (req, res) => {
|
||||
if (req.isAuthenticated() && req.user) {
|
||||
res.render('configs', {
|
||||
user: req.user
|
||||
})
|
||||
} else {
|
||||
res.redirect('/login?origin=/configs')
|
||||
}
|
||||
})
|
||||
|
||||
app.post('/configs', async (req, res) => {
|
||||
if (req.isAuthenticated() && req.user) {
|
||||
res.json(req.user.configs)
|
||||
} else {
|
||||
res.json([])
|
||||
}
|
||||
})
|
||||
|
||||
app.get('/configs/:id', async (req, res) => {
|
||||
const conf = await ConfigDB.findOne({
|
||||
shortid: req.params.id
|
||||
})
|
||||
if (conf) {
|
||||
res.json(conf.json)
|
||||
} else {
|
||||
res.status(404).end()
|
||||
}
|
||||
})
|
||||
|
||||
Auth.init(app, passport)
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
import fs from 'fs'
|
||||
|
||||
export const init = (baseDir: string) => {
|
||||
if (!fs.existsSync(`${baseDir}/logs`)) {
|
||||
fs.mkdirSync(`${baseDir}/logs`)
|
||||
}
|
||||
|
||||
let date = new Date()
|
||||
|
||||
let logs: fs.WriteStream | null = null
|
||||
let errs: fs.WriteStream | null = null
|
||||
|
||||
console.log = (item: any) => {
|
||||
if (!logs) {
|
||||
logs = fs.createWriteStream(baseDir + `/logs/logs-${date.toISOString()}.log`, { flags: 'a' })
|
||||
}
|
||||
|
||||
logs.write(`[${new Date().toISOString()}]: ${item}\n`)
|
||||
}
|
||||
|
||||
console.error = (item: any) => {
|
||||
if (!errs) {
|
||||
errs = fs.createWriteStream(baseDir + `/logs/errors-${date.toISOString()}.log`, { flags: 'a' })
|
||||
}
|
||||
|
||||
errs.write(`[${new Date().toISOString()}]: ${item}\n`)
|
||||
}
|
||||
}
|
||||
|
|
@ -1,100 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Geolosys Configurator</title>
|
||||
|
||||
<link rel="shortcut icon" href="/assets/img/logo.png" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="/Libraries/font-awesome/css/all.min.css">
|
||||
<link rel="stylesheet" href="/Libraries/bootstrap/css/bootstrap.css">
|
||||
<link rel="stylesheet" href="/assets/css/base.css">
|
||||
|
||||
<script src="/Libraries/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="/assets/js/configs.js"></script>
|
||||
</head>
|
||||
|
||||
<body class="fade">
|
||||
<nav class="navbar navbar-expand-lg navbar-dark sticky-top bg-dark">
|
||||
<div class="container-fluid">
|
||||
<a href="/" class="navbar-brand">
|
||||
<span>
|
||||
<img width="24" src="/assets/img/logo.png"> Configurator
|
||||
</span>
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav mr-auto mb-2 mb-lg-0">
|
||||
<li class="nav-item">
|
||||
<a href="/" class="nav-link">
|
||||
<span>
|
||||
<i class="far fa-plus-square"></i> Create
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<% if(user) {%>
|
||||
<li class="nav-item">
|
||||
<a href="/configs" class="nav-link active">
|
||||
<span>
|
||||
<b>{ }</b> Your Configs
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
<li class="nav-item">
|
||||
<% if(user) {%>
|
||||
<a href="/logout" class="nav-link">
|
||||
<span>
|
||||
<i class="fas fa-sign-out-alt"></i> Log Out
|
||||
</span>
|
||||
</a>
|
||||
<% } else { %>
|
||||
<a href="/login" class="nav-link">
|
||||
<span>
|
||||
<i class="fas fa-sign-in-alt"></i> Log In
|
||||
</span>
|
||||
</a>
|
||||
<% } %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="text-center d-block">
|
||||
<img class="header" src="/assets/img/logo.png">
|
||||
<h4>Your Geolosys Configs</h4>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<table class="table m-auto" style="width: 90vw; max-width: 512px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">Config</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="config-body">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<nav class="navbar fixed-bottom navbar-light bg-light">
|
||||
<h6 class="text-center w-100">
|
||||
Made with 💙 by
|
||||
<a href="https://oitsjustjose.com/">oitsjustjose</a>
|
||||
</h6>
|
||||
<div class="text-center w-100">
|
||||
Source Code Hosted on
|
||||
<a href="https://github.com/oitsjustjose/geolosys-config-generator" target="_blank">GitHub</a>
|
||||
</div>
|
||||
</nav>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -1,135 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Geolosys Configurator</title>
|
||||
|
||||
<link rel="shortcut icon" href="/assets/img/logo.png" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="/Libraries/font-awesome/css/all.min.css">
|
||||
<link rel="stylesheet" href="/Libraries/bootstrap/css/bootstrap.css">
|
||||
<link rel="stylesheet" href="/assets/css/base.css">
|
||||
|
||||
<script src="/Libraries/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
<script type="module" src="/assets/js/modules/util.module.js"></script>
|
||||
<script type="module" src="/assets/js/modules/parser/ore.module.js"></script>
|
||||
<script type="module" src="/assets/js/modules/parser/stone.module.js"></script>
|
||||
<script type="module" src="/assets/js/modules/events.module.js"></script>
|
||||
<script type="module" src="/assets/js/modules/renderer/components.module.js"></script>
|
||||
<script type="module" src="/assets/js/modules/renderer/ore.module.js"></script>
|
||||
<script type="module" src="/assets/js/modules/renderer/stone.module.js"></script>
|
||||
<script type="module" src="/assets/js/modules/init.module.js"></script>
|
||||
</head>
|
||||
|
||||
<body class="fade">
|
||||
<nav class="navbar navbar-expand-lg navbar-dark sticky-top bg-dark">
|
||||
<div class="container-fluid">
|
||||
<a href="/" class="navbar-brand">
|
||||
<span>
|
||||
<img width="24" src="/assets/img/logo.png"> Configurator
|
||||
</span>
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav mr-auto mb-2 mb-lg-0">
|
||||
<li class="nav-item">
|
||||
<a href="/" class="nav-link active">
|
||||
<span>
|
||||
<i class="far fa-plus-square"></i> Create
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<% if(user) {%>
|
||||
<li class="nav-item">
|
||||
<a href="/configs" class="nav-link">
|
||||
<span>
|
||||
<b>{ }</b> Your Configs
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
<li class="nav-item">
|
||||
<% if(user) {%>
|
||||
<a href="/logout" class="nav-link">
|
||||
<span>
|
||||
<i class="fas fa-sign-out-alt"></i> Log Out
|
||||
</span>
|
||||
</a>
|
||||
<% } else { %>
|
||||
<a href="/login" class="nav-link">
|
||||
<span>
|
||||
<i class="fas fa-sign-in-alt"></i> Log In
|
||||
</span>
|
||||
</a>
|
||||
<% } %>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<div class="form-check form-switch align-bottom mt-2">
|
||||
<input class="form-check-input" type="checkbox" id="switch-112-mode">
|
||||
<label class="form-check-label text-white" for="switch-112-mode">Using MC 1.14+</label>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="text-center d-block">
|
||||
<img class="header" src="/assets/img/logo.png">
|
||||
<h4>Geolosys Deposit Configurator</h4>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<h4>Ores</h4>
|
||||
<div class="accordion mb-4" id="oreconfig">
|
||||
</div>
|
||||
|
||||
<h4>Stones</h4>
|
||||
<div class="accordion mb-4" id="stoneconfig">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary m-auto mb-3 d-block" id="generate-btn">
|
||||
Generate
|
||||
</button>
|
||||
|
||||
<nav class="navbar fixed-bottom navbar-light bg-light">
|
||||
<h6 class="text-center w-100">
|
||||
Made with 💙 by
|
||||
<a href="https://oitsjustjose.com/">oitsjustjose</a>
|
||||
</h6>
|
||||
<div class="text-center w-100">
|
||||
Source Code Hosted on
|
||||
<a href="https://github.com/oitsjustjose/geolosys-config-generator" target="_blank">GitHub</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="modal fade" tabindex="-1" id="notification">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
new bootstrap.Modal(document.getElementById('notification'));
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Geolosys Configurator Login</title>
|
||||
|
||||
<link rel="shortcut icon" href="/assets/img/logo.png" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="/Libraries/font-awesome/css/all.min.css">
|
||||
<link rel="stylesheet" href="/Libraries/bootstrap/css/bootstrap.css">
|
||||
<link rel="stylesheet" href="/assets/css/base.css">
|
||||
|
||||
<script src="/Libraries/bootstrap/js/bootstrap.js"></script>
|
||||
<script src="/assets/js/login.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark sticky-top bg-dark">
|
||||
<div class="container-fluid">
|
||||
<a href="/" class="navbar-brand">
|
||||
<span>
|
||||
<img width="24" src="/assets/img/logo.png"> Configurator
|
||||
</span>
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav mr-auto mb-2 mb-lg-0">
|
||||
<li class="nav-item">
|
||||
<a href="/" class="nav-link">
|
||||
<span>
|
||||
<i class="far fa-plus-square"></i> Create
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/register" class="nav-link">
|
||||
<span>
|
||||
<i class="fas fa-user-plus"></i> Register
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container d-flex flex-column justify-content-center"
|
||||
style="width: 98vw; height: 90vh; max-width: 768px; max-height: 90vh">
|
||||
<div class="d-block text-center header">
|
||||
<h2>
|
||||
Geolosys Configurator Login
|
||||
</h2>
|
||||
</div>
|
||||
<form action="/login" method="POST">
|
||||
<div class="mb-3">
|
||||
<label for="username" class="form-label">Username</label>
|
||||
<input type="text" class="form-control" name="username" id="username">
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">Password</label>
|
||||
<input type="password" class="form-control" name="password" id="password">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Log In</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" tabindex="-1" id="notification">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -1,107 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Geolosys Configurator Login</title>
|
||||
|
||||
<link rel="shortcut icon" href="/assets/img/logo.png" type="image/x-icon">
|
||||
|
||||
<link rel="stylesheet" href="/Libraries/font-awesome/css/all.min.css">
|
||||
<link rel="stylesheet" href="/Libraries/bootstrap/css/bootstrap.css">
|
||||
<link rel="stylesheet" href="/assets/css/base.css">
|
||||
|
||||
<script src="/Libraries/bootstrap/js/bootstrap.js"></script>
|
||||
<script src="/assets/js/register.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark sticky-top bg-dark">
|
||||
<div class="container-fluid">
|
||||
<a href="/" class="navbar-brand">
|
||||
<span>
|
||||
<img width="24" src="/assets/img/logo.png"> Configurator
|
||||
</span>
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
|
||||
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav mr-auto mb-2 mb-lg-0">
|
||||
<li class="nav-item">
|
||||
<a href="/" class="nav-link">
|
||||
<span>
|
||||
<i class="far fa-plus-square"></i> Create
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/login" class="nav-link">
|
||||
<span>
|
||||
<i class="fas fa-sign-in-alt"></i> Log In
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container d-flex flex-column justify-content-center last"
|
||||
style="width: 98vw; height: 90vh; max-width: 768px; max-height: 90vh">
|
||||
<div class="d-block text-center header">
|
||||
<h2>
|
||||
Geolosys Configurator Account Registration
|
||||
</h2>
|
||||
</div>
|
||||
<form action="/register" method="POST">
|
||||
<div class="mb-3">
|
||||
<label for="username" class="form-label">Username</label>
|
||||
<input type="text" class="form-control" name="username" id="username" oninput="checkUsername(this)"
|
||||
required>
|
||||
<div class="invalid-feedback">
|
||||
Password Must Be At Least 6 Characters
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">Password</label>
|
||||
<input type="password" class="form-control" name="password" id="password" oninput="checkPass(this)"
|
||||
required>
|
||||
<div class="invalid-feedback">
|
||||
Password Must Be At Least 8 Characters
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">Confirm Password</label>
|
||||
<input type="password" class="form-control" name="password-conf" id="password-conf"
|
||||
oninput="checkPassConf(this)" required>
|
||||
<div class="invalid-feedback">
|
||||
Passwords Must Match
|
||||
</div>
|
||||
</div>
|
||||
<button id="register-btn" type="submit" class="btn btn-primary"
|
||||
onclick="location.href = '/register'">Register</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" tabindex="-1" id="notification">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
3952
src/public/Libraries/bootstrap/css/bootstrap-grid.css
vendored
3952
src/public/Libraries/bootstrap/css/bootstrap-grid.css
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,426 +0,0 @@
|
|||
/*!
|
||||
* Bootstrap Reboot v5.0.0-alpha1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors
|
||||
* Copyright 2011-2020 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
color: #212529;
|
||||
background-color: #fff;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
[tabindex="-1"]:focus:not(:focus-visible) {
|
||||
outline: 0 !important;
|
||||
}
|
||||
|
||||
hr {
|
||||
margin: 1rem 0;
|
||||
color: inherit;
|
||||
background-color: currentColor;
|
||||
border: 0;
|
||||
opacity: 0.25;
|
||||
}
|
||||
|
||||
hr:not([size]) {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-weight: 500;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: calc(1.375rem + 1.5vw);
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: calc(1.325rem + 0.9vw);
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
h2 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: calc(1.3rem + 0.6vw);
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
h3 {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
h4 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
abbr[title],
|
||||
abbr[data-original-title] {
|
||||
text-decoration: underline;
|
||||
-webkit-text-decoration: underline dotted;
|
||||
text-decoration: underline dotted;
|
||||
cursor: help;
|
||||
-webkit-text-decoration-skip-ink: none;
|
||||
text-decoration-skip-ink: none;
|
||||
}
|
||||
|
||||
address {
|
||||
margin-bottom: 1rem;
|
||||
font-style: normal;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul {
|
||||
padding-left: 2rem;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
dl {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ul,
|
||||
ol ul,
|
||||
ul ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-bottom: .5rem;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
mark {
|
||||
padding: 0.2em;
|
||||
background-color: #fcf8e3;
|
||||
}
|
||||
|
||||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
font-size: 0.75em;
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -.5em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0d6efd;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #024dbc;
|
||||
}
|
||||
|
||||
a:not([href]):not([class]), a:not([href]):not([class]):hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
pre {
|
||||
display: block;
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
overflow: auto;
|
||||
font-size: 0.875em;
|
||||
-ms-overflow-style: scrollbar;
|
||||
}
|
||||
|
||||
pre code {
|
||||
font-size: inherit;
|
||||
color: inherit;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: 0.875em;
|
||||
color: #d63384;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
a > code {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
kbd {
|
||||
padding: 0.2rem 0.4rem;
|
||||
font-size: 0.875em;
|
||||
color: #fff;
|
||||
background-color: #212529;
|
||||
border-radius: 0.2rem;
|
||||
}
|
||||
|
||||
kbd kbd {
|
||||
padding: 0;
|
||||
font-size: 1em;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
img,
|
||||
svg {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table {
|
||||
caption-side: bottom;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
caption {
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
color: #6c757d;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: inherit;
|
||||
text-align: -webkit-match-parent;
|
||||
}
|
||||
|
||||
thead,
|
||||
tbody,
|
||||
tfoot,
|
||||
tr,
|
||||
td,
|
||||
th {
|
||||
border-color: inherit;
|
||||
border-style: solid;
|
||||
border-width: 0;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button:focus {
|
||||
outline: 1px dotted;
|
||||
outline: 5px auto -webkit-focus-ring-color;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
optgroup,
|
||||
textarea {
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
button,
|
||||
input {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
[role="button"] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
select {
|
||||
word-wrap: normal;
|
||||
}
|
||||
|
||||
[list]::-webkit-calendar-picker-indicator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
button,
|
||||
[type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
button:not(:disabled),
|
||||
[type="button"]:not(:disabled),
|
||||
[type="reset"]:not(:disabled),
|
||||
[type="submit"]:not(:disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
legend {
|
||||
float: left;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
line-height: inherit;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
legend {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
legend + * {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
::-webkit-datetime-edit-fields-wrapper,
|
||||
::-webkit-datetime-edit-text,
|
||||
::-webkit-datetime-edit-minute,
|
||||
::-webkit-datetime-edit-hour-field,
|
||||
::-webkit-datetime-edit-day-field,
|
||||
::-webkit-datetime-edit-month-field,
|
||||
::-webkit-datetime-edit-year-field {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::-webkit-inner-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
[type="search"] {
|
||||
outline-offset: -2px;
|
||||
-webkit-appearance: textfield;
|
||||
}
|
||||
|
||||
::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
::-webkit-color-swatch-wrapper {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
output {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
iframe {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
/*# sourceMappingURL=bootstrap-reboot.css.map */
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,8 +0,0 @@
|
|||
/*!
|
||||
* Bootstrap Reboot v5.0.0-alpha1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors
|
||||
* Copyright 2011-2020 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/*,::after,::before{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#024dbc}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em;-ms-overflow-style:scrollbar}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[list]::-webkit-calendar-picker-indicator{display:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit;white-space:normal}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}
|
||||
/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
9729
src/public/Libraries/bootstrap/css/bootstrap.css
vendored
9729
src/public/Libraries/bootstrap/css/bootstrap.css
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
7678
src/public/Libraries/bootstrap/js/bootstrap.bundle.js
vendored
7678
src/public/Libraries/bootstrap/js/bootstrap.bundle.js
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
5038
src/public/Libraries/bootstrap/js/bootstrap.esm.js
vendored
5038
src/public/Libraries/bootstrap/js/bootstrap.esm.js
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
5066
src/public/Libraries/bootstrap/js/bootstrap.js
vendored
5066
src/public/Libraries/bootstrap/js/bootstrap.js
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4586
src/public/Libraries/font-awesome/css/all.css
vendored
4586
src/public/Libraries/font-awesome/css/all.css
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
15
src/public/Libraries/font-awesome/css/brands.css
vendored
15
src/public/Libraries/font-awesome/css/brands.css
vendored
|
|
@ -1,15 +0,0 @@
|
|||
/*!
|
||||
* Font Awesome Free 5.13.1 by @fontawesome - https://fontawesome.com
|
||||
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
||||
*/
|
||||
@font-face {
|
||||
font-family: 'Font Awesome 5 Brands';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: block;
|
||||
src: url("../webfonts/fa-brands-400.eot");
|
||||
src: url("../webfonts/fa-brands-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-brands-400.woff2") format("woff2"), url("../webfonts/fa-brands-400.woff") format("woff"), url("../webfonts/fa-brands-400.ttf") format("truetype"), url("../webfonts/fa-brands-400.svg#fontawesome") format("svg"); }
|
||||
|
||||
.fab {
|
||||
font-family: 'Font Awesome 5 Brands';
|
||||
font-weight: 400; }
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
/*!
|
||||
* Font Awesome Free 5.13.1 by @fontawesome - https://fontawesome.com
|
||||
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
||||
*/
|
||||
@font-face{font-family:"Font Awesome 5 Brands";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-brands-400.eot);src:url(../webfonts/fa-brands-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-brands-400.woff2) format("woff2"),url(../webfonts/fa-brands-400.woff) format("woff"),url(../webfonts/fa-brands-400.ttf) format("truetype"),url(../webfonts/fa-brands-400.svg#fontawesome) format("svg")}.fab{font-family:"Font Awesome 5 Brands";font-weight:400}
|
||||
4552
src/public/Libraries/font-awesome/css/fontawesome.css
vendored
4552
src/public/Libraries/font-awesome/css/fontawesome.css
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
|
|
@ -1,15 +0,0 @@
|
|||
/*!
|
||||
* Font Awesome Free 5.13.1 by @fontawesome - https://fontawesome.com
|
||||
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
||||
*/
|
||||
@font-face {
|
||||
font-family: 'Font Awesome 5 Free';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: block;
|
||||
src: url("../webfonts/fa-regular-400.eot");
|
||||
src: url("../webfonts/fa-regular-400.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-regular-400.woff2") format("woff2"), url("../webfonts/fa-regular-400.woff") format("woff"), url("../webfonts/fa-regular-400.ttf") format("truetype"), url("../webfonts/fa-regular-400.svg#fontawesome") format("svg"); }
|
||||
|
||||
.far {
|
||||
font-family: 'Font Awesome 5 Free';
|
||||
font-weight: 400; }
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
/*!
|
||||
* Font Awesome Free 5.13.1 by @fontawesome - https://fontawesome.com
|
||||
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
||||
*/
|
||||
@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:400;font-display:block;src:url(../webfonts/fa-regular-400.eot);src:url(../webfonts/fa-regular-400.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-regular-400.woff2) format("woff2"),url(../webfonts/fa-regular-400.woff) format("woff"),url(../webfonts/fa-regular-400.ttf) format("truetype"),url(../webfonts/fa-regular-400.svg#fontawesome) format("svg")}.far{font-family:"Font Awesome 5 Free";font-weight:400}
|
||||
16
src/public/Libraries/font-awesome/css/solid.css
vendored
16
src/public/Libraries/font-awesome/css/solid.css
vendored
|
|
@ -1,16 +0,0 @@
|
|||
/*!
|
||||
* Font Awesome Free 5.13.1 by @fontawesome - https://fontawesome.com
|
||||
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
||||
*/
|
||||
@font-face {
|
||||
font-family: 'Font Awesome 5 Free';
|
||||
font-style: normal;
|
||||
font-weight: 900;
|
||||
font-display: block;
|
||||
src: url("../webfonts/fa-solid-900.eot");
|
||||
src: url("../webfonts/fa-solid-900.eot?#iefix") format("embedded-opentype"), url("../webfonts/fa-solid-900.woff2") format("woff2"), url("../webfonts/fa-solid-900.woff") format("woff"), url("../webfonts/fa-solid-900.ttf") format("truetype"), url("../webfonts/fa-solid-900.svg#fontawesome") format("svg"); }
|
||||
|
||||
.fa,
|
||||
.fas {
|
||||
font-family: 'Font Awesome 5 Free';
|
||||
font-weight: 900; }
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
/*!
|
||||
* Font Awesome Free 5.13.1 by @fontawesome - https://fontawesome.com
|
||||
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
||||
*/
|
||||
@font-face{font-family:"Font Awesome 5 Free";font-style:normal;font-weight:900;font-display:block;src:url(../webfonts/fa-solid-900.eot);src:url(../webfonts/fa-solid-900.eot?#iefix) format("embedded-opentype"),url(../webfonts/fa-solid-900.woff2) format("woff2"),url(../webfonts/fa-solid-900.woff) format("woff"),url(../webfonts/fa-solid-900.ttf) format("truetype"),url(../webfonts/fa-solid-900.svg#fontawesome) format("svg")}.fa,.fas{font-family:"Font Awesome 5 Free";font-weight:900}
|
||||
|
|
@ -1,371 +0,0 @@
|
|||
/*!
|
||||
* Font Awesome Free 5.13.1 by @fontawesome - https://fontawesome.com
|
||||
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
||||
*/
|
||||
svg:not(:root).svg-inline--fa {
|
||||
overflow: visible; }
|
||||
|
||||
.svg-inline--fa {
|
||||
display: inline-block;
|
||||
font-size: inherit;
|
||||
height: 1em;
|
||||
overflow: visible;
|
||||
vertical-align: -.125em; }
|
||||
.svg-inline--fa.fa-lg {
|
||||
vertical-align: -.225em; }
|
||||
.svg-inline--fa.fa-w-1 {
|
||||
width: 0.0625em; }
|
||||
.svg-inline--fa.fa-w-2 {
|
||||
width: 0.125em; }
|
||||
.svg-inline--fa.fa-w-3 {
|
||||
width: 0.1875em; }
|
||||
.svg-inline--fa.fa-w-4 {
|
||||
width: 0.25em; }
|
||||
.svg-inline--fa.fa-w-5 {
|
||||
width: 0.3125em; }
|
||||
.svg-inline--fa.fa-w-6 {
|
||||
width: 0.375em; }
|
||||
.svg-inline--fa.fa-w-7 {
|
||||
width: 0.4375em; }
|
||||
.svg-inline--fa.fa-w-8 {
|
||||
width: 0.5em; }
|
||||
.svg-inline--fa.fa-w-9 {
|
||||
width: 0.5625em; }
|
||||
.svg-inline--fa.fa-w-10 {
|
||||
width: 0.625em; }
|
||||
.svg-inline--fa.fa-w-11 {
|
||||
width: 0.6875em; }
|
||||
.svg-inline--fa.fa-w-12 {
|
||||
width: 0.75em; }
|
||||
.svg-inline--fa.fa-w-13 {
|
||||
width: 0.8125em; }
|
||||
.svg-inline--fa.fa-w-14 {
|
||||
width: 0.875em; }
|
||||
.svg-inline--fa.fa-w-15 {
|
||||
width: 0.9375em; }
|
||||
.svg-inline--fa.fa-w-16 {
|
||||
width: 1em; }
|
||||
.svg-inline--fa.fa-w-17 {
|
||||
width: 1.0625em; }
|
||||
.svg-inline--fa.fa-w-18 {
|
||||
width: 1.125em; }
|
||||
.svg-inline--fa.fa-w-19 {
|
||||
width: 1.1875em; }
|
||||
.svg-inline--fa.fa-w-20 {
|
||||
width: 1.25em; }
|
||||
.svg-inline--fa.fa-pull-left {
|
||||
margin-right: .3em;
|
||||
width: auto; }
|
||||
.svg-inline--fa.fa-pull-right {
|
||||
margin-left: .3em;
|
||||
width: auto; }
|
||||
.svg-inline--fa.fa-border {
|
||||
height: 1.5em; }
|
||||
.svg-inline--fa.fa-li {
|
||||
width: 2em; }
|
||||
.svg-inline--fa.fa-fw {
|
||||
width: 1.25em; }
|
||||
|
||||
.fa-layers svg.svg-inline--fa {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
margin: auto;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0; }
|
||||
|
||||
.fa-layers {
|
||||
display: inline-block;
|
||||
height: 1em;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
vertical-align: -.125em;
|
||||
width: 1em; }
|
||||
.fa-layers svg.svg-inline--fa {
|
||||
-webkit-transform-origin: center center;
|
||||
transform-origin: center center; }
|
||||
|
||||
.fa-layers-text, .fa-layers-counter {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
text-align: center; }
|
||||
|
||||
.fa-layers-text {
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
-webkit-transform: translate(-50%, -50%);
|
||||
transform: translate(-50%, -50%);
|
||||
-webkit-transform-origin: center center;
|
||||
transform-origin: center center; }
|
||||
|
||||
.fa-layers-counter {
|
||||
background-color: #ff253a;
|
||||
border-radius: 1em;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
height: 1.5em;
|
||||
line-height: 1;
|
||||
max-width: 5em;
|
||||
min-width: 1.5em;
|
||||
overflow: hidden;
|
||||
padding: .25em;
|
||||
right: 0;
|
||||
text-overflow: ellipsis;
|
||||
top: 0;
|
||||
-webkit-transform: scale(0.25);
|
||||
transform: scale(0.25);
|
||||
-webkit-transform-origin: top right;
|
||||
transform-origin: top right; }
|
||||
|
||||
.fa-layers-bottom-right {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
top: auto;
|
||||
-webkit-transform: scale(0.25);
|
||||
transform: scale(0.25);
|
||||
-webkit-transform-origin: bottom right;
|
||||
transform-origin: bottom right; }
|
||||
|
||||
.fa-layers-bottom-left {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: auto;
|
||||
top: auto;
|
||||
-webkit-transform: scale(0.25);
|
||||
transform: scale(0.25);
|
||||
-webkit-transform-origin: bottom left;
|
||||
transform-origin: bottom left; }
|
||||
|
||||
.fa-layers-top-right {
|
||||
right: 0;
|
||||
top: 0;
|
||||
-webkit-transform: scale(0.25);
|
||||
transform: scale(0.25);
|
||||
-webkit-transform-origin: top right;
|
||||
transform-origin: top right; }
|
||||
|
||||
.fa-layers-top-left {
|
||||
left: 0;
|
||||
right: auto;
|
||||
top: 0;
|
||||
-webkit-transform: scale(0.25);
|
||||
transform: scale(0.25);
|
||||
-webkit-transform-origin: top left;
|
||||
transform-origin: top left; }
|
||||
|
||||
.fa-lg {
|
||||
font-size: 1.33333em;
|
||||
line-height: 0.75em;
|
||||
vertical-align: -.0667em; }
|
||||
|
||||
.fa-xs {
|
||||
font-size: .75em; }
|
||||
|
||||
.fa-sm {
|
||||
font-size: .875em; }
|
||||
|
||||
.fa-1x {
|
||||
font-size: 1em; }
|
||||
|
||||
.fa-2x {
|
||||
font-size: 2em; }
|
||||
|
||||
.fa-3x {
|
||||
font-size: 3em; }
|
||||
|
||||
.fa-4x {
|
||||
font-size: 4em; }
|
||||
|
||||
.fa-5x {
|
||||
font-size: 5em; }
|
||||
|
||||
.fa-6x {
|
||||
font-size: 6em; }
|
||||
|
||||
.fa-7x {
|
||||
font-size: 7em; }
|
||||
|
||||
.fa-8x {
|
||||
font-size: 8em; }
|
||||
|
||||
.fa-9x {
|
||||
font-size: 9em; }
|
||||
|
||||
.fa-10x {
|
||||
font-size: 10em; }
|
||||
|
||||
.fa-fw {
|
||||
text-align: center;
|
||||
width: 1.25em; }
|
||||
|
||||
.fa-ul {
|
||||
list-style-type: none;
|
||||
margin-left: 2.5em;
|
||||
padding-left: 0; }
|
||||
.fa-ul > li {
|
||||
position: relative; }
|
||||
|
||||
.fa-li {
|
||||
left: -2em;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
width: 2em;
|
||||
line-height: inherit; }
|
||||
|
||||
.fa-border {
|
||||
border: solid 0.08em #eee;
|
||||
border-radius: .1em;
|
||||
padding: .2em .25em .15em; }
|
||||
|
||||
.fa-pull-left {
|
||||
float: left; }
|
||||
|
||||
.fa-pull-right {
|
||||
float: right; }
|
||||
|
||||
.fa.fa-pull-left,
|
||||
.fas.fa-pull-left,
|
||||
.far.fa-pull-left,
|
||||
.fal.fa-pull-left,
|
||||
.fab.fa-pull-left {
|
||||
margin-right: .3em; }
|
||||
|
||||
.fa.fa-pull-right,
|
||||
.fas.fa-pull-right,
|
||||
.far.fa-pull-right,
|
||||
.fal.fa-pull-right,
|
||||
.fab.fa-pull-right {
|
||||
margin-left: .3em; }
|
||||
|
||||
.fa-spin {
|
||||
-webkit-animation: fa-spin 2s infinite linear;
|
||||
animation: fa-spin 2s infinite linear; }
|
||||
|
||||
.fa-pulse {
|
||||
-webkit-animation: fa-spin 1s infinite steps(8);
|
||||
animation: fa-spin 1s infinite steps(8); }
|
||||
|
||||
@-webkit-keyframes fa-spin {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg); }
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg); } }
|
||||
|
||||
@keyframes fa-spin {
|
||||
0% {
|
||||
-webkit-transform: rotate(0deg);
|
||||
transform: rotate(0deg); }
|
||||
100% {
|
||||
-webkit-transform: rotate(360deg);
|
||||
transform: rotate(360deg); } }
|
||||
|
||||
.fa-rotate-90 {
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";
|
||||
-webkit-transform: rotate(90deg);
|
||||
transform: rotate(90deg); }
|
||||
|
||||
.fa-rotate-180 {
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";
|
||||
-webkit-transform: rotate(180deg);
|
||||
transform: rotate(180deg); }
|
||||
|
||||
.fa-rotate-270 {
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";
|
||||
-webkit-transform: rotate(270deg);
|
||||
transform: rotate(270deg); }
|
||||
|
||||
.fa-flip-horizontal {
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";
|
||||
-webkit-transform: scale(-1, 1);
|
||||
transform: scale(-1, 1); }
|
||||
|
||||
.fa-flip-vertical {
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";
|
||||
-webkit-transform: scale(1, -1);
|
||||
transform: scale(1, -1); }
|
||||
|
||||
.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical {
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";
|
||||
-webkit-transform: scale(-1, -1);
|
||||
transform: scale(-1, -1); }
|
||||
|
||||
:root .fa-rotate-90,
|
||||
:root .fa-rotate-180,
|
||||
:root .fa-rotate-270,
|
||||
:root .fa-flip-horizontal,
|
||||
:root .fa-flip-vertical,
|
||||
:root .fa-flip-both {
|
||||
-webkit-filter: none;
|
||||
filter: none; }
|
||||
|
||||
.fa-stack {
|
||||
display: inline-block;
|
||||
height: 2em;
|
||||
position: relative;
|
||||
width: 2.5em; }
|
||||
|
||||
.fa-stack-1x,
|
||||
.fa-stack-2x {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
margin: auto;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0; }
|
||||
|
||||
.svg-inline--fa.fa-stack-1x {
|
||||
height: 1em;
|
||||
width: 1.25em; }
|
||||
|
||||
.svg-inline--fa.fa-stack-2x {
|
||||
height: 2em;
|
||||
width: 2.5em; }
|
||||
|
||||
.fa-inverse {
|
||||
color: #fff; }
|
||||
|
||||
.sr-only {
|
||||
border: 0;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
width: 1px; }
|
||||
|
||||
.sr-only-focusable:active, .sr-only-focusable:focus {
|
||||
clip: auto;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
position: static;
|
||||
width: auto; }
|
||||
|
||||
.svg-inline--fa .fa-primary {
|
||||
fill: var(--fa-primary-color, currentColor);
|
||||
opacity: 1;
|
||||
opacity: var(--fa-primary-opacity, 1); }
|
||||
|
||||
.svg-inline--fa .fa-secondary {
|
||||
fill: var(--fa-secondary-color, currentColor);
|
||||
opacity: 0.4;
|
||||
opacity: var(--fa-secondary-opacity, 0.4); }
|
||||
|
||||
.svg-inline--fa.fa-swap-opacity .fa-primary {
|
||||
opacity: 0.4;
|
||||
opacity: var(--fa-secondary-opacity, 0.4); }
|
||||
|
||||
.svg-inline--fa.fa-swap-opacity .fa-secondary {
|
||||
opacity: 1;
|
||||
opacity: var(--fa-primary-opacity, 1); }
|
||||
|
||||
.svg-inline--fa mask .fa-primary,
|
||||
.svg-inline--fa mask .fa-secondary {
|
||||
fill: black; }
|
||||
|
||||
.fad.fa-inverse {
|
||||
color: #fff; }
|
||||
File diff suppressed because one or more lines are too long
2172
src/public/Libraries/font-awesome/css/v4-shims.css
vendored
2172
src/public/Libraries/font-awesome/css/v4-shims.css
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
Before Width: | Height: | Size: 712 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue