UNPKG

@evan.network/ui-angular-core

Version:

The angular-core operates as an global and central library for the evan.network Angular 5 frontend development. Using this project you will be able to to the following things:

81 lines (80 loc) 2.58 kB
import { OnInit, ChangeDetectorRef, FormBuilder } from 'angular-libs'; import { EvanAddressBookService } from '../../services/bcc/address-book'; import { EvanTranslationService } from '../../services/ui/translate'; /**************************************************************************************************/ /** * Dialog to request user to accept permissions. * * Usage: * await this.modalService.createModal(TrustDialogComponent, { * smartAgentName: 'Onboarding Smart Agent', * smartAgentRights: [ * 'key-exchange', * 'mailbox-send' * ], * smartAgentDetails: { * description: ` * The onboarding Smart Agent gives you the ability, to invite persons via Email and send * them EVE\'s as seed money. They receive a custom Email with an invite link. * You get a mailbox message with the onboarded user id and the new alias of the account * `, * verifiedBy: 'evan.network', * verifiedAt: '28.02.2018', * createdBy: 'evan.network', * createdAt: '28.02.2018', * }, * smartAgentAccountId: '0x063fB42cCe4CA5448D69b4418cb89E663E71A139', * smartAgentTrustFn: async() => { * // do something when user accepted * } * }); * * @class Component TrustDialogComponent */ export declare class TrustDialogComponent implements OnInit { private addressBook; private formBuilder; private translate; private ref; /***************** variables *****************/ /** * name of the smart agent */ private smartAgentName; /** * permissions that are needed */ private smartAgentRights; /** * detail text of the smart agent */ private smartAgentDetails; /** * smart agent account id */ private smartAgentAccountId; /** * function that should be called, when the trust was accepted */ private smartAgentTrustFn; /** * resolvle function that is applied from modal service */ private resolveDialog; /** * reject function that is applied from modal service */ private rejectDialog; /** * loading indicator */ private loading; /***************** initialization *****************/ constructor(addressBook: EvanAddressBookService, formBuilder: FormBuilder, translate: EvanTranslationService, ref: ChangeDetectorRef); ngOnInit(): void; /***************** functions *****************/ /** * run when user accepts the trust */ finish(): Promise<void>; }