aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main/angular/login-link.component.ts
blob: 7e3a773c2c56b677484516aec597d42788e20dc8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { environment } from 'src/environments/environment'
import { Component, Input } from '@angular/core'
import { ServerService } from '@app/core'
import { PluginsManager } from '@root-helpers/plugins-manager'

@Component({
  selector: 'my-login-link',
  templateUrl: './login-link.component.html'
})
export class LoginLinkComponent {
  @Input() label = $localize`Login`

  @Input() className?: string

  constructor (private server: ServerService) {

  }

  getExternalLoginHref () {
    return PluginsManager.getDefaultLoginHref(environment.apiUrl, this.server.getHTMLConfig())
  }
}