Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release/1.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
holtwick committed Aug 12, 2020
2 parents 593926c + 269f4ed commit a32f152
Show file tree
Hide file tree
Showing 9 changed files with 1,813 additions and 1,532 deletions.
3,164 changes: 1,651 additions & 1,513 deletions package-lock.json

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "peer2school",
"version": "1.2.0",
"version": "1.3.0",
"private": true,
"scripts": {
"start": "npm run serve",
Expand All @@ -13,21 +13,21 @@
"clipboard-copy": "^3.1.0",
"core-js": "^3.6.5",
"debug": "^4.1.1",
"lib0": "^0.2.28",
"lib0": "^0.2.33",
"simple-peer": "^9.7.2",
"strophe.js": "^1.3.5",
"uuid": "^8.1.0",
"strophe.js": "^1.3.6",
"uuid": "^8.3.0",
"vue": "^2.6.11",
"y-indexeddb": "^9.0.3",
"y-protocols": "^1.0.0",
"yjs": "^13.2.0"
"y-indexeddb": "^9.0.5",
"y-protocols": "^1.0.1",
"yjs": "^13.3.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.4.4",
"@vue/cli-service": "~4.4.4",
"jest": "^26.0.1",
"@vue/cli-plugin-babel": "~4.5.3",
"@vue/cli-service": "~4.5.3",
"jest": "^26.3.0",
"node-sass": "^4.14.1",
"sass-loader": "^8.0.2",
"sass-loader": "^9.0.3",
"vue-template-compiler": "^2.6.11"
}
}
3 changes: 2 additions & 1 deletion src/jitsi/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import locale from '../lib/locale'
import de from '../locales/de'
import en from '../locales/en'
import it from '../locales/it'
import fr from '../locales/fr'
import App from './jitsi-main.vue'
import { state } from './state'

Expand All @@ -15,7 +16,7 @@ Vue.mixin({
})

Vue.use(locale, {
locales: { en, de, it },
locales: { en, de, it, fr },
})

