web: remove common_styles

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-03-17 17:11:39 +01:00
parent 2698d9d23a
commit 43bf9e6c21
59 changed files with 500 additions and 351 deletions

View File

@ -1,5 +1,6 @@
import { gettext } from "django";
import { html, TemplateResult } from "lit-html";
import "./elements/utils/LoadingState";
import "./elements/EmptyState";
export function getCookie(name: string): string {
let cookieValue = "";
@ -43,7 +44,10 @@ export function truncate(input?: string, max = 10): string {
export function loading<T>(v: T, actual: TemplateResult): TemplateResult {
if (!v) {
return html`<ak-loading-state></ak-loading-state>`;
return html`<ak-empty-state
?loading="${true}"
header=${gettext("Loading")}>
</ak-empty-state>`;
}
return actual;
}