Add support for uploading and assigning custom SVG icons to libraries… (#1788)
* Add support for uploading and assigning custom SVG icons to libraries and shelves * Add few default icons
This commit is contained in:
@@ -12,6 +12,7 @@ export interface MagicShelf {
|
||||
id?: number | null;
|
||||
name: string;
|
||||
icon?: string;
|
||||
iconType?: 'PRIME_NG' | 'CUSTOM_SVG';
|
||||
filterJson: string;
|
||||
isPublic?: boolean;
|
||||
}
|
||||
@@ -93,11 +94,12 @@ export class MagicShelfService {
|
||||
);
|
||||
}
|
||||
|
||||
saveShelf(data: { id?: number; name: string | null; icon: string | null; group: any, isPublic?: boolean | null }): Observable<MagicShelf> {
|
||||
saveShelf(data: { id?: number; name: string | null; icon: string | null; iconType?: 'PRIME_NG' | 'CUSTOM_SVG'; group: any, isPublic?: boolean | null }): Observable<MagicShelf> {
|
||||
const payload: MagicShelf = {
|
||||
id: data.id,
|
||||
name: data.name ?? '',
|
||||
icon: data.icon ?? 'pi pi-book',
|
||||
iconType: data.iconType,
|
||||
filterJson: JSON.stringify(data.group),
|
||||
isPublic: data.isPublic ?? false
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user