mirror of
https://github.com/matrix-org/matrix-hookshot.git
synced 2025-03-10 21:19:13 +00:00

* Add logic to enable generic hook expiry * Add storage for hook expiry warnings. * Migrate generic hooks / add expiry field * Allow reporting a specific error and status code for generic webhooks * Report the specific error when a message fails to send * Refactor input class to better support datetime * Remove single use of innerChild * Add UI support for expiry configuration * Add new packages * Add warnings when the timer is about to expire. * Add send expiry notice config option * lint * document new option s * Fixup test * Add tests for expiry * Add textual command for setting a duration on a webhook. * Add e2e test for inbound hooks. * changelog * Add a configuration option to force webhooks to expire. * update config.sample.yml * fix field not working
22 lines
609 B
TypeScript
22 lines
609 B
TypeScript
import { FunctionComponent } from "preact";
|
|
import styles from "./InputField.module.scss";
|
|
import clsx from 'clsx';
|
|
interface Props {
|
|
className?: string;
|
|
visible?: boolean;
|
|
label: string;
|
|
noPadding: boolean;
|
|
}
|
|
|
|
export const InputField: FunctionComponent<Props> = ({ className, children, visible = true, label, noPadding }) => {
|
|
if (!visible) {
|
|
return null;
|
|
}
|
|
|
|
return <div className={clsx(className, styles.inputField, noPadding && styles.nopad)}>
|
|
<label>{label}</label>
|
|
<div className={styles.container}>
|
|
{children}
|
|
</div>
|
|
</div>;
|
|
}; |