diff --git a/app/app.js b/app/app.js index e69de29..471d525 100644 --- a/app/app.js +++ b/app/app.js @@ -0,0 +1,11 @@ +import Vue from 'vue'; +import PasswordGenerator from './components/password-generator.vue'; +import BootstrapHr from './components/bootstrap-hr.vue'; + +new Vue({ + el: 'body', + components: { + passwordGenerator: PasswordGenerator, + bootstrapHr: BootstrapHr + } +}); \ No newline at end of file diff --git a/app/app.old.js b/app/app.old.js deleted file mode 100644 index 36c5318..0000000 --- a/app/app.old.js +++ /dev/null @@ -1,72 +0,0 @@ -import lesspass from '../app/lesspass'; -import angular from 'angular'; - -import Clipboard from 'clipboard'; - -window.jQuery = $ = require('jquery'); -var bootstrap = require('bootstrap/dist/js/bootstrap'); - -class lesspassController { - constructor($scope) { - var vm = this; - - this.password = ''; - this.site = { - site_name: '', - password_length: 12, - password_types: ['lowercase', 'uppercase', 'numbers', 'symbols'], - counter: 1 - }; - - $scope.$watch(function () { - return vm.password; - }, function () { - vm.updatePassword(); - }); - - $scope.$watchCollection(function () { - return vm.site; - }, function () { - vm.updatePassword(); - }); - - var clipboard = new Clipboard('#copy-btn'); - clipboard.on('success', function (e) { - if (vm.password && vm.site.site_name) { - var t = $('#copy-btn').tooltip({title: 'Copié'}); - t.tooltip('show'); - e.clearSelection(); - } - }); - - clipboard.on('error', function (e) { - var passwordGenerated = document.getElementById("password_generated"); - var t = $(passwordGenerated).tooltip({title: 'Cmd + C pour copier le mot de passe'}); - t.tooltip('show'); - }); - - this.displayHelp = false; - } - - updatePasswordTypes(type) { - var passwordTypes = this.site.password_types; - var indexOfId = passwordTypes.indexOf(type); - if (indexOfId == -1) { - passwordTypes.push(type) - } else { - passwordTypes.splice(indexOfId, 1) - } - this.updatePassword(); - } - - updatePassword() { - if (this.password && this.site.site_name) { - this.generatedPassword = lesspass.create_password(this.password, this.site); - } - } -} - - -angular - .module('app', []) - .controller('lesspassController', lesspassController); diff --git a/app/components/bootstrap-hr.vue b/app/components/bootstrap-hr.vue new file mode 100644 index 0000000..add57bd --- /dev/null +++ b/app/components/bootstrap-hr.vue @@ -0,0 +1,20 @@ + + \ No newline at end of file diff --git a/app/components/password-generator.vue b/app/components/password-generator.vue new file mode 100644 index 0000000..bb2cef5 --- /dev/null +++ b/app/components/password-generator.vue @@ -0,0 +1,126 @@ + + + + + \ No newline at end of file diff --git a/package.json b/package.json index 4b733a9..704af1e 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,9 @@ "build:production": "npm prune && npm install && npm run lint && npm test && npm run build", "build": "npm-run-all clean build:static build:app", "clean": "rimraf dist && mkdir dist", - "build:static": "npm-run-all copy:html build:css", + "build:static": "npm-run-all copy:html copy:images build:css", "copy:html": "cpy 'static/*.html' dist", + "copy:images": "cpy 'static/images/*.png' dist/images/", "build:css": "node-sass static/css/styles.scss dist/css/styles.css", "build:app": "browserify -e ./app/app.js -o ./dist/app.js", "prestart": "npm run build", @@ -35,14 +36,14 @@ }, "homepage": "https://github.com/guillaumevincent/lesspass#readme", "dependencies": { - "angular": "^1.4.8", "bootstrap": "^4.0.0-alpha.2", - "clipboard": "^1.5.5", - "jquery": "^2.1.4" + "clipboard": "^1.5.5" }, "devDependencies": { - "babel-core": "latest", - "babel-preset-es2015": "latest", + "babel-core": "^6.3.26", + "babel-plugin-transform-runtime": "^6.3.13", + "babel-preset-es2015": "^6.3.13", + "babel-runtime": "^5.8.34", "babelify": "latest", "browserify": "latest", "cpy": "latest", @@ -53,6 +54,10 @@ "nodemon": "latest", "npm-run-all": "latest", "rimraf": "latest", + "vue": "^1.0.12", + "vue-hot-reload-api": "^1.2.2", + "vueify": "^8.0.0", + "vueify-insert-css": "^1.0.0", "watch": "latest", "watchify": "latest" }, @@ -68,6 +73,20 @@ { "presets": [ "es2015" + ], + "plugins": [ + "transform-runtime" + ] + } + ], + [ + "vueify", + { + "presets": [ + "es2015" + ], + "plugins": [ + "transform-runtime" ] } ] diff --git a/static/css/styles.scss b/static/css/styles.scss index b5c05b9..14eec80 100644 --- a/static/css/styles.scss +++ b/static/css/styles.scss @@ -1,3 +1,36 @@ @import '../../node_modules/bootstrap/scss/bootstrap'; +body { + font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 1.5; + color: #CFD2DA; + background-color: #252830; + padding-bottom: 2em; +} +#header { + #logo-link { + margin: 0 auto; + width: 200px; + height: 45px; + + #logo { + width: inherit; + height: inherit; + } + } +} + +#headlines { + padding-top: 2em; + padding-bottom: 1em; +} + +.blue { + color: #0275D8; +} + +.jumbotron { + color: black; +} \ No newline at end of file diff --git "a/static/images/C:\\Users\\19011246\\workspace\\lesspass\\static\\images\\logo.png" "b/static/images/C:\\Users\\19011246\\workspace\\lesspass\\static\\images\\logo.png" new file mode 100644 index 0000000..b1d4e2f Binary files /dev/null and "b/static/images/C:\\Users\\19011246\\workspace\\lesspass\\static\\images\\logo.png" differ diff --git "a/static/images/C:\\Users\\19011246\\workspace\\lesspass\\static\\images\\logo2.png" "b/static/images/C:\\Users\\19011246\\workspace\\lesspass\\static\\images\\logo2.png" new file mode 100644 index 0000000..b1d4e2f Binary files /dev/null and "b/static/images/C:\\Users\\19011246\\workspace\\lesspass\\static\\images\\logo2.png" differ diff --git a/static/images/logo.png b/static/images/logo.png index 8bb4cb0..0cd7e3f 100644 Binary files a/static/images/logo.png and b/static/images/logo.png differ diff --git a/static/images/logo.svg b/static/images/logo.svg index a59d0c5..e76a108 100644 --- a/static/images/logo.svg +++ b/static/images/logo.svg @@ -9,16 +9,16 @@ 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="180" - height="37" - viewBox="0 0 180 37" + width="200" + height="45" + viewBox="0 0 200 45" id="svg2" version="1.1" - inkscape:version="0.91 r13725" + inkscape:version="0.48.4 r9939" sodipodi:docname="logo.svg" - inkscape:export-filename="C:\Users\19011246\workspace\lesspass\static\images\logo.png" - inkscape:export-xdpi="90" - inkscape:export-ydpi="90"> + inkscape:export-filename="/home/guillaume/workspace/lesspass/static/images/logo.png" + inkscape:export-xdpi="180" + inkscape:export-ydpi="180"> + transform="translate(0,-1007.3622)"> + inkscape:connector-curvature="0" + inkscape:export-xdpi="179.79413" + inkscape:export-ydpi="179.79413" /> lesspass + x="47.091797" + y="1040.5848" + style="font-size:30px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#cfd2da;fill-opacity:1;font-family:Open Sans;-inkscape-font-specification:Open Sans Bold">LessPass diff --git a/static/index.html b/static/index.html index d9065ee..4bcc970 100644 --- a/static/index.html +++ b/static/index.html @@ -8,6 +8,38 @@ + +
+

Gérez vos mots de passe en toute confiance

+

LessPass ne mémorise pas vos mots de passe, et vous non plus !

+
+ +
+
+
+
+

+ LessPass ne sauvegarde pas vos mots de passe, il les regénère à + chaque fois que vous en avez besoin. Chaque mot de passe est unique et propre à chaque site. Tout ce + dont vous avez besoin c'est de vous souvenir d'un seul mot de passe, et LessPass fait le reste. +

+

+ Comme LessPass ne sauvegarde pas vos mots de passe, il n'y a rien à voler. +

+
+
+
+
+ + \ No newline at end of file