Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
ab55877
Neuomorpic-design UI improve (#163)
sumansaurabh Feb 19, 2025
3db2b32
refactor(PaymentPricing.styles): remove background color from Pricing…
sumansaurabh Feb 19, 2025
c919f05
Table fixes (#165)
sumansaurabh Feb 20, 2025
4ed4134
Table fixes (#166)
sumansaurabh Feb 20, 2025
7ee681c
refactor(PaymentHistory): clean up imports by removing unused components
sumansaurabh Feb 20, 2025
40e76b7
fix(PaymentHistory): correct import statement for BaseCard
sumansaurabh Feb 20, 2025
e375ba8
refactor(PaymentPricing): remove unused imports from PaymentPricing c…
sumansaurabh Feb 20, 2025
b05e8a1
refactor(App): remove unused imports from App component
sumansaurabh Feb 21, 2025
11a8efa
refactor(PaymentPricing): replace BaseModal with Ant Design Modal and…
sumansaurabh Feb 21, 2025
c901b0a
fix(index.html): adjust modal positioning and z-index for better visi…
sumansaurabh Feb 21, 2025
6a387f5
refactor(styles): remove fixed positioning from modal styles for impr…
sumansaurabh Feb 21, 2025
ae1109c
refactor(SelectReposDropdown): update dropdown scroll behavior and im…
sumansaurabh Feb 21, 2025
9dead23
refactor(SelectReposDropdown): enhance scrollbar styling and adjust r…
sumansaurabh Feb 21, 2025
94e8245
refactor(SelectReposDropdown): enhance dropdown styles and add search…
sumansaurabh Feb 21, 2025
99eee3a
refactor(SelectReposDropdown): adjust dropdown max-height and update …
sumansaurabh Feb 21, 2025
73fbbec
refactor(SelectReposDropdown): replace BaseDropdown with AntDropdown …
sumansaurabh Feb 21, 2025
6ce63f9
refactor(SelectReposDropdown): replace customized dropdown with AntDr…
sumansaurabh Feb 21, 2025
12b9a69
refactor(SelectReposDropdown): remove unused type definitions for cle…
sumansaurabh Feb 21, 2025
c545ec6
refactor(SelectReposDropdown): add search functionality and improve d…
sumansaurabh Feb 21, 2025
4b08d9f
refactor(SelectReposDropdown): enhance search input styling and funct…
sumansaurabh Feb 21, 2025
10f53e4
refactor(SelectReposDropdown): enhance styling and functionality of d…
sumansaurabh Feb 21, 2025
d21a9de
refactor(SelectReposDropdown): update dropdown background and scrollb…
sumansaurabh Feb 21, 2025
c604bf4
refactor(SelectReposDropdown): simplify search input placeholder text…
sumansaurabh Feb 21, 2025
9c82c6c
refactor(SelectReposDropdown): adjust border-radius for improved drop…
sumansaurabh Feb 21, 2025
92d9ba2
refactor(PaymentPricing): enhance modal styling and layout for improv…
sumansaurabh Feb 21, 2025
6e6a402
refactor(PlanCheckoutModal): relocate price display for better visibi…
sumansaurabh Feb 21, 2025
6046037
refactor(PaymentPricing): adjust font sizes for improved readability …
sumansaurabh Feb 21, 2025
bc56b7e
refactor(SelectReposDropdown, BaseRadio): implement neumorphic stylin…
sumansaurabh Feb 21, 2025
67014eb
refactor(MainSider): set height to 100% for improved layout responsiv…
sumansaurabh Feb 21, 2025
7647eb1
refactor(MainNav): update styles for improved responsiveness and layo…
sumansaurabh Feb 21, 2025
4980cd9
refactor(MainLayout, MainNav): adjust margins and paddings for improv…
sumansaurabh Feb 21, 2025
947b7c4
refactor(MainLayout): comment out user profile fetching logic for cle…
sumansaurabh Feb 21, 2025
c6fb15f
refactor(user.api, MainLayout, userSlice): enhance user profile handl…
sumansaurabh Feb 21, 2025
90f75a4
refactor(userSlice): add null check for newUser in setUser action
sumansaurabh Feb 21, 2025
1fb12d5
refactor(MainSider): adjust height properties for responsive design
sumansaurabh Feb 21, 2025
6effce8
refactor(DashboardInfo, ListAllRepos): comment out localStorage usage…
sumansaurabh Feb 21, 2025
45b432a
refactor(DashboardInfo): enhance modal styling and add framer-motion …
sumansaurabh Feb 21, 2025
63eedeb
refactor(DashboardInfo): improve slide change logic and update progre…
sumansaurabh Feb 21, 2025
91e0f36
refactor(DashboardInfo): simplify slide change logic and enhance caro…
sumansaurabh Feb 21, 2025
6f637be
refactor(DashboardInfo, ListAllRepos, MainLayout): remove console log…
sumansaurabh Feb 21, 2025
53f1ccf
feat(SiderTutorial): add tutorial component for navigation guidance a…
sumansaurabh Feb 21, 2025
d9b1320
feat(DashboardInfo, SiderTutorial): enhance tutorial functionality wi…
sumansaurabh Feb 21, 2025
45706f5
feat(SiderTutorial, TutorialContent): enhance tutorial tooltips and i…
sumansaurabh Feb 21, 2025
a7ea170
feat(Tutorial): update tutorial content and styles for improved user …
sumansaurabh Feb 21, 2025
4d8eed8
feat(DashboardInfo, Tutorial.styles): enhance layout and styling for …
sumansaurabh Feb 21, 2025
7d0fe70
feat(DashboardInfo, SiderTutorial, Tutorial.styles): improve animatio…
sumansaurabh Feb 21, 2025
eee5942
feat(SiderTutorial, Tutorial.styles): update tooltip max width and en…
sumansaurabh Feb 21, 2025
f39bf4c
feat(DashboardInfo): add custom navigation arrows and enhance modal s…
sumansaurabh Feb 21, 2025
b6b3659
feat(DashboardInfo, Tutorial.styles): enhance carousel dot styling an…
sumansaurabh Feb 21, 2025
6c19ae8
feat(DashboardInfo): enable image preview for enhanced user experience
sumansaurabh Feb 21, 2025
6fc57e2
feat(SiderTutorial, TutorialContent): update sidebar navigation keys …
sumansaurabh Feb 21, 2025
a8140b1
refactor(ListAllRepos): remove unused import for improved code clarity
sumansaurabh Feb 21, 2025
699be30
fix(profileNavData): correct id for payment navigation item
sumansaurabh Feb 21, 2025
5cd9b19
fix(MainSider): disable tutorial run state by default
sumansaurabh Feb 22, 2025
fe2a8ad
feat(mixpanel): disable Mixpanel tracking on localhost for developmen…
sumansaurabh Feb 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
body {
margin: 0;
}
/* Fix modal positioning in the viewport */

#initSpinner {
height: 100vh;
Expand All @@ -37,6 +38,7 @@
#hubspot-messages-iframe-container {
color-scheme: light;
}

</style>

<!-- Start of HubSpot Embed Code -->
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"echarts": "^5.5.1",
"echarts-for-react": "^3.0.2",
"elt-react-credit-cards": "^0.0.1",
"framer-motion": "^12.4.7",
"i18next": "^23.15.1",
"mixpanel-browser": "^2.55.1",
"qs": "^6.13.0",
Expand All @@ -38,6 +39,7 @@
"react-i18next": "^15.0.2",
"react-infinite-scroll-component": "^6.1.0",
"react-insta-stories": "^2.7.0",
"react-joyride": "^2.9.3",
"react-redux": "^9.1.2",
"react-responsive": "^10.0.0",
"react-router-dom": "^6.26.2",
Expand Down
16 changes: 2 additions & 14 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,23 @@ import 'typeface-lato';
import { AppRouter } from './components/router/AppRouter';
import { useLanguage } from './hooks/useLanguage';
import { useThemeWatcher } from './hooks/useThemeWatcher';
import { useAppDispatch, useAppSelector } from './hooks/reduxHooks';
import { useAppSelector } from './hooks/reduxHooks';
import { themeObject } from './styles/themes/themeVariables';
import { getThemeConfig } from './styles/themeConfig';
import { trackClicks } from './config/mixpanel';
import { trackGAClicks } from './config/ga';
import { reloadUserProfile } from './api/user.api';
import { setUser } from './store/slices/userSlice';

const App: React.FC = () => {
const { language } = useLanguage();
const theme = useAppSelector((state) => state.theme.theme);
const user = useAppSelector(state => state.user.user);
const currentTheme = themeObject[theme];
const themeConfig = React.useMemo(() => getThemeConfig(currentTheme), [currentTheme]);
const dispatch = useAppDispatch();

useEffect(() => {
if (!user) return;

reloadUserProfile()
.then((data) => dispatch(setUser(data)))
.catch((err) => console.error(err));
}, [dispatch]);


useEffect(() => {
document.addEventListener('click', event => trackClicks(event, user));
return () => document.removeEventListener('click', event => trackClicks(event, user));
}, [user]);
}, []);

useEffect(() => {
document.addEventListener('click', trackGAClicks);
Expand Down
14 changes: 9 additions & 5 deletions src/api/apiToken.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export interface ApiTableRow {
key: string;
isActive: boolean;
createdAt: Date;
updatedAt: Date;
}

export interface Pagination {
Expand Down Expand Up @@ -50,26 +51,29 @@ export const toggleApiToken = (id: number): Promise<Record<string, string>> =>

export const getApiTableData = (pagination: Pagination): Promise<ApiTableData> => {
return new Promise((res) => {
const noPrevData = {
const noPrevData: ApiTableRow = {
id: -1,
key: "No API key found, please click an 'Create' button to generate one.",
key: "No API key found, please click on 'Create' button to generate one.",
createdAt: new Date(),
isActive: false,
updatedAt: new Date(),
};

const addLastEntry = {
const addFirstEntry: ApiTableRow = {
id: -1,
key: "Please click an 'Create' button to generate one.",
key: "Please click on 'Create' button to generate one.",
createdAt: new Date(),
isActive: false,
updatedAt: new Date(),
};

getAllApiToken()
.then((resp) => {
if (resp.length === 0) {
resp.push(noPrevData);
} else {
resp.push(addLastEntry);
///
resp.unshift(addFirstEntry);
}

res({
Expand Down
10 changes: 8 additions & 2 deletions src/api/user.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ import httpApi from '@app/api/http.api';
import { UserModel } from '@app/domain/UserModel';
import { UserUpdateModel } from '@app/domain/UserUpdateModel';

export const updateUserProfile = (userPayload: UserUpdateModel): Promise<UserModel> =>
httpApi.put<UserModel>(`/v1/users`, { ...userPayload }).then(({ data }) => data);
export const updateUserProfile = (userPayload: UserUpdateModel): Promise<UserModel> =>{
console.log(userPayload)
if (!userPayload) {
console.error('User payload is required');
throw new Error('User payload is required');
}
return httpApi.put<UserModel>(`/v1/users`, { ...userPayload }).then(({ data }) => data);
}

export const reloadUserProfile = (): Promise<UserModel> => httpApi.get<UserModel>('v1/user').then(({ data }) => data);
Binary file added src/assets/images/login.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions src/components/apiKeys/ApiKeys.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useAppSelector } from '@app/hooks/reduxHooks';
import { useResponsive } from '@app/hooks/useResponsive';
import { BaseCard } from '../common/BaseCard/BaseCard';
import { ApiKeyTable } from './apiKeysTable/ApiKeysTable';
import { BaseRow } from '../common/BaseRow/BaseRow';
import { BaseCol } from '../common/BaseCol/BaseCol';
Expand All @@ -13,9 +12,7 @@ export const ApiKeys: React.FC = () => {
if (!user) return null;

const content = (
<BaseCard>
<ApiKeyTable />
</BaseCard>
);

return isDesktop ? (
Expand Down
58 changes: 58 additions & 0 deletions src/components/apiKeys/apiKeysTable/ActionRow.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import { DeleteOutlined, CheckCircleOutlined, StopOutlined } from '@ant-design/icons';
import React from 'react';
import { BaseButton } from '@app/components/common/BaseButton/BaseButton';
import { ActionRowContainer } from './ApiKeysTable.style';
import { ApiTableRow } from '@app/api/apiToken.api';

interface ActionRowProps {
record: ApiTableRow;
handleToggleRow: (id: number) => void;
handleDeleteRow: (id: number) => void;
isCreating?: boolean; // If record.id === -1
t: (key: string) => string;
}

export const ActionRow: React.FC<ActionRowProps> = ({
record,
handleToggleRow,
handleDeleteRow,
isCreating,
t
}) => {
if (isCreating) {
// If your record has id === -1, you might show a "Create" button or something else
return (
<ActionRowContainer>
<BaseButton className="action-btn" onClick={() => handleToggleRow(record.id)}>
{t('apiTable.create')}
</BaseButton>
</ActionRowContainer>
);
}

// Normal row: show activate/deactivate and delete
return (
<ActionRowContainer>
<BaseButton
className="action-btn"
ghost
onClick={() => handleToggleRow(record.id)}
icon={record.isActive ? <StopOutlined /> : <CheckCircleOutlined />}
style={{color: !record.isActive ? '' : '#777777'}}
>
{record.isActive ? t('apiTable.deactivate') : t('apiTable.activate')}
</BaseButton>

<div className="divider" />

<BaseButton
className="action-btn delete-btn"
danger
onClick={() => handleDeleteRow(record.id)}
icon={<DeleteOutlined />}
>
{t('apiTable.delete')}
</BaseButton>
</ActionRowContainer>
);
};
46 changes: 46 additions & 0 deletions src/components/apiKeys/apiKeysTable/ApiKeysTable.style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// ApiKeyTable.styles.ts (example filename)
import styled from 'styled-components';

export const ActionRowContainer = styled.div`
display: flex;
align-items: center;
justify-content: center; /* center in the column */
gap: 1rem; /* space between buttons */
padding: 0.5rem 1rem;
border-radius: 8px;

/* Eye-catching gradient for the action area */
// background: unset;

/* Optional subtle shadow for a “raised” look */
// box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);

/* A small vertical divider between activate/deactivate and delete */
.divider {
width: 1px;
height: 24px;
background-color: rgba(255, 255, 255, 0.5);
}

/* Style the buttons to match the gradient background */
.action-btn {
color: #fff;
border: none;
transition: background-color 0.2s, color 0.2s;

&:hover {
background-color: rgba(255, 255, 255, 0.15);
color: #fff;
}

/* For “danger” or “delete” buttons, you might want a slight
variation in color or an icon. (Example: a red accent.)
*/
&.delete-btn {
background-color: rgba(255, 0, 0, 0.2);
&:hover {
background-color: rgba(255, 0, 0, 0.3);
}
}
}
`;
Loading
Loading