Fixed single page login for a certain poor Simon with a weird browser
This commit is contained in:
parent
2913c28271
commit
4a85fa82c3
7 changed files with 44 additions and 26 deletions
|
@ -7,21 +7,21 @@ import {link} from "fs";
|
|||
export class SubtleButton extends UIElement{
|
||||
private imageUrl: string;
|
||||
private message: UIElement;
|
||||
private linkTo: string = undefined;
|
||||
private linkTo: { url: string, newTab?: boolean } = undefined;
|
||||
|
||||
constructor(imageUrl: string, message: string | UIElement, linkTo : string = undefined) {
|
||||
constructor(imageUrl: string, message: string | UIElement, linkTo: { url: string, newTab?: boolean } = undefined) {
|
||||
super(undefined);
|
||||
this.linkTo = linkTo;
|
||||
this.message = Translations.W(message);
|
||||
this.imageUrl = imageUrl;
|
||||
|
||||
|
||||
}
|
||||
|
||||
InnerRender(): string {
|
||||
|
||||
if(this.linkTo != undefined){
|
||||
return new Combine([
|
||||
`<a class="subtle-button" href="${this.linkTo}" target="_blank">`,
|
||||
`<a class="subtle-button" href="${this.linkTo.url}" ${this.linkTo.newTab ? 'target="_blank"' : ""}>`,
|
||||
this.imageUrl !== undefined ? `<img src='${this.imageUrl}'>` : "",
|
||||
this.message,
|
||||
'</a>'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue