Lint code.
This commit is contained in:
parent
8a33dfd36f
commit
40387b5a48
|
@ -44,7 +44,7 @@ interface ElementInfo {
|
||||||
[propName: string]: any;
|
[propName: string]: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function makeElement(elementInfo: ElementInfo) {
|
export function makeElement(elementInfo: ElementInfo): HTMLElement {
|
||||||
if ("condition" in elementInfo) { if (!elementInfo.condition) { return null; } }
|
if ("condition" in elementInfo) { if (!elementInfo.condition) { return null; } }
|
||||||
const element = document.createElement(elementInfo.tag);
|
const element = document.createElement(elementInfo.tag);
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ export function makeElement(elementInfo: ElementInfo) {
|
||||||
return element;
|
return element;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function setElementAttributes(element: Element, attributes: {[propName: string]: any}) {
|
export function setElementAttributes(element: Element, attributes: {[propName: string]: any}): void {
|
||||||
for (const key of Object.getOwnPropertyNames(attributes)) {
|
for (const key of Object.getOwnPropertyNames(attributes)) {
|
||||||
element.setAttribute(key, attributes[key]);
|
element.setAttribute(key, attributes[key]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ export class KeyValueViewPage extends Page {
|
||||||
|
|
||||||
setTitleElement(pageState);
|
setTitleElement(pageState);
|
||||||
|
|
||||||
let kvViewPageContent = makeElement({ tag: "div" });
|
const kvViewPageContent = makeElement({ tag: "div" });
|
||||||
setPageContent(kvViewPageContent);
|
setPageContent(kvViewPageContent);
|
||||||
|
|
||||||
if (pageState.currentMountType == "cubbyhole") {
|
if (pageState.currentMountType == "cubbyhole") {
|
||||||
|
@ -34,7 +34,7 @@ export class KeyValueViewPage extends Page {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
let newButton = makeElement({
|
const newButton = makeElement({
|
||||||
tag: "button",
|
tag: "button",
|
||||||
text: i18next.t("kv_view_new_btn"),
|
text: i18next.t("kv_view_new_btn"),
|
||||||
class: ["uk-button", "uk-button-primary", "uk-margin-bottom"],
|
class: ["uk-button", "uk-button-primary", "uk-margin-bottom"],
|
||||||
|
@ -45,7 +45,7 @@ export class KeyValueViewPage extends Page {
|
||||||
kvViewPageContent.appendChild(newButton);
|
kvViewPageContent.appendChild(newButton);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let res = await getSecrets(
|
const res = await getSecrets(
|
||||||
pageState.currentBaseMount,
|
pageState.currentBaseMount,
|
||||||
pageState.currentMountType,
|
pageState.currentMountType,
|
||||||
pageState.currentSecretPath,
|
pageState.currentSecretPath,
|
||||||
|
|
|
@ -15,8 +15,8 @@ export class Page {
|
||||||
}
|
}
|
||||||
goBack(): void {
|
goBack(): void {
|
||||||
changePage("HOME");
|
changePage("HOME");
|
||||||
};
|
}
|
||||||
cleanup(): void {
|
cleanup(): void {
|
||||||
// Do Nothing
|
// Do Nothing
|
||||||
};
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue