diff --git a/connect/curators/curator.service.ts b/connect/curators/curator.service.ts index 84a8a29d..cf28ceff 100644 --- a/connect/curators/curator.service.ts +++ b/connect/curators/curator.service.ts @@ -11,19 +11,19 @@ export class CuratorService { constructor(private http: HttpClient) { } - public getCurators(properties: EnvProperties, emails: string): Observable { - let url: string = properties.adminToolsAPIURL + '/curator?emails='+emails; + public getCurators(properties: EnvProperties, communityId: string): Observable { + let url: string = properties.adminToolsAPIURL + '/' + communityId + '/curator'; return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url); } public updateCurator(properties: EnvProperties, curator: Curator) { let url: string = properties.adminToolsAPIURL + "curator"; - return this.http.post(url, curator, CustomOptions.getAuthOptions()); + return this.http.post(url, curator, CustomOptions.registryOptions()); } - public getCurator(properties: EnvProperties, curatorId: string): Observable { - let url: string = properties.adminToolsAPIURL + 'curator/'+curatorId; - return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url); + public getCurator(properties: EnvProperties): Observable { + let url: string = properties.adminToolsAPIURL + 'curator'; + return this.http.get((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url, CustomOptions.registryOptions()); } } diff --git a/utils/icons/icons-preview/icons-preview.component.ts b/utils/icons/icons-preview/icons-preview.component.ts new file mode 100644 index 00000000..54a62517 --- /dev/null +++ b/utils/icons/icons-preview/icons-preview.component.ts @@ -0,0 +1,149 @@ +import {Component} from "@angular/core"; + +@Component({ + selector: 'icons-preview', + template: ` +
+

Icons

+
+
+ +
arrow_left
+
+
+ +
arrow_right
+
+
+ +
arrow_up
+
+
+ +
arrow_down
+
+
+ +
book
+
+
+ +
database
+
+
+ +
cog
+
+
+ +
earth
+
+
+ +
edit
+
+
+ +
remove
+
+
+ +
preview
+
+
+ +
bullet
+
+
+ +
remove_circle
+
+
+ +
remove_circle_outline
+
+
+ +
person_add
+
+
+ +
cloud_upload
+
+
+ +
add
+
+
+ +
group
+
+
+ +
lock
+
+
+ +
search
+
+
+ +
refresh
+
+
+ +
close
+
+
+ +
done
+
+
+ +
mail
+
+
+ +
photo
+
+
+
+

Usage

+
    +
  • 1. Import IconsModule
  • +
  • 2. Add this to your module with these icons you will need
    +
    +
    constructor(private iconsService: IconsService) {{ "{" }}
    +   this.iconsService.registerIcons([edit]);
    +{{ "}" }}
    +
    +
  • +
  • 3. Use an icon with icon tag. Add parameter ratio to scale this icon. Default size 20x20 (ratio: 1)
    +
    +
    {{'<'}}icon name="edit"{{'><'}}/icon{{'>'}}
    +
    +
  • +
  • 4. Add a color class in parent of icon to give your icon a color.
    +
    +
    {{'<'}}div class="uk-text-secondary"{{'>'}}
    +  {{'<'}}icon name="edit"{{'><'}}/icon{{'>'}}
    +{{'<'}}/div{{'>'}}
    +
    +
  • +
+
+
+

Add a new icon

+
    +
  • 1. Go to Material Icons
  • +
  • 2. Find your icon and download it as svg.
  • +
  • 3. Open svg file with an editor and change width and height to 20
  • +
  • 4. Create an entry on icons file with your new icon.
  • +
+
+
+ ` +}) +export class IconsPreviewComponent { + +} diff --git a/utils/icons/icons-preview/icons-preview.module.ts b/utils/icons/icons-preview/icons-preview.module.ts new file mode 100644 index 00000000..ef279dbf --- /dev/null +++ b/utils/icons/icons-preview/icons-preview.module.ts @@ -0,0 +1,36 @@ +import {NgModule} from "@angular/core"; +import {CommonModule} from "@angular/common"; +import {RouterModule} from "@angular/router"; +import {IconsPreviewComponent} from "./icons-preview.component"; +import {IconsService} from "../icons.service"; +import {IconsModule} from "../icons.module"; +import { + add, + arrow_down, + arrow_left, + arrow_right, + arrow_up, + book, bullet, close, cloud_upload, + cog, + database, done, + earth, + edit, group, lock, mail, person_add, photo, + preview, refresh, + remove, remove_circle, remove_circle_outline, search +} from "../icons"; + +@NgModule({ + imports: [CommonModule, RouterModule.forChild([ + {path: '', component: IconsPreviewComponent} + ]), IconsModule], + declarations: [IconsPreviewComponent], + exports: [IconsPreviewComponent] +}) +export class IconsPreviewModule { + constructor(private iconsService: IconsService) { + this.iconsService.registerIcons([arrow_left, arrow_right, arrow_up, arrow_down, book, database, cog, earth, edit, + remove, preview, bullet, remove_circle, remove_circle_outline, person_add, cloud_upload, add, group, lock, search, + refresh, close, done, mail, photo + ]) + } +} diff --git a/utils/icons/icons.ts b/utils/icons/icons.ts index 53069b8d..184ec31c 100644 --- a/utils/icons/icons.ts +++ b/utils/icons/icons.ts @@ -50,7 +50,7 @@ export const edit: Icon = { export const remove: Icon = { name: 'remove', - data: '' + data: '' } export const preview: Icon = { @@ -126,3 +126,4 @@ export const photo = { name: 'photo', data: '' } +/** Add new icon under this line to be sure that it will be added on preview */