diff --git a/.eslintrc b/.eslintrc index 0884661..f16865b 100644 --- a/.eslintrc +++ b/.eslintrc @@ -44,6 +44,7 @@ "Masonry": true, "saveAs": true, "Base64": true, - "FileReader": true + "FileReader": true, + "notie": true } } diff --git a/README.md b/README.md index a4432f4..30f683a 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,7 @@ * [Masonry](https://masonry.desandro.com) - files grid layout * [JSZip](https://stuk.github.io/jszip) - generating zip package * [FileSaver](https://github.com/eligrey/FileSaver.js) - downloading zip file +* [notie](https://jaredreich.com/notie/) - toast notifications ## Resources * [OWASP TLS Cipher String Cheat Sheet](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/TLS_Cipher_String_Cheat_Sheet.md) diff --git a/build-vendor.js b/build-vendor.js index e28d67d..5181f7f 100644 --- a/build-vendor.js +++ b/build-vendor.js @@ -16,6 +16,7 @@ const jsFiles = [ 'node_modules/jszip/dist/jszip.min.js', 'node_modules/file-saver/dist/FileSaver.min.js', 'node_modules/js-base64/base64.min.js', + 'node_modules/notie/dist/notie.min.js', // angular plugins 'node_modules/ngclipboard/dist/ngclipboard.min.js', diff --git a/package-lock.json b/package-lock.json index 4e7233a..742380d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4826,6 +4826,11 @@ "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=" }, + "notie": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/notie/-/notie-4.3.1.tgz", + "integrity": "sha1-DRmd4VEwJC4hZ1UHq6Y8aSngrdo=" + }, "npm-run-path": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", diff --git a/package.json b/package.json index 41f7f92..dd80285 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "masonry-layout": "^4.2.2", "ngclipboard": "^2.0.0", "node-sass": "^4.12.0", + "notie": "^4.3.1", "postcss-cli": "^6.1.2" }, "devDependencies": { diff --git a/public/assets/js/app.js b/public/assets/js/app.js index ad6976b..b38f588 100644 --- a/public/assets/js/app.js +++ b/public/assets/js/app.js @@ -383,8 +383,6 @@ $scope.siteChanges = {}; $scope.commonChanges = {}; - $scope.clipboardCopy = undefined; - $scope.activeStep = 'download'; $scope.gzipTypes = 'text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml'; @@ -590,13 +588,11 @@ }; $scope.clipboardSuccess = function(key) { - $scope.clipboardCopy = key; - - $timeout(function(_key) { - if ($scope.clipboardCopy === _key) { - $scope.clipboardCopy = undefined; - } - }, 1500, true, key); + notie.alert({ + type: 'success', + text: 'Copied to clipboard! 🙌', + position: 'bottom', + }); gtag('event', key, { event_category: 'clipboard', diff --git a/public/index.html b/public/index.html index 8b7c97f..9eeda00 100644 --- a/public/index.html +++ b/public/index.html @@ -1033,7 +1033,7 @@
- +
- Copied!
@@ -1056,7 +1055,6 @@ - Copied!
@@ -1066,7 +1064,6 @@ - Copied!
@@ -1076,7 +1073,6 @@ - Copied!
@@ -1086,7 +1082,6 @@ - Copied!
@@ -1096,7 +1091,6 @@ - Copied!
@@ -1106,7 +1100,6 @@ - Copied!
@@ -1116,7 +1109,6 @@ - Copied!
@@ -1126,7 +1118,6 @@ - Copied!
@@ -1136,7 +1127,6 @@ - Copied!
diff --git a/resources/scss/app.scss b/resources/scss/app.scss index 8d17800..2f43b8a 100644 --- a/resources/scss/app.scss +++ b/resources/scss/app.scss @@ -3,6 +3,7 @@ @import 'vendor/bootstrap'; @import 'vendor/highlight-js'; @import 'vendor/angular-tooltips'; +@import 'vendor/notie'; @import 'typography'; diff --git a/resources/scss/vendor/_notie.scss b/resources/scss/vendor/_notie.scss new file mode 100644 index 0000000..c79de10 --- /dev/null +++ b/resources/scss/vendor/_notie.scss @@ -0,0 +1 @@ +@import '../../../node_modules/notie/dist/notie.min';