summaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorBo-Yi Wu <appleboy.tw@gmail.com>2017-02-09 17:58:05 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2017-02-09 17:58:04 +0800
commit40f43777171e9dce1be0d27aaa14b8e4160dd434 (patch)
tree9fa521406ac9ca8789dc0802e949534688f8a443 /public
parenta6751cec049f4a814b590beab641e94ab1bd30c8 (diff)
downloadgitea-40f43777171e9dce1be0d27aaa14b8e4160dd434.tar.gz
gitea-40f43777171e9dce1be0d27aaa14b8e4160dd434.zip
feat: fill in ssh key title automatically. (#863)
Diffstat (limited to 'public')
-rw-r--r--public/js/index.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/public/js/index.js b/public/js/index.js
index 487f812d1d..e700da29f8 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -1486,4 +1486,13 @@ $(function () {
$('.list-search-style').html('.search-list li:not([data-title*="' + value + '"]) {display: none;}');
}
});
+
+ // Parse SSH Key
+ $("#ssh-key-content").on('change paste keyup',function(){
+ var value = $(this).val();
+ var arrays = value.split(" ");
+ if (arrays.length === 3 && arrays[2] !== "") {
+ $("#ssh-key-title").val(arrays[2]);
+ }
+ });
});