Compare commits
90 Commits
production
...
dev
Author | SHA1 | Date |
---|---|---|
|
89780605e1 | 2 years ago |
|
dc1ba0d0bc | 2 years ago |
|
72e9f2e9ca | 2 years ago |
|
82a220f0e0 | 2 years ago |
|
8d3db4fb67 | 2 years ago |
|
a8bd40b10b | 2 years ago |
|
8479696682 | 2 years ago |
|
b8929fb765 | 2 years ago |
|
358726e0d2 | 2 years ago |
|
7d527600e0 | 2 years ago |
|
38a4cbc29a | 2 years ago |
|
1312b00de8 | 2 years ago |
|
ee5b243c0b | 2 years ago |
![]() |
f7cb5e9597 | 2 years ago |
![]() |
ca8a2b4111 | 2 years ago |
![]() |
1c2fc3826e | 2 years ago |
![]() |
e0e0552f86 | 2 years ago |
![]() |
9923af88a8 | 2 years ago |
|
4dd3fa4c54 | 2 years ago |
|
0d6330b968 | 2 years ago |
![]() |
49ed2e0cec | 2 years ago |
![]() |
0267795c3a | 2 years ago |
![]() |
93ddcbba7a | 2 years ago |
![]() |
28b24f2133 | 2 years ago |
![]() |
8688d4f048 | 2 years ago |
|
8ea65a8218 | 2 years ago |
![]() |
44a2078a9f | 2 years ago |
|
55ec18b75c | 2 years ago |
|
f215c6a07a | 2 years ago |
![]() |
d4e2b9f571 | 2 years ago |
|
75a98fe07f | 2 years ago |
|
de3490a9e9 | 2 years ago |
![]() |
25afe88cd5 | 2 years ago |
![]() |
6946307bca | 2 years ago |
![]() |
fa1a797a7c | 2 years ago |
![]() |
8bed9abdbe | 2 years ago |
![]() |
25fc896808 | 2 years ago |
![]() |
c3a7de208d | 2 years ago |
![]() |
d40a238ab3 | 2 years ago |
![]() |
51cbd34cce | 2 years ago |
|
01ed584c99 | 2 years ago |
|
c788454d21 | 2 years ago |
|
11abdf927e | 2 years ago |
![]() |
3c3bcc7551 | 2 years ago |
![]() |
ad90306a99 | 2 years ago |
![]() |
5c3169c7ce | 2 years ago |
![]() |
b70b210354 | 2 years ago |
![]() |
6355a5b779 | 2 years ago |
![]() |
cfd5a24104 | 2 years ago |
![]() |
d9493961ba | 2 years ago |
![]() |
e72477d9bf | 2 years ago |
![]() |
0ea82b137e | 2 years ago |
![]() |
2d0ea98371 | 2 years ago |
![]() |
7aa87207ba | 2 years ago |
![]() |
9ce4a7cb50 | 2 years ago |
![]() |
05f685b492 | 2 years ago |
|
5d3173f727 | 2 years ago |
|
17bf644668 | 2 years ago |
|
df063f8863 | 2 years ago |
|
45629e8026 | 2 years ago |
|
6064a447d7 | 2 years ago |
|
16e916154f | 2 years ago |
|
76b82c03a1 | 2 years ago |
|
51d9ac3a48 | 2 years ago |
![]() |
d9732ed6a0 | 2 years ago |
![]() |
60416a035f | 2 years ago |
![]() |
6ee043d915 | 2 years ago |
![]() |
d840f2b838 | 2 years ago |
![]() |
940dbe225c | 2 years ago |
![]() |
17001d2dad | 2 years ago |
![]() |
3f665416a8 | 2 years ago |
![]() |
49beaa91dc | 2 years ago |
![]() |
15cc0c07e0 | 2 years ago |
![]() |
cb16287571 | 2 years ago |
![]() |
b8e2469f16 | 2 years ago |
![]() |
1cd272f243 | 2 years ago |
![]() |
bd7984d10f | 2 years ago |
![]() |
187eb13888 | 2 years ago |
![]() |
32f3198291 | 2 years ago |
![]() |
00a5572695 | 2 years ago |
![]() |
4540bb20d9 | 2 years ago |
![]() |
6f0c153f0c | 2 years ago |
![]() |
8b1bc56372 | 2 years ago |
![]() |
8ea19b6eb1 | 2 years ago |
![]() |
9c958c90aa | 2 years ago |
![]() |
50c34c2c17 | 2 years ago |
![]() |
b099722cd7 | 2 years ago |
![]() |
27d71e27f7 | 2 years ago |
![]() |
432b676524 | 2 years ago |
![]() |
238acf40fd | 2 years ago |
@ -0,0 +1,27 @@
|
||||
module.exports = {
|
||||
parserOptions: {
|
||||
ecmaVersion: 2021,
|
||||
sourceType: 'module'
|
||||
},
|
||||
env: {
|
||||
browser: true,
|
||||
},
|
||||
plugins: [
|
||||
'react',
|
||||
'react-hooks'
|
||||
],
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:react/recommended',
|
||||
'plugin:react/jsx-runtime',
|
||||
'plugin:react-hooks/recommended'
|
||||
],
|
||||
rules: {
|
||||
'react/no-unescaped-entities': 0
|
||||
},
|
||||
settings: {
|
||||
react: {
|
||||
version: 'detect'
|
||||
}
|
||||
}
|
||||
};
|
@ -1,12 +1,25 @@
|
||||
.DS_Store
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# Generated by package manager
|
||||
node_modules/
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# Generated by Cordova
|
||||
/plugins/
|
||||
/platforms/
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
.idea
|
||||
# misc
|
||||
.DS_Store
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
.idea
|
||||
|
@ -1,5 +1,22 @@
|
||||
# Application Basket
|
||||
Ce repository utilise Cordova pour build sur electron / android et web.
|
||||
|
||||
## contribuer
|
||||
* Notre projet est une application qui permet a des clubs de basket d'envoyer des tactiques de jeux à leurs equipes.
|
||||
* Editeur et visualisateur interne des tactiques de jeux.
|
||||
* Les administrateurs (coachs) d'une equipe peuvent diffuser leurs tactiques à leurs élèves.
|
||||
* Les élèves peuvent aussi proposer leurs propres tactiques que les coachs peuvent à leurs tour approuver.
|
||||
|
||||
## Construire l'application
|
||||
|
||||
Ce projet utilise NPM comme gestionnaire de paquets, mais vous pouvez remplacer NPM par Yarn ou PNPM.
|
||||
|
||||
Une fois le dépôt cloné :
|
||||
|
||||
```bash
|
||||
npm install # Installe les dépendances
|
||||
npm run build # Construit l'application
|
||||
npm run dev # Démarre le serveur de développement
|
||||
npm run test # Lance les tests
|
||||
```
|
||||
|
||||
## Contribuer
|
||||
Dans le code ou dans la documentation, merci d'ecrire en anglais si possible
|
||||
|
@ -1,15 +0,0 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<widget id="org.tbasket.app" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
|
||||
<name>TactiqueBasketApplication</name>
|
||||
<description>Sample Apache Cordova App</description>
|
||||
<author email="dev@cordova.apache.org" href="https://cordova.apache.org">
|
||||
Apache Cordova Team
|
||||
</author>
|
||||
<content src="index.html" />
|
||||
<allow-intent href="http://*/*" />
|
||||
<allow-intent href="https://*/*" />
|
||||
<platform name="android">
|
||||
<preference name="Scheme" value="http" />
|
||||
</platform>
|
||||
|
||||
</widget>
|
@ -0,0 +1,16 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: Apache
|
||||
|
||||
steps:
|
||||
- name: Deliver
|
||||
image: override6/tbasket-frontend:latest
|
||||
workspace:
|
||||
path: /src/web
|
||||
environment:
|
||||
SSH_PRIVATE_KEY:
|
||||
from_secret: SSH_PRIVATE
|
||||
SSH_PUBLIC_KEY:
|
||||
from_secret: SSH_PUBLIC
|
||||
commands:
|
||||
- bash drone/deliver.sh browser
|
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
apt install apksigner > /dev/null
|
||||
|
||||
if [ $DRONE_BRANCH = "dev" ]; then
|
||||
ARTIFACT_TYPE="debug"
|
||||
elif [ $DRONE_BRANCH = "production" ]; then
|
||||
ARTIFACT_TYPE="release"
|
||||
fi
|
||||
|
||||
apksigner sign --ks /home/maxime/server/TBasket/application/android/tbasket.keystore app-$ARTIFACT_TYPE-unsigned.apk &&
|
||||
mv app-$ARTIFACT_TYPE-unsigned.apk tbasket-$ARTIFACT_TYPE.apk &&
|
||||
echo "apk has been signed."
|
||||
|
||||
echo "android-sign.sh done."
|
@ -0,0 +1,57 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
TYPE="$1"
|
||||
case "$DRONE_BRANCH" in
|
||||
"production")
|
||||
OPTIONS="--release"
|
||||
;;
|
||||
"")
|
||||
echo '$DRONE_BRANCH not set' >&2
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
OPTIONS="--debug"
|
||||
;;
|
||||
esac
|
||||
|
||||
curl https://codefirst.iut.uca.fr/git/Tactique-basket/Backend/raw/branch/dev/drone/prepare-deliver.sh > /tmp/prepare-deliver.sh
|
||||
source /tmp/prepare-deliver.sh
|
||||
|
||||
SERV_DIR="$DIR/application/$TYPE"
|
||||
|
||||
case "$TYPE" in
|
||||
"android")
|
||||
OPTIONS="$OPTIONS -- --packageType=apk"
|
||||
OUT_DIR="platforms/android/app/build/outputs/apk"
|
||||
|
||||
#install gradle
|
||||
wget -q https://services.gradle.org/distributions/gradle-7.5.1-bin.zip -P /tmp
|
||||
unzip -d /opt/gradle /tmp/gradle-*.zip > /dev/null
|
||||
export GRADLE_HOME=/opt/gradle/gradle-7.5.1/
|
||||
echo $GRADLE_HOME
|
||||
export PATH=$PATH:$GRADLE_HOME/bin
|
||||
;;
|
||||
"browser")
|
||||
OUT_DIR="platforms/browser/www/"
|
||||
mkdir -p "$OUT_DIR"
|
||||
npm install && npm run build -- --outDir "$OUT_DIR"
|
||||
if [ "$DRONE_BRANCH" = "production" ]; then
|
||||
SERV_DIR="public_html/basket"
|
||||
else SERV_DIR="/server/apache/TBasket/"
|
||||
fi
|
||||
;;
|
||||
"electron")
|
||||
OUT_DIR="platforms/electron/build"
|
||||
;;
|
||||
*)
|
||||
echo "unrecognized platform $TYPE." >&2
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "delivering outputs on server"
|
||||
|
||||
echo "making delivery onto '$USER@$IP:$SERV_DIR'"
|
||||
rsync -avz -I \
|
||||
--rsync-path="mkdir -p \"$SERV_DIR\" && rsync" \
|
||||
-e "ssh -o StrictHostKeyChecking=no" \
|
||||
--delete "$OUT_DIR" "$USER@$IP:/$SERV_DIR"
|
@ -0,0 +1,4 @@
|
||||
FROM alvrme/alpine-android:android-32-jdk11
|
||||
RUN apk update \
|
||||
&& apk add npm openssh-client tree rsync \
|
||||
&& npm install -g cordova
|
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Tactique basket</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/index.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -1,28 +1,32 @@
|
||||
{
|
||||
"name": "org.tbasket.app",
|
||||
"displayName": "TactiqueBasketApplication",
|
||||
"version": "1.0.0",
|
||||
"description": "A sample Apache Cordova application that responds to the deviceready event.",
|
||||
"main": "index.js",
|
||||
"name": "tbasket",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-svg-core": "^6.3.0",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.3.0",
|
||||
"@fortawesome/react-fontawesome": "^0.2.0",
|
||||
"ionicons": "^6.1.3",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-router-dom": "^6.8.2",
|
||||
"web-vitals": "^3.1.1"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
"build": "vite build",
|
||||
"test": "vitest",
|
||||
"dev": "vite",
|
||||
"lint": "eslint src/**/*.{js,jsx}"
|
||||
},
|
||||
"keywords": [
|
||||
"ecosystem:cordova"
|
||||
],
|
||||
"author": "Apache Cordova Team",
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"cordova-android": "^11.0.0",
|
||||
"cordova-browser": "^6.0.0",
|
||||
"cordova-electron": "^3.1.0"
|
||||
},
|
||||
"cordova": {
|
||||
"platforms": [
|
||||
"electron",
|
||||
"browser",
|
||||
"android"
|
||||
],
|
||||
"plugins": {}
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/react": "^14.0.0",
|
||||
"@vitejs/plugin-react": "^3.1.0",
|
||||
"eslint": "^8.35.0",
|
||||
"eslint-plugin-react": "^7.32.2",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"jsdom": "^21.1.0",
|
||||
"vite": "^4.1.4",
|
||||
"vitest": "^0.29.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,47 @@
|
||||
const path = require('path');
|
||||
|
||||
const { app, BrowserWindow } = require('electron');
|
||||
const isDev = require('electron-is-dev');
|
||||
|
||||
function createWindow() {
|
||||
// Create the browser window.
|
||||
const win = new BrowserWindow({
|
||||
width: 800,
|
||||
height: 600,
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
},
|
||||
});
|
||||
|
||||
// and load the index.html of the app.
|
||||
// win.loadFile("index.html");
|
||||
win.loadURL(
|
||||
isDev
|
||||
? 'http://localhost:3000'
|
||||
: `file://${path.join(__dirname, '../build/index.html')}`
|
||||
);
|
||||
// Open the DevTools.
|
||||
if (isDev) {
|
||||
win.webContents.openDevTools({ mode: 'detach' });
|
||||
}
|
||||
}
|
||||
|
||||
// This method will be called when Electron has finished
|
||||
// initialization and is ready to create browser windows.
|
||||
// Some APIs can only be used after this event occurs.
|
||||
app.whenReady().then(createWindow);
|
||||
|
||||
// Quit when all windows are closed, except on macOS. There, it's common
|
||||
// for applications and their menu bar to stay active until the user quits
|
||||
// explicitly with Cmd + Q.
|
||||
app.on('window-all-closed', () => {
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit();
|
||||
}
|
||||
});
|
||||
|
||||
app.on('activate', () => {
|
||||
if (BrowserWindow.getAllWindows().length === 0) {
|
||||
createWindow();
|
||||
}
|
||||
});
|
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 568 KiB |
After Width: | Height: | Size: 1.3 MiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 9.4 KiB |
@ -0,0 +1,93 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Accueil</title>
|
||||
<link rel="stylesheet" type="text/css" href="../src/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="header-left">
|
||||
<img src="img/logo2.png" alt="logo">
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<h2>Hello Prénom Nom !</h2>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<!-- <button>
|
||||
<img src="deconnection.png" alt="Déconnection">
|
||||
<span>Déconnection</span>
|
||||
</button>-->
|
||||
<button class="submit-button">Déconnexion</button>
|
||||
</div>
|
||||
</header>
|
||||
<main>
|
||||
<div id="teams-section">
|
||||
<div id="team-list-h">
|
||||
<h2>Mes équipes</h2>
|
||||
</div>
|
||||
<div id="teams-list">
|
||||
<!-- afficher la liste des équipes -->
|
||||
<div class="team-item">
|
||||
<img src="/img/logo2.png">
|
||||
<p class="team-name">Equipe 1</p>
|
||||
</div>
|
||||
<div class="team-item">
|
||||
<img src="img/logo2.png">
|
||||
<p class="team-name">Equipe 2</p>
|
||||
</div>
|
||||
<div class="team-item">
|
||||
<img src="img/logo2.png">
|
||||
<p class="team-name">Equipe 3</p>
|
||||
</div>
|
||||
<div class="team-item">
|
||||
<img src="img/logo2.png">
|
||||
<p class="team-name">Equipe 3</p>
|
||||
</div>
|
||||
<div class="team-item">
|
||||
<img src="img/logo2.png">
|
||||
<p class="team-name">Equipe 3</p>
|
||||
</div>
|
||||
<div class="team-item">
|
||||
<img src="img/logo2.png">
|
||||
<p class="team-name">Equipe 3</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="schema-section">
|
||||
<div id="schema-list-h">
|
||||
<h2>Mes Schémas</h2>
|
||||
</div>
|
||||
<div id="schema-list">
|
||||
<!-- afficher la liste des équipes -->
|
||||
<div class="schema-item">
|
||||
<img src="img/schema.png">
|
||||
<p class="schema-name">Schémas 1</p>
|
||||
</div>
|
||||
<div class="schema-item">
|
||||
<img src="img/schema.png">
|
||||
<p class="schema-name">Schémas 2</p>
|
||||
</div>
|
||||
<div class="schema-item">
|
||||
<img src="img/schema.png">
|
||||
<p class="schema-name">Schémas 3</p>
|
||||
</div>
|
||||
<div class="schema-item">
|
||||
<img src="img/schema.png">
|
||||
<p class="schema-name">Schémas 3</p>
|
||||
</div>
|
||||
<div class="schema-item">
|
||||
<img src="img/schema.png">
|
||||
<p class="schema-name">Schémas 3</p>
|
||||
</div>
|
||||
<div class="schema-item">
|
||||
<img src="img/schema.png">
|
||||
<p class="schema-name">Schémas 3</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,25 @@
|
||||
{
|
||||
"short_name": "React App",
|
||||
"name": "Create React App Sample",
|
||||
"icons": [
|
||||
{
|
||||
"src": "favicon.ico",
|
||||
"sizes": "64x64 32x32 24x24 16x16",
|
||||
"type": "image/x-icon"
|
||||
},
|
||||
{
|
||||
"src": "logo192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192"
|
||||
},
|
||||
{
|
||||
"src": "logo512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512"
|
||||
}
|
||||
],
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#ffffff"
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
# https://www.robotstxt.org/robotstxt.html
|
||||
User-agent: *
|
||||
Disallow:
|
@ -0,0 +1,38 @@
|
||||
.App {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.App-logo {
|
||||
height: 40vmin;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
.App-logo {
|
||||
animation: App-logo-spin infinite 5s linear;
|
||||
}
|
||||
}
|
||||
|
||||
.App-header {
|
||||
background-color: #282c34;
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: calc(10px + 2vmin);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.App-link {
|
||||
color: #61dafb;
|
||||
}
|
||||
|
||||
@keyframes App-logo-spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
import Register from './components/register/Register';
|
||||
import Login from "./components/login/Login";
|
||||
import {MainPage} from "./components/main/Main";
|
||||
import {BrowserRouter, Routes, Route} from "react-router-dom";
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<div className="App">
|
||||
<BrowserRouter>
|
||||
<Routes>
|
||||
<Route path="/" element={<MainPage />} />
|
||||
<Route path="/register" element={<Register />} />
|
||||
<Route path="/login" element={<Login />} />
|
||||
<Route path="/main" element={<MainPage/>} />
|
||||
<Route path="/main/:id" element={<MainPage/>} />
|
||||
<Route path="/*" element={<MainPage />} />
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
export default App;
|
@ -0,0 +1,51 @@
|
||||
import '../../css/login.css'
|
||||
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||||
|
||||
export default function Login() {
|
||||
return (
|
||||
<>
|
||||
<div className={"body"}>
|
||||
<div className="container">
|
||||
<form action="/login" method="POST">
|
||||
<h3>Se connecter :</h3>
|
||||
<div className="Input">
|
||||
<span>Identifiant (eMail)</span>
|
||||
<div className="box">
|
||||
<div className="icon">
|
||||
<FontAwesomeIcon icon="envelope" />
|
||||
</div>
|
||||
<input type="input" className="form__field" placeholder="email" name="email" id='email'
|
||||
required/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="Input">
|
||||
<span>Mot de passe</span>
|
||||
<div className="box">
|
||||
<div className="icon">
|
||||
<FontAwesomeIcon icon="lock" />
|
||||
</div>
|
||||
<input type="password" className="form__field" placeholder="mot de passe" name="password"
|
||||
id="password" required/>
|
||||
</div>
|
||||
</div>
|
||||
<label>
|
||||
<input type="checkbox" value="se souvenir de moi" id={"remember me"} name={"remember me"}/>
|
||||
se souvenir de moi
|
||||
</label>
|
||||
<div className="Input">
|
||||
<div className="box">
|
||||
<input type="submit" value="Se connecter"/>
|
||||
</div>
|
||||
</div>
|
||||
<div className={"Href"}>
|
||||
<a href="/login">J'ai oublier mon mot de passe</a>
|
||||
<a href="/register">Je n'ai pas encore de compte</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
@ -0,0 +1,75 @@
|
||||
import '../../css/main.css'
|
||||
|
||||
export function MainPage() {
|
||||
return (<>
|
||||
<header>
|
||||
<div className="header-left">
|
||||
<img src="/img/logo2.png" alt="" />
|
||||
</div>
|
||||
<div className="header-center">
|
||||
<h2>Bienvenue, Prénom Nom</h2>
|
||||
</div>
|
||||
<div className="header-right">
|
||||
<button className="submit-button">Déconnexion</button>
|
||||
</div>
|
||||
</header>
|
||||
<div id="teams-section">
|
||||
<div id="team-list-h">
|
||||
<h2>Mes équipes</h2>
|
||||
</div>
|
||||
<div id="teams-list">
|
||||
{/*afficher la liste des équipes*/}
|
||||
<div className="team-item">
|
||||
<img src="/img/logo2.png" alt="" />
|
||||
<p className="team-name">Equipe 1</p>
|
||||
</div>
|
||||
<div className="team-item">
|
||||
<img src="/img/logo2.png" alt="" />
|
||||
<p className="team-name">Equipe 2</p>
|
||||
</div>
|
||||
<div className="team-item">
|
||||
<img src="/img/logo2.png" alt="" />
|
||||
<p className="team-name">Equipe 3</p>
|
||||
</div>
|
||||
<div className="team-item">
|
||||
<img src="/img/logo2.png" alt="" />
|
||||
<p className="team-name">Equipe 3</p>
|
||||
</div>
|
||||
<div className="team-item">
|
||||
<img src="/img/logo2.png" alt="" />
|
||||
<p className="team-name">Equipe 3</p>
|
||||
</div>
|
||||
<div className="team-item">
|
||||
<img src="/img/logo2.png" alt="" />
|
||||
<p className="team-name">Equipe 3</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="schemas-section">
|
||||
<div id="schemas-list-h">
|
||||
<h2>Mes Schémas</h2>
|
||||
</div>
|
||||
<div id="schemas-list">
|
||||
{/*afficher la liste des Schémas*/}
|
||||
<div className="schemas-item">
|
||||
<img src="/img/Visualiseur.png" alt="" />
|
||||
<p className="schemas-name">Schéma 1</p>
|
||||
</div>
|
||||
<div className="schemas-item">
|
||||
<img src="/img/Visualiseur.png" alt="" />
|
||||
<p className="schemas-name">Schéma 2</p>
|
||||
</div>
|
||||
<div className="schemas-item">
|
||||
<img src="/img/Visualiseur.png" alt="" />
|
||||
<p className="schemas-name">Schéma 3</p>
|
||||
</div>
|
||||
<div className="schemas-item">
|
||||
<img src="/img/Visualiseur.png" alt="" />
|
||||
<p className="schemas-name">Schéma 3</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
@ -0,0 +1,80 @@
|
||||
import '../../css/login.css'
|
||||
import { library } from '@fortawesome/fontawesome-svg-core';
|
||||
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faLock, faEnvelope, faUser } from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
library.add(faLock);
|
||||
library.add(faEnvelope);
|
||||
library.add(faUser);
|
||||
|
||||
export default function Register() {
|
||||
return (
|
||||
<>
|
||||
<div className={"body"}>
|
||||
<div className="container">
|
||||
<form action="/signup" method="POST">
|
||||
<h3>S'inscrire :</h3>
|
||||
<div className="Input">
|
||||
<span>Adresse e-mail</span>
|
||||
<div className="box">
|
||||
<div className="icon">
|
||||
<FontAwesomeIcon icon="envelope" />
|
||||
</div>
|
||||
<input type="input" className="form__field" placeholder="email" name="email" id='email'
|
||||
required/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="Input">
|
||||
<span>Nom</span>
|
||||
<div className="box">
|
||||
<div className="icon">
|
||||
<FontAwesomeIcon icon="user" />
|
||||
</div>
|
||||
<input type="input" placeholder="nom" name="name" id='name' required/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="Input">
|
||||
<span>Prénom</span>
|
||||
<div className="box">
|
||||
<div className="icon">
|
||||
<FontAwesomeIcon icon="user" />
|
||||
</div>
|
||||
<input type="input" placeholder="Prénom" name="forename" id='forename' required/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="Input">
|
||||
<span>Mot de passe</span>
|
||||
<div className="box">
|
||||
<div className="icon">
|
||||
<FontAwesomeIcon icon="lock" />
|
||||
</div>
|
||||
<input type="password" className="form__field" placeholder="mot de passe" name="password"
|
||||
id="password"
|
||||
required/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="Input">
|
||||
<span>Confirmer le mot de passe</span>
|
||||
<div className="box">
|
||||
<div className="icon">
|
||||
<FontAwesomeIcon icon="lock" />
|
||||
</div>
|
||||
<input type="password" className="form__field" placeholder="mot de passe" name="cpassword"
|
||||
id="cpassword" required/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="Input">
|
||||
<div className="box">
|
||||
<input type="submit" value="S'inscrire"/>
|
||||
</div>
|
||||
</div>
|
||||
<a href="/login">J'ai déjà un compte</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
|
||||
)
|
||||
}
|
@ -0,0 +1,126 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=Alegreya+Sans:ital,wght@0,100;0,300;0,400;0,500;0,700;0,800;0,900;1,100;1,300;1,400;1,500;1,700;1,800;1,900&display=swap');
|
||||
*{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
font-family: 'Alegreya',sans-serif;
|
||||
}
|
||||
a{
|
||||
text-decoration: none;
|
||||
}
|
||||
.body{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
background-image: url("/img/background-login.jpg");
|
||||
-webkit-backdrop-filter: blur(15px); /* assure la compatibilité avec safari */
|
||||
backdrop-filter: blur(35px);
|
||||
background-color: rgba(182, 182, 182, 0.2);
|
||||
}
|
||||
|
||||
.container{
|
||||
position: relative;
|
||||
width: 400px;
|
||||
min-height: 550px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #F2561D;
|
||||
box-shadow: 25px 25px 75px rgba(0,0,0,0.25), 10px 10px 70px rgba(0,0,0,0.5);
|
||||
border-radius: 30px;
|
||||
padding: 50px;
|
||||
}
|
||||
|
||||
form{
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.container h3{
|
||||
color: #0D0D0D;
|
||||
font-weight: 600;
|
||||
font-size: 2em;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
container a:link{
|
||||
color: #0D0D0D;
|
||||
}
|
||||
container a:visited{
|
||||
color: #0D0D0D;
|
||||
}
|
||||
|
||||
container a:hover{
|
||||
color: #0D0D0D;
|
||||
}
|
||||
.Input{
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.Input span{
|
||||
display: inline-block;
|
||||
color: #0D0D0D;
|
||||
margin-bottom: 10px;
|
||||
letter-spacing: 1px;
|
||||
font-size: 1.25em;
|
||||
border-left: 4px solid #FF8444;
|
||||
padding-left: 4px;
|
||||
line-height: 1em;
|
||||
}
|
||||
.Input .box{
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.Input .box .icon{
|
||||
position: relative;
|
||||
min-width: 40px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 50%;
|
||||
margin-right: 10px;
|
||||
color: #0D0D0D;
|
||||
font-size: 1.15em;
|
||||
box-shadow: 5px 5px 7px rgba(0,0,0,0.25);
|
||||
}
|
||||
|
||||
.Input .box input{
|
||||
position: relative;
|
||||
width: 100%;
|
||||
border: none;
|
||||
outline: none;
|
||||
padding: 10px 20px;
|
||||
border-radius: 30px;
|
||||
font-size: 0.85em;
|
||||
box-shadow: 5px 5px 7px rgba(0,0,0,0.25);
|
||||
}
|
||||
|
||||
.Input .box input[type="submit"]{
|
||||
background-color: #0D0D0D;
|
||||
box-shadow: 5px 5px 7px rgba(0,0,0,0.25);
|
||||
color: #FF8444;
|
||||
cursor:pointer;
|
||||
letter-spacing: 2px;
|
||||
font-weight: 600;
|
||||
margin-top: 10px;
|
||||
}
|
||||
label{
|
||||
color: #0D0D0D;
|
||||
letter-spacing: 1px;
|
||||
font-size: 0.95em;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
label input{
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
a:nth-of-type(1) {
|
||||
display: block;
|
||||
}
|
@ -0,0 +1,159 @@
|
||||
header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 20px 0 20px;
|
||||
background-color: #FF8444;
|
||||
height: 160px;
|
||||
}
|
||||
body{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: sans-serif;
|
||||
background: #34495e;
|
||||
}
|
||||
.header-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.header-left img {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
}
|
||||
|
||||
.header-center h2 {
|
||||
font-size: 30px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.submit-button {
|
||||
background-color: #34495e;
|
||||
color: white;
|
||||
padding: 18px 30px;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-size: 24px;
|
||||
box-shadow: 4px 4px #1B1B1B;
|
||||
}
|
||||
|
||||
#teams-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 60px;
|
||||
background-color: #f2f2f2;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
box-shadow: 5px 5px #1B1B1B;
|
||||
margin: 10px;
|
||||
|
||||
}
|
||||
|
||||
#teams-section h2 {
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
margin-top: 0;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#teams-list {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
overflow: hidden;
|
||||
justify-content: center;
|
||||
}
|
||||
.team-item {
|
||||
padding: 15px 15px 5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
min-width: 150px;
|
||||
margin: 10px;
|
||||
background-color: #ccc;
|
||||
border-radius: 15px;
|
||||
|
||||
overflow: hidden;
|
||||
box-shadow: 3px 3px #585858;
|
||||
}
|
||||
|
||||
.team-item .team-name {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.team-name {
|
||||
font-size: 18px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.team-item img {
|
||||
border-radius: 15px;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
max-width: 150px;
|
||||
max-height: 150px;
|
||||
|
||||
box-shadow: 2px 2px #A7A7A7;
|
||||
}
|
||||
|
||||
#schemas-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 60px;
|
||||
background-color: #f2f2f2;
|
||||
border-radius: 10px 10px 10px 10px;
|
||||
box-shadow: 5px 5px #1B1B1B;
|
||||
margin: 10px;
|
||||
|
||||
}
|
||||
|
||||
#schemas-section h2 {
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
margin-top: 0;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#schemas-list {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
overflow: hidden;
|
||||
justify-content: center;
|
||||
}
|
||||
.schemas-item {
|
||||
padding: 15px 15px 5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
min-width: 150px;
|
||||
margin: 10px;
|
||||
background-color: #ccc;
|
||||
border-radius: 15px;
|
||||
|
||||
overflow: hidden;
|
||||
box-shadow: 3px 3px #585858;
|
||||
}
|
||||
|
||||
.schemas-item .schemas-name {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.schemas-name {
|
||||
font-size: 18px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.schemas-item img {
|
||||
border-radius: 15px;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
max-width: 150px;
|
||||
max-height: 150px;
|
||||
|
||||
box-shadow: 2px 2px #A7A7A7;
|
||||
}
|
||||
|
@ -0,0 +1,13 @@
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
||||
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
||||
sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
||||
monospace;
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import './index.css';
|
||||
import App from './App';
|
||||
import reportWebVitals from './reportWebVitals';
|
||||
|
||||
const root = ReactDOM.createRoot(document.getElementById('root'));
|
||||
root.render(
|
||||
<React.StrictMode>
|
||||
<App />
|
||||
</React.StrictMode>
|
||||
);
|
||||
|
||||
// If you want to start measuring performance in your app, pass a function
|
||||
// to log results (for example: reportWebVitals(console.log))
|
||||
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
||||
reportWebVitals();
|
After Width: | Height: | Size: 2.6 KiB |
@ -0,0 +1,13 @@
|
||||
const reportWebVitals = onPerfEntry => {
|
||||
if (onPerfEntry && onPerfEntry instanceof Function) {
|
||||
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
|
||||
getCLS(onPerfEntry);
|
||||
getFID(onPerfEntry);
|
||||
getFCP(onPerfEntry);
|
||||
getLCP(onPerfEntry);
|
||||
getTTFB(onPerfEntry);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export default reportWebVitals;
|
@ -0,0 +1,5 @@
|
||||
// jest-dom adds custom jest matchers for asserting on DOM nodes.
|
||||
// allows you to do things like:
|
||||
// expect(element).toHaveTextContent(/react/i)
|
||||
// learn more: https://github.com/testing-library/jest-dom
|
||||
import '@testing-library/jest-dom';
|
@ -0,0 +1,12 @@
|
||||
import { render } from '@testing-library/react';
|
||||
import { describe, test, expect } from 'vitest';
|
||||
|
||||
const App = () => <div>learn react</div>
|
||||
|
||||
describe('Application', function () {
|
||||
test('renders learn react link', () => {
|
||||
const { getByText } = render(<App />);
|
||||
const linkElement = getByText(/learn react/i);
|
||||
expect(linkElement).toBeInTheDocument();
|
||||
});
|
||||
});
|
@ -0,0 +1 @@
|
||||
import '@testing-library/jest-dom'
|
@ -0,0 +1,36 @@
|
||||
import react from '@vitejs/plugin-react';
|
||||
import { defineConfig } from 'vitest/config';
|
||||
import fs from 'fs/promises';
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
esbuild: {
|
||||
loader: "jsx",
|
||||
include: /(src|test)\/.*\.jsx?$/,
|
||||
exclude: [],
|
||||
},
|
||||
build: {
|
||||
target: 'es2021',
|
||||
},
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'jsdom',
|
||||
setupFiles: './test/setupTests.js'
|
||||
},
|
||||
plugins: [react()],
|
||||
optimizeDeps: {
|
||||
esbuildOptions: {
|
||||
plugins: [
|
||||
{
|
||||
name: 'load-js-files-as-jsx',
|
||||
setup(build) {
|
||||
build.onLoad({ filter: /(src|test)\/.*\.js$/ }, async (args) => ({
|
||||
loader: 'jsx',
|
||||
contents: await fs.readFile(args.path, 'utf8'),
|
||||
}));
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
});
|
@ -1,19 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<script src="index.js"></script>
|
||||
<title>Counter</title>
|
||||
</head>
|
||||
<body onload="initCounter()">
|
||||
|
||||
<div id="page">
|
||||
<label>Compteur : </label>
|
||||
<label id="counter">{0}</label>
|
||||
<button id="increment" onclick="makeIncrement()">Incrémenter</button>
|
||||
<button id="reload" onclick="window.location.reload()">recharger la page</button>
|
||||
</div>
|
||||
|
||||
<script src="/cordova.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -1,23 +0,0 @@
|
||||
let counter = 0;
|
||||
const ADDRESS = "92.132.18.192:950"
|
||||
|
||||
function updateText() {
|
||||
document.getElementById("counter").innerHTML = counter
|
||||
}
|
||||
|
||||
async function makeIncrement() {
|
||||
fetch(`http://${ADDRESS}/counter`, {method: 'POST'})
|
||||
.then(response => { //TODO verify if it's not an error
|
||||
counter++
|
||||
updateText()
|
||||
})
|
||||
}
|
||||
|
||||
function initCounter() {
|
||||
fetch(`http://${ADDRESS}/counter`, {method: 'GET'})
|
||||
.then(response => response.json())
|
||||
.then(json => {
|
||||
counter = json.value
|
||||
updateText()
|
||||
})
|
||||
}
|
Before Width: | Height: | Size: 21 KiB |
@ -1,16 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<script src="index.js"></script>
|
||||
<title>hello</title>
|
||||
</head>
|
||||
<body onload="">
|
||||
|
||||
<div id="page">
|
||||
<button onclick="window.location.href = 'counter/index.html'">aller au compteur</button>
|
||||
</div>
|
||||
|
||||
<script src="/cordova.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
// Wait for the deviceready event before using any of Cordova's device APIs.
|
||||
// See https://cordova.apache.org/docs/en/latest/cordova/events/events.html#deviceready
|
||||
document.addEventListener('deviceready', onDeviceReady, false);
|
||||
|
||||
function onDeviceReady() {
|
||||
// Cordova is now initialized. Have fun!
|
||||
|
||||
console.log('Running cordova-' + cordova.platformId + '@' + cordova.version);
|
||||
document.getElementById('deviceready').classList.add('ready');
|
||||
}
|