Cont'd Twilio stuff
This commit is contained in:
parent
deb4f24856
commit
7c574d73de
16 changed files with 240 additions and 236 deletions
|
@ -432,7 +432,7 @@ const AddPhoneNumberDialog = (props) => {
|
|||
const verifyPhone = async () => {
|
||||
try {
|
||||
setSending(true);
|
||||
await accountApi.verifyPhone(phoneNumber);
|
||||
await accountApi.verifyPhoneNumber(phoneNumber);
|
||||
setVerificationCodeSent(true);
|
||||
} catch (e) {
|
||||
console.log(`[Account] Error sending verification`, e);
|
||||
|
@ -449,7 +449,7 @@ const AddPhoneNumberDialog = (props) => {
|
|||
const checkVerifyPhone = async () => {
|
||||
try {
|
||||
setSending(true);
|
||||
await accountApi.checkVerifyPhone(phoneNumber, code);
|
||||
await accountApi.addPhoneNumber(phoneNumber, code);
|
||||
props.onClose();
|
||||
} catch (e) {
|
||||
console.log(`[Account] Error confirming verification`, e);
|
||||
|
|
|
@ -45,7 +45,6 @@ const PublishDialog = (props) => {
|
|||
const [filename, setFilename] = useState("");
|
||||
const [filenameEdited, setFilenameEdited] = useState(false);
|
||||
const [email, setEmail] = useState("");
|
||||
const [sms, setSms] = useState("");
|
||||
const [call, setCall] = useState("");
|
||||
const [delay, setDelay] = useState("");
|
||||
const [publishAnother, setPublishAnother] = useState(false);
|
||||
|
@ -54,7 +53,6 @@ const PublishDialog = (props) => {
|
|||
const [showClickUrl, setShowClickUrl] = useState(false);
|
||||
const [showAttachUrl, setShowAttachUrl] = useState(false);
|
||||
const [showEmail, setShowEmail] = useState(false);
|
||||
const [showSms, setShowSms] = useState(false);
|
||||
const [showCall, setShowCall] = useState(false);
|
||||
const [showDelay, setShowDelay] = useState(false);
|
||||
|
||||
|
@ -128,9 +126,6 @@ const PublishDialog = (props) => {
|
|||
if (email.trim()) {
|
||||
url.searchParams.append("email", email.trim());
|
||||
}
|
||||
if (sms.trim()) {
|
||||
url.searchParams.append("sms", sms.trim());
|
||||
}
|
||||
if (call.trim()) {
|
||||
url.searchParams.append("call", call.trim());
|
||||
}
|
||||
|
@ -416,27 +411,6 @@ const PublishDialog = (props) => {
|
|||
/>
|
||||
</ClosableRow>
|
||||
}
|
||||
{showSms &&
|
||||
<ClosableRow disabled={disabled} closeLabel={t("publish_dialog_sms_reset")} onClose={() => {
|
||||
setSms("");
|
||||
setShowSms(false);
|
||||
}}>
|
||||
<TextField
|
||||
margin="dense"
|
||||
label={t("publish_dialog_sms_label")}
|
||||
placeholder={t("publish_dialog_sms_placeholder")}
|
||||
value={sms}
|
||||
onChange={ev => setSms(ev.target.value)}
|
||||
disabled={disabled}
|
||||
type="tel"
|
||||
variant="standard"
|
||||
fullWidth
|
||||
inputProps={{
|
||||
"aria-label": t("publish_dialog_sms_label")
|
||||
}}
|
||||
/>
|
||||
</ClosableRow>
|
||||
}
|
||||
{showCall &&
|
||||
<ClosableRow disabled={disabled} closeLabel={t("publish_dialog_call_reset")} onClose={() => {
|
||||
setCall("");
|
||||
|
@ -562,7 +536,6 @@ const PublishDialog = (props) => {
|
|||
<div>
|
||||
{!showClickUrl && <Chip clickable disabled={disabled} label={t("publish_dialog_chip_click_label")} aria-label={t("publish_dialog_chip_click_label")} onClick={() => setShowClickUrl(true)} sx={{marginRight: 1, marginBottom: 1}}/>}
|
||||
{!showEmail && <Chip clickable disabled={disabled} label={t("publish_dialog_chip_email_label")} aria-label={t("publish_dialog_chip_email_label")} onClick={() => setShowEmail(true)} sx={{marginRight: 1, marginBottom: 1}}/>}
|
||||
{!showSms && <Chip clickable disabled={disabled} label={t("publish_dialog_chip_sms_label")} aria-label={t("publish_dialog_chip_sms_label")} onClick={() => setShowSms(true)} sx={{marginRight: 1, marginBottom: 1}}/>}
|
||||
{!showCall && <Chip clickable disabled={disabled} label={t("publish_dialog_chip_call_label")} aria-label={t("publish_dialog_chip_call_label")} onClick={() => setShowCall(true)} sx={{marginRight: 1, marginBottom: 1}}/>}
|
||||
{!showAttachUrl && !showAttachFile && <Chip clickable disabled={disabled} label={t("publish_dialog_chip_attach_url_label")} aria-label={t("publish_dialog_chip_attach_url_label")} onClick={() => setShowAttachUrl(true)} sx={{marginRight: 1, marginBottom: 1}}/>}
|
||||
{!showAttachFile && !showAttachUrl && <Chip clickable disabled={disabled} label={t("publish_dialog_chip_attach_file_label")} aria-label={t("publish_dialog_chip_attach_file_label")} onClick={() => handleAttachFileClick()} sx={{marginRight: 1, marginBottom: 1}}/>}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue