web: further cleanup, more linting

This commit is contained in:
Jens Langhammer
2020-12-02 15:44:40 +01:00
parent 05aeeafacc
commit c17623323a
23 changed files with 1647 additions and 39 deletions

View File

@ -8,6 +8,9 @@ import GlobalsStyle from "@patternfly/patternfly/base/patternfly-globals.css";
import { until } from "lit-html/directives/until";
import "./SidebarBrand";
import "./SidebarUser";
export interface SidebarItem {
name: string;
path?: string[];

View File

@ -16,7 +16,7 @@ export const DefaultConfig: Config = {
@customElement("pb-sidebar-brand")
export class SidebarBrand extends LitElement {
@property()
@property({attribute: false})
config: Config = DefaultConfig;
static get styles(): CSSResult[] {

View File

@ -46,9 +46,9 @@ export class SidebarUser extends LitElement {
return html`
<a href="#/-/user/" class="pf-c-nav__link user-avatar" id="user-settings">
${until(User.me().then(u => {
return html`<img class="pf-c-avatar" src="${u.avatar}" alt="" />
return html`<img class="pf-c-avatar" src="${u.avatar}" alt="" />
<span>${u.username}</span>`;
}), html``)}
}), html``)}
</a>
<a href="/flows/-/default/invalidation/" class="pf-c-nav__link user-logout" id="logout">
<i class="fas fa-sign-out-alt" aria-hidden="true"></i>