diff --git a/web/src/api/Sources.ts b/web/src/api/Sources.ts index 749dfb031..0e05d2b5b 100644 --- a/web/src/api/Sources.ts +++ b/web/src/api/Sources.ts @@ -1,4 +1,5 @@ import { BaseInheritanceModel, DefaultClient, AKResponse, QueryArguments } from "./Client"; +import { TypeCreate } from "./Providers"; export class Source implements BaseInheritanceModel { pk: string; @@ -23,6 +24,10 @@ export class Source implements BaseInheritanceModel { return DefaultClient.fetch>(["sources", "all"], filter); } + static getTypes(): Promise { + return DefaultClient.fetch(["sources", "all", "types"]); + } + static adminUrl(rest: string): string { return `/administration/sources/${rest}`; } diff --git a/web/src/pages/providers/ProviderListPage.ts b/web/src/pages/providers/ProviderListPage.ts index c7ca29608..fc524f796 100644 --- a/web/src/pages/providers/ProviderListPage.ts +++ b/web/src/pages/providers/ProviderListPage.ts @@ -92,7 +92,7 @@ export class ProviderListPage extends TablePage {
`; - }) + }); }), html``)} diff --git a/web/src/pages/sources/SourcesListPage.ts b/web/src/pages/sources/SourcesListPage.ts index f64e21ea9..7266e9e22 100644 --- a/web/src/pages/sources/SourcesListPage.ts +++ b/web/src/pages/sources/SourcesListPage.ts @@ -7,6 +7,8 @@ import { TablePage } from "../../elements/table/TablePage"; import "../../elements/buttons/ModalButton"; import "../../elements/buttons/SpinnerButton"; +import "../../elements/buttons/Dropdown"; +import { until } from "lit-html/directives/until"; @customElement("ak-source-list") export class SourceListPage extends TablePage { @@ -52,13 +54,13 @@ export class SourceListPage extends TablePage { html` - Edit + ${gettext("Edit")}
  - Delete + ${gettext("Delete")}
@@ -66,4 +68,29 @@ export class SourceListPage extends TablePage { ]; } + renderToolbar(): TemplateResult { + return html` + + + + + ${super.renderToolbar()}`; + } + }