From e8c20c28b28825ba877ed6ab8d571ab8acdb7975 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 10 Feb 2022 11:06:44 +0100 Subject: [PATCH] allow passing label into LoadingView also doesn't need to be a template view, as it doesn't have bindings or event handlers --- src/platform/web/ui/general/LoadingView.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/platform/web/ui/general/LoadingView.js b/src/platform/web/ui/general/LoadingView.js index f2ab20cc..436d189c 100644 --- a/src/platform/web/ui/general/LoadingView.js +++ b/src/platform/web/ui/general/LoadingView.js @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -import {TemplateView} from "./TemplateView"; +import {StaticView} from "./StaticView"; import {spinner} from "../common.js"; -export class LoadingView extends TemplateView { - render(t) { - return t.div({ className: "LoadingView" }, [spinner(t), "Loading"]); +export class LoadingView extends StaticView { + constructor(label = "Loading") { + super(label, (t, label) => { + return t.div({ className: "LoadingView" }, [spinner(t), label]); + }); } }