diff --git a/src/app/components/app/app.component.html b/src/app/components/app/app.component.html
index 3ffd704..024da75 100644
--- a/src/app/components/app/app.component.html
+++ b/src/app/components/app/app.component.html
@@ -5,12 +5,12 @@
@if (showControls) {
- REGON
- NIP
- PESEL
- DOWÓD
- KOMÓRA
- IBAN
+ REGON
+ NIP
+ PESEL
+ DOWÓD
+ KOMÓRA
+ IBAN
diff --git a/src/app/components/app/app.component.ts b/src/app/components/app/app.component.ts
index 359bc4e..2fb424a 100644
--- a/src/app/components/app/app.component.ts
+++ b/src/app/components/app/app.component.ts
@@ -36,6 +36,18 @@ export class AppComponent implements OnInit {
this.selectedTheme = savedTheme;
this.applyTheme(savedTheme);
}
+
+ const savedGenerators = localStorage.getItem('generatorSettings');
+ if (savedGenerators) {
+ const settings = JSON.parse(savedGenerators);
+ this.showRegon = settings.showRegon ?? true;
+ this.showNip = settings.showNip ?? true;
+ this.showPesel = settings.showPesel ?? true;
+ this.showIdentityCard = settings.showIdentityCard ?? true;
+ this.showIban = settings.showIban ?? true;
+ this.showMobile = settings.showMobile ?? true;
+ }
+
setTimeout(() => {
this.isInitialVisible = false;
this.cdr.detectChanges();
@@ -48,6 +60,18 @@ export class AppComponent implements OnInit {
this.applyTheme(theme);
}
+ saveGeneratorSettings() {
+ const settings = {
+ showRegon: this.showRegon,
+ showNip: this.showNip,
+ showPesel: this.showPesel,
+ showIdentityCard: this.showIdentityCard,
+ showIban: this.showIban,
+ showMobile: this.showMobile
+ };
+ localStorage.setItem('generatorSettings', JSON.stringify(settings));
+ }
+
private applyTheme(theme: string) {
const body = document.body;
this.themes.forEach(t => {