new Vue({
Expand Down
2 changes: 1 addition & 1 deletion src/lib/locale.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export default {
install(Vue, { lang, locales = { en: {} } } = {}) {

lang = lang || navigator.language
lang = lang || navigator?.language?.slice(0, 2)
if (locales[lang] == null) {
lang = 'en'
}
Expand Down
10 changes: 5 additions & 5 deletions src/locales/fr.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
export default {
share_button: 'Partager avec les élèves',
send_message: 'Envoyer un message',
what_name: 'Quel est votre nom ?',
what_name: 'Quel est votre nom?',
student: 'Élève',
teacher: 'Enseignant',
set_name: 'Définir votre nom',
share: {
title: 'Partager',
link_info: 'Veuillez donner ce lien à vos élèves pour qu'ils participent :',
link_info: 'Veuillez donner ce lien à vos élèves pour qu\'ils participent:',
button_copy: 'Copier le lien',
qr_info: 'Vous pouvez également scanner ce QR Code avec la caméra d'un appareil mobile :',
qr_info: 'Vous pouvez également scanner ce QR Code avec la caméra d\'un appareil mobile:',
feedback: 'Pour tout commentaire, écrivez à <a href="mailto:[email protected]">[email protected]</a>',
media_server: 'Utiliser le serveur de médias'
}
media_server: 'Utiliser le serveur de médias',
},
}
3 changes: 2 additions & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import locale from './lib/locale'
import de from './locales/de'
import en from './locales/en'
import it from './locales/it'
import fr from './locales/fr'
import { state } from './state'

Vue.config.productionTip = false
Expand All @@ -17,7 +18,7 @@ Vue.mixin({
})

Vue.use(locale, {
locales: { en, de, it },
locales: { en, de, it, fr },
})

new Vue({
Expand Down
53 changes: 53 additions & 0 deletions web/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# (C)opyright Dirk Holtwick, 2017-02-03 <[email protected]>

# HSTS https://www.cyon.ch/support/a/wie-aktiviere-ich-http-strict-transport-security-hsts-fur-meine-website
Header set Strict-Transport-Security "max-age=3600" env=HTTPS

Header set X-Frame-Options SAMEORIGIN
Header set X-XSS-Protection "1; mode=block"
Header set X-Content-Type-Options nosniff

Header set Referrer-Policy same-origin

RewriteEngine on

DirectoryIndex index.html
# ErrorDocument 404 index.html

# Enforce https and remove www.
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} .*
RewriteCond %{SERVER_NAME} ^(www\.)?(.+)$ [NC]
RewriteRule ^(.*)$ https://peer.school/$1?referrer=%{HTTP_REFERER} [L,QSA,R=301]

RewriteCond %{HTTPS} off
RewriteCond %{SERVER_NAME} ^(www\.)?(.+)$ [NC]
RewriteRule ^(.*)$ https://peer.school/$1?referrer=%2 [L,R=301]

# Force Hostname
RewriteCond "%{HTTP_HOST}" "!^peer\.school" [NC]
RewriteCond "%{HTTP_HOST}" "!^$"
RewriteRule "^/?(.*)" "https://peer.school/$1?referrer=%{SERVER_NAME}" [L,R,NE]

# French
# RewriteCond %{HTTP:Accept-Language} ^((?!de|en|it).)*fr [NC]
# RewriteRule ^$ /fr/ [L,R=301]

# Italian
RewriteCond %{HTTP:Accept-Language} ^((?!de|en|fr).)*it [NC]
RewriteRule ^$ /it/ [L,R=301]

# English
# RewriteCond %{HTTP:Accept-Language} ^((?!de|it|fr).)*en [NC]
# RewriteRule ^$ /en/ [L,R=301]

# German
RewriteCond %{HTTP:Accept-Language} ^((?!en|it|fr).)*de [NC]
RewriteRule ^$ /de/ [L,R=301]

# Fallback
# RewriteRule ^$ /en/ [L,R=301]

# RewriteRule ^$ https://onepile.app/en/help/public-links [L,R=301]
RewriteRule ^class/(.+)/?$ /class.php?room=$1 [PT]
88 changes: 88 additions & 0 deletions web/fr/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<!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, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui, viewport-fit=cover">

<title>peer.school</title>

<style>
body {
text-align: center;
margin-top: 3rem;
font-family: -apple-system, system-ui, BlinkMacSystemFont, Segoe UI, Roboto, Hiragino Sans, Hiragino Kaku Gothic Pro, Yu Gothic, YuGothic, Meiryo, Helvetica Neue, sans-serif;
background: white;
color: #333;
}

.logo {
display: inline-flex;
align-content: center;
align-items: baseline;
}

.peer {
padding: 0.5rem;
background: #333;
color: white;
font-weight: 500;
border-radius: 0.25rem;
align-self: center;
}

.school {
color: black;
font-size: 4rem;
padding: 0.5rem 0.5rem 0.5rem 1rem;
font-family: Georgia;
}

.enter {
margin-top: 5rem;
}

.button {
background: #32b643;
color: white;
font-weight: 700;
border-radius: 0.25rem;
padding: 1.5rem;
text-decoration: none;
}

.button:hover {
background: #36ca4c;
}

.button:active {
background: #1f732b;
}

.footer {
margin-top: 5rem;
opacity: 0.6;
}

.abstract a,
.footer a {
color: #32b643;
text-decoration: none;
}

</style>
</head>
<body>
<div class="logo"><span class="peer">peer.</span><i class="school">School</i></div>
<div class="abstract">
<p><i>The virtual classroom from elementary school onwards</i></p>
<p>A contribution to the <a href="https://devpost.com/software/019_e-learning_peer-to-peer-lernplattform-ab-der-1-klasse" target="_blank">#wirvsvirus Hackathon</a></p>
</div>
<div class="enter">
<a class="button" role="button" href="/dist">Enter a new classroom</a>
</div>
<div class="footer">
<p>Open Source on <a href="https://github.com/holtwick/peer2school" target="_blank">GitHub</a></p>
</div>
</body>
</html>
File renamed without changes.

0 comments on commit a32f152

Please sign in to comment.