From 5eced69296340dc341cf23ad9917fda497d9d54c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janis=20Daniel=20Da=CC=88hne?= <janis.daehne2@student.uni-halle.de> Date: Mon, 9 Sep 2019 17:51:08 +0200 Subject: [PATCH] - added privacy policy file - changed about site (now external site) - added additional safety chech before deleting old users (activated users) - disabled old about site (removed link but router is still active for it) --- i18n/en.ts | 4 ++ i18n/i18nRoot.ts | 4 ++ package.json | 2 +- .../siteHeaderBar/siteHeaderUserArea.tsx | 46 +++++++++++++- src/components/siteSideMenu/menu.tsx | 23 +++---- .../manageActivatedUsersSite/listViewItem.tsx | 11 +++- src/constants.ts | 6 +- static_pages/about/about.css | 1 + static_pages/about/about.html | 53 +++++++++------- static_pages/about/about.styl | 1 + static_pages/about/todo.txt | 1 - static_pages/privacyPolicy/privacy.html | 17 +++++ webpack.config.dist.js | 62 +++++++++++++------ 13 files changed, 175 insertions(+), 56 deletions(-) create mode 100644 static_pages/privacyPolicy/privacy.html diff --git a/i18n/en.ts b/i18n/en.ts index 36caca5e..179f804d 100644 --- a/i18n/en.ts +++ b/i18n/en.ts @@ -63,6 +63,9 @@ export const lang_en: LangObj = { "Select an option...": "Select an option...", "Owner" : "Owner", "Owner was not loaded, id:" : "Owner was not loaded, id:", + "Privacy policy" : "Privacy policy", + "Copyright page" : "Copyright page", + "About page" : "About page", "Password and Password again were different": "Password and Password-Again were different", @@ -93,6 +96,7 @@ export const lang_en: LangObj = { "Are you sure you want to delete the not activated user(s)?": "Are you sure you want to delete the not activated user(s)?", "Delete activated user": "Delete activated user", "Are you sure you want to delete the activated user?": "Are you sure you want to delete the activated user?", + "Are you really sure you want to delete the activated user? This cannot be undone and all data connected to the user is also deleted (solutions, tests, custom projects, ...)! Note that this operation can still fail if the user has a solution for a locked exercise!" : "Are you really sure you want to delete the activated user? This cannot be undone and all data connected to the user is also deleted (solutions, tests, custom projects, ...)! Note that this operation can still fail if the user has a solution for a locked exercise!", "Delete tag": "Delete tag", "Are you sure you want to delete the tag?": "Are you sure you want to delete the tag?", "Release user from group": "Release user from group", diff --git a/i18n/i18nRoot.ts b/i18n/i18nRoot.ts index 7f2c1831..0c04761f 100644 --- a/i18n/i18nRoot.ts +++ b/i18n/i18nRoot.ts @@ -66,6 +66,9 @@ export interface LangObj { "Select an option...": string "Owner": string "Owner was not loaded, id:": string + "Privacy policy": string + "Copyright page": string + "About page": string "Password and Password again were different": string @@ -96,6 +99,7 @@ export interface LangObj { "Are you sure you want to delete the not activated user(s)?": string "Delete activated user": string "Are you sure you want to delete the activated user?": string + "Are you really sure you want to delete the activated user? This cannot be undone and all data connected to the user is also deleted (solutions, tests, custom projects, ...)! Note that this operation can still fail if the user has a solution for a locked exercise!": string "Delete tag": string "Are you sure you want to delete the tag?": string "Release user from group": string diff --git a/package.json b/package.json index 1b862115..154985e1 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "", "scripts": { "vendor": "webpack --config vendor.webpack.config.js", - "dev": "echo-cli \"Make sure the vendor dll file is up-to-date... already recreate if some npm module added/removed ... then add/remove it from vendor.webpack.config.js\" && webpack-dev-server", + "dev": "echo-cli \"Make sure the vendor dll file is up-to-date... recreate if some npm module added/removed ... then add/remove it from vendor.webpack.config.js\" && webpack-dev-server", "build": "echo-cli \" --- Don't forget to increment the version string in constants.ts > versionString ---\" && tsc static_pages/firstExternalLoginPage/firstLoginExternalLogin.ts && tsc static_pages/about/about.ts && node --max-old-space-size=4096 node_modules/webpack/bin/webpack.js --config webpack.config.dist.js", "test": "echo-cli \"Error: no test specified\" && exit 1", "size": "webpack -p --progress" diff --git a/src/components/siteHeaderBar/siteHeaderUserArea.tsx b/src/components/siteHeaderBar/siteHeaderUserArea.tsx index baf11b43..c59016f6 100644 --- a/src/components/siteHeaderBar/siteHeaderUserArea.tsx +++ b/src/components/siteHeaderBar/siteHeaderUserArea.tsx @@ -136,7 +136,7 @@ class SiteHeaderUserArea extends React.Component<Props, any> { </List.Item> <Divider/> - <List.Item className="clickable"> + <List.Item> <Link to={constants.ownSettingsLinkPath} onClick={() => this.userMenuEntryClicked()}> <Icon name="settings"/> <span className="mar-left-half"> @@ -184,6 +184,50 @@ class SiteHeaderUserArea extends React.Component<Props, any> { </List.Content> </List.Item> + <List.Item> + <List.Content> + <a href={constants.privacyPolicyPageLinkPath} onClick={() => this.userMenuEntryClicked()} + target="_blank"> + <Icon name="shield"/> + <span className="mar-left-half"> + { + getI18n(this.props.langId, 'Privacy policy') + } + </span> + <Icon className="mar-left-half" name="external alternate"/> + </a> + </List.Content> + </List.Item> + + <List.Item> + <List.Content> + <a href={constants.copyrightPageLinkPath} onClick={() => this.userMenuEntryClicked()} + target="_blank"> + <Icon name="law"/> + <span className="mar-left-half"> + { + getI18n(this.props.langId, 'Copyright page') + } + </span> + <Icon className="mar-left-half" name="external alternate"/> + </a> + </List.Content> + </List.Item> + + <List.Item> + <List.Content> + <a href={constants.aboutPageLinkPath} onClick={() => this.userMenuEntryClicked()} target="_blank"> + <Icon name="question circle outline"/> + <span className="mar-left-half"> + { + getI18n(this.props.langId, 'About page') + } + </span> + <Icon className="mar-left-half" name="external alternate"/> + </a> + </List.Content> + </List.Item> + <Divider/> <List.Item className="clickable" diff --git a/src/components/siteSideMenu/menu.tsx b/src/components/siteSideMenu/menu.tsx index 54255885..a0753e50 100644 --- a/src/components/siteSideMenu/menu.tsx +++ b/src/components/siteSideMenu/menu.tsx @@ -465,16 +465,17 @@ class menu extends React.Component<Props, any> { </div> - <div> - <Link to={constants.aboutLinkPath} onClick={() => this.linkClicked()}> - <Icon size="huge" name='info'/> - <span> - { - getI18n(this.props.langId,'About') - } - </span> - </Link> - </div> + {/* we now have a new external about site ... see src/components/siteHeaderBar/siteHeaderUserArea.tsx | we leave the /about route enabled like a little easter egg*/} + {/*<div>*/} + {/* <Link to={constants.aboutLinkPath} onClick={() => this.linkClicked()}>*/} + {/* <Icon size="huge" name='info'/>*/} + {/* <span>*/} + {/* {*/} + {/* getI18n(this.props.langId,'About')*/} + {/* }*/} + {/* </span>*/} + {/* </Link>*/} + {/*</div>*/} </div> </div> @@ -485,4 +486,4 @@ class menu extends React.Component<Props, any> { } } -export default connect(mapStateToProps, mapDispatchToProps)(menu) \ No newline at end of file +export default connect(mapStateToProps, mapDispatchToProps)(menu) diff --git a/src/components/sites/manageActivatedUsersSite/listViewItem.tsx b/src/components/sites/manageActivatedUsersSite/listViewItem.tsx index 3300bbf4..b4e6ed41 100644 --- a/src/components/sites/manageActivatedUsersSite/listViewItem.tsx +++ b/src/components/sites/manageActivatedUsersSite/listViewItem.tsx @@ -172,7 +172,16 @@ class testRow extends React.Component<Props, any> { ) if (shouldRemove) { - this.props.deleteActivatedUserAsync(activatedUser) + + const shouldRemoveSure = await askDialog(getI18n(this.props.langId, 'Delete activated user'), + `${getI18n(this.props.langId, + 'Are you really sure you want to delete the activated user? This cannot be undone and all data connected to the user is also deleted (solutions, tests, custom projects, ...)! Note that this operation can still fail if the user has a solution for a locked exercise!' + )} (${activatedUser.lastName}, ${activatedUser.firstName})`, this.props.langId + ) + + if (shouldRemoveSure) { + this.props.deleteActivatedUserAsync(activatedUser) + } } }} diff --git a/src/constants.ts b/src/constants.ts index d5b69604..835ec1c3 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -13,7 +13,7 @@ import Logger from './helpers/logger' * y - breaking changes / new features * z - fixes, small changes */ -export const versionString = '2.4.10' +export const versionString = '2.4.11' export const supportMail = 'yapex@informatik.uni-halle.de' @@ -86,6 +86,10 @@ export function setCurrentCrsfToken(token: string): void { // Logger.log('found crsf token, setting header') } +export const copyrightPageLinkPath = '/copyright/copyright.html' //see webpack.config.dist.js -> CopyWebpackPlugin +export const privacyPolicyPageLinkPath = '/privacypolicy/privacy.html' //see webpack.config.dist.js -> CopyWebpackPlugin +export const aboutPageLinkPath = '/about/about.html' + // noinspection TsLint /** diff --git a/static_pages/about/about.css b/static_pages/about/about.css index 86fd2b11..6907310a 100644 --- a/static_pages/about/about.css +++ b/static_pages/about/about.css @@ -119,6 +119,7 @@ } .wanted-feature > div { padding: 0 1em; + align-self: center; } .wanted-feature > div p { font-weight: bold; diff --git a/static_pages/about/about.html b/static_pages/about/about.html index cc249803..dfb8b3b6 100644 --- a/static_pages/about/about.html +++ b/static_pages/about/about.html @@ -79,7 +79,7 @@ <p>Unterstützung des Lernprozesses bei Programmieraufgaben</p> <div class="content"> -Programmieren erfordert eine Fülle an kognitiven Prozessen und gerade Programmieranfänger können schnell überfordert werden. Das Projekt YAPEX verfolgt mehrere Ziele: Einerseits sollen unnötige Hürden beseitigt oder reduziert werden, andererseits soll der Lernprozess durch automatisierte und zeitnahe Rückmeldungen begleitet und unterstützt werden. +Programmieren erfordert eine Fülle an kognitiven Prozessen und gerade Programmieranfänger können schnell überfordert werden. Das Projekt YAPEX verfolgt mehrere Ziele: Einerseits sollen unnötige Hürden beseitigt oder reduziert werden, andererseits soll der Lernprozess durch automatisierte und zeitnahe Rückmeldungen begleitet und unterstützt werden. </div> </div> @@ -138,17 +138,17 @@ Zeitnahe Rückmeldungen zu einzelnen (Teil)Lösungen sind ein wichtiger Bestandt <!-- http://localhost:5000/index_deploy.html#/editor/exercises/edit/false/12 --> - <a href="screenshots/kfeature1-1.png" data-fancybox="key-features" + <a href="screenshots/kfeature1-1.png" data-fancybox="key-features-1" data-caption="Markdown mit Tabelle und Bild"> <img src="screenshots/kfeature1-1.png" alt=""> </a> <!-- http://localhost:5000/index_deploy.html#/editor/exercises/edit/false/112 --> - <a href="screenshots/kfeature1-2.png" data-fancybox="key-features" + <a href="screenshots/kfeature1-2.png" data-fancybox="key-features-1" data-caption="Markdown mit fenced code blocks und Mathe Formeln"> <img src="screenshots/kfeature1-2.png" alt=""> </a> <!-- created --> - <a href="screenshots/kfeature1-3.png" data-fancybox="key-features" + <a href="screenshots/kfeature1-3.png" data-fancybox="key-features-1" data-caption="Fertiges PDF als Aufgabenstellung"> <img src="screenshots/kfeature1-3.png" alt=""> </a> @@ -226,16 +226,16 @@ Zeitnahe Rückmeldungen zu einzelnen (Teil)Lösungen sind ein wichtiger Bestandt <!-- http://localhost:5000/index_deploy.html#/editor/exercises/edit/false/180 --> - <a href="screenshots/kfeature2-1.png" data-fancybox="key-features" + <a href="screenshots/kfeature2-1.png" data-fancybox="key-features-2" data-caption="Datei vorgeben zum Bearbeiten"> <img src="screenshots/kfeature2-1.png" alt=""> </a> - <a href="screenshots/kfeature2-2.png" data-fancybox="key-features" data-caption="Datei zum Testen"> + <a href="screenshots/kfeature2-2.png" data-fancybox="key-features-2" data-caption="Datei zum Testen"> <img src="screenshots/kfeature2-2.png" alt=""> </a> - <a href="screenshots/kfeature2-3.png" data-fancybox="key-features" + <a href="screenshots/kfeature2-3.png" data-fancybox="key-features-2" data-caption="Schreibschutz und Sichtbarkeit der Template Dateien einstellen"> <img src="screenshots/kfeature2-3.png" alt=""> </a> @@ -249,12 +249,12 @@ Zeitnahe Rückmeldungen zu einzelnen (Teil)Lösungen sind ein wichtiger Bestandt <!-- http://localhost:5000/index_deploy.html#/exercises/180/false/releases --> - <a href="screenshots/kfeature3-1.png" data-fancybox="key-features" + <a href="screenshots/kfeature3-1.png" data-fancybox="key-features-3" data-caption="Eisntellungen einer Freigabe"> <img src="screenshots/kfeature3-1.png" alt=""> </a> - <a href="screenshots/kfeature3-2.png" data-fancybox="key-features" data-caption="Freigaben verwalten"> + <a href="screenshots/kfeature3-2.png" data-fancybox="key-features-3" data-caption="Freigaben verwalten"> <img style="object-fit:cover" src="screenshots/kfeature3-2.png" alt=""> </a> @@ -305,12 +305,12 @@ Zeitnahe Rückmeldungen zu einzelnen (Teil)Lösungen sind ein wichtiger Bestandt <!-- http://localhost:5000/index_deploy.html#/editor/exercises/edit/false/180 --> - <a href="screenshots/kfeature4-1.png" data-fancybox="key-features" + <a href="screenshots/kfeature4-1.png" data-fancybox="key-features-4" data-caption="Aufgabe wurde nicht richtig gelöst"> <img src="screenshots/kfeature4-1.png" alt=""> </a> - <a href="screenshots/kfeature4-2.png" data-fancybox="key-features" + <a href="screenshots/kfeature4-2.png" data-fancybox="key-features-4" data-caption="Aufgabe nachträglich korrekt gelöst"> <img src="screenshots/kfeature4-2.png" alt=""> </a> @@ -326,28 +326,28 @@ Zeitnahe Rückmeldungen zu einzelnen (Teil)Lösungen sind ein wichtiger Bestandt <!-- https://yapex.informatik.uni-halle.de/#/editor/exercises/edit/true/13 --> - <a href="screenshots/kfeature5-1.png" data-fancybox="key-features" + <a href="screenshots/kfeature5-1.png" data-fancybox="key-features-5" data-caption="Normale Tests für eine Aufgabe"> <img src="screenshots/kfeature5-1.png" alt=""> </a> - <a href="screenshots/kfeature5-2.png" data-fancybox="key-features" + <a href="screenshots/kfeature5-2.png" data-fancybox="key-features-5" data-caption="Versteckte Tests für eine Aufgabe"> <img src="screenshots/kfeature5-2.png" alt=""> </a> - <a href="screenshots/kfeature5-3.png" data-fancybox="key-features" + <a href="screenshots/kfeature5-3.png" data-fancybox="key-features-5" data-caption="Editor für spezifikation des Tests"> <img src="screenshots/kfeature5-3.png" alt=""> </a> - <a href="screenshots/kfeature5-4.png" data-fancybox="key-features" + <a href="screenshots/kfeature5-4.png" data-fancybox="key-features-5" data-caption="Visuelle Darstellung der Spezifikation des Tests"> <img src="screenshots/kfeature5-4.png" alt=""> </a> - <a href="screenshots/kfeature5-4.png" data-fancybox="key-features" data-caption="Optionen für den Test"> - <img src="screenshots/kfeature5-4.png" alt=""> + <a href="screenshots/kfeature5-5.png" data-fancybox="key-features-5" data-caption="Optionen für den Test"> + <img src="screenshots/kfeature5-5.png" alt=""> </a> </div> @@ -433,7 +433,7 @@ Aufgaben können aktuell nur von einem Nutzern allein gelöst werden. Wünschens </div> </div> </div> - + <div class="column wanted-feature"> <i class="fas fa-bug fa-5x"></i> <div> @@ -784,10 +784,21 @@ Natürlich gibt es viele kleinere Verbesserungsvorschläge und Ideen YAPEX noch </ul> </div> + <div class="col"> + <div> + <i class="far fa-envelope"></i> + yapex[-a-t-]informatik.uni-halle.de + </div> + + <div> + - datenschutz... + - offizieller kontakt?? + </div> + + </div> + + - - datenschutz... - - offizieller kontakt?? - - email?? </div> diff --git a/static_pages/about/about.styl b/static_pages/about/about.styl index 42090a61..179171c5 100644 --- a/static_pages/about/about.styl +++ b/static_pages/about/about.styl @@ -182,6 +182,7 @@ $sectionPaddingLeftRight = 1em > div { padding 0 1em + align-self center p { //text-align center diff --git a/static_pages/about/todo.txt b/static_pages/about/todo.txt index bb1b22a5..ff042d08 100644 --- a/static_pages/about/todo.txt +++ b/static_pages/about/todo.txt @@ -3,4 +3,3 @@ - change font -- data-fancybox="key-features" separate galleries?? diff --git a/static_pages/privacyPolicy/privacy.html b/static_pages/privacyPolicy/privacy.html new file mode 100644 index 00000000..94beb448 --- /dev/null +++ b/static_pages/privacyPolicy/privacy.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <title>YAPEX Datenschutz</title> + + <meta name="robots" content="noindex" /> + + <meta name="version" content="0.0.1"> + +</head> +<body> + +TODO + +</body> +</html> diff --git a/webpack.config.dist.js b/webpack.config.dist.js index 8da21072..7b0b656d 100644 --- a/webpack.config.dist.js +++ b/webpack.config.dist.js @@ -157,19 +157,30 @@ module.exports = { from: 'node_modules/mathjax/jax/output/CommonHTML', to: 'static/mathjax/jax/output/CommonHTML', }, - //copy also static pages & assets + //--- copy also static pages & assets { - from: 'static_pages/copyright/copyright.html', - to: 'copyright.html', + from: 'static_pages/static/sha512.js', //needed for firstLoginExternalLogin + to: 'static/sha512.js', }, { - from: 'static_pages/firstExternalLoginPage/firstLoginExternalLogin.html', - to: 'firstLoginExternalLogin.html', + from: 'static_pages/static/favicon.png', + to: 'favicon.png', }, { - from: 'static_pages/firstExternalLoginPage/firstLoginExternalLogin.js', - to: 'firstLoginExternalLogin.js', + from: 'static_pages/static/about_icon.png', + to: 'about_icon.png', + }, + //hack because react-notifications cannot properly bundled ... the icons are not displayed + //TODO not working because these files are overwritten by the loader!! + { + from: 'node_modules/react-notifications/dist/fonts/notification.ttf', + to: 'a8c8792074cb2979091029707dbf0c46.ttf', }, + { + from: 'node_modules/react-notifications/dist/fonts/notification.woff', + to: '80abd98351a79a932614527b220f71e8.woff', + }, + //--- static pages { from: 'static_pages/about/about.html', to: 'about/about.html', @@ -179,26 +190,39 @@ module.exports = { to: 'about/about.js', }, { - from: 'static_pages/static/sha512.js', //needed for firstLoginExternalLogin - to: 'static/sha512.js', + from: 'static_pages/about/about.css', + to: 'about/about.css', }, { - from: 'static_pages/static/favicon.png', - to: 'favicon.png', + from: 'static_pages/about/dependencies/', + to: 'about/dependencies', + toType: 'dir' }, { - from: 'static_pages/static/about_icon.png', - to: 'about_icon.png', + from: 'static_pages/about/imgs/', + to: 'about/imgs', + toType: 'dir' }, - //hack because react-notifications cannot properly bundled ... the icons are not displayed - //TODO not working because these files are overwritten by the loader!! { - from: 'node_modules/react-notifications/dist/fonts/notification.ttf', - to: 'a8c8792074cb2979091029707dbf0c46.ttf', + from: 'static_pages/about/screenshots/', + to: 'about/screenshots', + toType: 'dir' }, { - from: 'node_modules/react-notifications/dist/fonts/notification.woff', - to: '80abd98351a79a932614527b220f71e8.woff', + from: 'static_pages/copyright/copyright.html', + to: 'copyright/copyright.html', + }, + { + from: 'static_pages/privacyPolicy/privacy.html', + to: 'privacypolicy/privacy.html', + }, + { + from: 'static_pages/firstExternalLoginPage/firstLoginExternalLogin.html', + to: 'firstLoginExternalLogin.html', + }, + { + from: 'static_pages/firstExternalLoginPage/firstLoginExternalLogin.js', + to: 'firstLoginExternalLogin.js', }, ]), new MiniCssExtractPlugin({ -- GitLab