1 import { Component, Input, OnInit } from '@angular/core'
2 import { FormReactive } from '@app/shared/forms/form-reactive'
6 } from '@app/shared/forms/form-validators'
9 selector: 'my-remote-subscribe',
10 templateUrl: './remote-subscribe.component.html',
11 styleUrls: ['./remote-subscribe.component.scss']
13 export class RemoteSubscribeComponent extends FormReactive implements OnInit {
14 @Input() account: string
15 @Input() interact = false
16 @Input() showHelp = false
19 protected formValidatorService: FormValidatorService,
20 private userValidatorsService: UserValidatorsService
27 text: this.userValidatorsService.USER_EMAIL
33 if (!this.form.valid) return
39 const address = this.form.value['text']
40 const [ , hostname ] = address.split('@')
41 window.open(`https://${hostname}/authorize_interaction?acct=${this.account}`)