Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/feature/new-dashboard--1' into…
Browse files Browse the repository at this point in the history
… ahmed/DAPI-707/feat--add-account-swticher-on-api-explorer
  • Loading branch information
ahmed-deriv committed Oct 14, 2024
2 parents cd6824a + 31100cf commit 16dbc7b
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 8 deletions.
3 changes: 3 additions & 0 deletions src/contexts/app-manager/app-manager.provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ const AppManagerContextProvider = ({ children }: TAppManagerContextProps) => {

const updateCurrentTab = useCallback((updatedTab: TDashboardTab) => {
setCurrentTab(updatedTab);

const bodySelector = document.querySelector('body');
if(bodySelector) { bodySelector.scrollTop = 0; }
}, []);

const handleCurrentUpdatingItem = useCallback((item: ApplicationObject) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

@include tablet-lg {
border: none;
gap: 3rem;
}

table {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ const tableColumns: TTokenColumn[] = [
{
Header: translate({ message: 'Name' }),
accessor: 'display_name',
width: '25%',
width: '20%',
minWidth: 200,
},
{
Header: translate({ message: 'Account Type' }),
Cell: AccountTypeCell,
width: '15%',
width: '20%',
},
{
Header: translate({ message: 'Token' }),
Expand All @@ -43,14 +43,14 @@ const tableColumns: TTokenColumn[] = [
Header: translate({ message: 'Token scopes' }),
accessor: 'scopes',
Cell: ScopesCell,
width: '20%',
width: '25%',
maxWidth: 300,
},
{
Header: translate({ message: 'Last used' }),
accessor: 'last_used',
Cell: ApiLastUsedCell,
width: '15%',
width: '20%',
},
{
Header: translate({ message: 'Actions' }),
Expand Down
10 changes: 10 additions & 0 deletions src/features/dashboard/components/apps-table/apps-table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,16 @@
justify-content: space-between;
align-items: center;
cursor: pointer;
margin-right: 1rem;

h5 {
width: 100%;
}

svg {
width: 10px;
height: 24px;
}
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/features/dashboard/components/apps-table/apps-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ const AppsTableSortColumn: React.FC<IAppsTableSortColumnProps> = ({

return (
<div className='sortColumn' onClick={() => onPressSort(id)} data-testid={id}>
{columnName} {getColumnIcon()}
<Heading.H5>{columnName}</Heading.H5>
{getColumnIcon()}
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
cursor: pointer;

p {
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
Expand Down
4 changes: 3 additions & 1 deletion src/features/dashboard/update-app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import useWS from '@site/src/hooks/useWs';
import RegisterAppDialogError from '../components/dialogs/register-app-dialog-error';

export default function UpdateApp() {
const { current_updating_item, updateCurrentTab } = useAppManager();
const { current_updating_item, updateCurrentTab, getApps } = useAppManager();
const { send: updateApp, is_loading, error, data, clear } = useWS('app_update');


const initialValues = {
...current_updating_item,
Expand All @@ -24,6 +25,7 @@ export default function UpdateApp() {

useEffect(() => {
if (data?.app_id && !error) {
getApps();
updateCurrentTab(TDashboardTab.MANAGE_APPS);
}
}, [data, error, updateCurrentTab]);
Expand Down

0 comments on commit 16dbc7b

Please sign in to comment.