Removed material
This commit is contained in:
@@ -11,6 +11,6 @@ export const appConfig: ApplicationConfig = {
|
|||||||
provideRouter(appRoutes, withInMemoryScrolling({ anchorScrolling: 'enabled', scrollPositionRestoration: 'enabled' }), withEnabledBlockingInitialNavigation()),
|
provideRouter(appRoutes, withInMemoryScrolling({ anchorScrolling: 'enabled', scrollPositionRestoration: 'enabled' }), withEnabledBlockingInitialNavigation()),
|
||||||
provideHttpClient(withFetch()),
|
provideHttpClient(withFetch()),
|
||||||
provideAnimationsAsync(),
|
provideAnimationsAsync(),
|
||||||
providePrimeNG({ theme: { preset: Aura, options: { darkModeSelector: '.app-dark' } }, ripple: false, inputStyle: 'outlined' })
|
providePrimeNG({ theme: { preset: Aura, options: { darkModeSelector: '.app-dark' } } })
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { FormsModule } from '@angular/forms';
|
|||||||
import { $t, updatePreset, updateSurfacePalette } from '@primeng/themes';
|
import { $t, updatePreset, updateSurfacePalette } from '@primeng/themes';
|
||||||
import Aura from '@primeng/themes/aura';
|
import Aura from '@primeng/themes/aura';
|
||||||
import Lara from '@primeng/themes/lara';
|
import Lara from '@primeng/themes/lara';
|
||||||
import Material from '@primeng/themes/material';
|
|
||||||
import Nora from '@primeng/themes/nora';
|
import Nora from '@primeng/themes/nora';
|
||||||
import { PrimeNG } from 'primeng/config';
|
import { PrimeNG } from 'primeng/config';
|
||||||
import { SelectButtonModule } from 'primeng/selectbutton';
|
import { SelectButtonModule } from 'primeng/selectbutton';
|
||||||
@@ -12,7 +11,6 @@ import { LayoutService } from '../service/layout.service';
|
|||||||
|
|
||||||
const presets = {
|
const presets = {
|
||||||
Aura,
|
Aura,
|
||||||
Material,
|
|
||||||
Lara,
|
Lara,
|
||||||
Nora
|
Nora
|
||||||
} as const;
|
} as const;
|
||||||
@@ -279,15 +277,8 @@ export class AppConfigurator {
|
|||||||
|
|
||||||
getPresetExt() {
|
getPresetExt() {
|
||||||
const color: SurfacesType = this.primaryColors().find((c) => c.name === this.selectedPrimaryColor()) || {};
|
const color: SurfacesType = this.primaryColors().find((c) => c.name === this.selectedPrimaryColor()) || {};
|
||||||
|
|
||||||
const preset = this.layoutService.layoutConfig().preset;
|
const preset = this.layoutService.layoutConfig().preset;
|
||||||
|
|
||||||
if (preset === 'Material') {
|
|
||||||
this.primeng.inputVariant.set('filled');
|
|
||||||
} else {
|
|
||||||
this.primeng.inputVariant.set('outlined');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (color.name === 'noir') {
|
if (color.name === 'noir') {
|
||||||
return {
|
return {
|
||||||
semantic: {
|
semantic: {
|
||||||
@@ -373,42 +364,6 @@ export class AppConfigurator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} else if (preset === 'Material') {
|
|
||||||
return {
|
|
||||||
semantic: {
|
|
||||||
primary: color.palette,
|
|
||||||
colorScheme: {
|
|
||||||
light: {
|
|
||||||
primary: {
|
|
||||||
color: '{primary.500}',
|
|
||||||
contrastColor: '#ffffff',
|
|
||||||
hoverColor: '{primary.400}',
|
|
||||||
activeColor: '{primary.300}'
|
|
||||||
},
|
|
||||||
highlight: {
|
|
||||||
background: 'color-mix(in srgb, {primary.color}, transparent 88%)',
|
|
||||||
focusBackground: 'color-mix(in srgb, {primary.color}, transparent 76%)',
|
|
||||||
color: '{primary.700}',
|
|
||||||
focusColor: '{primary.800}'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
dark: {
|
|
||||||
primary: {
|
|
||||||
color: '{primary.400}',
|
|
||||||
contrastColor: '{surface.900}',
|
|
||||||
hoverColor: '{primary.300}',
|
|
||||||
activeColor: '{primary.200}'
|
|
||||||
},
|
|
||||||
highlight: {
|
|
||||||
background: 'color-mix(in srgb, {primary.400}, transparent 84%)',
|
|
||||||
focusBackground: 'color-mix(in srgb, {primary.400}, transparent 76%)',
|
|
||||||
color: 'rgba(255,255,255,.87)',
|
|
||||||
focusColor: 'rgba(255,255,255,.87)'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
semantic: {
|
semantic: {
|
||||||
@@ -472,13 +427,6 @@ export class AppConfigurator {
|
|||||||
this.layoutService.layoutConfig.update((state) => ({ ...state, preset: event }));
|
this.layoutService.layoutConfig.update((state) => ({ ...state, preset: event }));
|
||||||
const preset = presets[event as KeyOfType<typeof presets>];
|
const preset = presets[event as KeyOfType<typeof presets>];
|
||||||
const surfacePalette = this.surfaces.find((s) => s.name === this.selectedSurfaceColor())?.palette;
|
const surfacePalette = this.surfaces.find((s) => s.name === this.selectedSurfaceColor())?.palette;
|
||||||
if (this.layoutService.layoutConfig().preset === 'Material') {
|
|
||||||
document.body.classList.add('material');
|
|
||||||
this.config.ripple.set(true);
|
|
||||||
} else {
|
|
||||||
document.body.classList.remove('material');
|
|
||||||
this.config.ripple.set(false);
|
|
||||||
}
|
|
||||||
$t().preset(preset).preset(this.getPresetExt()).surfacePalette(surfacePalette).use({ useDefaultOptions: true });
|
$t().preset(preset).preset(this.getPresetExt()).surfacePalette(surfacePalette).use({ useDefaultOptions: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user