PeerTube/client/src/app/shared/shared-main/angular/login-link.component.ts

23 lines
589 B
TypeScript

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())
}
}