Skip to content
This repository was archived by the owner on Jun 29, 2025. It is now read-only.

Commit d4e8d4f

Browse files
committed
fix: autocomplete on create share modal
1 parent 4df8dea commit d4e8d4f

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

frontend/src/components/share/modals/showCreateReverseShareModal.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import showCompletedReverseShareModal from "./showCompletedReverseShareModal";
2323
const showCreateReverseShareModal = (
2424
modals: ModalsContextProps,
2525
showSendEmailNotificationOption: boolean,
26-
getReverseShares: () => void,
26+
getReverseShares: () => void
2727
) => {
2828
return modals.openModal({
2929
title: "Create reverse share",
@@ -64,7 +64,7 @@ const Body = ({
6464
values.expiration_num + values.expiration_unit,
6565
values.maxShareSize,
6666
values.maxUseCount,
67-
values.sendEmailNotification,
67+
values.sendEmailNotification
6868
)
6969
.then(({ link }) => {
7070
modals.closeAll();
@@ -150,7 +150,7 @@ const Body = ({
150150
expiresOn: t("account.reverseShare.expires-on"),
151151
neverExpires: t("account.reverseShare.never-expires"),
152152
},
153-
form,
153+
form
154154
)}
155155
</Text>
156156
</div>
@@ -174,7 +174,7 @@ const Body = ({
174174
labelPosition="left"
175175
label={t("account.reverseShares.modal.send-email")}
176176
description={t(
177-
"account.reverseShares.modal.send-email.description",
177+
"account.reverseShares.modal.send-email.description"
178178
)}
179179
{...form.getInputProps("sendEmailNotification", {
180180
type: "checkbox",

frontend/src/components/upload/modals/showCreateUploadModal.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const showCreateUploadModal = (
3838
allowUnauthenticatedShares: boolean;
3939
enableEmailRecepients: boolean;
4040
},
41-
uploadCallback: (createShare: CreateShare) => void,
41+
uploadCallback: (createShare: CreateShare) => void
4242
) => {
4343
const t = translateOutsideContext();
4444

@@ -152,7 +152,7 @@ const CreateUploadModalBody = ({
152152
"link",
153153
Buffer.from(Math.random().toString(), "utf8")
154154
.toString("base64")
155-
.substr(10, 7),
155+
.substr(10, 7)
156156
)
157157
}
158158
>
@@ -251,7 +251,7 @@ const CreateUploadModalBody = ({
251251
neverExpires: t("upload.modal.completed.never-expires"),
252252
expiresOn: t("upload.modal.completed.expires-on"),
253253
},
254-
form,
254+
form
255255
)}
256256
</Text>
257257
</>
@@ -266,7 +266,7 @@ const CreateUploadModalBody = ({
266266
<Textarea
267267
variant="filled"
268268
placeholder={t(
269-
"upload.modal.accordion.description.placeholder",
269+
"upload.modal.accordion.description.placeholder"
270270
)}
271271
{...form.getInputProps("description")}
272272
/>
@@ -283,14 +283,14 @@ const CreateUploadModalBody = ({
283283
data={form.values.recipients}
284284
placeholder={t("upload.modal.accordion.email.placeholder")}
285285
searchable
286-
{...form.getInputProps("recipients")}
287286
creatable
287+
autoComplete="email-recipients"
288288
getCreateLabel={(query) => `+ ${query}`}
289289
onCreate={(query) => {
290290
if (!query.match(/^\S+@\S+\.\S+$/)) {
291291
form.setFieldError(
292292
"recipients",
293-
t("upload.modal.accordion.email.invalid-email"),
293+
t("upload.modal.accordion.email.invalid-email")
294294
);
295295
} else {
296296
form.setFieldError("recipients", null);
@@ -301,6 +301,7 @@ const CreateUploadModalBody = ({
301301
return query;
302302
}
303303
}}
304+
{...form.getInputProps("recipients")}
304305
/>
305306
</Accordion.Panel>
306307
</Accordion.Item>
@@ -315,17 +316,18 @@ const CreateUploadModalBody = ({
315316
<PasswordInput
316317
variant="filled"
317318
placeholder={t(
318-
"upload.modal.accordion.security.password.placeholder",
319+
"upload.modal.accordion.security.password.placeholder"
319320
)}
320321
label={t("upload.modal.accordion.security.password.label")}
322+
autoComplete="off"
321323
{...form.getInputProps("password")}
322324
/>
323325
<NumberInput
324326
min={1}
325327
type="number"
326328
variant="filled"
327329
placeholder={t(
328-
"upload.modal.accordion.security.max-views.placeholder",
330+
"upload.modal.accordion.security.max-views.placeholder"
329331
)}
330332
label={t("upload.modal.accordion.security.max-views.label")}
331333
{...form.getInputProps("maxViews")}

0 commit comments

Comments
 (0)