/
dimamir
/
authentik
Обзор
Документация
Войти
/
dimamir
/
authentik
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
web/src/elements/AkControlElement.ts
28 строк
658 B
Ken Sternberg
web/admin: better footer links (#12004)
18 ноя 2024, 15:17
Не верифицирован
18 ноя 2024, 15:17
ac00386
Код
Авторство
О чём код?
import { AKElement } from "./Base"; /** * @class - prototype for all of our hand-made input elements * * Ensures that the `data-ak-control` property is always set, so that * scrapers can find it easily, and adds a corresponding method for * extracting the value. * */ export class AkControlElement<T = string | string[]> extends AKElement { constructor() { super(); this.dataset.akControl = "true"; } json(): T { throw new Error("Controllers using this protocol must override this method"); } get toJson(): T { return this.json(); } get isValid(): boolean { return true; } }