update pages as well

This commit is contained in:
emma 2023-11-15 18:24:50 -05:00
parent d8f8e6db73
commit bc6f362861
21 changed files with 48 additions and 56 deletions

View File

@ -1,6 +1,6 @@
import type { TemplateResult } from "lit";
import { render } from "lit";
import { property, state, query } from "lit/decorators.js";
import { property, state, query, customElement } from "lit/decorators.js";
import { when } from "lit/directives/when.js";
import { msg, localized } from "@lit/localize";
import { ifDefined } from "lit/directives/if-defined.js";
@ -53,6 +53,7 @@ type APIUser = {
* @event update-user-info
*/
@localized()
@customElement("browsertrix-app")
export class App extends LiteElement {
@property({ type: String })
version?: string;
@ -937,5 +938,3 @@ export class App extends LiteElement {
AppStateService.updateOrgSlug(null);
}
}
customElements.define("browsertrix-app", App);

View File

@ -1,4 +1,4 @@
import { state, property } from "lit/decorators.js";
import { state, property, customElement } from "lit/decorators.js";
import { ifDefined } from "lit/directives/if-defined.js";
import { when } from "lit/directives/when.js";
import { msg, localized, str } from "@lit/localize";
@ -18,6 +18,7 @@ import { Profile } from "./types";
* ```
*/
@localized()
@customElement("btrix-browser-profiles-detail")
export class BrowserProfilesDetail extends LiteElement {
@property({ type: Object })
authState!: AuthState;
@ -665,5 +666,3 @@ export class BrowserProfilesDetail extends LiteElement {
e.stopPropagation();
}
}
customElements.define("btrix-browser-profiles-detail", BrowserProfilesDetail);

View File

@ -1,4 +1,4 @@
import { state, property } from "lit/decorators.js";
import { state, property, customElement } from "lit/decorators.js";
import { msg, localized, str } from "@lit/localize";
import { when } from "lit/directives/when.js";
@ -18,6 +18,7 @@ import type { SelectNewDialogEvent } from "./index";
* ```
*/
@localized()
@customElement("btrix-browser-profiles-list")
export class BrowserProfilesList extends LiteElement {
@property({ type: Object })
authState!: AuthState;
@ -297,5 +298,3 @@ export class BrowserProfilesList extends LiteElement {
return data.items;
}
}
customElements.define("btrix-browser-profiles-list", BrowserProfilesList);

View File

@ -1,4 +1,4 @@
import { state, property } from "lit/decorators.js";
import { state, property, customElement } from "lit/decorators.js";
import { msg, localized, str } from "@lit/localize";
import { ifDefined } from "lit/directives/if-defined.js";
@ -16,6 +16,7 @@ import LiteElement, { html } from "../../utils/LiteElement";
* ```
*/
@localized()
@customElement("btrix-browser-profiles-new")
export class BrowserProfilesNew extends LiteElement {
@property({ type: Object })
authState!: AuthState;
@ -236,5 +237,3 @@ export class BrowserProfilesNew extends LiteElement {
}
}
}
customElements.define("btrix-browser-profiles-new", BrowserProfilesNew);

View File

@ -1,4 +1,4 @@
import { state, property } from "lit/decorators.js";
import { state, property, customElement } from "lit/decorators.js";
import { msg, localized, str } from "@lit/localize";
import { choose } from "lit/directives/choose.js";
import { when } from "lit/directives/when.js";
@ -25,6 +25,7 @@ const TABS = ["replay", "items"] as const;
export type Tab = (typeof TABS)[number];
@localized()
@customElement("btrix-collection-detail")
export class CollectionDetail extends LiteElement {
@property({ type: Object })
authState!: AuthState;
@ -852,4 +853,3 @@ export class CollectionDetail extends LiteElement {
}
}
}
customElements.define("btrix-collection-detail", CollectionDetail);

View File

@ -1,4 +1,4 @@
import { state, property } from "lit/decorators.js";
import { state, property, customElement } from "lit/decorators.js";
import { msg, localized, str } from "@lit/localize";
import { when } from "lit/directives/when.js";
import difference from "lodash/fp/difference";
@ -10,6 +10,7 @@ import type { Collection } from "../../types/collection";
import "./collection-editor";
@localized()
@customElement("btrix-collection-edit")
export class CollectionEdit extends LiteElement {
@property({ type: Object })
authState!: AuthState;
@ -202,4 +203,3 @@ export class CollectionEdit extends LiteElement {
return data;
}
}
customElements.define("btrix-collection-edit", CollectionEdit);

View File

@ -1,5 +1,5 @@
import type { TemplateResult } from "lit";
import { state, property, query } from "lit/decorators.js";
import { state, property, query, customElement } from "lit/decorators.js";
import { msg, localized, str } from "@lit/localize";
import { when } from "lit/directives/when.js";
import { guard } from "lit/directives/guard.js";
@ -93,6 +93,7 @@ type FormValues = {
* @event on-submit
*/
@localized()
@customElement("btrix-collection-editor")
export class CollectionEditor extends LiteElement {
@property({ type: Object })
authState!: AuthState;
@ -1557,4 +1558,3 @@ export class CollectionEditor extends LiteElement {
}
}
}
customElements.define("btrix-collection-editor", CollectionEditor);

View File

@ -1,4 +1,4 @@
import { state, property } from "lit/decorators.js";
import { state, property, customElement } from "lit/decorators.js";
import { msg, localized, str } from "@lit/localize";
import { when } from "lit/directives/when.js";
import { guard } from "lit/directives/guard.js";
@ -51,6 +51,7 @@ const sortableFields: Record<
const MIN_SEARCH_LENGTH = 2;
@localized()
@customElement("btrix-collections-list")
export class CollectionsList extends LiteElement {
@property({ type: Object })
authState!: AuthState;
@ -751,4 +752,3 @@ export class CollectionsList extends LiteElement {
return data;
}
}
customElements.define("btrix-collections-list", CollectionsList);

View File

@ -1,4 +1,4 @@
import { state, property } from "lit/decorators.js";
import { state, property, customElement } from "lit/decorators.js";
import { msg, localized, str } from "@lit/localize";
import type { CollectionSubmitEvent } from "./collection-editor";
@ -8,6 +8,7 @@ import type { Collection } from "../../types/collection";
import "./collection-editor";
@localized()
@customElement("btrix-collections-new")
export class CollectionsNew extends LiteElement {
@property({ type: Object })
authState!: AuthState;
@ -105,4 +106,3 @@ export class CollectionsNew extends LiteElement {
this.isSubmitting = false;
}
}
customElements.define("btrix-collections-new", CollectionsNew);

View File

@ -1,4 +1,4 @@
import { state, property, queryAsync } from "lit/decorators.js";
import { state, property, queryAsync, customElement } from "lit/decorators.js";
import { msg, localized, str } from "@lit/localize";
import { when } from "lit/directives/when.js";
import { serialize } from "@shoelace-style/shoelace/dist/utilities/form.js";
@ -51,6 +51,7 @@ const ABORT_REASON_QUOTA_REACHED = "storage_quota_reached";
* @event uploaded
*/
@localized()
@customElement("btrix-file-uploader")
export class FileUploader extends LiteElement {
@property({ type: String })
orgId!: string;
@ -537,4 +538,3 @@ export class FileUploader extends LiteElement {
return !formEl.querySelector("[data-invalid]");
}
}
customElements.define("btrix-file-uploader", FileUploader);

View File

@ -1,4 +1,4 @@
import { state, property, queryAsync } from "lit/decorators.js";
import { state, property, queryAsync, customElement } from "lit/decorators.js";
import { msg, localized, str } from "@lit/localize";
import type { SlInput } from "@shoelace-style/shoelace";
@ -7,6 +7,7 @@ import LiteElement, { html } from "../../../utils/LiteElement";
import type { Dialog } from "../../../components/dialog";
@localized()
@customElement("btrix-new-browser-profile-dialog")
export class NewBrowserProfileDialog extends LiteElement {
@property({ type: Object })
authState!: AuthState;
@ -176,7 +177,3 @@ export class NewBrowserProfileDialog extends LiteElement {
e.stopPropagation();
}
}
customElements.define(
"btrix-new-browser-profile-dialog",
NewBrowserProfileDialog
);

View File

@ -1,4 +1,4 @@
import { state, property, queryAsync } from "lit/decorators.js";
import { state, property, queryAsync, customElement } from "lit/decorators.js";
import { msg, localized, str } from "@lit/localize";
import type { SlInput } from "@shoelace-style/shoelace";
import { serialize } from "@shoelace-style/shoelace/dist/utilities/form.js";
@ -9,6 +9,7 @@ import LiteElement, { html } from "../../../utils/LiteElement";
import type { Dialog } from "../../../components/dialog";
@localized()
@customElement("btrix-new-collection-dialog")
export class NewCollectionDialog extends LiteElement {
@property({ type: Object })
authState!: AuthState;
@ -174,4 +175,3 @@ export class NewCollectionDialog extends LiteElement {
e.stopPropagation();
}
}
customElements.define("btrix-new-collection-dialog", NewCollectionDialog);

View File

@ -1,5 +1,5 @@
import { LitElement, html, css } from "lit";
import { state, property } from "lit/decorators.js";
import { state, property, customElement } from "lit/decorators.js";
import { msg, localized, str } from "@lit/localize";
import seededCrawlSvg from "../../../assets/images/new-crawl-config_Seeded-Crawl.svg";
@ -11,6 +11,7 @@ export type SelectJobTypeEvent = CustomEvent<"url-list" | "seed-crawl">;
* @event select-job-type SelectJobTypeEvent
*/
@localized()
@customElement("btrix-new-workflow-dialog")
export class NewWorkflowDialog extends LitElement {
static styles = css`
.title,
@ -127,4 +128,3 @@ export class NewWorkflowDialog extends LitElement {
`;
}
}
customElements.define("btrix-new-workflow-dialog", NewWorkflowDialog);

View File

@ -1,5 +1,5 @@
import type { TemplateResult } from "lit";
import { state, property } from "lit/decorators.js";
import { state, property, customElement } from "lit/decorators.js";
import { when } from "lit/directives/when.js";
import { ifDefined } from "lit/directives/if-defined.js";
import { classMap } from "lit/directives/class-map.js";
@ -38,6 +38,7 @@ const POLL_INTERVAL_SECONDS = 10;
* ```
*/
@localized()
@customElement("btrix-crawl-detail")
export class CrawlDetail extends LiteElement {
@property({ type: Object })
authState?: AuthState;
@ -1091,5 +1092,3 @@ ${this.crawl?.description}
}
}
}
customElements.define("btrix-crawl-detail", CrawlDetail);

