web: fix duplicate classes, make generic icon clickable

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-12-06 21:13:04 +01:00
parent b3e40c6aed
commit b14c22cbff
6 changed files with 13 additions and 9 deletions

View File

@ -84,6 +84,9 @@ migrate:
run: run:
go run -v cmd/server/main.go go run -v cmd/server/main.go
web-watch:
cd web && npm run watch
web: web-lint-fix web-lint web-extract web: web-lint-fix web-lint web-extract
web-lint-fix: web-lint-fix:

View File

@ -95,7 +95,7 @@ export class NotificationDrawer extends LitElement {
class="pf-c-dropdown__toggle pf-m-plain" class="pf-c-dropdown__toggle pf-m-plain"
href="#/events/log/${item.event?.pk}" href="#/events/log/${item.event?.pk}"
> >
<i class="fas fas fa-share-square"></i> <i class="fas fa-share-square"></i>
</a> </a>
`} `}
<button <button

View File

@ -143,7 +143,7 @@ export class IdentificationStage extends BaseStage<
} }
renderSource(source: LoginSource): TemplateResult { renderSource(source: LoginSource): TemplateResult {
let icon = html`<i class="fas fas fa-share-square" title="${source.name}"></i>`; let icon = html`<i class="fas fa-share-square" title="${source.name}"></i>`;
if (source.iconUrl) { if (source.iconUrl) {
icon = html`<img src="${source.iconUrl}" alt="${source.name}" />`; icon = html`<img src="${source.iconUrl}" alt="${source.name}" />`;
} }

View File

@ -125,7 +125,7 @@ export class ApplicationListPage extends TablePage<Application> {
</ak-forms-modal> </ak-forms-modal>
${item.launchUrl ${item.launchUrl
? html`<a href=${item.launchUrl} target="_blank" class="pf-c-button pf-m-plain"> ? html`<a href=${item.launchUrl} target="_blank" class="pf-c-button pf-m-plain">
<i class="fas fas fa-share-square"></i> <i class="fas fa-share-square"></i>
</a>` </a>`
: html``}`, : html``}`,
]; ];

View File

@ -70,7 +70,7 @@ export class EventListPage extends TablePage<Event> {
html`<span>${item.clientIp || t`-`}</span>`, html`<span>${item.clientIp || t`-`}</span>`,
html`<span>${item.tenant?.name || t`-`}</span>`, html`<span>${item.tenant?.name || t`-`}</span>`,
html`<a href="#/events/log/${item.pk}"> html`<a href="#/events/log/${item.pk}">
<i class="fas fas fa-share-square"></i> <i class="fas fa-share-square"></i>
</a>`, </a>`,
]; ];
} }

View File

@ -73,14 +73,15 @@ export class LibraryApplication extends LitElement {
style="background: ${this.background} !important" style="background: ${this.background} !important"
> >
<div class="pf-c-card__header"> <div class="pf-c-card__header">
${this.application.metaIcon <a href="${ifDefined(this.application.launchUrl ?? "")}">
? html`<a href="${ifDefined(this.application.launchUrl ?? "")}" ${this.application.metaIcon
><img ? html`<img
class="app-icon pf-c-avatar" class="app-icon pf-c-avatar"
src="${ifDefined(this.application.metaIcon)}" src="${ifDefined(this.application.metaIcon)}"
alt="${t`Application Icon`}" alt="${t`Application Icon`}"
/></a>` />`
: html`<i class="fas fas fa-share-square"></i>`} : html`<i class="fas fa-share-square"></i>`}
</a>
${until( ${until(
uiConfig().then((config) => { uiConfig().then((config) => {
if (!config.enabledFeatures.applicationEdit) { if (!config.enabledFeatures.applicationEdit) {