mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 09:01:03 -08:00
feat(category-management): add snackbar notification for save errors
This commit is contained in:
1 parent
74a65a53a9
commit
16a5e1e4c9
2 files changed
+6
-4
No files matched your search
-4
@@ -1,7 +1,3 @@
|
||||
::ng-deep .mat-mdc-dialog-content {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
.loading-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
+6
@@ -11,6 +11,7 @@ import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { TranslatePipe } from '@ngx-translate/core';
|
||||
import { DatabaseService, XCategoryFromDb } from 'services';
|
||||
|
||||
@@ -168,6 +169,11 @@ export class CategoryManagementDialogComponent implements OnInit {
|
||||
this.dialogRef.close(true);
|
||||
} catch (error) {
|
||||
console.error('Error saving category visibility:', error);
|
||||
inject(MatSnackBar).open(
|
||||
'Failed to save category visibility',
|
||||
'Close',
|
||||
{ duration: 3000 }
|
||||
);
|
||||
} finally {
|
||||
this.isSaving.set(false);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user