@ -819,7 +819,7 @@ async function initRepository() {
$ . post ( update _url , {
$ . post ( update _url , {
_csrf : csrf ,
_csrf : csrf ,
target _branch : targetBranch
target _branch : targetBranch
} ) . success ( ( data ) => {
} ) . done ( ( data ) => {
$branchTarget . text ( data . base _branch ) ;
$branchTarget . text ( data . base _branch ) ;
} ) . always ( ( ) => {
} ) . always ( ( ) => {
reload ( ) ;
reload ( ) ;
@ -1044,7 +1044,7 @@ async function initRepository() {
if ( window . confirm ( $this . data ( 'locale' ) ) ) {
if ( window . confirm ( $this . data ( 'locale' ) ) ) {
$ . post ( $this . data ( 'url' ) , {
$ . post ( $this . data ( 'url' ) , {
_csrf : csrf
_csrf : csrf
} ) . success ( ( ) => {
} ) . done ( ( ) => {
$ ( ` # ${ $this . data ( 'comment-id' ) } ` ) . remove ( ) ;
$ ( ` # ${ $this . data ( 'comment-id' ) } ` ) . remove ( ) ;
} ) ;
} ) ;
}
}
@ -2192,7 +2192,7 @@ function initU2FAuth() {
}
}
u2fApi . ensureSupport ( )
u2fApi . ensureSupport ( )
. then ( ( ) => {
. then ( ( ) => {
$ . getJSON ( ` ${ AppSubUrl } /user/u2f/challenge ` ) . success ( ( req ) => {
$ . getJSON ( ` ${ AppSubUrl } /user/u2f/challenge ` ) . done ( ( req ) => {
u2fApi . sign ( req . appId , req . challenge , req . registeredKeys , 30 )
u2fApi . sign ( req . appId , req . challenge , req . registeredKeys , 30 )
. then ( u2fSigned )
. then ( u2fSigned )
. catch ( ( err ) => {
. catch ( ( err ) => {
@ -2288,7 +2288,7 @@ function u2fRegisterRequest() {
$ . post ( ` ${ AppSubUrl } /user/settings/security/u2f/request_register ` , {
$ . post ( ` ${ AppSubUrl } /user/settings/security/u2f/request_register ` , {
_csrf : csrf ,
_csrf : csrf ,
name : $ ( '#nickname' ) . val ( )
name : $ ( '#nickname' ) . val ( )
} ) . success ( ( req ) => {
} ) . done ( ( req ) => {
$ ( '#nickname' ) . closest ( 'div.field' ) . removeClass ( 'error' ) ;
$ ( '#nickname' ) . closest ( 'div.field' ) . removeClass ( 'error' ) ;
$ ( '#register-device' ) . modal ( 'show' ) ;
$ ( '#register-device' ) . modal ( 'show' ) ;
if ( req . registeredKeys === null ) {
if ( req . registeredKeys === null ) {