added notie

This commit is contained in:
Bálint Szekeres 2019-05-19 22:14:53 +02:00
parent 0cc107a7a8
commit bb29709bd6
9 changed files with 18 additions and 21 deletions

View File

@ -44,6 +44,7 @@
"Masonry": true,
"saveAs": true,
"Base64": true,
"FileReader": true
"FileReader": true,
"notie": true
}
}

View File

@ -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)

View File

@ -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',

5
package-lock.json generated
View File

@ -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",

View File

@ -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": {

View File

@ -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',

View File

@ -1033,7 +1033,7 @@
<div class="grid-sizer col-xl-6"></div>
<div class="grid-item col-xl-12 mb-3 text-center" ng-cloak>
<button class="btn btn-primary btn-sm btn-download" ng-click="downloadZip()"><img src="assets/img/download.svg" alt="Download"> Generated config <small>(.zip)</small></button>
<button tooltips tooltip-template="Copied!" tooltip-show-trigger="click" class="btn btn-success btn-sm btn-download btn-base64" ng-click="copyAsBase64()"><img src="assets/img/download.svg" alt="Download"> Copy Base64 <small>(inline)</small></button>
<button class="btn btn-success btn-sm btn-download btn-base64" ng-click="copyAsBase64()"><img src="assets/img/download.svg" alt="Download"> Copy Base64 <small>(inline)</small></button>
</div>
<div id="base64-zip-wrapper" class="custom-control-input">
<button class="btn btn-light btn-clipboard" id="btn-base64-zip-line" ngclipboard data-clipboard-target="#base64-zip-line" ngclipboard-success="clipboardSuccess('base64-zip-line')">
@ -1046,7 +1046,6 @@
<button class="btn btn-light btn-clipboard" ngclipboard data-clipboard-target="#file-nginx" ngclipboard-success="clipboardSuccess('nginx.conf')">
<img src="assets/img/clipboard-dark.svg" alt="Copy to clipboard">
</button>
<span class="clipboard-success" ng-if="clipboardCopy === 'nginx.conf'">Copied!</span>
<div class="code source" data-filename="nginx.conf">
<pre><code class="nginx" ng-include="'templates/conf/nginx.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></code></pre>
</div><div id="file-nginx" class="code highlighted"></div>
@ -1056,7 +1055,6 @@
<button class="btn btn-light btn-clipboard" ngclipboard data-clipboard-target="#file-domain-{{ $index }}" ngclipboard-success="clipboardSuccess('example.com')">
<img src="assets/img/clipboard-dark.svg" alt="Copy to clipboard">
</button>
<span class="clipboard-success" ng-if="clipboardCopy === 'example.com'">Copied!</span>
<div class="code source" data-filename="sites-{{ isSymlink() ? 'available' : 'enabled' }}/{{ _domain }}.conf">
<pre><code class="nginx" ng-include="'templates/conf/sites-available/example.com.conf.html?v=COMMIT_HASH?v=COMMIT_HASH'" onload="refreshHighlighting()"></code></pre>
</div><div id="file-domain-{{ $index }}" class="code highlighted"></div>
@ -1066,7 +1064,6 @@
<button class="btn btn-light btn-clipboard" ngclipboard data-clipboard-target="#file-letsencrypt" ngclipboard-success="clipboardSuccess('letsencrypt.conf')">
<img src="assets/img/clipboard-dark.svg" alt="Copy to clipboard">
</button>
<span class="clipboard-success" ng-if="clipboardCopy === 'letsencrypt.conf'">Copied!</span>
<div class="code source" data-filename="nginxconfig.io/letsencrypt.conf">
<pre><code class="nginx" ng-include="'templates/conf/nginxconfig.io/letsencrypt.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></code></pre>
</div><div id="file-letsencrypt" class="code highlighted"></div>
@ -1076,7 +1073,6 @@
<button class="btn btn-light btn-clipboard" ngclipboard data-clipboard-target="#file-general" ngclipboard-success="clipboardSuccess('general.conf')">
<img src="assets/img/clipboard-dark.svg" alt="Copy to clipboard">
</button>
<span class="clipboard-success" ng-if="clipboardCopy === 'general.conf'">Copied!</span>
<div class="code source" data-filename="nginxconfig.io/general.conf">
<pre><code class="nginx" ng-include="'templates/conf/nginxconfig.io/general.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></code></pre>
</div><div id="file-general" class="code highlighted"></div>
@ -1086,7 +1082,6 @@
<button class="btn btn-light btn-clipboard" ngclipboard data-clipboard-target="#file-php_fastcgi" ngclipboard-success="clipboardSuccess('php_fastcgi.conf')">
<img src="assets/img/clipboard-dark.svg" alt="Copy to clipboard">
</button>
<span class="clipboard-success" ng-if="clipboardCopy === 'php_fastcgi.conf'">Copied!</span>
<div class="code source" data-filename="nginxconfig.io/php_fastcgi.conf">
<pre><code class="nginx" ng-include="'templates/conf/nginxconfig.io/php_fastcgi.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></code></pre>
</div><div id="file-php_fastcgi" class="code highlighted"></div>
@ -1096,7 +1091,6 @@
<button class="btn btn-light btn-clipboard" ngclipboard data-clipboard-target="#file-python_uwsgi" ngclipboard-success="clipboardSuccess('python_uwsgi.conf')">
<img src="assets/img/clipboard-dark.svg" alt="Copy to clipboard">
</button>
<span class="clipboard-success" ng-if="clipboardCopy === 'python_uwsgi.conf'">Copied!</span>
<div class="code source" data-filename="nginxconfig.io/python_uwsgi.conf">
<pre><code class="nginx" ng-include="'templates/conf/nginxconfig.io/python_uwsgi.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></code></pre>
</div><div id="file-python_uwsgi" class="code highlighted"></div>
@ -1106,7 +1100,6 @@
<button class="btn btn-light btn-clipboard" ngclipboard data-clipboard-target="#file-proxy" ngclipboard-success="clipboardSuccess('proxy.conf')">
<img src="assets/img/clipboard-dark.svg" alt="Copy to clipboard">
</button>
<span class="clipboard-success" ng-if="clipboardCopy === 'proxy.conf'">Copied!</span>
<div class="code source" data-filename="nginxconfig.io/proxy.conf">
<pre><code class="nginx" ng-include="'templates/conf/nginxconfig.io/proxy.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></code></pre>
</div><div id="file-proxy" class="code highlighted"></div>
@ -1116,7 +1109,6 @@
<button class="btn btn-light btn-clipboard" ngclipboard data-clipboard-target="#file-wordpress" ngclipboard-success="clipboardSuccess('wordpress.conf')">
<img src="assets/img/clipboard-dark.svg" alt="Copy to clipboard">
</button>
<span class="clipboard-success" ng-if="clipboardCopy === 'wordpress.conf'">Copied!</span>
<div class="code source" data-filename="nginxconfig.io/wordpress.conf">
<pre><code class="nginx" ng-include="'templates/conf/nginxconfig.io/wordpress.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></code></pre>
</div><div id="file-wordpress" class="code highlighted"></div>
@ -1126,7 +1118,6 @@
<button class="btn btn-light btn-clipboard" ngclipboard data-clipboard-target="#file-drupal" ngclipboard-success="clipboardSuccess('drupal.conf')">
<img src="assets/img/clipboard-dark.svg" alt="Copy to clipboard">
</button>
<span class="clipboard-success" ng-if="clipboardCopy === 'drupal.conf'">Copied!</span>
<div class="code source" data-filename="nginxconfig.io/drupal.conf">
<pre><code class="nginx" ng-include="'templates/conf/nginxconfig.io/drupal.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></code></pre>
</div><div id="file-drupal" class="code highlighted"></div>
@ -1136,7 +1127,6 @@
<button class="btn btn-light btn-clipboard" ngclipboard data-clipboard-target="#file-magento" ngclipboard-success="clipboardSuccess('magento.conf')">
<img src="assets/img/clipboard-dark.svg" alt="Copy to clipboard">
</button>
<span class="clipboard-success" ng-if="clipboardCopy === 'magento.conf'">Copied!</span>
<div class="code source" data-filename="nginxconfig.io/magento.conf">
<pre><code class="nginx" ng-include="'templates/conf/nginxconfig.io/magento.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></code></pre>
</div><div id="file-magento" class="code highlighted"></div>

View File

@ -3,6 +3,7 @@
@import 'vendor/bootstrap';
@import 'vendor/highlight-js';
@import 'vendor/angular-tooltips';
@import 'vendor/notie';
@import 'typography';

1
resources/scss/vendor/_notie.scss vendored Normal file
View File

@ -0,0 +1 @@
@import '../../../node_modules/notie/dist/notie.min';