diff --git a/public/assets/css/app.css b/public/assets/css/app.css index aa3b5ef..b5474c0 100644 --- a/public/assets/css/app.css +++ b/public/assets/css/app.css @@ -102,6 +102,12 @@ main .file .btn-clipboard { vertical-align: text-bottom; } +main .file .clipboard-success { + font-size: 0.8rem; + color: #4BB543; + font-weight: 700; +} + main .file .code, main .commands { padding: 0.5rem; diff --git a/public/assets/js/app.js b/public/assets/js/app.js index d660fb5..2b54ec8 100644 --- a/public/assets/js/app.js +++ b/public/assets/js/app.js @@ -59,6 +59,7 @@ $scope.gzipTypes = 'text/plain text/css text/xml application/json application/javascript application/xml+rss application/atom+xml image/svg+xml'; + $scope.clipboardCopy = undefined; ///////////////////// @@ -114,6 +115,14 @@ }; $scope.clipboardSuccess = function(key) { + $scope.clipboardCopy = key; + + $timeout(function(_key) { + if ($scope.clipboardCopy === _key) { + $scope.clipboardCopy = undefined; + } + }, 1500, true, key); + gtag('event', key, { event_category: 'clipboard', }); diff --git a/public/index.html b/public/index.html index f6ac52d..0b10b50 100644 --- a/public/index.html +++ b/public/index.html @@ -240,6 +240,7 @@ + Copied!