Merge pull request #58 from wulkanowy/feature/replace-react-to-vue-add-login-panel
Replace react to vue and add login panel
This commit is contained in:
commit
dd6a90d8a3
71 changed files with 10158 additions and 12401 deletions
7
.editorconfig
Normal file
7
.editorconfig
Normal file
|
@ -0,0 +1,7 @@
|
|||
[*.{js,jsx,ts,tsx,vue}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
max_line_length = 100
|
2
.github/workflows/frontend.yml
vendored
2
.github/workflows/frontend.yml
vendored
|
@ -9,4 +9,4 @@
|
|||
- name: Install npm
|
||||
run: npm install --prefix frontend
|
||||
- name: Build app
|
||||
run: npm run dev --prefix frontend
|
||||
run: npm run build --prefix frontend
|
||||
|
|
|
@ -29,10 +29,10 @@ python manage.py migrate
|
|||
```sh
|
||||
python manage.py runserver
|
||||
```
|
||||
|
||||
```sh
|
||||
And in frontend:
|
||||
```shell
|
||||
cd frontend
|
||||
npm run dev
|
||||
npm run build
|
||||
```
|
||||
|
||||
# Docker
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"presets": [
|
||||
"@babel/preset-env", "@babel/preset-react"
|
||||
]
|
||||
}
|
3
frontend/.browserslistrc
Normal file
3
frontend/.browserslistrc
Normal file
|
@ -0,0 +1,3 @@
|
|||
> 1%
|
||||
last 2 versions
|
||||
not dead
|
29
frontend/.eslintrc.js
Normal file
29
frontend/.eslintrc.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
node: true,
|
||||
},
|
||||
extends: [
|
||||
'plugin:vue/essential',
|
||||
'@vue/airbnb',
|
||||
'@vue/typescript/recommended',
|
||||
],
|
||||
parserOptions: {
|
||||
ecmaVersion: 2020,
|
||||
},
|
||||
rules: {
|
||||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: [
|
||||
'**/__tests__/*.{j,t}s?(x)',
|
||||
'**/tests/unit/**/*.spec.{j,t}s?(x)',
|
||||
],
|
||||
env: {
|
||||
mocha: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
26
frontend/.gitignore
vendored
Normal file
26
frontend/.gitignore
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
|
||||
/tests/e2e/videos/
|
||||
/tests/e2e/screenshots/
|
||||
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Log files
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
34
frontend/README.md
Normal file
34
frontend/README.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
# frontend
|
||||
|
||||
## Project setup
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
### Compiles and hot-reloads for development
|
||||
```
|
||||
npm run serve
|
||||
```
|
||||
|
||||
### Compiles and minifies for production
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Run your unit tests
|
||||
```
|
||||
npm run test:unit
|
||||
```
|
||||
|
||||
### Run your end-to-end tests
|
||||
```
|
||||
npm run test:e2e
|
||||
```
|
||||
|
||||
### Lints and fixes files
|
||||
```
|
||||
npm run lint
|
||||
```
|
||||
|
||||
### Customize configuration
|
||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
5
frontend/babel.config.js
Normal file
5
frontend/babel.config.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
module.exports = {
|
||||
presets: [
|
||||
'@vue/cli-plugin-babel/preset',
|
||||
],
|
||||
};
|
3
frontend/cypress.json
Normal file
3
frontend/cypress.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"pluginsFile": "tests/e2e/plugins/index.js"
|
||||
}
|
20722
frontend/package-lock.json
generated
20722
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,54 +1,51 @@
|
|||
{
|
||||
"name": "wulkanowy-web",
|
||||
"version": "1.0.0",
|
||||
"description": "🌋 Przeglądarkowy klient dzienniczka VULCAN UONET+ dla ucznia i rodzica",
|
||||
"main": "index.js",
|
||||
"browserslist": [
|
||||
"defaults"
|
||||
],
|
||||
"directories": {
|
||||
"test": "tests"
|
||||
},
|
||||
"name": "frontend",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "webpack --mode development",
|
||||
"build": "webpack --mode production",
|
||||
"watch": "webpack --mode development --watch"
|
||||
"serve": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"test:unit": "vue-cli-service test:unit",
|
||||
"test:e2e": "vue-cli-service test:e2e",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/wulkanowy/wulkanowy-web.git"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"bugs": {
|
||||
"url": "https://github.com/wulkanowy/wulkanowy-web/issues"
|
||||
},
|
||||
"homepage": "https://github.com/wulkanowy/wulkanowy-web#readme",
|
||||
"dependencies": {
|
||||
"@material-ui/core": "^4.11.3",
|
||||
"@material-ui/icons": "^4.11.2",
|
||||
"@types/jest": "^26.0.20",
|
||||
"@types/node": "^14.14.22",
|
||||
"@types/react": "^17.0.1",
|
||||
"@types/react-dom": "^17.0.0",
|
||||
"object-hash": "^2.1.1",
|
||||
"react-scripts": "^4.0.1",
|
||||
"remarkable-react": "^1.4.3",
|
||||
"reverse-md5": "0.0.5"
|
||||
"axios": "^0.21.1",
|
||||
"core-js": "^3.6.5",
|
||||
"register-service-worker": "^1.7.1",
|
||||
"universal-cookie": "^4.0.4",
|
||||
"vue": "^2.6.11",
|
||||
"vue-router": "^3.2.0",
|
||||
"vuetify": "^2.4.0",
|
||||
"vuex": "^3.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.10",
|
||||
"@babel/preset-env": "^7.12.11",
|
||||
"@babel/preset-react": "^7.12.10",
|
||||
"babel-loader": "^8.2.2",
|
||||
"css-loader": "^5.0.1",
|
||||
"react": "^17.0.1",
|
||||
"react-dom": "^17.0.1",
|
||||
"style-loader": "^2.0.0",
|
||||
"ts-loader": "^8.0.14",
|
||||
"typescript": "^4.1.3",
|
||||
"webpack": "^5.17.0",
|
||||
"webpack-cli": "^4.3.1"
|
||||
"@types/chai": "^4.2.11",
|
||||
"@types/mocha": "^5.2.4",
|
||||
"@typescript-eslint/eslint-plugin": "^4.18.0",
|
||||
"@typescript-eslint/parser": "^4.18.0",
|
||||
"@vue/cli-plugin-babel": "~4.5.0",
|
||||
"@vue/cli-plugin-e2e-cypress": "~4.5.0",
|
||||
"@vue/cli-plugin-eslint": "~4.5.0",
|
||||
"@vue/cli-plugin-pwa": "~4.5.0",
|
||||
"@vue/cli-plugin-router": "~4.5.0",
|
||||
"@vue/cli-plugin-typescript": "~4.5.0",
|
||||
"@vue/cli-plugin-unit-mocha": "~4.5.0",
|
||||
"@vue/cli-plugin-vuex": "~4.5.0",
|
||||
"@vue/cli-service": "~4.5.0",
|
||||
"@vue/eslint-config-airbnb": "^5.0.2",
|
||||
"@vue/eslint-config-typescript": "^7.0.0",
|
||||
"@vue/test-utils": "^1.0.3",
|
||||
"chai": "^4.1.2",
|
||||
"eslint": "^6.7.2",
|
||||
"eslint-plugin-import": "^2.20.2",
|
||||
"eslint-plugin-vue": "^6.2.2",
|
||||
"node-sass": "^4.12.0",
|
||||
"sass": "^1.32.0",
|
||||
"sass-loader": "^10.0.0",
|
||||
"typescript": "~4.1.5",
|
||||
"vue-cli-plugin-vuetify": "~2.3.1",
|
||||
"vue-template-compiler": "^2.6.11",
|
||||
"vuetify-loader": "^1.7.0"
|
||||
}
|
||||
}
|
||||
|
|
BIN
frontend/public/favicon.ico
Normal file
BIN
frontend/public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
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">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:400,500,700,400italic|Material+Icons">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
2
frontend/public/robots.txt
Normal file
2
frontend/public/robots.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
User-agent: *
|
||||
Disallow:
|
|
@ -1 +0,0 @@
|
|||
import Content from "./components/AccountManager";
|
13
frontend/src/App.vue
Normal file
13
frontend/src/App.vue
Normal file
|
@ -0,0 +1,13 @@
|
|||
<template>
|
||||
<v-app>
|
||||
<router-view></router-view>
|
||||
</v-app>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
|
||||
export default Vue.extend({
|
||||
name: 'App',
|
||||
});
|
||||
</script>
|
25
frontend/src/api/login.ts
Normal file
25
frontend/src/api/login.ts
Normal file
|
@ -0,0 +1,25 @@
|
|||
import axios, { AxiosResponse } from 'axios';
|
||||
import Cookies from 'universal-cookie';
|
||||
|
||||
export default {
|
||||
register: async (email: string, password: string, symbol: string): Promise<AxiosResponse> => {
|
||||
const cookies = new Cookies();
|
||||
const response = await axios({
|
||||
method: 'post',
|
||||
url: 'http://localhost:8000/api/login',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRFToken': cookies.get('csrf-token'),
|
||||
},
|
||||
data: {
|
||||
loginName: email,
|
||||
Password: password,
|
||||
Symbol: symbol,
|
||||
diaryUrl: 'http://cufs.fakelog.cf/',
|
||||
},
|
||||
});
|
||||
|
||||
document.cookie = response.headers['Set-Cookie'];
|
||||
return response;
|
||||
},
|
||||
};
|
129
frontend/src/assets/logo_login.svg
Normal file
129
frontend/src/assets/logo_login.svg
Normal file
|
@ -0,0 +1,129 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
height="1024"
|
||||
width="3584"
|
||||
xml:space="preserve"
|
||||
viewBox="0 0 3584 1024"
|
||||
y="0px"
|
||||
x="0px"
|
||||
id="Layer_1"
|
||||
version="1.1"
|
||||
sodipodi:docname="wulkanowy-full-flat.svg"
|
||||
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
id="namedview25"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.33928571"
|
||||
inkscape:cx="1860.4549"
|
||||
inkscape:cy="586.56969"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="text8460" /><metadata
|
||||
id="metadata15"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs13" /><style
|
||||
id="style2"
|
||||
type="text/css">
|
||||
.st0{fill:#D32F2F;}
|
||||
.st1{fill:#AD2A2A;}
|
||||
.st2{fill:#FFFFFF;}
|
||||
</style><g
|
||||
style="display:none"
|
||||
id="layer4"><rect
|
||||
style="display:inline;fill:#d32f2f;stroke-width:1.02195609"
|
||||
height="1024"
|
||||
width="3584"
|
||||
class="st0"
|
||||
y="0"
|
||||
x="0"
|
||||
id="XMLID_57_" /></g><g
|
||||
style="display:none"
|
||||
id="layer3"><path
|
||||
id="path18992"
|
||||
d="M 3046.8164,390.66602 3134.3164,542 v 91.33398 L 3524.9824,1024 H 3584 V 732.18359 L 3242.4824,390.66602 h -23.666 l -53.0352,94.63086 -94.6308,-94.63086 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;display:inline;fill:#ad2a2a;fill-opacity:1;stroke:none" /><path
|
||||
id="path18990"
|
||||
d="m 2746.9824,390.66602 62,242.66796 L 3199.6484,1024 H 3584 V 940.68359 L 3033.9824,390.66602 h -21 l -21.9043,90.92773 -90.9277,-90.92773 h -18.5 l -25.4043,88.26367 -88.2637,-88.26367 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;display:inline;fill:#ad2a2a;fill-opacity:1;stroke:none" /><path
|
||||
id="path18988"
|
||||
d="m 2620.8164,387.33398 c -18.6667,0 -35.1667,4.60982 -49.5,13.83204 -14.3333,9.11111 -25.4451,22.22287 -33.334,39.33398 -7.7778,17 -11.666,36.5549 -11.666,58.66602 v 25 c 0,34.44444 8.7216,61.83463 26.166,82.16796 L 2970.1484,1024 h 323.168 l -623.166,-623.16602 c -14.2222,-9 -30.6673,-13.5 -49.334,-13.5 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;display:inline;fill:#ad2a2a;fill-opacity:1;stroke:none" /><path
|
||||
id="path18984"
|
||||
d="M 2293.4824,390.66602 V 633.33398 L 2684.1484,1024 h 423.336 l -633.334,-633.33398 h -20.334 v 139.66601 l -139.666,-139.66601 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;display:inline;fill:#ad2a2a;fill-opacity:1;stroke:none" /><path
|
||||
id="path18978"
|
||||
d="M 1864.8164,390.66602 V 633.33398 L 2255.4824,1024 h 413.334 l -633.334,-633.33398 h -25.832 l -60.584,63.75 -63.75,-63.75 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;display:inline;fill:#ad2a2a;fill-opacity:1;stroke:none" /><path
|
||||
id="path18976"
|
||||
d="M 1684.8164,390.66602 V 633.33398 L 2075.4824,1024 h 263.334 l -633.334,-633.33398 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;display:inline;fill:#ad2a2a;fill-opacity:1;stroke:none" /><path
|
||||
id="path19059"
|
||||
d="m 1133.6504,390.66602 62,242.66796 L 1586.3164,1024 h 467.668 l -633.334,-633.33398 h -21 l -21.9043,90.92773 -90.9277,-90.92773 h -18.5 l -25.4043,88.26367 -88.2637,-88.26367 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;display:inline;fill:#ad2a2a;fill-opacity:1;stroke:none" /><path
|
||||
id="path18966"
|
||||
d="m 1456.4824,390.66602 v 167.16796 c 0.5556,24.66667 8.5007,44 23.834,58 L 1888.4824,1024 h 372.168 l -633.334,-633.33398 h -20.666 V 520.5 l -129.834,-129.83398 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;display:inline;fill:#ad2a2a;fill-opacity:1;stroke:none" /><path
|
||||
id="path18982"
|
||||
d="M 2146.3164,390.66602 2054.4824,633.33398 2445.1484,1024 h 354.002 l -633.334,-633.33398 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;display:inline;fill:#ad2a2a;fill-opacity:1;stroke:none" /><path
|
||||
id="XMLID_64_"
|
||||
d="M 637.15234,214.95703 487.75,364.35742 466.01562,386.0918 c 0.31273,0.31271 0.54872,0.54666 0.70508,0.85937 0.0782,0.23454 0.23432,0.54671 0.3125,0.78125 0.31272,0.54726 0.47071,1.17339 0.47071,1.79883 0.0782,0.54726 -0.0799,1.01725 -0.31446,1.48633 -0.23454,0.54725 -0.70285,1.40597 -1.09375,1.79687 l 150.8086,149.71485 -23.68946,23.6875 -12.74414,-12.74219 -13.44726,-13.44727 -78.80469,-78.80664 -11.17969,-11.17968 -7.5039,-7.50391 -35.41602,-35.17969 -3.08984,-0.98047 -4.33594,4.26367 v 0.46876 c 0,7.34888 0.38998,15.00865 -1.48633,22.20117 -0.85998,3.28355 -2.34444,6.25595 -4.14258,8.91406 -0.15636,0.15636 -0.23627,0.23426 -0.31445,0.39062 -1.87631,2.57993 -4.06471,4.84619 -6.48828,6.95704 -5.3944,4.53442 -11.25752,8.67896 -17.27734,12.50976 -0.15637,0.0782 -0.23427,0.1562 -0.39063,0.23438 -2.11085,1.40723 -4.3012,2.7354 -6.49023,4.06445 -8.91248,5.39439 -18.37192,10.08772 -28.37891,13.13672 -1.25087,0.31272 -2.42317,-0.001 -3.36133,-0.70508 l -6.01953,5.94141 c 1.25087,0.62543 2.03136,1.87776 1.875,3.51953 -10e-6,0.15636 -0.0762,0.23231 -0.0762,0.38867 0,0.0782 -0.0781,0.23628 -0.0781,0.31445 -1.32905,4.45624 -2.34505,8.98897 -3.2832,13.60156 -0.15636,0.70363 -0.23622,1.33154 -0.39258,2.03516 -0.85997,4.37806 -1.64209,8.83288 -2.3457,13.21094 0.23453,5.3944 0.39263,11.0234 0.31445,16.65234 v 0.39258 c -0.0782,7.66161 -0.78373,15.32114 -2.8164,22.51367 -2.26721,8.28704 -6.64376,15.63728 -10.55274,23.22071 -0.0782,0.15636 -0.15815,0.23426 -0.23633,0.39062 -1.25088,2.42357 -2.49924,4.92399 -3.59375,7.50391 -4.84714,11.33605 -7.42749,23.92328 -10.55468,35.88476 -0.23454,0.70362 -0.39046,1.48578 -0.625,2.26758 0,0.15636 -0.0801,0.23427 -0.0801,0.39063 -2.97082,11.10151 -6.09819,22.28173 -10.94532,32.75781 -1.40724,2.97082 -2.81531,5.86322 -4.3789,8.75586 -0.15636,0.23454 -0.23231,0.46858 -0.38867,0.70312 -0.62544,1.09451 -1.25152,2.26871 -1.87696,3.44141 -0.0782,0.15636 -0.15619,0.23426 -0.23437,0.39062 -3.51809,6.25438 -7.27098,12.43118 -10.78906,18.68555 -5.0035,8.8343 -8.99075,18.13635 -13.83789,27.04883 -0.0782,0.15636 -0.1562,0.23426 -0.23438,0.39062 -0.70362,1.32905 -1.48579,2.65728 -2.26758,3.98633 -5.0035,8.20887 -10.63256,16.0279 -16.57422,23.61133 -0.15635,0.15636 -0.23426,0.3124 -0.39062,0.46875 -0.7818,1.01634 -1.48578,1.95443 -2.26758,2.89258 -3.90898,4.92532 -7.97378,9.85009 -11.96094,14.77539 -0.0782,0.15637 -0.23432,0.23622 -0.3125,0.39258 -8.75612,10.71061 -17.35628,21.49761 -24.54883,33.30273 0,0.70362 -0.15602,1.33159 -0.46874,1.95703 -1.25087,2.42357 -2.65734,4.68971 -3.90821,7.11328 -0.0782,0.15636 0.62511,1.24989 0.46875,1.40625 L 429.86133,1024 H 1463.0215 L 661.85547,222.92969 c -0.93816,2.11087 -5.23681,1.40935 -7.34766,-0.23242 -1.71995,-1.32906 -3.12603,-3.05147 -4.45508,-4.84961 -0.62544,-0.31271 -1.25168,-0.62288 -1.64257,-0.85743 -2.89265,-1.40723 -6.09933,-1.48632 -9.30469,-1.48632 -0.7818,-0.0782 -1.40588,-0.23416 -1.95313,-0.54688 z m -206.12304,191.41992 0.11914,-0.11523 -0.23438,0.0781 z"
|
||||
style="display:inline;fill:#ad2a2a;stroke-width:0.78179646" /></g><g
|
||||
style="display:inline"
|
||||
id="layer2"><path
|
||||
style="fill:#ffffff;stroke-width:0.78179646"
|
||||
d="m 385.17894,776.98989 c 0.62544,2.03267 0.31272,4.2217 -0.7818,6.01983 l -15.08867,24.47023 c -1.48541,2.42357 -4.2217,3.98716 -7.19253,3.98716 H 220.92351 c -6.56709,0 -10.55425,-6.8798 -7.03616,-12.03966 l 90.92292,-133.92173 c 0.54726,-0.78179 0.85997,-1.64177 1.09451,-2.50174 l 41.66975,-177.93687 c 0.46908,-2.11085 1.87631,-3.90898 3.90898,-5.00349 l 56.4457,-30.95914 c 2.03267,-1.09452 3.43991,-2.89265 3.90899,-5.08168 l 7.58342,-33.06999 c 1.56359,-6.8798 11.41423,-8.36522 15.32321,-2.34538 l 2.73629,4.37806 c 1.17269,1.87631 1.48541,4.2217 0.70362,6.33255 l -51.44221,148.69767 c -0.3909,1.1727 -0.54726,2.42357 -0.31272,3.67445 l 12.82146,71.14347 c 0.23454,1.40723 0.0782,2.89265 -0.54725,4.2217 l -30.56824,68.64172 c -0.70362,1.64178 -0.85998,3.43991 -0.31272,5.08168 z m 417.94836,34.47722 h -97.25548 c -2.81446,0 -5.39439,-1.40723 -6.95798,-3.59626 l -65.43636,-92.01744 c -0.3909,-0.62543 -0.7818,-1.25087 -1.01634,-1.95449 L 600.01659,619.1452 c -0.62544,-1.87631 -2.11085,-3.51809 -3.98716,-4.45624 L 516.59891,574.5828 c -2.18903,-1.09451 -3.75262,-3.12718 -4.2217,-5.39439 l -11.72694,-58.16566 c -0.15636,-0.93815 -0.54726,-1.87631 -1.1727,-2.73628 L 472.5056,468.64939 c -1.48542,-2.18903 -1.71995,-4.84714 -0.62544,-7.19253 l 16.41772,-35.10266 c 1.25088,-2.6581 3.98717,-4.45624 7.11435,-4.6126 l 30.49006,-1.79813 c 1.79813,-0.0782 3.43991,-0.70361 4.76896,-1.79813 l 22.43756,-17.43406 c 4.2217,-3.28354 10.63243,-1.87631 12.89964,2.73629 l 77.31966,157.29744 c 0.31272,0.70361 0.54726,1.40723 0.70362,2.11085 l 9.53792,63.24733 c 0.23453,1.48541 0.85997,2.81446 1.87631,3.90898 l 154.01389,168.5553 c 4.53442,5.0035 0.70362,12.89964 -6.33255,12.89964 z M 424.97238,319.32628 c 0,-17.90314 11.33604,-33.30453 27.59741,-40.49706 -1.1727,-1.95449 -1.87631,-4.06534 -1.87631,-6.33255 0,-8.67794 10.00699,-15.71411 22.2812,-15.71411 0.31271,0 0.54725,0 0.85997,0 5.08168,-8.4434 14.77595,-14.15051 25.87746,-14.15051 0.7818,0 1.5636,0 2.34539,0.0782 1.01634,0.0782 2.03267,-0.3909 2.57993,-1.1727 8.20886,-12.50874 29.00465,-21.42122 53.31851,-21.42122 8.99066,0 17.51224,1.25088 25.09567,3.36173 1.79813,-2.97083 5.78529,-5.0035 10.39789,-5.0035 5.23804,0 9.69428,2.65811 11.02333,6.33255 6.41073,-7.42707 17.2777,-12.2742 29.63008,-12.2742 19.70127,0 35.64992,12.43056 35.64992,27.75377 0,1.87631 -0.23454,3.67444 -0.70362,5.47257 -0.31271,1.25088 0.3909,2.50175 1.71996,2.97083 12.58692,4.6126 21.1085,13.36872 21.1085,23.37571 0,11.41423 -11.02333,21.18669 -26.58108,25.01749 -1.25087,0.31272 -2.03267,1.40723 -2.03267,2.57993 0,0.0782 0,0.15635 0,0.23453 0,8.8343 -8.75612,16.10501 -20.01399,16.88681 0.0782,0.3909 0.0782,0.78179 0.0782,1.25087 0,16.96498 -32.28819,30.64642 -72.08163,30.64642 -8.59976,0 -16.80862,-0.62544 -24.39204,-1.79813 0,0.15636 0,0.23454 0,0.3909 0,7.03616 -9.06884,12.74328 -20.17035,12.74328 -0.62544,0 -1.1727,0 -1.71995,-0.0782 0.78179,1.71995 1.17269,3.51808 1.17269,5.39439 0,10.94515 -13.8378,19.77945 -30.95914,19.77945 -1.87631,0 -3.67444,-0.0782 -5.47257,-0.31272 -1.40724,-0.15635 -2.73629,0.70362 -3.04901,2.03268 -1.48541,5.47257 -6.25437,9.45973 -11.96148,9.45973 -6.87981,0 -12.35239,-5.86347 -12.35239,-13.056 0,-3.36172 1.1727,-6.41073 3.12719,-8.67794 0.70362,-0.78179 0.93816,-1.87631 0.46908,-2.81447 -1.09452,-2.03267 -1.5636,-4.14352 -1.5636,-6.41073 v 0 c 0,-1.25087 -1.01633,-2.26721 -2.2672,-2.57992 -21.18669,-4.69078 -37.13533,-22.35938 -37.13533,-43.46788 z m 179.50045,424.6718 c 0.31272,0.93816 0.3909,1.87632 0.3909,2.89265 l -4.53442,57.30568 c -0.31272,4.06534 -3.90898,7.2707 -8.28704,7.2707 H 445.68998 c -3.12718,0 -6.01983,-1.79813 -7.42707,-4.37806 l -24.1575,-44.87511 c -0.15636,-0.23454 -0.23454,-0.46908 -0.31272,-0.70362 l -22.75028,-55.11664 c -0.85997,-1.95449 -0.70361,-4.2217 0.23454,-6.09802 l 37.76077,-73.87976 c 0.93815,-1.79813 1.09451,-3.90898 0.3909,-5.78529 l -18.4504,-51.12948 c -0.62544,-1.79814 -0.54726,-3.83081 0.23454,-5.55076 l 30.80278,-65.59272 c 3.12718,-6.56709 13.36872,-6.01983 15.55775,0.85998 l 9.61609,29.86462 29.31737,78.49236 c 0.78179,2.18903 2.6581,3.90898 5.00349,4.69078 l 62.54372,21.34304 c 2.42357,0.85998 4.29988,2.65811 5.08167,4.92532 z"
|
||||
id="XMLID_42_" /><g
|
||||
id="text4752"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
|
||||
aria-label="WULKANOWY" /></g><g
|
||||
style="display:inline"
|
||||
id="layer1"><g
|
||||
aria-label="WULKANOWY"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
|
||||
id="text8460"><path
|
||||
d="m 1198.9832,567.83331 7.5,37.66667 9.1666,-36 52.6667,-178.83334 h 18.5 l 52,178.83334 9,36.33333 8,-38 43.8333,-177.16667 h 21 l -62.1666,242.66667 h -19.6667 l -55,-189.83334 -6.1667,-24 -6,24 -56.3333,189.83334 h -19.6667 l -62,-242.66667 h 21 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;font-family:Roboto;-inkscape-font-specification:'Roboto Light';fill:#ffffff"
|
||||
id="path4764" /><path
|
||||
d="m 1627.3165,390.66664 v 165.66667 q -0.1667,24.5 -10.8333,42.66667 -10.6667,18.16667 -30.1667,28 -19.3333,9.66667 -44.5,9.66667 -38.3333,0 -61.5,-20.83334 -23,-21 -23.8333,-58 V 390.66664 h 20.3333 v 164.16667 q 0,30.66667 17.5,47.66667 17.5,16.83333 47.5,16.83333 30,0 47.3333,-17 17.5,-17 17.5,-47.33333 V 390.66664 Z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;font-family:Roboto;-inkscape-font-specification:'Roboto Light';fill:#ffffff"
|
||||
id="path4766" /><path
|
||||
d="m 1705.4832,615.99998 h 119.8333 v 17.33333 h -140.5 V 390.66664 h 20.6667 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;font-family:Roboto;-inkscape-font-specification:'Roboto Light';fill:#ffffff"
|
||||
id="path4768" /><path
|
||||
d="m 1919.4832,512.83331 -34.1667,33.66667 v 86.83333 h -20.5 V 390.66664 h 20.5 v 130.83334 l 124.3333,-130.83334 h 25.8334 l -101.6667,108 109.5,134.66667 h -25 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;font-family:Roboto;-inkscape-font-specification:'Roboto Light';fill:#ffffff"
|
||||
id="path4770" /><path
|
||||
d="m 2211.1498,565.33331 h -110.1666 l -25,68 h -21.5 l 91.8333,-242.66667 h 19.5 l 91.8333,242.66667 h -21.3333 z m -103.8333,-17.5 h 97.3333 l -48.6666,-132.16667 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;font-family:Roboto;-inkscape-font-specification:'Roboto Light';fill:#ffffff"
|
||||
id="path4772" /><path
|
||||
d="m 2474.1499,633.33331 h -20.5 l -139.5,-207.66667 v 207.66667 h -20.6667 V 390.66664 h 20.6667 l 139.6666,207.83334 V 390.66664 h 20.3334 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;font-family:Roboto;-inkscape-font-specification:'Roboto Light';fill:#ffffff"
|
||||
id="path4774" /><path
|
||||
d="m 2715.4832,525.16664 q 0,33.5 -11.6667,58.83334 -11.5,25.33333 -33,39 -21.5,13.66667 -49.6667,13.66667 -42.5,0 -68.6666,-30.33334 -26.1667,-30.5 -26.1667,-82.16667 v -25 q 0,-33.16667 11.6667,-58.66667 11.8333,-25.66666 33.3333,-39.33333 21.5,-13.83333 49.5,-13.83333 28,0 49.3333,13.5 21.5,13.5 33.1667,38.16666 11.6667,24.66667 12.1667,57.16667 z m -20.5,-26.33333 q 0,-43.83334 -19.8334,-68.66667 -19.8333,-24.83333 -54.3333,-24.83333 -33.8333,0 -54,25 -20,24.83333 -20,69.5 v 25.33333 q 0,43.16667 20,68.50001 20,25.16666 54.3333,25.16666 34.8334,0 54.3334,-24.83333 19.5,-25 19.5,-69.5 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;font-family:Roboto;-inkscape-font-specification:'Roboto Light';fill:#ffffff"
|
||||
id="path4776" /><path
|
||||
d="m 2812.3165,567.83331 7.5,37.66667 9.1667,-36 52.6667,-178.83334 h 18.5 l 52,178.83334 9,36.33333 8,-38 43.8333,-177.16667 h 21 l -62.1667,242.66667 h -19.6666 l -55,-189.83334 -6.1667,-24 -6,24 -56.3333,189.83334 h -19.6667 l -62,-242.66667 h 21 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;font-family:Roboto;-inkscape-font-specification:'Roboto Light';fill:#ffffff"
|
||||
id="path4778" /><path
|
||||
d="m 3144.6499,522.99998 74.1666,-132.33334 h 23.6667 l -87.6667,151.33334 v 91.33333 h -20.5 v -91.33333 l -87.5,-151.33334 h 24.3334 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.33334351px;font-family:Roboto;-inkscape-font-specification:'Roboto Light';fill:#ffffff"
|
||||
id="path4780" /></g></g></svg>
|
After Width: | Height: | Size: 18 KiB |
BIN
frontend/src/assets/wallpaper.jpg
Normal file
BIN
frontend/src/assets/wallpaper.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 203 KiB |
68
frontend/src/assets/wulkanowy.svg
Normal file
68
frontend/src/assets/wulkanowy.svg
Normal file
|
@ -0,0 +1,68 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="210mm"
|
||||
height="297mm"
|
||||
viewBox="0 0 210 297"
|
||||
version="1.1"
|
||||
id="svg91"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
|
||||
sodipodi:docname="wulkanowy_only_logo.svg">
|
||||
<defs
|
||||
id="defs85" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.35"
|
||||
inkscape:cx="400"
|
||||
inkscape:cy="560"
|
||||
inkscape:document-units="mm"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:document-rotation="0"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1677"
|
||||
inkscape:window-height="1030"
|
||||
inkscape:window-x="192"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0" />
|
||||
<metadata
|
||||
id="metadata88">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Warstwa 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<g
|
||||
style="display:inline"
|
||||
id="layer2"
|
||||
transform="matrix(0.26458333,0,0,0.26458333,-30.389283,3.6285705)">
|
||||
<path
|
||||
style="fill:#ffffff;stroke-width:0.781796"
|
||||
d="m 385.17894,776.98989 c 0.62544,2.03267 0.31272,4.2217 -0.7818,6.01983 l -15.08867,24.47023 c -1.48541,2.42357 -4.2217,3.98716 -7.19253,3.98716 H 220.92351 c -6.56709,0 -10.55425,-6.8798 -7.03616,-12.03966 l 90.92292,-133.92173 c 0.54726,-0.78179 0.85997,-1.64177 1.09451,-2.50174 l 41.66975,-177.93687 c 0.46908,-2.11085 1.87631,-3.90898 3.90898,-5.00349 l 56.4457,-30.95914 c 2.03267,-1.09452 3.43991,-2.89265 3.90899,-5.08168 l 7.58342,-33.06999 c 1.56359,-6.8798 11.41423,-8.36522 15.32321,-2.34538 l 2.73629,4.37806 c 1.17269,1.87631 1.48541,4.2217 0.70362,6.33255 l -51.44221,148.69767 c -0.3909,1.1727 -0.54726,2.42357 -0.31272,3.67445 l 12.82146,71.14347 c 0.23454,1.40723 0.0782,2.89265 -0.54725,4.2217 l -30.56824,68.64172 c -0.70362,1.64178 -0.85998,3.43991 -0.31272,5.08168 z m 417.94836,34.47722 h -97.25548 c -2.81446,0 -5.39439,-1.40723 -6.95798,-3.59626 l -65.43636,-92.01744 c -0.3909,-0.62543 -0.7818,-1.25087 -1.01634,-1.95449 L 600.01659,619.1452 c -0.62544,-1.87631 -2.11085,-3.51809 -3.98716,-4.45624 L 516.59891,574.5828 c -2.18903,-1.09451 -3.75262,-3.12718 -4.2217,-5.39439 l -11.72694,-58.16566 c -0.15636,-0.93815 -0.54726,-1.87631 -1.1727,-2.73628 L 472.5056,468.64939 c -1.48542,-2.18903 -1.71995,-4.84714 -0.62544,-7.19253 l 16.41772,-35.10266 c 1.25088,-2.6581 3.98717,-4.45624 7.11435,-4.6126 l 30.49006,-1.79813 c 1.79813,-0.0782 3.43991,-0.70361 4.76896,-1.79813 l 22.43756,-17.43406 c 4.2217,-3.28354 10.63243,-1.87631 12.89964,2.73629 l 77.31966,157.29744 c 0.31272,0.70361 0.54726,1.40723 0.70362,2.11085 l 9.53792,63.24733 c 0.23453,1.48541 0.85997,2.81446 1.87631,3.90898 l 154.01389,168.5553 c 4.53442,5.0035 0.70362,12.89964 -6.33255,12.89964 z M 424.97238,319.32628 c 0,-17.90314 11.33604,-33.30453 27.59741,-40.49706 -1.1727,-1.95449 -1.87631,-4.06534 -1.87631,-6.33255 0,-8.67794 10.00699,-15.71411 22.2812,-15.71411 0.31271,0 0.54725,0 0.85997,0 5.08168,-8.4434 14.77595,-14.15051 25.87746,-14.15051 0.7818,0 1.5636,0 2.34539,0.0782 1.01634,0.0782 2.03267,-0.3909 2.57993,-1.1727 8.20886,-12.50874 29.00465,-21.42122 53.31851,-21.42122 8.99066,0 17.51224,1.25088 25.09567,3.36173 1.79813,-2.97083 5.78529,-5.0035 10.39789,-5.0035 5.23804,0 9.69428,2.65811 11.02333,6.33255 6.41073,-7.42707 17.2777,-12.2742 29.63008,-12.2742 19.70127,0 35.64992,12.43056 35.64992,27.75377 0,1.87631 -0.23454,3.67444 -0.70362,5.47257 -0.31271,1.25088 0.3909,2.50175 1.71996,2.97083 12.58692,4.6126 21.1085,13.36872 21.1085,23.37571 0,11.41423 -11.02333,21.18669 -26.58108,25.01749 -1.25087,0.31272 -2.03267,1.40723 -2.03267,2.57993 0,0.0782 0,0.15635 0,0.23453 0,8.8343 -8.75612,16.10501 -20.01399,16.88681 0.0782,0.3909 0.0782,0.78179 0.0782,1.25087 0,16.96498 -32.28819,30.64642 -72.08163,30.64642 -8.59976,0 -16.80862,-0.62544 -24.39204,-1.79813 0,0.15636 0,0.23454 0,0.3909 0,7.03616 -9.06884,12.74328 -20.17035,12.74328 -0.62544,0 -1.1727,0 -1.71995,-0.0782 0.78179,1.71995 1.17269,3.51808 1.17269,5.39439 0,10.94515 -13.8378,19.77945 -30.95914,19.77945 -1.87631,0 -3.67444,-0.0782 -5.47257,-0.31272 -1.40724,-0.15635 -2.73629,0.70362 -3.04901,2.03268 -1.48541,5.47257 -6.25437,9.45973 -11.96148,9.45973 -6.87981,0 -12.35239,-5.86347 -12.35239,-13.056 0,-3.36172 1.1727,-6.41073 3.12719,-8.67794 0.70362,-0.78179 0.93816,-1.87631 0.46908,-2.81447 -1.09452,-2.03267 -1.5636,-4.14352 -1.5636,-6.41073 v 0 c 0,-1.25087 -1.01633,-2.26721 -2.2672,-2.57992 -21.18669,-4.69078 -37.13533,-22.35938 -37.13533,-43.46788 z m 179.50045,424.6718 c 0.31272,0.93816 0.3909,1.87632 0.3909,2.89265 l -4.53442,57.30568 c -0.31272,4.06534 -3.90898,7.2707 -8.28704,7.2707 H 445.68998 c -3.12718,0 -6.01983,-1.79813 -7.42707,-4.37806 l -24.1575,-44.87511 c -0.15636,-0.23454 -0.23454,-0.46908 -0.31272,-0.70362 l -22.75028,-55.11664 c -0.85997,-1.95449 -0.70361,-4.2217 0.23454,-6.09802 l 37.76077,-73.87976 c 0.93815,-1.79813 1.09451,-3.90898 0.3909,-5.78529 l -18.4504,-51.12948 c -0.62544,-1.79814 -0.54726,-3.83081 0.23454,-5.55076 l 30.80278,-65.59272 c 3.12718,-6.56709 13.36872,-6.01983 15.55775,0.85998 l 9.61609,29.86462 29.31737,78.49236 c 0.78179,2.18903 2.6581,3.90898 5.00349,4.69078 l 62.54372,21.34304 c 2.42357,0.85998 4.29988,2.65811 5.08167,4.92532 z"
|
||||
id="XMLID_42_" />
|
||||
<g
|
||||
id="text4752"
|
||||
style="font-style:normal;font-variant:normal;font-weight:300;font-stretch:normal;font-size:341.333px;line-height:1.25;font-family:Roboto;-inkscape-font-specification:'Roboto Light';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none"
|
||||
aria-label="WULKANOWY" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 6.2 KiB |
|
@ -1,28 +0,0 @@
|
|||
import React, { Component } from 'react';
|
||||
|
||||
class AttendanceCom extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
var cookies_data = sessionStorage.getItem('cookies_data');
|
||||
var csrfcookie_ = sessionStorage.getItem('csrfcookie');
|
||||
fetch('../api/attendance', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRFToken': csrfcookie_
|
||||
},
|
||||
body: JSON.stringify({"cookies": cookies_data, "week": 0})
|
||||
}).then(response => response.json()).then(data => {
|
||||
console.log(data);
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<p>Attendance</p>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default AttendanceCom
|
|
@ -1,28 +0,0 @@
|
|||
import React, { Component } from 'react';
|
||||
|
||||
class DashboardCom extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
var cookies_data = sessionStorage.getItem('cookies_data');
|
||||
var csrfcookie_ = sessionStorage.getItem('csrfcookie');
|
||||
fetch('../api/dashboard', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRFToken': csrfcookie_
|
||||
},
|
||||
body: cookies_data
|
||||
}).then(response => response.json()).then(data => {
|
||||
console.log(data)
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<p>Dashboard</p>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default DashboardCom
|
|
@ -1,28 +0,0 @@
|
|||
import React, { Component } from 'react';
|
||||
|
||||
class ExamsCom extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
var cookies_data = sessionStorage.getItem('cookies_data');
|
||||
var csrfcookie_ = sessionStorage.getItem('csrfcookie');
|
||||
fetch('../api/exams', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRFToken': csrfcookie_
|
||||
},
|
||||
body: JSON.stringify({"cookies": cookies_data, "week": 0})
|
||||
}).then(response => response.json()).then(data => {
|
||||
console.log(data)
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<p>Exams</p>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default ExamsCom
|
|
@ -1,11 +0,0 @@
|
|||
import React, { Component } from 'react';
|
||||
|
||||
class GradesCom extends Component {
|
||||
render() {
|
||||
return (
|
||||
<p>Grades</p>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default GradesCom
|
|
@ -1,28 +0,0 @@
|
|||
import React, { Component } from 'react';
|
||||
|
||||
class HomeworksCom extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
var cookies_data = sessionStorage.getItem('cookies_data');
|
||||
var csrfcookie_ = sessionStorage.getItem('csrfcookie');
|
||||
fetch('../api/homeworks', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRFToken': csrfcookie_
|
||||
},
|
||||
body: JSON.stringify({"cookies": cookies_data, "week": 0})
|
||||
}).then(response => response.json()).then(data => {
|
||||
console.log(data);
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<p>Homeworks</p>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default HomeworksCom
|
|
@ -1,11 +0,0 @@
|
|||
import React, { Component } from 'react';
|
||||
|
||||
class DeletedCom extends Component {
|
||||
render() {
|
||||
return (
|
||||
<p>Deleted Messages</p>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default DeletedCom
|
|
@ -1,11 +0,0 @@
|
|||
import React, { Component } from 'react';
|
||||
|
||||
class ReceivedCom extends Component {
|
||||
render() {
|
||||
return (
|
||||
<p>Received Messages</p>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default ReceivedCom
|
|
@ -1,11 +0,0 @@
|
|||
import React, { Component } from 'react';
|
||||
|
||||
class SendCom extends Component {
|
||||
render() {
|
||||
return (
|
||||
<p>Send Message</p>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default SendCom
|
|
@ -1,11 +0,0 @@
|
|||
import React, { Component } from 'react';
|
||||
|
||||
class SentCom extends Component {
|
||||
render() {
|
||||
return (
|
||||
<p>Sent Messages</p>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default SentCom
|
|
@ -1,11 +0,0 @@
|
|||
import React, { Component } from 'react';
|
||||
|
||||
class MobileCom extends Component {
|
||||
render() {
|
||||
return (
|
||||
<p>Mobile</p>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default MobileCom
|
|
@ -1,28 +0,0 @@
|
|||
import React, { Component } from 'react';
|
||||
|
||||
class NotesCom extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
var cookies_data = sessionStorage.getItem('cookies_data');
|
||||
var csrfcookie_ = sessionStorage.getItem('csrfcookie');
|
||||
fetch('../api/notes', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRFToken': csrfcookie_
|
||||
},
|
||||
body: cookies_data
|
||||
}).then(response => response.json()).then(data => {
|
||||
console.log(data);
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<p>Notes</p>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default NotesCom
|
|
@ -1,28 +0,0 @@
|
|||
import React, { Component } from 'react';
|
||||
|
||||
class SchoolDataCom extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
var cookies_data = sessionStorage.getItem('cookies_data');
|
||||
var csrfcookie_ = sessionStorage.getItem('csrfcookie');
|
||||
fetch('../api/school_data', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRFToken': csrfcookie_
|
||||
},
|
||||
body: cookies_data
|
||||
}).then(response => response.json()).then(data => {
|
||||
console.log(data);
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<p>School Data</p>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default SchoolDataCom
|
|
@ -1,15 +0,0 @@
|
|||
import React, { Component } from 'react';
|
||||
|
||||
class StatsCom extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<p>Stats</p>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default StatsCom
|
|
@ -1,28 +0,0 @@
|
|||
import React, { Component } from 'react';
|
||||
|
||||
class StudentDataCom extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
var cookies_data = sessionStorage.getItem('cookies_data');
|
||||
var csrfcookie_ = sessionStorage.getItem('csrfcookie');
|
||||
fetch('../api/student_data', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRFToken': csrfcookie_
|
||||
},
|
||||
body: cookies_data
|
||||
}).then(response => response.json()).then(data => {
|
||||
console.log(data)
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<p>Student Data</p>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default StudentDataCom
|
|
@ -1,28 +0,0 @@
|
|||
import React, { Component } from 'react';
|
||||
|
||||
class TimetableCom extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
var cookies_data = sessionStorage.getItem('cookies_data');
|
||||
var csrfcookie_ = sessionStorage.getItem('csrfcookie');
|
||||
fetch('../api/timetable', {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRFToken': csrfcookie_
|
||||
},
|
||||
body: JSON.stringify({"cookies": cookies_data, "week": 0})
|
||||
}).then(response => response.json()).then(data => {
|
||||
console.log(data)
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<p>Timetable</p>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default TimetableCom
|
|
@ -1,61 +0,0 @@
|
|||
import React, { Component } from 'react';
|
||||
import { render } from 'react-dom';
|
||||
import { Radio } from '@material-ui/core';
|
||||
import { FormControlLabel } from '@material-ui/core'
|
||||
import { RadioGroup } from '@material-ui/core';
|
||||
import { Button } from "@material-ui/core";
|
||||
|
||||
class AccountManager extends Component {
|
||||
state = {
|
||||
cookies_data: null,
|
||||
student: {},
|
||||
students: [],
|
||||
studentsCounter: []
|
||||
};
|
||||
|
||||
constructor (props) {
|
||||
super(props)
|
||||
this.handleChangeStudent = this.handleChangeStudent.bind(this)
|
||||
var cookies_data = JSON.parse(sessionStorage.getItem('cookies_data'));
|
||||
var students = cookies_data.data.students.data;
|
||||
this.state.cookies_data = cookies_data;
|
||||
this.state.students = students;
|
||||
students.forEach((student) => {
|
||||
var studentName = student.UczenPelnaNazwa
|
||||
this.state.studentsCounter.push(<FormControlLabel value={studentName} label={studentName} control={<Radio />} />, <br />)})
|
||||
};
|
||||
|
||||
handleChangeStudent = (event) => {
|
||||
this.setState({student: event.target.value});
|
||||
};
|
||||
|
||||
handleSubmit = () => {
|
||||
this.state.students.forEach((student) => {
|
||||
if (student.UczenPelnaNazwa == this.state.student) {
|
||||
console.log(this.state.cookies_data)
|
||||
this.state.cookies_data.data.students.data = [student];
|
||||
sessionStorage.setItem('cookies_data', JSON.stringify(this.state.cookies_data));
|
||||
window.location.href = '/content/';
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div id="box" onChange={this.handleChangeStudent}>
|
||||
<h1>Wybierz Ucznia</h1>
|
||||
<RadioGroup>
|
||||
<div id="group">
|
||||
{this.state.studentsCounter}
|
||||
</div>
|
||||
</RadioGroup>
|
||||
<Button type="submit" id="button" variant="contained" size="large" onClick={this.handleSubmit}>Wybierz</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default AccountManager;
|
||||
|
||||
const container = document.getElementById("AccountManager");
|
||||
render(<AccountManager />, container);
|
|
@ -1,20 +0,0 @@
|
|||
import React, { Component } from "react";
|
||||
import { render } from "react-dom";
|
||||
import LoginForm from "./LoginForm";
|
||||
|
||||
class App extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<LoginForm />
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default App;
|
||||
|
||||
const container = document.getElementById("app");
|
||||
render(<App />, container);
|
|
@ -1,3 +0,0 @@
|
|||
.drawer {
|
||||
width: 500px !important;
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
import React, { Component } from "react";
|
||||
import Drawer from "@material-ui/core/Drawer"
|
||||
import List from "@material-ui/core/List"
|
||||
import ListItem from "@material-ui/core/ListItem"
|
||||
import ListItemIcon from "@material-ui/core/ListItemIcon"
|
||||
import ListItemText from "@material-ui/core/ListItemText"
|
||||
import Filter6Icon from '@material-ui/icons/Filter6';
|
||||
|
||||
class Dashboard extends Component {
|
||||
state = {
|
||||
cookies_data: sessionStorage.getItem('cookies_data'),
|
||||
csrfcookie: sessionStorage.getItem('csrfcookie'),
|
||||
data: {}
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
fetch("/api/dashboard", {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRFToken': this.state.csrfcookie
|
||||
},
|
||||
body: this.state.cookies_data
|
||||
}).then(response => response.json()).then(data => {
|
||||
console.log(data)
|
||||
this.state.data = data
|
||||
})
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<Drawer variant="permanent" anchor="left" >
|
||||
<List>
|
||||
<ListItem>
|
||||
<ListItemIcon><Filter6Icon /></ListItemIcon>
|
||||
<ListItemText>Oceny</ListItemText>
|
||||
</ListItem>
|
||||
</List>
|
||||
</Drawer>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default Dashboard
|
54
frontend/src/components/Login/SelectStudent.vue
Normal file
54
frontend/src/components/Login/SelectStudent.vue
Normal file
|
@ -0,0 +1,54 @@
|
|||
<template>
|
||||
<v-row align="center">
|
||||
<v-col cols="12">
|
||||
<a>Select student to login!</a>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<v-radio-group>
|
||||
<v-radio
|
||||
v-model="selectedStudent"
|
||||
v-for="student in this.$store.state.loginData.data.students.data"
|
||||
:key="student.UczenPelnaNazwa"
|
||||
:label="student.UczenPelnaNazwa">
|
||||
</v-radio>
|
||||
</v-radio-group>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<v-btn
|
||||
class="login-button"
|
||||
depressed
|
||||
color="primary"
|
||||
@click="chooseClicked()">
|
||||
Choose</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'SelectStudent',
|
||||
data() {
|
||||
return {
|
||||
radioGroup: 1,
|
||||
selectedStudent: '',
|
||||
studentList: {
|
||||
type: Array,
|
||||
},
|
||||
};
|
||||
},
|
||||
beforeMount() {
|
||||
console.log(this.$store.state.loginData.data.students.data[0]);
|
||||
},
|
||||
methods: {
|
||||
async chooseClicked() {
|
||||
this.$store.state.selectedUser = this.selectedStudent;
|
||||
this.$store.state.showStudentsList = true;
|
||||
await this.$router.push('/user');
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
87
frontend/src/components/Login/UserLogin.vue
Normal file
87
frontend/src/components/Login/UserLogin.vue
Normal file
|
@ -0,0 +1,87 @@
|
|||
<template>
|
||||
<div>
|
||||
<v-row align="center">
|
||||
<v-col cols="12"></v-col>
|
||||
<v-col cols="12">
|
||||
<v-text-field
|
||||
class="login-input"
|
||||
v-model="login"
|
||||
label="E-mail"
|
||||
outlined
|
||||
clearable>
|
||||
</v-text-field>
|
||||
<v-text-field
|
||||
class="login-input"
|
||||
v-model="password"
|
||||
label="Password"
|
||||
outlined
|
||||
clearable>
|
||||
</v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<v-select
|
||||
:items="domains"
|
||||
v-model="selectedSymbol"
|
||||
item-value="Fakelog"
|
||||
v-on:change="itemSelected()"
|
||||
label="Symbol"
|
||||
outlined></v-select>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<v-btn
|
||||
class="login-button"
|
||||
depressed
|
||||
color="primary"
|
||||
@click="loginUser()">
|
||||
Log in!</v-btn>
|
||||
<v-divider style="padding: 5px"></v-divider>
|
||||
<a style="">You forgot password click here!</a>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import LoginForm from '../../props/LoginForm.ts';
|
||||
import Vue from 'vue';
|
||||
import login from '../../api/login';
|
||||
|
||||
export default {
|
||||
name: 'UserLogin',
|
||||
data() {
|
||||
return {
|
||||
login: '',
|
||||
password: '',
|
||||
selectedSymbol: '',
|
||||
domains: [
|
||||
'Vulcan',
|
||||
'Fakelog',
|
||||
],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async loginUser() {
|
||||
Vue.set(this.$store.state, 'isLoading', true);
|
||||
const response = await login.register(this.login, this.password, this.selectedSymbol);
|
||||
this.$store.state.loginData = response.data;
|
||||
|
||||
console.log(this.$store.state.loginData);
|
||||
|
||||
if (this.$store.state.loginData.data.students.data.length > 1) {
|
||||
this.$store.state.isLoading = false;
|
||||
this.$store.state.showStudentsList = true;
|
||||
}
|
||||
},
|
||||
itemSelected() {
|
||||
if (this.selectedSymbol === 'Fakelog') {
|
||||
this.login = 'jan@fakelog.cf';
|
||||
this.password = 'jan123';
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -1,91 +0,0 @@
|
|||
import React, { Component } from "react";
|
||||
import TextField from "@material-ui/core/TextField";
|
||||
import Button from "@material-ui/core/Button";
|
||||
import Select from "@material-ui/core/Select";
|
||||
import MenuItem from '@material-ui/core/MenuItem';
|
||||
|
||||
class LoginForm extends Component {
|
||||
urls = {
|
||||
Uonet: 'https://cufs.vulcan.net.pl/',
|
||||
Fakelog: 'http://cufs.fakelog.cf/',
|
||||
};
|
||||
state = {
|
||||
loginName: '',
|
||||
Password: '',
|
||||
Symbol: '',
|
||||
diaryUrl: ''
|
||||
};
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.handleChangeEmail = this.handleChangeEmail.bind(this);
|
||||
this.handleChangePassword = this.handleChangePassword.bind(this);
|
||||
this.handleChangeSymbol = this.handleChangeSymbol.bind(this)
|
||||
this.handleChangeURL = this.handleChangeURL.bind(this)
|
||||
this.handleSubmit = this.handleSubmit.bind(this);
|
||||
}
|
||||
|
||||
handleChangeEmail = (event) =>{ this.setState({loginName: event.target.value}); }
|
||||
handleChangePassword = (event) => { this.setState({Password: event.target.value}); }
|
||||
handleChangeSymbol = (event) => { this.setState({Symbol: event.target.value}); }
|
||||
handleChangeURL = (event) => { this.setState({diaryUrl: event.target.value}); }
|
||||
csrfcookie() {
|
||||
var cookieValue = null,
|
||||
name = 'csrftoken';
|
||||
if (document.cookie && document.cookie !== '') {
|
||||
var cookies = document.cookie.split(';');
|
||||
for (var i = 0; i < cookies.length; i++) {
|
||||
var cookie = cookies[i].trim();
|
||||
if (cookie.substring(0, name.length + 1) == (name + '=')) {
|
||||
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return cookieValue;
|
||||
};
|
||||
handleSubmit = (event) => {
|
||||
fetch("api/login", {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRFToken': this.csrfcookie(),
|
||||
},
|
||||
body: JSON.stringify(this.state)
|
||||
}).then(response => response.json()).then(data => {
|
||||
if(data['success']){
|
||||
var myStorage = window.sessionStorage;
|
||||
sessionStorage.setItem('cookies_data', JSON.stringify(data));
|
||||
sessionStorage.setItem('csrfcookie', this.csrfcookie());
|
||||
sessionStorage.setItem('email', this.state.loginName);
|
||||
window.location.href = "/account-manager/";
|
||||
}
|
||||
else{
|
||||
document.querySelector('#error').innerHTML = 'Zła nazwa użytkownika, hasło lub symbol';
|
||||
}
|
||||
});
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div id="box">
|
||||
<div id="box-content">
|
||||
<form onSubmit={this.handleSubmit}>
|
||||
<TextField value={this.state.loginName} onChange={this.handleChangeEmail} label="E-mail"/><br />
|
||||
<TextField value={this.state.Password} onChange={this.handleChangePassword} label="Password" type="password"/><br />
|
||||
<TextField value={this.state.Symbol} onChange={this.handleChangeSymbol} label="Symbol"/><br />
|
||||
<Select id="url-select" autoWidth={true} onChange={this.handleChangeURL}>
|
||||
<MenuItem value={this.urls.Uonet}>Vulcan UONET+</MenuItem>
|
||||
<MenuItem value={this.urls.Fakelog}>Fakelog</MenuItem>
|
||||
</Select><br />
|
||||
<div id="error"></div>
|
||||
<Button type="submit" id="button" variant="contained" size="large">Zaloguj</Button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default LoginForm;
|
|
@ -1,236 +0,0 @@
|
|||
import React, { Component } from 'react';
|
||||
import { renderToString } from 'react-dom/server'
|
||||
import clsx from 'clsx';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { createStyles, makeStyles, useTheme, Theme } from '@material-ui/core/styles';
|
||||
import Drawer from '@material-ui/core/Drawer';
|
||||
import AppBar from '@material-ui/core/AppBar';
|
||||
import Toolbar from '@material-ui/core/Toolbar';
|
||||
import List from '@material-ui/core/List';
|
||||
import CssBaseline from '@material-ui/core/CssBaseline';
|
||||
import Typography from '@material-ui/core/Typography';
|
||||
import Divider from '@material-ui/core/Divider';
|
||||
import IconButton from '@material-ui/core/IconButton';
|
||||
import MenuIcon from '@material-ui/icons/Menu';
|
||||
import ChevronLeftIcon from '@material-ui/icons/ChevronLeft';
|
||||
import ChevronRightIcon from '@material-ui/icons/ChevronRight';
|
||||
import ListItem from '@material-ui/core/ListItem';
|
||||
import ListItemIcon from '@material-ui/core/ListItemIcon';
|
||||
import ListItemText from '@material-ui/core/ListItemText';
|
||||
import InboxIcon from '@material-ui/icons/MoveToInbox';
|
||||
import Filter6Icon from '@material-ui/icons/Filter6';
|
||||
import Dashboard from '@material-ui/icons/Dashboard';
|
||||
import EventNote from '@material-ui/icons/EventNote';
|
||||
import Event from '@material-ui/icons/Event';
|
||||
import Class from '@material-ui/icons/Class';
|
||||
import DateRange from '@material-ui/icons/DateRange';
|
||||
import InsertChart from '@material-ui/icons/InsertChart';
|
||||
import EmojiEvents from '@material-ui/icons/EmojiEvents';
|
||||
import Devices from '@material-ui/icons/Devices';
|
||||
import Business from '@material-ui/icons/Business'
|
||||
import AssignmentInd from '@material-ui/icons/AssignmentInd';
|
||||
import Forward from '@material-ui/icons/Forward';
|
||||
import Send from '@material-ui/icons/Send';
|
||||
import Delete from '@material-ui/icons/Delete';
|
||||
import DashboardCom from './API/dashboard';
|
||||
import GradesCom from './API/grades';
|
||||
import TimetableCom from './API/timetable';
|
||||
import ExamsCom from './API/exams';
|
||||
import HomeworksCom from './API/homeworks';
|
||||
import AttendanceCom from './API/attendance';
|
||||
import StatsCom from './API/stats';
|
||||
import NotesCom from './API/notes';
|
||||
import MobileCom from './API/mobile';
|
||||
import SchoolDataCom from './API/schoolData';
|
||||
import StudentDataCom from './API/studentData';
|
||||
//MESSAGES
|
||||
import ReceivedCom from './API/messages/received';
|
||||
import SentCom from './API/messages/sent';
|
||||
import SendCom from './API/messages/send';
|
||||
import DeletedCom from './API/messages/deleted';
|
||||
|
||||
const drawerWidth = 240;
|
||||
|
||||
const useStyles = makeStyles((theme: Theme) =>
|
||||
createStyles({
|
||||
root: {
|
||||
display: 'flex',
|
||||
},
|
||||
appBar: {
|
||||
zIndex: theme.zIndex.drawer + 1,
|
||||
transition: theme.transitions.create(['width', 'margin'], {
|
||||
easing: theme.transitions.easing.sharp,
|
||||
duration: theme.transitions.duration.leavingScreen,
|
||||
}),
|
||||
},
|
||||
appBarShift: {
|
||||
marginLeft: drawerWidth,
|
||||
width: `calc(100% - ${drawerWidth}px)`,
|
||||
transition: theme.transitions.create(['width', 'margin'], {
|
||||
easing: theme.transitions.easing.sharp,
|
||||
duration: theme.transitions.duration.enteringScreen,
|
||||
}),
|
||||
},
|
||||
menuButton: {
|
||||
marginRight: 36,
|
||||
},
|
||||
hide: {
|
||||
display: 'none',
|
||||
},
|
||||
drawer: {
|
||||
width: drawerWidth,
|
||||
flexShrink: 0,
|
||||
whiteSpace: 'nowrap',
|
||||
},
|
||||
drawerOpen: {
|
||||
width: drawerWidth,
|
||||
transition: theme.transitions.create('width', {
|
||||
easing: theme.transitions.easing.sharp,
|
||||
duration: theme.transitions.duration.enteringScreen,
|
||||
}),
|
||||
},
|
||||
drawerClose: {
|
||||
transition: theme.transitions.create('width', {
|
||||
easing: theme.transitions.easing.sharp,
|
||||
duration: theme.transitions.duration.leavingScreen,
|
||||
}),
|
||||
overflowX: 'hidden',
|
||||
width: theme.spacing(7) + 1,
|
||||
[theme.breakpoints.up('sm')]: {
|
||||
width: theme.spacing(9) + 1,
|
||||
},
|
||||
},
|
||||
toolbar: {
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'flex-end',
|
||||
padding: theme.spacing(0, 1),
|
||||
// necessary for content to be below app bar
|
||||
...theme.mixins.toolbar,
|
||||
},
|
||||
content: {
|
||||
flexGrow: 1,
|
||||
padding: theme.spacing(3),
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
function MiniDrawer() {
|
||||
const classes = useStyles();
|
||||
const theme = useTheme();
|
||||
const [open, setOpen] = React.useState(false);
|
||||
|
||||
const handleDrawerOpen = () => {
|
||||
setOpen(true);
|
||||
};
|
||||
|
||||
const handleDrawerClose = () => {
|
||||
setOpen(false);
|
||||
};
|
||||
|
||||
const handleGetDashboard = () => {document.querySelector('#content-typo').innerHTML = renderToString(<DashboardCom />);};
|
||||
const handleGetGrades = () => {document.querySelector('#content-typo').innerHTML = renderToString(<GradesCom />);};
|
||||
const handleGetTimetable = () => {document.querySelector('#content-typo').innerHTML = renderToString(<TimetableCom />)};
|
||||
const handleGetExams = () => {document.querySelector('#content-typo').innerHTML = renderToString(<ExamsCom />)};
|
||||
const handleGetHomeworks = () => {document.querySelector('#content-typo').innerHTML = renderToString(<HomeworksCom />);};
|
||||
const handleGetAttendance = () => {document.querySelector('#content-typo').innerHTML = renderToString(<AttendanceCom />);};
|
||||
const handleGetStats = () => {document.querySelector('#content-typo').innerHTML = renderToString(<StatsCom />);};
|
||||
const handleGetNotes = () => {document.querySelector('#content-typo').innerHTML = renderToString(<NotesCom />);};
|
||||
const handleGetMobile = () => {document.querySelector('#content-typo').innerHTML = renderToString(<MobileCom />);};
|
||||
const handleGetSchoolData = () => {document.querySelector('#content-typo').innerHTML = renderToString(<SchoolDataCom />);};
|
||||
const handleGetStudentData = () => {document.querySelector('#content-typo').innerHTML = renderToString(<StudentDataCom />);};
|
||||
|
||||
const handleGetReceived = () => {document.querySelector('#content-typo').innerHTML = renderToString(<ReceivedCom />);};
|
||||
const handleGetSent = () => {document.querySelector('#content-typo').innerHTML = renderToString(<SentCom />);};
|
||||
const handleSend = () => {document.querySelector('#content-typo').innerHTML = renderToString(<SendCom />);};
|
||||
const handleGetDeleted = () => {document.querySelector('#content-typo').innerHTML = renderToString(<DeletedCom />);};
|
||||
|
||||
const getDataList = [handleGetDashboard, handleGetGrades, handleGetTimetable, handleGetExams, handleGetHomeworks, handleGetAttendance, handleGetStats, handleGetNotes, handleGetMobile, handleGetSchoolData, handleGetStudentData];
|
||||
const getDataMessages = [handleGetReceived, handleGetSent, handleSend, handleGetDeleted]
|
||||
const iconsList = [<Dashboard />, <Filter6Icon />, <EventNote />, <Event />, <Class />, <DateRange />, <InsertChart />, <EmojiEvents />, <Devices />, <Business />, <AssignmentInd />];
|
||||
const iconsListMessages = [<InboxIcon />, <Forward />, <Send />, <Delete />]
|
||||
|
||||
return (
|
||||
<div className={classes.root}>
|
||||
<CssBaseline />
|
||||
<AppBar id="bar"
|
||||
position="fixed"
|
||||
className={clsx(classes.appBar, {
|
||||
[classes.appBarShift]: open,
|
||||
})}
|
||||
>
|
||||
<Toolbar>
|
||||
<IconButton
|
||||
color="inherit"
|
||||
aria-label="open drawer"
|
||||
onClick={handleDrawerOpen}
|
||||
edge="start"
|
||||
className={clsx(classes.menuButton, {
|
||||
[classes.hide]: open,
|
||||
})}
|
||||
>
|
||||
<MenuIcon />
|
||||
</IconButton>
|
||||
<Typography variant="h6" noWrap>
|
||||
Wulkanowy web early access insider preview pre-alpha pre-beta alpha beta release canditate v. 0.0.1
|
||||
</Typography>
|
||||
</Toolbar>
|
||||
</AppBar>
|
||||
<Drawer anchor="left"
|
||||
variant="permanent"
|
||||
className={clsx(classes.drawer, {
|
||||
[classes.drawerOpen]: open,
|
||||
[classes.drawerClose]: !open,
|
||||
})}
|
||||
classes={{
|
||||
paper: clsx({
|
||||
[classes.drawerOpen]: open,
|
||||
[classes.drawerClose]: !open,
|
||||
}),
|
||||
}}>
|
||||
<div className={classes.toolbar}>
|
||||
<IconButton onClick={handleDrawerClose}>
|
||||
{theme.direction === 'rtl' ? <ChevronRightIcon /> : <ChevronLeftIcon />}
|
||||
</IconButton>
|
||||
</div>
|
||||
<Divider />
|
||||
<List>
|
||||
{['Start', 'Oceny', 'Plan Lekcji', 'Sprawdziany', 'Zadania Domowe', 'Frekwencja', 'Uczeń na Tle Klasy', 'Uwagi i Osiągnięcia', 'Dostęp Mobilny', 'Szkoła i Nauczyciele', 'Dane Ucznia'].map((text, index) => (
|
||||
<ListItem button onClick={getDataList[index]} key={text}>
|
||||
<ListItemIcon>{iconsList[index]}</ListItemIcon>
|
||||
<ListItemText primary={text} />
|
||||
</ListItem>
|
||||
))}
|
||||
</List>
|
||||
<Divider />
|
||||
<List>
|
||||
{['Odebrane', 'Wysłane', 'Wyślij Wiadomość', 'Usunięte'].map((text, index) => (
|
||||
<ListItem button onClick={getDataMessages[index]} key={text}>
|
||||
<ListItemIcon>{iconsListMessages[index]}</ListItemIcon>
|
||||
<ListItemText primary={text} />
|
||||
</ListItem>
|
||||
))}
|
||||
</List>
|
||||
</Drawer>
|
||||
<main className={classes.content}>
|
||||
<div className={classes.toolbar} />
|
||||
<Typography id="content-typo" paragraph>
|
||||
<DashboardCom />
|
||||
</Typography>
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
class UI extends Component {
|
||||
render() {
|
||||
return (
|
||||
<MiniDrawer />
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default UI
|
||||
|
||||
const content = document.getElementById("content");
|
||||
ReactDOM.render(<UI />, content);
|
|
@ -1 +0,0 @@
|
|||
import UI from "./components/UI";
|
|
@ -1 +0,0 @@
|
|||
import App from "./components/App";
|
15
frontend/src/main.ts
Normal file
15
frontend/src/main.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import Vue from 'vue';
|
||||
import App from './App.vue';
|
||||
import './registerServiceWorker';
|
||||
import router from './router';
|
||||
import store from './store';
|
||||
import vuetify from './plugins/vuetify';
|
||||
|
||||
Vue.config.productionTip = false;
|
||||
|
||||
new Vue({
|
||||
router,
|
||||
store,
|
||||
vuetify,
|
||||
render: (h) => h(App),
|
||||
}).$mount('#app');
|
17
frontend/src/plugins/vuetify.ts
Normal file
17
frontend/src/plugins/vuetify.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
import Vue from 'vue';
|
||||
import Vuetify from 'vuetify/lib/framework';
|
||||
import colors from 'vuetify/lib/util/colors';
|
||||
|
||||
Vue.use(Vuetify);
|
||||
|
||||
export default new Vuetify({
|
||||
theme: {
|
||||
themes: {
|
||||
light: {
|
||||
primary: colors.red.darken1, // #E53935
|
||||
secondary: colors.red.lighten4, // #FFCDD2
|
||||
accent: colors.indigo.base, // #3F51B5
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
6
frontend/src/props/LoginForm.ts
Normal file
6
frontend/src/props/LoginForm.ts
Normal file
|
@ -0,0 +1,6 @@
|
|||
interface LoginForm {
|
||||
login: String,
|
||||
password: String,
|
||||
domains: Array<String>,
|
||||
selectedSymbol: String
|
||||
}
|
32
frontend/src/registerServiceWorker.ts
Normal file
32
frontend/src/registerServiceWorker.ts
Normal file
|
@ -0,0 +1,32 @@
|
|||
/* eslint-disable no-console */
|
||||
|
||||
import { register } from 'register-service-worker';
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
register(`${process.env.BASE_URL}service-worker.js`, {
|
||||
ready() {
|
||||
console.log(
|
||||
'App is being served from cache by a service worker.\n'
|
||||
+ 'For more details, visit https://goo.gl/AFskqB',
|
||||
);
|
||||
},
|
||||
registered() {
|
||||
console.log('Service worker has been registered.');
|
||||
},
|
||||
cached() {
|
||||
console.log('Content has been cached for offline use.');
|
||||
},
|
||||
updatefound() {
|
||||
console.log('New content is downloading.');
|
||||
},
|
||||
updated() {
|
||||
console.log('New content is available; please refresh.');
|
||||
},
|
||||
offline() {
|
||||
console.log('No internet connection found. App is running in offline mode.');
|
||||
},
|
||||
error(error) {
|
||||
console.error('Error during service worker registration:', error);
|
||||
},
|
||||
});
|
||||
}
|
32
frontend/src/router/index.ts
Normal file
32
frontend/src/router/index.ts
Normal file
|
@ -0,0 +1,32 @@
|
|||
import Vue from 'vue';
|
||||
import VueRouter, { RouteConfig } from 'vue-router';
|
||||
import Login from '../views/Login.vue';
|
||||
|
||||
Vue.use(VueRouter);
|
||||
|
||||
const routes: Array<RouteConfig> = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'Login',
|
||||
component: Login,
|
||||
},
|
||||
{
|
||||
path: '/about',
|
||||
name: 'About',
|
||||
// route level code-splitting
|
||||
// this generates a separate chunk (about.[hash].js) for this route
|
||||
// which is lazy-loaded when the route is visited.
|
||||
component: () => import(/* webpackChunkName: "about" */ '../views/About.vue'),
|
||||
},
|
||||
{
|
||||
path: '/user',
|
||||
name: 'User',
|
||||
component: () => import('../views/Panel.vue'),
|
||||
},
|
||||
];
|
||||
|
||||
const router = new VueRouter({
|
||||
routes,
|
||||
});
|
||||
|
||||
export default router;
|
13
frontend/src/shims-tsx.d.ts
vendored
Normal file
13
frontend/src/shims-tsx.d.ts
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
import Vue, { VNode } from 'vue';
|
||||
|
||||
declare global {
|
||||
namespace JSX {
|
||||
// tslint:disable no-empty-interface
|
||||
interface Element extends VNode {}
|
||||
// tslint:disable no-empty-interface
|
||||
interface ElementClass extends Vue {}
|
||||
interface IntrinsicElements {
|
||||
[elem: string]: any
|
||||
}
|
||||
}
|
||||
}
|
5
frontend/src/shims-vue.d.ts
vendored
Normal file
5
frontend/src/shims-vue.d.ts
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
declare module '*.vue' {
|
||||
import Vue from 'vue';
|
||||
|
||||
export default Vue;
|
||||
}
|
5
frontend/src/shims-vuetify.d.ts
vendored
Normal file
5
frontend/src/shims-vuetify.d.ts
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
declare module 'vuetify/lib/framework' {
|
||||
import Vuetify from 'vuetify';
|
||||
|
||||
export default Vuetify;
|
||||
}
|
15
frontend/src/store/index.ts
Normal file
15
frontend/src/store/index.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import Vue from 'vue';
|
||||
import Vuex from 'vuex';
|
||||
|
||||
Vue.use(Vuex);
|
||||
|
||||
export default new Vuex.Store({
|
||||
state: {
|
||||
},
|
||||
mutations: {
|
||||
},
|
||||
actions: {
|
||||
},
|
||||
modules: {
|
||||
},
|
||||
});
|
26
frontend/src/store/login.ts
Normal file
26
frontend/src/store/login.ts
Normal file
|
@ -0,0 +1,26 @@
|
|||
import Vue from 'vue';
|
||||
import Vuex from 'vuex';
|
||||
|
||||
Vue.use(Vuex);
|
||||
|
||||
export default new Vuex.Store({
|
||||
state: {
|
||||
isLoading: false,
|
||||
loginData: null,
|
||||
showStudentsList: false,
|
||||
},
|
||||
mutations: {
|
||||
},
|
||||
actions: {
|
||||
setLoading(state) {
|
||||
if (!this.state.isLoading) {
|
||||
this.state.isLoading = true;
|
||||
}
|
||||
|
||||
this.state.isLoading = false;
|
||||
}
|
||||
},
|
||||
modules: {
|
||||
|
||||
},
|
||||
});
|
16
frontend/src/store/user.ts
Normal file
16
frontend/src/store/user.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
import Vue from 'vue';
|
||||
import Vuex from 'vuex';
|
||||
|
||||
Vue.use(Vuex);
|
||||
|
||||
export default new Vuex.Store({
|
||||
state: {
|
||||
selectedUser: '',
|
||||
},
|
||||
mutations: {
|
||||
},
|
||||
actions: {
|
||||
},
|
||||
modules: {
|
||||
},
|
||||
});
|
5
frontend/src/views/About.vue
Normal file
5
frontend/src/views/About.vue
Normal file
|
@ -0,0 +1,5 @@
|
|||
<template>
|
||||
<div class="about">
|
||||
<h1>This is an about page</h1>
|
||||
</div>
|
||||
</template>
|
66
frontend/src/views/Login.vue
Normal file
66
frontend/src/views/Login.vue
Normal file
|
@ -0,0 +1,66 @@
|
|||
<template>
|
||||
<div id="login">
|
||||
<img class="image" src="../assets/logo_login.svg" width="500" alt="Wulkanowy">
|
||||
<v-main style="width: 100%;">
|
||||
<v-card
|
||||
:loading="this.$store.state.isLoading"
|
||||
elevation="24"
|
||||
id="login-form"
|
||||
class="mx-auto mt-9">
|
||||
<form>
|
||||
<v-container>
|
||||
<UserLogin v-if="!this.$store.state.showStudentsList"></UserLogin>
|
||||
<SelectStudent v-if="this.$store.state.showStudentsList"></SelectStudent>
|
||||
</v-container>
|
||||
</form>
|
||||
</v-card>
|
||||
</v-main>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import UserLogin from '../components/Login/UserLogin.vue';
|
||||
import SelectStudent from '../components/Login/SelectStudent.vue';
|
||||
|
||||
export default {
|
||||
name: 'Login',
|
||||
components: {
|
||||
SelectStudent,
|
||||
UserLogin,
|
||||
},
|
||||
methods: {
|
||||
getLoading() {
|
||||
return this.$store.state.isLoading;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#login {
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
background-image: url("../assets/wallpaper.jpg");
|
||||
background-size: cover;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#login-form {
|
||||
width: 500px;
|
||||
top: 15%;
|
||||
bottom: 50%;
|
||||
}
|
||||
|
||||
.login-input {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.login-button {
|
||||
margin: 10px;
|
||||
}
|
||||
</style>
|
24
frontend/src/views/Panel.vue
Normal file
24
frontend/src/views/Panel.vue
Normal file
|
@ -0,0 +1,24 @@
|
|||
<template>
|
||||
<div>
|
||||
<iframe
|
||||
width="560"
|
||||
height="315"
|
||||
src="https://www.youtube.com/embed/dQw4w9WgXcQ"
|
||||
title="YouTube video player"
|
||||
frameborder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write;
|
||||
encrypted-media; gyroscope; picture-in-picture"
|
||||
allowfullscreen>
|
||||
</iframe>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Panel',
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
12
frontend/tests/e2e/.eslintrc.js
Normal file
12
frontend/tests/e2e/.eslintrc.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
module.exports = {
|
||||
plugins: [
|
||||
'cypress',
|
||||
],
|
||||
env: {
|
||||
mocha: true,
|
||||
'cypress/globals': true,
|
||||
},
|
||||
rules: {
|
||||
strict: 'off',
|
||||
},
|
||||
};
|
26
frontend/tests/e2e/plugins/index.js
Normal file
26
frontend/tests/e2e/plugins/index.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
/* eslint-disable arrow-body-style */
|
||||
// https://docs.cypress.io/guides/guides/plugins-guide.html
|
||||
|
||||
// if you need a custom webpack configuration you can uncomment the following import
|
||||
// and then use the `file:preprocessor` event
|
||||
// as explained in the cypress docs
|
||||
// https://docs.cypress.io/api/plugins/preprocessors-api.html#Examples
|
||||
|
||||
// /* eslint-disable import/no-extraneous-dependencies, global-require */
|
||||
// const webpack = require('@cypress/webpack-preprocessor')
|
||||
|
||||
module.exports = (on, config) => {
|
||||
// on('file:preprocessor', webpack({
|
||||
// webpackOptions: require('@vue/cli-service/webpack.config'),
|
||||
// watchOptions: {}
|
||||
// }))
|
||||
|
||||
return {
|
||||
...config,
|
||||
fixturesFolder: 'tests/e2e/fixtures',
|
||||
integrationFolder: 'tests/e2e/specs',
|
||||
screenshotsFolder: 'tests/e2e/screenshots',
|
||||
videosFolder: 'tests/e2e/videos',
|
||||
supportFile: 'tests/e2e/support/index.js',
|
||||
};
|
||||
};
|
8
frontend/tests/e2e/specs/test.js
Normal file
8
frontend/tests/e2e/specs/test.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
// https://docs.cypress.io/api/introduction/api.html
|
||||
|
||||
describe('My First Test', () => {
|
||||
it('Visits the app root url', () => {
|
||||
cy.visit('/');
|
||||
cy.contains('h1', 'Welcome to Your Vue.js + TypeScript App');
|
||||
});
|
||||
});
|
25
frontend/tests/e2e/support/commands.js
Normal file
25
frontend/tests/e2e/support/commands.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
// ***********************************************
|
||||
// This example commands.js shows you how to
|
||||
// create various custom commands and overwrite
|
||||
// existing commands.
|
||||
//
|
||||
// For more comprehensive examples of custom
|
||||
// commands please read more here:
|
||||
// https://on.cypress.io/custom-commands
|
||||
// ***********************************************
|
||||
//
|
||||
//
|
||||
// -- This is a parent command --
|
||||
// Cypress.Commands.add("login", (email, password) => { ... })
|
||||
//
|
||||
//
|
||||
// -- This is a child command --
|
||||
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
|
||||
//
|
||||
//
|
||||
// -- This is a dual command --
|
||||
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
|
||||
//
|
||||
//
|
||||
// -- This is will overwrite an existing command --
|
||||
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
|
20
frontend/tests/e2e/support/index.js
Normal file
20
frontend/tests/e2e/support/index.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
// ***********************************************************
|
||||
// This example support/index.js is processed and
|
||||
// loaded automatically before your test files.
|
||||
//
|
||||
// This is a great place to put global configuration and
|
||||
// behavior that modifies Cypress.
|
||||
//
|
||||
// You can change the location of this file or turn off
|
||||
// automatically serving support files with the
|
||||
// 'supportFile' configuration option.
|
||||
//
|
||||
// You can read more here:
|
||||
// https://on.cypress.io/configuration
|
||||
// ***********************************************************
|
||||
|
||||
// Import commands.js using ES2015 syntax:
|
||||
import './commands';
|
||||
|
||||
// Alternatively you can use CommonJS syntax:
|
||||
// require('./commands')
|
13
frontend/tests/unit/example.spec.ts
Normal file
13
frontend/tests/unit/example.spec.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
import { expect } from 'chai';
|
||||
import { shallowMount } from '@vue/test-utils';
|
||||
import HelloWorld from '@/components/HelloWorld.vue';
|
||||
|
||||
describe('HelloWorld.vue', () => {
|
||||
it('renders props.msg when passed', () => {
|
||||
const msg = 'new message';
|
||||
const wrapper = shallowMount(HelloWorld, {
|
||||
propsData: { msg },
|
||||
});
|
||||
expect(wrapper.text()).to.include(msg);
|
||||
});
|
||||
});
|
|
@ -1,13 +1,41 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist/",
|
||||
"sourceMap": true,
|
||||
"noImplicitAny": false,
|
||||
"module": "es6",
|
||||
"target": "es5",
|
||||
"jsx": "react",
|
||||
"moduleResolution": "node",
|
||||
"allowJs": true,
|
||||
"allowSyntheticDefaultImports": true
|
||||
}
|
||||
}
|
||||
"compilerOptions": {
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
"strict": true,
|
||||
"jsx": "preserve",
|
||||
"importHelpers": true,
|
||||
"moduleResolution": "node",
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"sourceMap": true,
|
||||
"baseUrl": ".",
|
||||
"types": [
|
||||
"webpack-env",
|
||||
"mocha",
|
||||
"chai"
|
||||
],
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"src/*"
|
||||
]
|
||||
},
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"scripthost"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.tsx",
|
||||
"src/**/*.vue",
|
||||
"tests/**/*.ts",
|
||||
"tests/**/*.tsx"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
|
|
5
frontend/vue.config.js
Normal file
5
frontend/vue.config.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
module.exports = {
|
||||
transpileDependencies: [
|
||||
'vuetify',
|
||||
],
|
||||
};
|
|
@ -1,26 +0,0 @@
|
|||
const path = require("path")
|
||||
|
||||
module.exports = {
|
||||
entry: {
|
||||
login : "./src/login.js",
|
||||
content : "./src/content.js",
|
||||
accountManager: "./src/AccountManager.js"
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
//"allowJs": true,
|
||||
test: /\.tsx?$/,
|
||||
use: 'ts-loader',
|
||||
exclude: /node_modules/,
|
||||
},
|
||||
],
|
||||
},
|
||||
resolve: {
|
||||
extensions: [ '.tsx' ,'.jsx', '.ts', '.js' ],
|
||||
},
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
path: path.resolve(__dirname, "./static/frontend"),
|
||||
},
|
||||
};
|
Loading…
Reference in a new issue