add style strict
This commit is contained in:
parent
99daa282d6
commit
2cd12c828f
@ -19,6 +19,7 @@ const api : ControllerAPI = new ControllerAPI();
|
|||||||
async function authInit() {
|
async function authInit() {
|
||||||
console.log("User is authenticated");
|
console.log("User is authenticated");
|
||||||
const newsFeed = await api.getNews(true) as NewsFeed;
|
const newsFeed = await api.getNews(true) as NewsFeed;
|
||||||
|
newsFeed.style = currentStyle;
|
||||||
const appElement = document.getElementById("app");
|
const appElement = document.getElementById("app");
|
||||||
if (appElement)
|
if (appElement)
|
||||||
appElement.innerHTML = newsFeed.build();
|
appElement.innerHTML = newsFeed.build();
|
||||||
|
|||||||
@ -6,4 +6,9 @@ export abstract class DefaultElement extends GefestElement {
|
|||||||
constructor(content: (GefestElement | string)[] | string) {
|
constructor(content: (GefestElement | string)[] | string) {
|
||||||
super(content);
|
super(content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
build(isFromStyle?: boolean): string {
|
||||||
|
if (!this.style) throw new Error("Setup style is required");
|
||||||
|
return super.build(isFromStyle);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user