fix dialog
This commit is contained in:
parent
e1ef894275
commit
ebb9dc826a
@ -2,6 +2,7 @@ import { localized, msg, str } from "@lit/localize";
|
||||
import type { SlInput } from "@shoelace-style/shoelace";
|
||||
import { type TemplateResult } from "lit";
|
||||
import { customElement, property } from "lit/decorators.js";
|
||||
import { when } from "lit/directives/when.js";
|
||||
|
||||
import type { CurrentUser, UserOrg } from "@/types/user";
|
||||
import LiteElement, { html } from "@/utils/LiteElement";
|
||||
@ -38,17 +39,14 @@ export class OrgsList extends LiteElement {
|
||||
}
|
||||
|
||||
private renderOrgQuotas() {
|
||||
if (!this.currOrg) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
return html`
|
||||
<btrix-dialog
|
||||
.label=${msg(str`Quotas for: ${this.currOrg.name}`)}
|
||||
.label=${msg(str`Quotas for: ${this.currOrg?.name || ""}`)}
|
||||
.open=${!!this.currOrg}
|
||||
@sl-request-close=${() => (this.currOrg = null)}
|
||||
>
|
||||
${Object.entries(this.currOrg.quotas!).map(([key, value]) => {
|
||||
${when(this.currOrg?.quotas, (quotas) =>
|
||||
Object.entries(quotas).map(([key, value]) => {
|
||||
let label;
|
||||
switch (key) {
|
||||
case "maxConcurrentCrawls":
|
||||
@ -80,7 +78,8 @@ export class OrgsList extends LiteElement {
|
||||
type="number"
|
||||
@sl-input="${this.onUpdateQuota}"
|
||||
></sl-input>`;
|
||||
})}
|
||||
}),
|
||||
)}
|
||||
<div slot="footer" class="flex justify-end">
|
||||
<sl-button
|
||||
size="small"
|
||||
|
Loading…
Reference in New Issue
Block a user