Skip to content

Commit 914baeb

Browse files
Merge pull request #221 from zenml-io/revert-220-personal_details_settings
Revert "Personal details settings"
2 parents 1d5d530 + 51fa631 commit 914baeb

File tree

27 files changed

+505
-1147
lines changed

27 files changed

+505
-1147
lines changed

global.d.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ interface TUser {
4141
userName: string;
4242
email_opted_in: any;
4343
emailOptedIn: any;
44-
roles?: any;
45-
created?: any
4644
}
4745

4846
interface TOrganization {

src/redux/reducers/rolesReducer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const newState = (roles: Roles[]): State => ({
2323
const rolesReducer = (state: State = initialState, action: Action): State => {
2424
switch (action.type) {
2525
case rolesActionTypes.getRoles.success: {
26-
const roles: Roles[] = camelCaseArray(action.payload?.items as RolesPayload);
26+
const roles: Roles[] = camelCaseArray(action.payload as RolesPayload);
2727

2828
return { ...newState(roles) };
2929
}

src/services/locales/zu.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,11 @@
217217
"text": "Change the username, role and password of",
218218
"form": {
219219
"username": {
220-
"label": "Username",
220+
"label": "username",
221221
"placeholder": "username"
222222
},
223223
"password": {
224-
"label": "Password",
224+
"label": "password",
225225
"placeholder": "password"
226226
}
227227
},

src/ui/assets/successTick.png

-5.87 KB
Binary file not shown.

src/ui/assets/userImage.png

-1.01 KB
Binary file not shown.

src/ui/components/forms/index.tsx

Lines changed: 15 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
Box,
1111
LinkBox,
1212
icons,
13-
DropdownInput
13+
DropdownInput,
1414
} from '..';
1515
import { handleUpdateNumericInput } from '../../../utils/input';
1616
import { iconColors } from '../../../constants/icons';
@@ -118,9 +118,8 @@ export const CopyField = (
118118
labelColor: any;
119119
placeholder: any;
120120
value: string;
121-
showTokField: any;
122121
} & any,
123-
): any => {
122+
): JSX.Element => {
124123
const [copied, setCopied] = useState(false);
125124
const handleClick = () => {
126125
navigator.clipboard.writeText(props.value);
@@ -131,38 +130,26 @@ export const CopyField = (
131130
};
132131

133132
return (
134-
<FlexBox.Column fullWidth>
133+
<FlexBox.Column fullWidth style={{ height: '100px' }}>
135134
<FlexBox alignItems="center" fullWidth style={{ position: 'relative' }}>
136135
<InputWithLabel
137136
name={props.name}
138137
label={props.label}
139138
labelColor={props.labelColor}
140139
InputComponent={
141-
props.showTokField ?
142-
<TextInput
143-
{...props}
144-
style={{ background: 'rgba(168, 168, 168, 0.2)', border: '1px solid #C9CBD0' }}
145-
value={`${props.value.slice(0, 30)}...`}
146-
placeholder={props.placeholder}
147-
/>
148-
:
149-
<TextInput
150-
{...props}
151-
style={{ background: 'rgba(168, 168, 168, 0.2)', border: '1px solid #C9CBD0' }}
152-
value='Token'
153-
placeholder={props.placeholder}
154-
/>
155-
}
140+
<TextInput
141+
{...props}
142+
value={`${props.value.slice(0, 60)}...`}
143+
placeholder={props.placeholder}
144+
/>
145+
}
156146
/>
157-
158-
{props.showTokField && (
159-
<LinkBox
160-
style={{ position: 'absolute', right: '10px', top: '40px' }}
161-
onClick={handleClick}
162-
>
163-
<icons.copy color={iconColors.grey} />
164-
</LinkBox>
165-
)}
147+
<LinkBox
148+
style={{ position: 'absolute', right: '10px', top: '30px' }}
149+
onClick={handleClick}
150+
>
151+
<icons.copy color={iconColors.grey} />
152+
</LinkBox>
166153
</FlexBox>
167154
{copied && (
168155
<div style={{ marginTop: '20px', textAlign: 'right' }}>
@@ -182,70 +169,6 @@ export const CopyField = (
182169
);
183170
};
184171

185-
186-
export const GenerateTokenField = (
187-
props: {
188-
label: string;
189-
labelColor: any;
190-
placeholder: any;
191-
value: string;
192-
handleClick: any;
193-
loading: boolean;
194-
hideButton: boolean;
195-
} & any,
196-
): any => {
197-
return (
198-
<FlexBox.Column fullWidth>
199-
<FlexBox alignItems="center" fullWidth style={{ position: 'relative' }}>
200-
<InputWithLabel
201-
optional={props.required}
202-
name={props.name}
203-
label={props.label}
204-
labelColor={props.labelColor}
205-
InputComponent={
206-
<TextInput
207-
{...props}
208-
style={props.style}
209-
placeholder={props.placeholder}
210-
hasError={props.error?.hasError}
211-
value={props.value}
212-
onChangeText={props.onChange}
213-
/>
214-
}
215-
/>
216-
{!props.hideButton && (
217-
<Box
218-
style={{
219-
position: 'absolute',
220-
right: '0',
221-
top: '38px',
222-
display: 'flex',
223-
justifyContent: 'center',
224-
textAlign: 'center',
225-
}} >
226-
<Box style={{ width: '120px', borderLeft: '1px solid #C9CBD0' }}>
227-
<div style={{
228-
fontFamily: 'Rubik',
229-
fontSize: '16px',
230-
color: '#443E99',
231-
marginTop: '3px',
232-
cursor: 'pointer'
233-
}}
234-
onClick={props.handleClick}
235-
>
236-
{props.loading ? <>Submitting...</> : <>Generate</>}
237-
</div>
238-
</Box>
239-
</Box>
240-
)}
241-
</FlexBox>
242-
</FlexBox.Column>
243-
);
244-
};
245-
246-
247-
248-
249172
export const EditField = (
250173
props: {
251174
label: string;

src/ui/components/icons/assets/Share.svg

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/ui/components/icons/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ import { ReactComponent as ChatDots } from './assets/ChatDots.svg';
6363
import { ReactComponent as Run } from './assets/Run.svg';
6464
import { ReactComponent as ImageBuilder } from './assets/ImageBuilder.svg';
6565
import { ReactComponent as Pen } from './assets/Pen.svg';
66-
import { ReactComponent as Share } from './assets/Share.svg';
6766
// import { ReactComponent as Inprogress } from './assets/InProgress.svg';
6867
// import { ReactComponent as Cached } from './assets/Cached.svg';
6968
// import { ReactComponent as RightArrow } from './assets/RightArrow.svg';
@@ -201,7 +200,6 @@ const icons = {
201200
useStroke: true,
202201
}),
203202
pen: createIcon({ Component: Pen, useStroke: true }),
204-
share: createIcon({ Component: Share, useStroke: true }),
205203

206204
// paginations
207205
paginationFirst: createIcon({ Component: PaginationFirst, useStroke: true }),

src/ui/layouts/common/PopupSmall/index.module.scss

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/ui/layouts/common/PopupSmall/index.tsx

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)