Improve code style

This commit is contained in:
Kevin Kandlbinder 2022-05-02 20:09:01 +02:00
parent 8358fd7d27
commit a18117112d
5 changed files with 16 additions and 15 deletions

View file

@ -35,10 +35,10 @@ const Base64Tool = () => {
<p><Trans i18nKey={"tools.cryptography.base64.description"} components={{wikipedia: <a href="https://en.wikipedia.org/wiki/Base64">xxx</a>, pre: <pre/>}} /></p>
<label for="base64-input">{t("tools.cryptography.common.cleartext")}</label>
<label htmlFor="base64-input">{t("tools.cryptography.common.cleartext")}</label>
<textarea id="base64-input" placeholder={t("tools.cryptography.common.cleartext")} onChange={(e) => {setReversed(false); setInput(e.currentTarget.value);}} value={input}></textarea>
<label for="base64-output">{t("tools.cryptography.common.ciphertext")}</label>
<label htmlFor="base64-output">{t("tools.cryptography.common.ciphertext")}</label>
<textarea id="base64-output" placeholder={t("tools.cryptography.common.ciphertext")} onChange={(e) => {setReversed(true); setOutput(e.currentTarget.value);}} value={output}></textarea>
</div>
</main>

View file

@ -64,13 +64,13 @@ const RotTool = () => {
<BoxMessage icon={AlertOctagon} color="red" hideInPlace={!outOfRangeWarning}>{t("tools.cryptography.rot.outOfRangeWarning")}</BoxMessage>
<label for="rot-input">{t("tools.cryptography.common.cleartext")}</label>
<label htmlFor="rot-input">{t("tools.cryptography.common.cleartext")}</label>
<textarea id="rot-input" placeholder={t("tools.cryptography.common.cleartext")} onChange={(e) => {setReversed(false); setInput(e.currentTarget.value.toUpperCase());}} value={input}></textarea>
<label for="rot-offset" className={styles.center}>{t("tools.cryptography.rot.offset")}</label>
<label htmlFor="rot-offset" className={styles.center}>{t("tools.cryptography.rot.offset")}</label>
<input type="number" id="rot-offset" value={offset} onChange={(e) => {setOffset(parseInt(e.currentTarget.value))}} className={styles.center} />
<label for="rot-output">{t("tools.cryptography.common.ciphertext")}</label>
<label htmlFor="rot-output">{t("tools.cryptography.common.ciphertext")}</label>
<textarea id="rot-output" placeholder={t("tools.cryptography.common.ciphertext")} onChange={(e) => {setReversed(true); setOutput(e.currentTarget.value.toUpperCase());}} value={output}></textarea>
</div>
</main>