mirror of
https://github.com/bitwarden/web
synced 2025-12-06 00:03:28 +00:00
* Break form controls up into reusable components * Add proper form styling, validation, inline error messages, etc * Move control options into class instead of template * Add accessibility
26 lines
730 B
TypeScript
26 lines
730 B
TypeScript
import { Component, Input } from "@angular/core";
|
|
|
|
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
|
|
|
|
/** For use in the SSO Config Form only - will be deprecated by the Component Library */
|
|
@Component({
|
|
selector: "app-input-text-readonly",
|
|
templateUrl: "input-text-readonly.component.html",
|
|
})
|
|
export class InputTextReadOnlyComponent {
|
|
@Input() controlValue: string;
|
|
@Input() label: string;
|
|
@Input() showCopy = true;
|
|
@Input() showLaunch = false;
|
|
|
|
constructor(private platformUtilsService: PlatformUtilsService) {}
|
|
|
|
copy(value: string) {
|
|
this.platformUtilsService.copyToClipboard(value);
|
|
}
|
|
|
|
launchUri(url: string) {
|
|
this.platformUtilsService.launchUri(url);
|
|
}
|
|
}
|