View File

@ -1,4 +1,4 @@
import { state, property, query } from "lit/decorators.js";
import { state, property, query, customElement } from "lit/decorators.js";
import { ifDefined } from "lit/directives/if-defined.js";
import { msg, localized, str } from "@lit/localize";
import { when } from "lit/directives/when.js";
@ -50,6 +50,7 @@ const sortableFields: Record<
* ```
*/
@localized()
@customElement("btrix-crawls-list")
export class CrawlsList extends LiteElement {
static FieldLabels: Record<SearchFields, string> = {
name: msg("Name"),
@ -747,5 +748,3 @@ export class CrawlsList extends LiteElement {
return data;
}
}
customElements.define("btrix-crawls-list", CrawlsList);

View File

@ -1,5 +1,5 @@
import type { PropertyValues, TemplateResult } from "lit";
import { state, property } from "lit/decorators.js";
import { state, property, customElement } from "lit/decorators.js";
import { when } from "lit/directives/when.js";
import { ifDefined } from "lit/directives/if-defined.js";
import { msg, localized, str } from "@lit/localize";
@ -32,6 +32,7 @@ type Metrics = {
const BYTES_PER_GB = 1e9;
@localized()
@customElement("btrix-dashboard")
export class Dashboard extends LiteElement {
@property({ type: Object })
authState!: AuthState;
@ -629,4 +630,3 @@ export class Dashboard extends LiteElement {
}
}
}
customElements.define("btrix-dashboard", Dashboard);

View File

@ -1,4 +1,4 @@
import { state, property } from "lit/decorators.js";
import { state, property, customElement } from "lit/decorators.js";
import { ifDefined } from "lit/directives/if-defined.js";
import { msg, localized, str } from "@lit/localize";
import { when } from "lit/directives/when.js";
@ -56,6 +56,7 @@ export type OrgRemoveMemberEvent = CustomEvent<{
* org-remove-member
*/
@localized()
@customElement("btrix-org-settings")
export class OrgSettings extends LiteElement {
@property({ type: Object })
authState?: AuthState;
@ -589,5 +590,3 @@ export class OrgSettings extends LiteElement {
}
}
}
customElements.define("btrix-org-settings", OrgSettings);

View File

@ -1,5 +1,5 @@
import type { HTMLTemplateResult, TemplateResult } from "lit";
import { state, property } from "lit/decorators.js";
import { state, property, customElement } from "lit/decorators.js";
import { when } from "lit/directives/when.js";
import { until } from "lit/directives/until.js";
import { ifDefined } from "lit/directives/if-defined.js";
@ -40,6 +40,7 @@ const LOGS_PAGE_SIZE = 50;
* ```
*/
@localized()
@customElement("btrix-workflow-detail")
export class WorkflowDetail extends LiteElement {
@property({ type: Object })
authState!: AuthState;
@ -1719,5 +1720,3 @@ export class WorkflowDetail extends LiteElement {
return data;
}
}
customElements.define("btrix-workflow-detail", WorkflowDetail);

