From 880c34a6ab5ed6b00700028129bc9d63822f617f Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Fri, 3 Feb 2023 16:05:47 +0100 Subject: [PATCH 1/5] feat(chalice): changed smtp helper --- api/chalicelib/utils/smtp.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/chalicelib/utils/smtp.py b/api/chalicelib/utils/smtp.py index 63e1621fb..1fb80af76 100644 --- a/api/chalicelib/utils/smtp.py +++ b/api/chalicelib/utils/smtp.py @@ -17,20 +17,20 @@ class SMTPClient: def __init__(self): if config("EMAIL_HOST") is None or len(config("EMAIL_HOST")) == 0: return - elif config("EMAIL_USE_SSL").lower() == "false": - self.server = smtplib.SMTP(host=config("EMAIL_HOST"), port=int(config("EMAIL_PORT"))) + elif not config("EMAIL_USE_SSL", cast=bool): + self.server = smtplib.SMTP(host=config("EMAIL_HOST"), port=config("EMAIL_PORT", cast=int)) else: if len(config("EMAIL_SSL_KEY")) == 0 or len(config("EMAIL_SSL_CERT")) == 0: - self.server = smtplib.SMTP_SSL(host=config("EMAIL_HOST"), port=int(config("EMAIL_PORT"))) + self.server = smtplib.SMTP_SSL(host=config("EMAIL_HOST"), port=config("EMAIL_PORT", cast=int)) else: - self.server = smtplib.SMTP_SSL(host=config("EMAIL_HOST"), port=int(config("EMAIL_PORT")), + self.server = smtplib.SMTP_SSL(host=config("EMAIL_HOST"), port=config("EMAIL_PORT", cast=int), keyfile=config("EMAIL_SSL_KEY"), certfile=config("EMAIL_SSL_CERT")) def __enter__(self): if self.server is None: return EmptySMTP() self.server.ehlo() - if config("EMAIL_USE_SSL").lower() == "false" and config("EMAIL_USE_TLS").lower() == "true": + if not config("EMAIL_USE_SSL", cast=bool) and config("EMAIL_USE_TLS", cast=bool): self.server.starttls() # stmplib docs recommend calling ehlo() before & after starttls() self.server.ehlo() From 6a96b2748a61e0dd902e63d9e20e4ce15cb873c5 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Fri, 3 Feb 2023 15:33:01 +0100 Subject: [PATCH 2/5] change(ui) - role form input length --- .../app/components/Client/Roles/components/RoleForm/RoleForm.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/app/components/Client/Roles/components/RoleForm/RoleForm.tsx b/frontend/app/components/Client/Roles/components/RoleForm/RoleForm.tsx index f189c09ec..b6b9efe92 100644 --- a/frontend/app/components/Client/Roles/components/RoleForm/RoleForm.tsx +++ b/frontend/app/components/Client/Roles/components/RoleForm/RoleForm.tsx @@ -77,6 +77,7 @@ const RoleForm = (props: Props) => { name="name" value={role.name} onChange={write} + maxLength={40} className={stl.input} id="name-field" placeholder="Ex. Admin" From 5cb7418d3328515cc0ad205a74ec4c9d1f05ac73 Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Fri, 3 Feb 2023 15:33:14 +0100 Subject: [PATCH 3/5] change(ui) - project form input length --- frontend/app/components/Client/Sites/NewSiteForm.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/app/components/Client/Sites/NewSiteForm.js b/frontend/app/components/Client/Sites/NewSiteForm.js index 75776e1f1..2ff8ed917 100644 --- a/frontend/app/components/Client/Sites/NewSiteForm.js +++ b/frontend/app/components/Client/Sites/NewSiteForm.js @@ -102,7 +102,7 @@ export default class NewSiteForm extends React.PureComponent {
- +
)}
- {this.state.existsError &&
{'Site exists already. Please choose another one.'}
} + {this.state.existsError &&
{'Project exists already.'}
}
From f5cf2c48ca3a5069d2494890d22146eb144b40de Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Fri, 3 Feb 2023 15:36:43 +0100 Subject: [PATCH 4/5] change(ui) - other form input length --- frontend/app/components/Client/CustomFields/CustomFieldForm.js | 1 + frontend/app/components/Client/ProfileSettings/Settings.js | 2 ++ frontend/app/components/Client/Webhooks/WebhookForm.js | 1 + 3 files changed, 4 insertions(+) diff --git a/frontend/app/components/Client/CustomFields/CustomFieldForm.js b/frontend/app/components/Client/CustomFields/CustomFieldForm.js index 15d24be3d..1a8a582cd 100644 --- a/frontend/app/components/Client/CustomFields/CustomFieldForm.js +++ b/frontend/app/components/Client/CustomFields/CustomFieldForm.js @@ -37,6 +37,7 @@ class CustomFieldForm extends React.PureComponent { value={field.key} onChange={this.write} placeholder="Field Name" + maxLength={50} /> diff --git a/frontend/app/components/Client/ProfileSettings/Settings.js b/frontend/app/components/Client/ProfileSettings/Settings.js index 5329d98dc..e8343ebda 100644 --- a/frontend/app/components/Client/ProfileSettings/Settings.js +++ b/frontend/app/components/Client/ProfileSettings/Settings.js @@ -51,6 +51,7 @@ export default class Settings extends React.PureComponent { type="text" onChange={ this.onChange } value={ accountName } + maxLength={50} /> @@ -62,6 +63,7 @@ export default class Settings extends React.PureComponent { type="text" onChange={ this.onChange } value={ organizationName } + maxLength={50} /> diff --git a/frontend/app/components/Client/Webhooks/WebhookForm.js b/frontend/app/components/Client/Webhooks/WebhookForm.js index c918dcb93..62f009f1e 100644 --- a/frontend/app/components/Client/Webhooks/WebhookForm.js +++ b/frontend/app/components/Client/Webhooks/WebhookForm.js @@ -27,6 +27,7 @@ function WebhookForm(props) { value={webhook.name} onChange={write} placeholder="Name" + maxLength={50} /> From ae4bb03c66b1a81f650a40b1c2ab454d215ebe44 Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Fri, 3 Feb 2023 15:46:32 +0100 Subject: [PATCH 5/5] change(ui): fix mob req intercept --- .../Player/Controls/components/CreateNote.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/frontend/app/components/Session_/Player/Controls/components/CreateNote.tsx b/frontend/app/components/Session_/Player/Controls/components/CreateNote.tsx index 663e70251..0daf840ec 100644 --- a/frontend/app/components/Session_/Player/Controls/components/CreateNote.tsx +++ b/frontend/app/components/Session_/Player/Controls/components/CreateNote.tsx @@ -76,6 +76,11 @@ function CreateNote({ const duration = Duration.fromMillis(time).toFormat('mm:ss'); + const cleanUp = () => { + setCreateNoteTooltip({ isVisible: false, time: 0 }); + setText(''); + setTag(undefined); + } const onSubmit = () => { if (text === '') return; @@ -108,9 +113,7 @@ function CreateNote({ console.error(e); }) .finally(() => { - setCreateNoteTooltip({ isVisible: false, time: 0 }); - setText(''); - setTag(undefined); + cleanUp() }); } @@ -128,13 +131,12 @@ function CreateNote({ console.error(e); }) .finally(() => { - setCreateNoteTooltip({ isVisible: false, time: 0 }); - setText(''); - setTag(undefined); + cleanUp() }); }; const closeTooltip = () => { + cleanUp() setCreateNoteTooltip({ isVisible: false, time: 100 }); };