File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5555# user_sql .msg .waiting {
5656 background-color : # ff8f00 ;
5757 color : # fff ;
58- }
58+ }
59+
60+ # user_sql .loading {
61+ display : inline-block;
62+ height : 32px ;
63+ margin : 5px 0 ;
64+ width : 32px ;
65+ }
Original file line number Diff line number Diff line change @@ -62,15 +62,17 @@ user_sql.adminSettingsUI = function () {
6262 var cryptoChanged = function ( ) {
6363 var div = $ ( "#opt-crypto_params" ) ;
6464 div . empty ( ) ;
65+ div . append ( "<span class=\"icon loading\"></span>" ) ;
6566
6667 var cryptoClass = $ ( "#opt-crypto_class" ) . val ( ) ;
6768 $ . get ( OC . generateUrl ( "/apps/user_sql/settings/crypto/params" ) , cryptoClass , function ( data ) {
69+ div . empty ( ) ;
6870 if ( data . status === "success" ) {
6971 for ( var index = 0 , length = data . data . length ; index < length ; ++ index ) {
7072 div . append ( "<div><label for=\"opt-crypto_param_"
7173 + index
7274 + "\"><span>"
73- + data . data [ index ] [ "visible_name " ]
75+ + data . data [ index ] [ "name " ]
7476 + "</span><input type=\"number\" id=\"opt-crypto_param_"
7577 + index
7678 + "\" name=\"opt-crypto_param_"
@@ -80,7 +82,7 @@ user_sql.adminSettingsUI = function () {
8082 + "\" max=\""
8183 + data . data [ index ] [ "max" ]
8284 + "\" value=\""
83- + data . data [ index ] [ "default" ] // TODO set current
85+ + data . data [ index ] [ "value" ]
8486 + "\"></label></div>" ) ;
8587 }
8688 }
Original file line number Diff line number Diff line change @@ -375,25 +375,25 @@ public function groupTableAutocomplete()
375375 */
376376 public function cryptoParams ()
377377 {
378+ sleep (3 );
378379 // TODO implement
379380 // TODO add current values
380381 return [
381382 "status " => "success " ,
382383 "data " => [
383384 [
384- "name " => "memoryCost " ,
385- "visible_name " => "Memory cost (KiB) " ,
386- "default " => PASSWORD_ARGON2_DEFAULT_MEMORY_COST ,
385+ "name " => "Memory cost (KiB) " ,
386+ "value " => PASSWORD_ARGON2_DEFAULT_MEMORY_COST ,
387387 "min " => 1 , "max " => 1048576
388388 ],
389389 [
390- "name " => "timeCost " , " visible_name " => " Time cost " ,
391- "default " => PASSWORD_ARGON2_DEFAULT_TIME_COST , "min " => 1 ,
390+ "name " => "Time cost " ,
391+ "value " => PASSWORD_ARGON2_DEFAULT_TIME_COST , "min " => 1 ,
392392 "max " => 1024
393393 ],
394394 [
395- "name " => "threads " , " visible_name " => " Threads " ,
396- "default " => PASSWORD_ARGON2_DEFAULT_THREADS , "min " => 1 ,
395+ "name " => "Threads " ,
396+ "value " => PASSWORD_ARGON2_DEFAULT_THREADS , "min " => 1 ,
397397 "max " => 1024
398398 ]
399399 ]
You can’t perform that action at this time.
0 commit comments