View File

@ -10,7 +10,13 @@ import type {
SlSwitch,
SlTextarea,
} from "@shoelace-style/shoelace";
import { state, property, query, queryAsync } from "lit/decorators.js";
import {
state,
property,
query,
queryAsync,
customElement,
} from "lit/decorators.js";
import { when } from "lit/directives/when.js";
import { msg, localized, str } from "@lit/localize";
import { ifDefined } from "lit/directives/if-defined.js";
@ -223,6 +229,7 @@ const BYTES_PER_GB = 1e9;
const URL_LIST_MAX_URLS = 1000;
@localized()
@customElement("btrix-workflow-editor")
export class CrawlConfigEditor extends LiteElement {
@property({ type: Object })
authState!: AuthState;
@ -2470,5 +2477,3 @@ https://archiveweb.page/images/${"logo.svg"}`}
}
}
}
customElements.define("btrix-workflow-editor", CrawlConfigEditor);

View File

@ -1,5 +1,5 @@
import type { HTMLTemplateResult, PropertyValueMap } from "lit";
import { state, property, query } from "lit/decorators.js";
import { state, property, query, customElement } from "lit/decorators.js";
import { msg, localized, str } from "@lit/localize";
import { when } from "lit/directives/when.js";
import { ifDefined } from "lit/directives/if-defined.js";
@ -59,6 +59,7 @@ const sortableFields: Record<
* ```
*/
@localized()
@customElement("btrix-workflows-list")
export class WorkflowsList extends LiteElement {
static FieldLabels: Record<SearchFields, string> = {
name: msg("Name"),
@ -860,5 +861,3 @@ export class WorkflowsList extends LiteElement {
return data;
}
}
customElements.define("btrix-workflows-list", WorkflowsList);

View File

@ -1,5 +1,5 @@
import type { TemplateResult, LitElement, PropertyValues } from "lit";
import { state, property } from "lit/decorators.js";
import { state, property, customElement } from "lit/decorators.js";
import { when } from "lit/directives/when.js";
import { msg, localized, str } from "@lit/localize";
import { mergeDeep } from "immutable";
@ -40,6 +40,7 @@ const defaultValue = {
* ```
*/
@localized()
@customElement("btrix-workflows-new")
export class WorkflowsNew extends LiteElement {
@property({ type: Object })
authState!: AuthState;
@ -146,5 +147,3 @@ export class WorkflowsNew extends LiteElement {
</btrix-alert>
`;
}
customElements.define("btrix-workflows-new", WorkflowsNew);