File tree 2 files changed +11
-2
lines changed 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -1486,4 +1486,13 @@ $(function () {
1486
1486
$ ( '.list-search-style' ) . html ( '.search-list li:not([data-title*="' + value + '"]) {display: none;}' ) ;
1487
1487
}
1488
1488
} ) ;
1489
+
1490
+ // Parse SSH Key
1491
+ $ ( "#ssh-key-content" ) . on ( 'change paste keyup' , function ( ) {
1492
+ var value = $ ( this ) . val ( ) ;
1493
+ var arrays = value . split ( " " ) ;
1494
+ if ( arrays . length === 3 && arrays [ 2 ] !== "" ) {
1495
+ $ ( "#ssh-key-title" ) . val ( arrays [ 2 ] ) ;
1496
+ }
1497
+ } ) ;
1489
1498
} ) ;
Original file line number Diff line number Diff line change 53
53
{{.CsrfTokenHtml}}
54
54
<div class="field {{if .Err_Title}}error{{end}}">
55
55
<label for="title">{{.i18n.Tr "settings.key_name"}}</label>
56
- <input id="title" name="title" value="{{.title}}" autofocus required>
56
+ <input id="ssh-key- title" name="title" value="{{.title}}" autofocus required>
57
57
</div>
58
58
<div class="field {{if .Err_Content}}error{{end}}">
59
59
<label for="content">{{.i18n.Tr "settings.key_content"}}</label>
60
- <textarea id="content" name="content" required>{{.content}}</textarea>
60
+ <textarea id="ssh-key- content" name="content" required>{{.content}}</textarea>
61
61
</div>
62
62
<button class="ui green button">
63
63
{{.i18n.Tr "settings.add_key"}}
You can’t perform that action at this time.
0 commit comments