mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
add not login message to search demo
This commit is contained in:
@@ -36,11 +36,14 @@ import {
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'alfresco-search-demo',
|
selector: 'alfresco-search-demo',
|
||||||
template: `
|
template: `
|
||||||
<div class="container">
|
<div class="container" *ngIf="authenticated">
|
||||||
<alfresco-search-control *ngIf="authenticated" [searchTerm]="searchTerm"
|
<alfresco-search-control [searchTerm]="searchTerm"
|
||||||
(searchChange)="searchTermChange($event);"></alfresco-search-control>
|
(searchChange)="searchTermChange($event);"></alfresco-search-control>
|
||||||
<alfresco-search [searchTerm]="searchTerm"></alfresco-search>
|
<alfresco-search [searchTerm]="searchTerm"></alfresco-search>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="!authenticated">
|
||||||
|
Authentication failed to ip {{ host }}
|
||||||
|
</div>
|
||||||
`,
|
`,
|
||||||
styles: [':host > .container {padding: 10px}'],
|
styles: [':host > .container {padding: 10px}'],
|
||||||
providers: [ALFRESCO_SEARCH_PROVIDERS],
|
providers: [ALFRESCO_SEARCH_PROVIDERS],
|
||||||
@@ -53,13 +56,15 @@ class SearchDemo implements OnInit {
|
|||||||
|
|
||||||
public searchTerm: string = 'foo bar';
|
public searchTerm: string = 'foo bar';
|
||||||
|
|
||||||
|
host: string = 'http://192.168.99.100:8080';
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private authService: AlfrescoAuthenticationService,
|
private authService: AlfrescoAuthenticationService,
|
||||||
settings: AlfrescoSettingsService,
|
settings: AlfrescoSettingsService,
|
||||||
translation: AlfrescoTranslationService,
|
translation: AlfrescoTranslationService,
|
||||||
searchService: AlfrescoService) {
|
searchService: AlfrescoService) {
|
||||||
|
|
||||||
settings.host = 'http://192.168.99.100:8080';
|
settings.host = this.host;
|
||||||
translation.translationInit();
|
translation.translationInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user