Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/thedevs-network/kutt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorpoeti8 <ezzati.upt@gmail.com>2020-02-15 16:34:49 +0300
committerpoeti8 <ezzati.upt@gmail.com>2020-02-15 16:34:49 +0300
commit3959f6af3fb275c9569a08fa3073bc7da2d6acbd (patch)
tree538852809d0ce443b3e2c67a08797de11a3edde6 /client
parent029b93d24a3a5044bde5ef0f8358f12550f5b1e4 (diff)
fix: disable password auto-complete
Diffstat (limited to 'client')
-rw-r--r--client/components/Input.tsx5
-rw-r--r--client/components/Settings/SettingsDeleteAccount.tsx7
-rw-r--r--client/components/Settings/SettingsPassword.tsx1
-rw-r--r--client/components/Shortener.tsx2
-rw-r--r--client/pages/protected/[id].tsx1
5 files changed, 13 insertions, 3 deletions
diff --git a/client/components/Input.tsx b/client/components/Input.tsx
index 7d83399..1cb50e7 100644
--- a/client/components/Input.tsx
+++ b/client/components/Input.tsx
@@ -5,7 +5,7 @@ import { FC } from "react";
import { Span } from "./Text";
-interface StyledSelectProps extends BoxProps {
+interface StyledTextProps extends BoxProps {
autoFocus?: boolean;
name?: string;
id?: string;
@@ -16,11 +16,12 @@ interface StyledSelectProps extends BoxProps {
placeholderSize?: number[];
br?: string;
bbw?: string;
+ autocomplete?: "on" | "off";
}
export const TextInput = styled(Flex).attrs({
as: "input"
-})<StyledSelectProps>`
+})<StyledTextProps>`
position: relative;
box-sizing: border-box;
letter-spacing: 0.05em;
diff --git a/client/components/Settings/SettingsDeleteAccount.tsx b/client/components/Settings/SettingsDeleteAccount.tsx
index 9253b07..03229f9 100644
--- a/client/components/Settings/SettingsDeleteAccount.tsx
+++ b/client/components/Settings/SettingsDeleteAccount.tsx
@@ -56,7 +56,12 @@ const SettingsDeleteAccount: FC = () => {
Password
</Text>
<RowCenterV as="form" onSubmit={onSubmit}>
- <TextInput placeholder="Password..." {...password("password")} mr={3} />
+ <TextInput
+ {...password("password")}
+ placeholder="Password..."
+ autocomplete="off"
+ mr={3}
+ />
<Button color="red" type="submit" disabled={loading}>
<Icon name={loading ? "spinner" : "trash"} mr={2} stroke="white" />
{loading ? "Deleting..." : "Delete"}
diff --git a/client/components/Settings/SettingsPassword.tsx b/client/components/Settings/SettingsPassword.tsx
index 0be9ebc..e2d7fda 100644
--- a/client/components/Settings/SettingsPassword.tsx
+++ b/client/components/Settings/SettingsPassword.tsx
@@ -68,6 +68,7 @@ const SettingsPassword: FC = () => {
}
}
})}
+ autocomplete="off"
placeholder="New password..."
width={[1, 2 / 3]}
mr={3}
diff --git a/client/components/Shortener.tsx b/client/components/Shortener.tsx
index 9f8abf8..3d8ba98 100644
--- a/client/components/Shortener.tsx
+++ b/client/components/Shortener.tsx
@@ -279,6 +279,7 @@ const Shortener = () => {
<TextInput
{...text("customurl")}
placeholder="Custom address"
+ autocomplete="off"
data-lpignore
pl={[3, 24]}
pr={[3, 24]}
@@ -301,6 +302,7 @@ const Shortener = () => {
<TextInput
{...password("password")}
placeholder="Password"
+ autocomplete="off"
data-lpignore
pl={[3, 24]}
pr={[3, 24]}
diff --git a/client/pages/protected/[id].tsx b/client/pages/protected/[id].tsx
index 84bbc94..d7e728a 100644
--- a/client/pages/protected/[id].tsx
+++ b/client/pages/protected/[id].tsx
@@ -68,6 +68,7 @@ const ProtectedPage: NextPage<Props> = () => {
<TextInput
{...password("password")}
placeholder="Password"
+ autocomplete="off"
height={[44, 54]}
width={[1, 1 / 2]}
mr={3}