refactor: migrate to material symbols icon set

This commit is contained in:
Thea Schöbl
2022-08-19 11:48:34 +00:00
parent f3cf3b30e3
commit 68734bfe21
2097 changed files with 26045 additions and 18101 deletions

View File

@@ -1,19 +1,20 @@
/*
* Copyright (C) 2021 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
* Copyright (C) 2022 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Pipe, PipeTransform} from '@angular/core';
import {SCThingType} from '@openstapps/core';
import {DataIcons} from './data-icon.config';
/**
* Converts the data type text into the icon name
@@ -25,40 +26,7 @@ export class DataIconPipe implements PipeTransform {
/**
* Mapping from data types to ionic icons to show
*/
typeIconMap: {[type in SCThingType]: string};
constructor() {
this.typeIconMap = {
'academic event': 'school',
'assessment': 'file-text',
'article': 'file',
'book': 'book',
'building': 'location',
'catalog': 'folder',
'contact point': 'phone',
'course of study': 'school',
'date series': 'calendar',
'dish': 'tools-kitchen-2',
'favorite': 'heart',
'floor': 'arrow-up-circle',
'message': 'news',
'organization': 'briefcase',
'periodical': 'news',
'person': 'user',
'point of interest': 'location',
'publication event': 'speakerphone',
'room': 'location',
'semester': 'school',
'setting': 'settings',
'sport course': 'ball-football',
'study module': 'school',
'ticket': 'ticket',
'todo': 'checkbox',
'tour': 'lifebuoy',
'video': 'video',
'diff': 'arrows-left-right',
};
}
typeIconMap = DataIcons;
/**
* Provide the icon name from the data type