web/elements: use <slot> in ak-label instead of attribute

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-11-28 21:03:24 +01:00
parent 96a86b3298
commit 235d283def
7 changed files with 31 additions and 40 deletions

View File

@ -68,13 +68,13 @@ export class SystemTaskListPage extends TablePage<Task> {
taskStatus(task: Task): TemplateResult {
switch (task.status) {
case StatusEnum.Successful:
return html`<ak-label color=${PFColor.Green} text=${t`Successful`}></ak-label>`;
return html`<ak-label color=${PFColor.Green}>${t`Successful`}</ak-label>`;
case StatusEnum.Warning:
return html`<ak-label color=${PFColor.Orange} text=${t`Warning`}></ak-label>`;
return html`<ak-label color=${PFColor.Orange}>${t`Warning`}</ak-label>`;
case StatusEnum.Error:
return html`<ak-label color=${PFColor.Red} text=${t`Error`}></ak-label>`;
return html`<ak-label color=${PFColor.Red}>${t`Error`}</ak-label>`;
default:
return html`<ak-label color=${PFColor.Grey} text=${t`Unknown`}></ak-label>`;
return html`<ak-label color=${PFColor.Grey}>${t`Unknown`}</ak-label>`;
}
}