[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant-backoffice] 06/07: add left label to inputsecured
From: |
gnunet |
Subject: |
[taler-merchant-backoffice] 06/07: add left label to inputsecured |
Date: |
Wed, 03 Mar 2021 18:44:13 +0100 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository merchant-backoffice.
commit 90e4e00bcfac3940475473f3a44978b89060b81e
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Wed Mar 3 14:38:54 2021 -0300
add left label to inputsecured
---
packages/frontend/src/components/form/InputSecured.tsx | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/packages/frontend/src/components/form/InputSecured.tsx
b/packages/frontend/src/components/form/InputSecured.tsx
index 53acd76..01b0f19 100644
--- a/packages/frontend/src/components/form/InputSecured.tsx
+++ b/packages/frontend/src/components/form/InputSecured.tsx
@@ -21,7 +21,6 @@
import { Fragment, h, VNode } from "preact";
import { Message, useMessage } from "preact-messages";
import { useState } from "preact/hooks";
-import { DeleteModal } from "../modal";
import { useField } from "./Field";
export interface Props<T> {
@@ -46,7 +45,7 @@ export function InputSecured<T>({ name, readonly }:
Props<T>): VNode {
const tooltip = useMessage(`fields.instance.${name}.tooltip`, {});
const [active, setActive] = useState(false);
- const [newValue, setNuewValue] = useState(toStr(value))
+ const [newValue, setNuewValue] = useState("")
return <div class="field is-horizontal">
<div class="field-label is-normal">
@@ -70,6 +69,9 @@ export function InputSecured<T>({ name, readonly }:
Props<T>): VNode {
</Fragment> :
<Fragment>
<div class="field has-addons">
+ <div class="control">
+ <a class="button is-static">secret-token:</a>
+ </div>
<div class="control">
<input class="input" type="password"
placeholder={placeholder} readonly={readonly || !active}
@@ -81,21 +83,21 @@ export function InputSecured<T>({ name, readonly }:
Props<T>): VNode {
<Message id={`fields.instance.${name}.help`}> </Message>
</div>
<div class="control">
- <button class="button is-info" disabled={fromStr(newValue) ===
value} onClick={(): void => { onChange(fromStr(newValue)); setActive(!active);
}} >
+ <button class="button is-info" disabled={fromStr(newValue) ===
value} onClick={(): void => { onChange(fromStr(newValue)); setActive(!active);
setNuewValue(""); }} >
<div class="icon is-left"><i class="mdi mdi-lock-outline"
/></div>
<span>Update</span>
</button>
</div>
</div>
<div class="control">
- <button class="button is-danger" disabled={null === value}
onClick={(): void => { onChange(null!); setActive(!active); }} >
+ <button class="button is-danger" disabled={null === value ||
undefined === value} onClick={(): void => { onChange(null!);
setActive(!active); setNuewValue("");}} >
<div class="icon is-left"><i class="mdi mdi-lock-open-variant"
/></div>
<span>Remove</span>
</button>
</div>
<div class="field ml-4">
<div class="control">
- <button class="button " onClick={(): void => {
onChange(initial!); setActive(!active); }} >
+ <button class="button " onClick={(): void => {
onChange(initial!); setActive(!active); setNuewValue(""); }} >
<div class="icon is-left"><i class="mdi mdi-lock-open-variant"
/></div>
<span>Cancel update</span>
</button>
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-merchant-backoffice] branch master updated (6c363c9 -> f3aea32), gnunet, 2021/03/03
- [taler-merchant-backoffice] 06/07: add left label to inputsecured,
gnunet <=
- [taler-merchant-backoffice] 04/07: login modal should be sent on update, gnunet, 2021/03/03
- [taler-merchant-backoffice] 02/07: lang selector behavior, gnunet, 2021/03/03
- [taler-merchant-backoffice] 05/07: improve sidebar to show instance id and navbar to show a title, gnunet, 2021/03/03
- [taler-merchant-backoffice] 01/07: fixed some comments, gnunet, 2021/03/03
- [taler-merchant-backoffice] 03/07: improve app routing, gnunet, 2021/03/03
- [taler-merchant-backoffice] 07/07: refactor backend mutate api to use token from instance id, implemented new passwod endpoint, gnunet, 2021/03/03