1
0
Fork 0

Make TransitViewSecret page look prettyer.

This commit is contained in:
Kitteh 2021-05-09 14:48:47 +01:00
parent ba3df3af78
commit c1ce81ba0d
2 changed files with 20 additions and 35 deletions

View file

@ -6,11 +6,10 @@ type optionsFunctionsObject = {
const optionsFunctions: optionsFunctionsObject = {
"class": (e: Element, arg: string | string[]) => {
if (Array.isArray(arg)) {
e.classList.add(...arg);
} else {
e.classList.add(arg);
if (!Array.isArray(arg)) {
arg = String(arg).split(" ");
}
e.classList.add(...arg);
},
"id": (e: Element, arg: string) => e.id = arg,
"html": (e: Element, arg: string) => e.innerHTML = arg,

View file

@ -6,15 +6,6 @@ import i18next from 'i18next';
import { getTransitKey } from "../../api/transit/getTransitKey";
import { Tile } from "../../elements/Tile";
type TileParams = {
condition: Boolean;
title: string;
description: string;
icon: string;
iconText: string;
onclick: () => void;
}
export class TransitViewSecretPage extends Page {
constructor() {
super();
@ -31,11 +22,8 @@ export class TransitViewSecretPage extends Page {
setPageContent(makeElement({
tag: "div",
class: ["uk-list", "uk-width-1-1@s"],
class: "uk-child-width-1-1@s uk-child-width-1-2@m uk-grid-small uk-grid-match",
attributes: { "uk-grid": "" },
children: [
makeElement({
tag: "div",
children: [
Tile({
condition: transitKey.supports_encryption,
@ -54,8 +42,6 @@ export class TransitViewSecretPage extends Page {
onclick: () => { changePage("TRANSIT_DECRYPT"); }
}),
]
}),
]
}));
}