ludusavi 0.31.0

Game save backup tool
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
use iced::{
    keyboard, padding,
    widget::{space, tooltip, Space},
    Alignment, Length,
};

use crate::{
    gui::{
        badge::Badge,
        button,
        common::{BackupPhase, BrowseFileSubject, BrowseSubject, GameSelection, Message, ScrollSubject, UndoSubject},
        icon::Icon,
        search::CustomGamesFilter,
        shortcuts::TextHistories,
        style,
        widget::{checkbox, pick_list, text, Column, Container, IcedParentExt, Row, Tooltip},
    },
    lang::TRANSLATOR,
    resource::{
        cache::Cache,
        config::{self, Config, CustomGameKind, Integration, RedirectKind, SecondaryManifestConfigKind},
        manifest::{Manifest, Store},
    },
};

pub fn root<'a>(config: &Config, histories: &TextHistories, modifiers: &keyboard::Modifiers) -> Container<'a> {
    let mut content = Column::new().width(Length::Fill).spacing(5);
    if config.roots.is_empty() {
        content = content.push(text(TRANSLATOR.no_roots_are_configured()));
    } else {
        content = config
            .roots
            .iter()
            .enumerate()
            .fold(content, |parent, (i, root)| match root.store() {
                Store::Lutris => parent
                    .push(
                        Row::new()
                            .spacing(20)
                            .push(button::move_up(Message::config(config::Event::Root), i))
                            .push(button::move_down(
                                Message::config(config::Event::Root),
                                i,
                                config.roots.len(),
                            ))
                            .push(histories.input(UndoSubject::RootPath(i)))
                            .push(
                                pick_list(
                                    Store::ALL,
                                    Some(root.store()),
                                    Message::config(move |v| config::Event::RootStore(i, v)),
                                )
                                .class(style::PickList::Primary),
                            )
                            .push(button::choose_folder(BrowseSubject::Root(i), modifiers))
                            .push(button::remove(Message::config(config::Event::Root), i)),
                    )
                    .push(
                        Row::new()
                            .spacing(20)
                            .align_y(Alignment::Center)
                            .push(space::horizontal().width(70))
                            .push(text(TRANSLATOR.field("pga.db")))
                            .push(histories.input(UndoSubject::RootLutrisDatabase(i)))
                            .push(button::choose_file(BrowseFileSubject::RootLutrisDatabase(i), modifiers)),
                    ),
                _ => parent.push(
                    Row::new()
                        .spacing(20)
                        .push(button::move_up(Message::config(config::Event::Root), i))
                        .push(button::move_down(
                            Message::config(config::Event::Root),
                            i,
                            config.roots.len(),
                        ))
                        .push(histories.input(UndoSubject::RootPath(i)))
                        .push(
                            pick_list(
                                Store::ALL,
                                Some(root.store()),
                                Message::config(move |v| config::Event::RootStore(i, v)),
                            )
                            .class(style::PickList::Primary),
                        )
                        .push(button::choose_folder(BrowseSubject::Root(i), modifiers))
                        .push(button::remove(Message::config(config::Event::Root), i)),
                ),
            });
    };

    content = content.push(
        Row::new()
            .spacing(20)
            .push(button::add(Message::config(config::Event::Root)))
            .push(button::search(Message::FindRoots)),
    );

    Container::new(content)
}

pub fn manifest<'a>(
    config: &Config,
    cache: &'a Cache,
    histories: &TextHistories,
    modifiers: &keyboard::Modifiers,
) -> Container<'a> {
    let label_width = Length::Fixed(160.0);
    let right_offset = Length::Fixed(70.0);

    let get_checked = |url: Option<&str>, cache: &'a Cache| {
        let url = url?;
        let cached = cache.manifests.get(url)?;
        let checked = match cached.checked {
            Some(x) => chrono::DateTime::<chrono::Local>::from(x)
                .format("%Y-%m-%dT%H:%M:%S")
                .to_string(),
            None => "?".to_string(),
        };
        Some(Container::new(text(checked)).width(label_width))
    };

    let get_updated = |url: Option<&str>, cache: &'a Cache| {
        let url = url?;
        let cached = cache.manifests.get(url)?;
        let updated = match cached.updated {
            Some(x) => chrono::DateTime::<chrono::Local>::from(x)
                .format("%Y-%m-%dT%H:%M:%S")
                .to_string(),
            None => "?".to_string(),
        };
        Some(Container::new(text(updated)).width(label_width))
    };

    let mut content = Column::new()
        .padding(5)
        .spacing(5)
        .push(
            Row::new()
                .spacing(20)
                .align_y(Alignment::Center)
                .push(Space::new().width(Length::Fill))
                .push(Container::new(text(TRANSLATOR.checked_label())).width(label_width))
                .push(Container::new(text(TRANSLATOR.updated_label())).width(label_width))
                .push_if(!config.manifest.secondary.is_empty(), || {
                    Space::new().width(right_offset)
                }),
        )
        .push(
            Row::new()
                .spacing(20)
                .align_y(Alignment::Center)
                .push(
                    checkbox(
                        "",
                        config.manifest.enable,
                        Message::config(move |enabled| config::Event::PrimaryManifestEnabled { enabled }),
                    )
                    .spacing(0)
                    .class(style::Checkbox),
                )
                .push(iced::widget::TextInput::new("", config.manifest.url()).width(Length::Fill))
                .push(get_checked(Some(config.manifest.url()), cache))
                .push(get_updated(Some(config.manifest.url()), cache))
                .push_if(!config.manifest.secondary.is_empty(), || {
                    Space::new().width(right_offset)
                }),
        );

    content = config
        .manifest
        .secondary
        .iter()
        .enumerate()
        .fold(content, |column, (i, _)| {
            column.push(
                Row::new()
                    .spacing(20)
                    .align_y(Alignment::Center)
                    .push(
                        checkbox(
                            "",
                            config.manifest.secondary[i].enabled(),
                            Message::config(move |enabled| config::Event::SecondaryManifestEnabled {
                                index: i,
                                enabled,
                            }),
                        )
                        .spacing(0)
                        .class(style::Checkbox),
                    )
                    .push(button::move_up(Message::config(config::Event::SecondaryManifest), i))
                    .push(button::move_down(
                        Message::config(config::Event::SecondaryManifest),
                        i,
                        config.manifest.secondary.len(),
                    ))
                    .push(
                        pick_list(
                            SecondaryManifestConfigKind::ALL,
                            Some(config.manifest.secondary[i].kind()),
                            Message::config(move |v| config::Event::SecondaryManifestKind(i, v)),
                        )
                        .class(style::PickList::Primary)
                        .width(75),
                    )
                    .push(histories.input(UndoSubject::SecondaryManifest(i)))
                    .push(get_checked(config.manifest.secondary[i].url(), cache))
                    .push(get_updated(config.manifest.secondary[i].url(), cache))
                    .push(match config.manifest.secondary[i].kind() {
                        SecondaryManifestConfigKind::Local => {
                            Some(button::choose_file(BrowseFileSubject::SecondaryManifest(i), modifiers))
                        }
                        SecondaryManifestConfigKind::Remote => None,
                    })
                    .push(button::remove(Message::config(config::Event::SecondaryManifest), i)),
            )
        });

    content = content.push(button::add(Message::config(config::Event::SecondaryManifest)));

    Container::new(content).class(style::Container::GameListEntry)
}

pub fn redirect<'a>(config: &Config, histories: &TextHistories, modifiers: &keyboard::Modifiers) -> Container<'a> {
    let redirects = config.get_redirects();

    let wrapper = Container::new({
        let mut content = Column::new().padding(5).spacing(4).push(checkbox(
            TRANSLATOR.reverse_redirects_when_restoring(),
            config.restore.reverse_redirects,
            Message::config(config::Event::ReverseRedirectsOnRestore),
        ));

        content = config.redirects.iter().enumerate().fold(content, |parent, (i, _)| {
            parent.push(
                Row::new()
                    .spacing(20)
                    .push(button::move_up(
                        Message::config(move |x| config::Event::Redirect(x, None)),
                        i,
                    ))
                    .push(button::move_down(
                        Message::config(move |x| config::Event::Redirect(x, None)),
                        i,
                        config.redirects.len(),
                    ))
                    .push(
                        pick_list(
                            RedirectKind::ALL,
                            Some(redirects[i].kind),
                            Message::config(move |v| config::Event::RedirectKind(i, v)),
                        )
                        .class(style::PickList::Primary),
                    )
                    .push(histories.input(UndoSubject::RedirectSource(i)))
                    .push(button::choose_folder(BrowseSubject::RedirectSource(i), modifiers))
                    .push(histories.input(UndoSubject::RedirectTarget(i)))
                    .push(button::choose_folder(BrowseSubject::RedirectTarget(i), modifiers))
                    .push(button::remove(
                        Message::config(move |x| config::Event::Redirect(x, None)),
                        i,
                    )),
            )
        });

        content.push(button::add(Message::config(move |x| config::Event::Redirect(x, None))))
    })
    .class(style::Container::GameListEntry);

    Container::new(wrapper)
}

pub fn custom_games<'a>(
    config: &Config,
    manifest: &Manifest,
    operating: bool,
    histories: &TextHistories,
    modifiers: &keyboard::Modifiers,
    filter: &CustomGamesFilter,
) -> Container<'a> {
    if config.custom_games.is_empty() {
        return Container::new(Space::new());
    }

    let content = config.custom_games.iter().enumerate().fold(
        Column::new()
            .width(Length::Fill)
            .padding(padding::top(0).bottom(5).left(15).right(15))
            .spacing(10),
        |parent, (i, x)| {
            if !filter.qualifies(x) {
                return parent;
            }
            parent.push({
                let mut content = Column::new().padding(5).spacing(5).push(
                    Row::new()
                        .spacing(20)
                        .align_y(iced::Alignment::Center)
                        .push(button::expand(
                            x.expanded,
                            Message::ToggleCustomGameExpanded {
                                index: i,
                                expanded: !x.expanded,
                            },
                        ))
                        .push(
                            Row::new()
                                .width(110)
                                .spacing(20)
                                .align_y(Alignment::Center)
                                .push(
                                    checkbox(
                                        "",
                                        config.is_custom_game_enabled(i),
                                        Message::config(move |enabled| config::Event::CustomGameEnabled {
                                            index: i,
                                            enabled,
                                        }),
                                    )
                                    .spacing(0)
                                    .class(style::Checkbox),
                                )
                                .push(button::move_up_maybe(
                                    Message::config(config::Event::CustomGame),
                                    i,
                                    !filter.enabled,
                                ))
                                .push(button::move_down_maybe(
                                    Message::config(config::Event::CustomGame),
                                    i,
                                    config.custom_games.len(),
                                    !filter.enabled,
                                )),
                        )
                        .push(histories.input(UndoSubject::CustomGameName(i)))
                        .push(if manifest.0.get(&x.name).is_some_and(|game| game.is_from_manifest()) {
                            Some(match x.effective_integration() {
                                Integration::Override => Badge::icon(Icon::CallSplit)
                                    .tooltip(TRANSLATOR.custom_game_will_override())
                                    .view(),
                                Integration::Extend => Badge::icon(Icon::CallMerge)
                                    .tooltip(TRANSLATOR.custom_game_will_extend())
                                    .view(),
                            })
                        } else {
                            None
                        })
                        .push(
                            pick_list(
                                CustomGameKind::ALL,
                                Some(config.custom_games[i].kind()),
                                Message::config(move |v| config::Event::CustomGameKind(i, v)),
                            )
                            .class(style::PickList::Primary)
                            .width(100),
                        )
                        .push(
                            Tooltip::new(
                                button::refresh_custom_game(
                                    Message::Backup(BackupPhase::Start {
                                        games: Some(GameSelection::single(config.custom_games[i].name.clone())),
                                        preview: true,
                                        jump: true,
                                        repair: false,
                                    }),
                                    operating,
                                    config.is_custom_game_individually_scannable(i),
                                ),
                                text(TRANSLATOR.preview_button_in_custom_mode()).size(16),
                                tooltip::Position::Top,
                            )
                            .gap(5)
                            .class(style::Container::Tooltip),
                        )
                        .push(button::delete(Message::config(config::Event::CustomGame), i)),
                );

                if x.expanded {
                    let top_side = 5;
                    let left_side = 165;

                    content = content
                        .push_if(config.custom_games[i].kind() == CustomGameKind::Alias, move || {
                            Row::new()
                                .spacing(10)
                                .align_y(Alignment::Center)
                                .push(
                                    Column::new()
                                        .width(left_side)
                                        .padding(padding::top(top_side))
                                        .push(text(TRANSLATOR.original_name_field())),
                                )
                                .push(histories.input(UndoSubject::CustomGameAlias(i)))
                        })
                        .push_if(config.custom_games[i].kind() == CustomGameKind::Alias, || {
                            Row::new()
                                .spacing(10)
                                .push(
                                    Container::new(space::horizontal().width(left_side))
                                        .padding(padding::top(top_side)),
                                )
                                .push(checkbox(
                                    TRANSLATOR.prefer_alias_display(),
                                    config.custom_games[i].prefer_alias,
                                    Message::config(move |x| config::Event::CustomGaleAliasDisplay(i, x)),
                                ))
                        })
                        .push_if(config.custom_games[i].kind() == CustomGameKind::Game, || {
                            Row::new()
                                .spacing(10)
                                .push(
                                    Column::new()
                                        .width(left_side)
                                        .padding(padding::top(top_side))
                                        .push(text(TRANSLATOR.field(&TRANSLATOR.integration_label()))),
                                )
                                .push(
                                    pick_list(
                                        Integration::ALL,
                                        Some(config.custom_games[i].integration),
                                        Message::config(move |v| config::Event::CustomGameIntegration(i, v)),
                                    )
                                    .class(style::PickList::Primary),
                                )
                        })
                        .push_if(config.custom_games[i].kind() == CustomGameKind::Game, || {
                            Row::new()
                                .spacing(10)
                                .push(
                                    Column::new()
                                        .width(left_side)
                                        .padding(padding::top(top_side))
                                        .push(text(TRANSLATOR.custom_files_label())),
                                )
                                .push(
                                    x.files
                                        .iter()
                                        .enumerate()
                                        .fold(Column::new().spacing(4), |column, (ii, _)| {
                                            column.push(
                                                Row::new()
                                                    .align_y(Alignment::Center)
                                                    .spacing(20)
                                                    .push(button::move_up_nested(
                                                        Message::config2(config::Event::CustomGameFile),
                                                        i,
                                                        ii,
                                                    ))
                                                    .push(button::move_down_nested(
                                                        Message::config2(config::Event::CustomGameFile),
                                                        i,
                                                        ii,
                                                        x.files.len(),
                                                    ))
                                                    .push(histories.input(UndoSubject::CustomGameFile(i, ii)))
                                                    .push(button::choose_folder(
                                                        BrowseSubject::CustomGameFile(i, ii),
                                                        modifiers,
                                                    ))
                                                    .push(button::remove_nested(
                                                        Message::config2(config::Event::CustomGameFile),
                                                        i,
                                                        ii,
                                                    )),
                                            )
                                        })
                                        .push(button::add_nested(Message::config2(config::Event::CustomGameFile), i)),
                                )
                        })
                        .push_if(config.custom_games[i].kind() == CustomGameKind::Game, || {
                            Row::new()
                                .spacing(10)
                                .push(
                                    Column::new()
                                        .width(left_side)
                                        .padding(padding::top(top_side))
                                        .push(text(TRANSLATOR.custom_registry_label())),
                                )
                                .push(
                                    x.registry
                                        .iter()
                                        .enumerate()
                                        .fold(Column::new().spacing(4), |column, (ii, _)| {
                                            column.push(
                                                Row::new()
                                                    .spacing(20)
                                                    .align_y(Alignment::Center)
                                                    .push(button::move_up_nested(
                                                        Message::config2(config::Event::CustomGameRegistry),
                                                        i,
                                                        ii,
                                                    ))
                                                    .push(button::move_down_nested(
                                                        Message::config2(config::Event::CustomGameRegistry),
                                                        i,
                                                        ii,
                                                        x.registry.len(),
                                                    ))
                                                    .push(histories.input(UndoSubject::CustomGameRegistry(i, ii)))
                                                    .push(button::remove_nested(
                                                        Message::config2(config::Event::CustomGameRegistry),
                                                        i,
                                                        ii,
                                                    )),
                                            )
                                        })
                                        .push(button::add_nested(
                                            Message::config2(config::Event::CustomGameRegistry),
                                            i,
                                        )),
                                )
                        })
                        .push_if(config.custom_games[i].kind() == CustomGameKind::Game, || {
                            Row::new()
                                .spacing(10)
                                .push(
                                    Column::new()
                                        .width(left_side)
                                        .padding(padding::top(top_side))
                                        .push(text(TRANSLATOR.field(&TRANSLATOR.custom_installed_name_label()))),
                                )
                                .push(
                                    x.install_dir
                                        .iter()
                                        .enumerate()
                                        .fold(Column::new().spacing(4), |column, (ii, _)| {
                                            column.push(
                                                Row::new()
                                                    .align_y(Alignment::Center)
                                                    .spacing(20)
                                                    .push(button::move_up_nested(
                                                        Message::config2(config::Event::CustomGameInstallDir),
                                                        i,
                                                        ii,
                                                    ))
                                                    .push(button::move_down_nested(
                                                        Message::config2(config::Event::CustomGameInstallDir),
                                                        i,
                                                        ii,
                                                        x.install_dir.len(),
                                                    ))
                                                    .push(histories.input(UndoSubject::CustomGameInstallDir(i, ii)))
                                                    .push(button::remove_nested(
                                                        Message::config2(config::Event::CustomGameInstallDir),
                                                        i,
                                                        ii,
                                                    )),
                                            )
                                        })
                                        .push(button::add_nested(
                                            Message::config2(config::Event::CustomGameInstallDir),
                                            i,
                                        )),
                                )
                        })
                        .push_if(config.custom_games[i].kind() == CustomGameKind::Game, || {
                            Row::new()
                                .spacing(10)
                                .push(
                                    Column::new()
                                        .width(left_side)
                                        .padding(padding::top(top_side))
                                        .push(text(TRANSLATOR.field(&TRANSLATOR.wine_prefix()))),
                                )
                                .push(
                                    x.wine_prefix
                                        .iter()
                                        .enumerate()
                                        .fold(Column::new().spacing(4), |column, (ii, _)| {
                                            column.push(
                                                Row::new()
                                                    .align_y(Alignment::Center)
                                                    .spacing(20)
                                                    .push(button::move_up_nested(
                                                        Message::config2(config::Event::CustomGameWinePrefix),
                                                        i,
                                                        ii,
                                                    ))
                                                    .push(button::move_down_nested(
                                                        Message::config2(config::Event::CustomGameWinePrefix),
                                                        i,
                                                        ii,
                                                        x.wine_prefix.len(),
                                                    ))
                                                    .push(histories.input(UndoSubject::CustomGameWinePrefix(i, ii)))
                                                    .push(button::remove_nested(
                                                        Message::config2(config::Event::CustomGameWinePrefix),
                                                        i,
                                                        ii,
                                                    )),
                                            )
                                        })
                                        .push(button::add_nested(
                                            Message::config2(config::Event::CustomGameWinePrefix),
                                            i,
                                        )),
                                )
                        });
                }

                Container::new(content)
                    .id(config.custom_games[i].name.clone())
                    .class(style::Container::GameListEntry)
            })
        },
    );

    Container::new(ScrollSubject::CustomGames.into_widget(content))
}

pub fn ignored_items<'a>(config: &Config, histories: &TextHistories, modifiers: &keyboard::Modifiers) -> Container<'a> {
    Container::new({
        Column::new().spacing(10).push(
            Container::new(
                Column::new()
                    .padding(5)
                    .spacing(5)
                    .push(
                        Row::new()
                            .push(Column::new().width(100).push(text(TRANSLATOR.custom_files_label())))
                            .push(
                                config
                                    .backup
                                    .filter
                                    .ignored_paths
                                    .iter()
                                    .enumerate()
                                    .fold(Column::new().spacing(4), |column, (ii, _)| {
                                        column.push(
                                            Row::new()
                                                .spacing(20)
                                                .push(button::move_up(
                                                    Message::config(config::Event::BackupFilterIgnoredPath),
                                                    ii,
                                                ))
                                                .push(button::move_down(
                                                    Message::config(config::Event::BackupFilterIgnoredPath),
                                                    ii,
                                                    config.backup.filter.ignored_paths.len(),
                                                ))
                                                .push(histories.input(UndoSubject::BackupFilterIgnoredPath(ii)))
                                                .push(button::choose_folder(
                                                    BrowseSubject::BackupFilterIgnoredPath(ii),
                                                    modifiers,
                                                ))
                                                .push(button::remove(
                                                    Message::config(config::Event::BackupFilterIgnoredPath),
                                                    ii,
                                                )),
                                        )
                                    })
                                    .push(button::add(Message::config(config::Event::BackupFilterIgnoredPath))),
                            ),
                    )
                    .push(
                        Row::new()
                            .push(Column::new().width(100).push(text(TRANSLATOR.custom_registry_label())))
                            .push(
                                config
                                    .backup
                                    .filter
                                    .ignored_registry
                                    .iter()
                                    .enumerate()
                                    .fold(Column::new().spacing(4), |column, (ii, _)| {
                                        column.push(
                                            Row::new()
                                                .spacing(20)
                                                .push(button::move_up(
                                                    Message::config(config::Event::BackupFilterIgnoredRegistry),
                                                    ii,
                                                ))
                                                .push(button::move_down(
                                                    Message::config(config::Event::BackupFilterIgnoredRegistry),
                                                    ii,
                                                    config.backup.filter.ignored_registry.len(),
                                                ))
                                                .push(histories.input(UndoSubject::BackupFilterIgnoredRegistry(ii)))
                                                .push(button::remove(
                                                    Message::config(config::Event::BackupFilterIgnoredRegistry),
                                                    ii,
                                                )),
                                        )
                                    })
                                    .push(button::add(Message::config(config::Event::BackupFilterIgnoredRegistry))),
                            ),
                    ),
            )
            .class(style::Container::GameListEntry),
        )
    })
}