Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Show Space invite link prefix in profile setup

Anand Baburajan26ace158fc77
diff --git a/web/apps/space/src/screens/SetupProfileScreen.tsx b/web/apps/space/src/screens/SetupProfileScreen.tsx
index d6e7ef85ce..fa31a43578 100644
--- a/web/apps/space/src/screens/SetupProfileScreen.tsx
+++ b/web/apps/space/src/screens/SetupProfileScreen.tsx
@@ -57,10 +57,12 @@ interface SetupProfileScreenProps {
interface TextInputProps {
endAdornment?: React.ReactNode;
+ id: string;
label: string;
onChange?: (value: string) => void;
placeholder?: string;
required?: boolean;
+ startAdornment?: React.ReactNode;
value?: string;
}
@@ -134,15 +136,18 @@ const UsernameStatusIcon: React.FC<{
const TextInput: React.FC<TextInputProps> = ({
endAdornment,
+ id,
label,
onChange,
placeholder,
required,
+ startAdornment,
value,
}) => (
<Box sx={{ width: "100%" }}>
<Box
component="label"
+ htmlFor={id}
sx={{
color: textBase,
display: "flex",
@@ -155,7 +160,11 @@ const TextInput: React.FC<TextInputProps> = ({
}}
>
{label}
- {required && <Box sx={{ color: warning }}>*</Box>}
+ {required && (
+ <Box component="span" sx={{ color: warning }}>
+ *
+ </Box>
+ )}
</Box>
<Box
sx={{
@@ -172,8 +181,10 @@ const TextInput: React.FC<TextInputProps> = ({
},
}}
>
+ {startAdornment}
<Box
component="input"
+ id={id}
onChange={(event) => onChange?.(event.target.value)}
placeholder={placeholder}
type="text"
@@ -564,13 +575,32 @@ export const SetupProfileScreen: React.FC<SetupProfileScreenProps> = ({
endAdornment={
<UsernameStatusIcon status={usernameStatus} />
}
+ id="space-setup-profile-username"
label="Username"
onChange={handleUsernameChange}
- placeholder="Choose your username"
+ placeholder="username"
required
+ startAdornment={
+ <Box
+ component="span"
+ aria-hidden
+ sx={{
+ color: textBase,
+ flexShrink: 0,
+ fontFamily:
+ '"Inter Variable", Inter, sans-serif',
+ fontSize: 14,
+ fontWeight: 500,
+ lineHeight: "20px",
+ }}
+ >
+ ente.space/
+ </Box>
+ }
value={username}
/>
<TextInput
+ id="space-setup-profile-name"
label="Name"
onChange={setFullName}
placeholder="Enter your name"