@@ -118,7 +118,8 @@ impl PageAccountsView {
118
118
. push ( widget:: text:: body ( format ! (
119
119
"{}: {}" ,
120
120
fl!( "last-sync-time" ) ,
121
- local_time. to_rfc2822( )
121
+ //local_time.to_rfc2822()
122
+ local_time. format( "%a, %d %b %Y %H:%M:%S" )
122
123
) ) )
123
124
. align_y ( Alignment :: Center )
124
125
. into ( ) ,
@@ -266,6 +267,7 @@ impl PageAccountsView {
266
267
}
267
268
268
269
pub fn add_account < ' a > ( account : Account ) -> Element < ' a , Message > {
270
+ let spacing = theme:: active ( ) . cosmic ( ) . spacing ;
269
271
let cosmic_theme:: Spacing { space_xxs, .. } = theme:: active ( ) . cosmic ( ) . spacing ;
270
272
let display_name_widget_title = widget:: text:: body ( fl ! ( "display-name" ) ) ;
271
273
let display_name_widget_text_input = widget:: text_input ( "Name" , account. display_name . clone ( ) )
@@ -287,19 +289,63 @@ pub fn add_account<'a>(account: Account) -> Element<'a, Message> {
287
289
288
290
widget:: column ( )
289
291
. spacing ( space_xxs)
290
- . push ( display_name_widget_title)
292
+ . push (
293
+ widget:: row:: with_capacity ( 2 )
294
+ . spacing ( spacing. space_xxs )
295
+ . push ( widget:: icon:: from_name ( "user-available-symbolic" ) )
296
+ . push ( display_name_widget_title)
297
+ . padding ( [
298
+ spacing. space_none ,
299
+ spacing. space_xxs ,
300
+ spacing. space_none ,
301
+ spacing. space_none ,
302
+ ] )
303
+ . align_y ( Alignment :: Center ) ,
304
+ )
291
305
. push ( display_name_widget_text_input)
292
- . push ( instance_widget_title)
306
+ . push (
307
+ widget:: row:: with_capacity ( 2 )
308
+ . spacing ( spacing. space_xxs )
309
+ . push ( widget:: icon:: from_name ( "network-server-symbolic" ) )
310
+ . push ( instance_widget_title)
311
+ . padding ( [
312
+ spacing. space_xxxs ,
313
+ spacing. space_xxs ,
314
+ spacing. space_none ,
315
+ spacing. space_none ,
316
+ ] )
317
+ . align_y ( Alignment :: Center ) ,
318
+ )
293
319
. push ( instance_widget_text_input)
294
- . push ( api_key_widget_title)
320
+ . push (
321
+ widget:: row:: with_capacity ( 2 )
322
+ . spacing ( spacing. space_xxs )
323
+ . push ( widget:: icon:: from_name ( "system-lock-screen-symbolic" ) )
324
+ . push ( api_key_widget_title)
325
+ . padding ( [
326
+ spacing. space_xxxs ,
327
+ spacing. space_xxs ,
328
+ spacing. space_none ,
329
+ spacing. space_none ,
330
+ ] )
331
+ . align_y ( Alignment :: Start ) ,
332
+ )
295
333
. push ( api_key_widget_text_input)
296
- . push ( widget:: Space :: new ( 0 , 10 ) )
297
- . push ( tls_widget_checkbox)
298
- . push ( widget:: Space :: new ( 0 , 10 ) )
334
+ . push (
335
+ widget:: row:: with_capacity ( 1 )
336
+ . push ( tls_widget_checkbox)
337
+ . padding ( [
338
+ spacing. space_s ,
339
+ spacing. space_none ,
340
+ spacing. space_xs ,
341
+ spacing. space_none ,
342
+ ] ) ,
343
+ )
299
344
. push ( buttons_widget_container)
300
345
. into ( )
301
346
}
302
347
348
+ #[ allow( clippy:: too_many_lines) ]
303
349
pub fn edit_account < ' a > ( account : Account ) -> Element < ' a , Message > {
304
350
let spacing = theme:: active ( ) . cosmic ( ) . spacing ;
305
351
let cosmic_theme:: Spacing { space_xxs, .. } = theme:: active ( ) . cosmic ( ) . spacing ;
@@ -365,18 +411,61 @@ pub fn edit_account<'a>(account: Account) -> Element<'a, Message> {
365
411
366
412
widget:: column ( )
367
413
. spacing ( space_xxs)
368
- . push ( display_name_widget_title)
414
+ . push (
415
+ widget:: row:: with_capacity ( 2 )
416
+ . spacing ( spacing. space_xxs )
417
+ . push ( widget:: icon:: from_name ( "user-available-symbolic" ) )
418
+ . push ( display_name_widget_title)
419
+ . padding ( [
420
+ spacing. space_none ,
421
+ spacing. space_xxs ,
422
+ spacing. space_none ,
423
+ spacing. space_none ,
424
+ ] )
425
+ . align_y ( Alignment :: Center ) ,
426
+ )
369
427
. push ( display_name_widget_text_input)
370
- . push ( instance_widget_title)
428
+ . push (
429
+ widget:: row:: with_capacity ( 2 )
430
+ . spacing ( spacing. space_xxs )
431
+ . push ( widget:: icon:: from_name ( "network-server-symbolic" ) )
432
+ . push ( instance_widget_title)
433
+ . padding ( [
434
+ spacing. space_xxxs ,
435
+ spacing. space_xxs ,
436
+ spacing. space_none ,
437
+ spacing. space_none ,
438
+ ] )
439
+ . align_y ( Alignment :: Center ) ,
440
+ )
371
441
. push ( instance_widget_text_input)
372
- . push ( api_key_widget_title)
442
+ . push (
443
+ widget:: row:: with_capacity ( 2 )
444
+ . spacing ( spacing. space_xxs )
445
+ . push ( widget:: icon:: from_name ( "system-lock-screen-symbolic" ) )
446
+ . push ( api_key_widget_title)
447
+ . padding ( [
448
+ spacing. space_xxxs ,
449
+ spacing. space_xxs ,
450
+ spacing. space_none ,
451
+ spacing. space_none ,
452
+ ] )
453
+ . align_y ( Alignment :: Start ) ,
454
+ )
373
455
. push ( api_key_widget_text_input)
374
- . push ( widget:: Space :: new ( 0 , 10 ) )
375
- . push ( tls_widget_checkbox)
376
- . push ( widget:: Space :: new ( 0 , 10 ) )
456
+ . push (
457
+ widget:: row:: with_capacity ( 1 )
458
+ . push ( tls_widget_checkbox)
459
+ . padding ( [
460
+ spacing. space_s ,
461
+ spacing. space_none ,
462
+ spacing. space_xs ,
463
+ spacing. space_none ,
464
+ ] ) ,
465
+ )
377
466
. push ( enable_shared_widget_text)
378
467
. push ( enable_public_shared_widget_text)
379
- . push ( widget:: Space :: new ( 0 , 10 ) )
468
+ . push ( widget:: Space :: new ( 0 , 5 ) )
380
469
. push ( buttons_widget_container)
381
470
. into ( )
382
471
}
0 commit comments