refactor(dashboard): move dashboard configuration to view preferences settings (#1822)
This commit is contained in:
@@ -4,7 +4,6 @@ import {DialogService} from 'primeng/dynamicdialog';
|
||||
import {MessageService} from 'primeng/api';
|
||||
import {getTranslocoModule} from '../../core/testing/transloco-testing';
|
||||
|
||||
import {DashboardSettingsComponent} from '../../features/dashboard/components/dashboard-settings/dashboard-settings.component';
|
||||
import {LibraryCreatorComponent} from '../../features/library-creator/library-creator.component';
|
||||
import {DialogLauncherService, DialogSize, DialogStyle} from './dialog-launcher.service';
|
||||
|
||||
@@ -55,17 +54,6 @@ describe('DialogLauncherService', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('opens the dashboard settings dialog with the expected style class', async () => {
|
||||
await service.openDashboardSettingsDialog();
|
||||
|
||||
expect(dialogService.open).toHaveBeenCalledWith(
|
||||
DashboardSettingsComponent,
|
||||
expect.objectContaining({
|
||||
showHeader: false,
|
||||
styleClass: `${DialogSize.XL} ${DialogStyle.MINIMAL}`,
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
it('passes the library id into the library edit dialog', async () => {
|
||||
await service.openLibraryEditDialog(12);
|
||||
|
||||
@@ -63,16 +63,6 @@ export class DialogLauncherService {
|
||||
});
|
||||
}
|
||||
|
||||
async openDashboardSettingsDialog(): Promise<DynamicDialogRef | null> {
|
||||
return this.launchLazyDialog(async () => {
|
||||
const {DashboardSettingsComponent} = await import('../../features/dashboard/components/dashboard-settings/dashboard-settings.component');
|
||||
return this.openDialog(DashboardSettingsComponent, {
|
||||
showHeader: false,
|
||||
styleClass: `${DialogSize.XL} ${DialogStyle.MINIMAL}`,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async openLibraryCreateDialog(): Promise<DynamicDialogRef | null> {
|
||||
return this.launchLazyDialog(async () => {
|
||||
const {LibraryCreatorComponent} = await import('../../features/library-creator/library-creator.component');
|
||||
|
||||
Reference in New Issue
Block a user