[SALEOR-6645] Show appUrl in 3rd-party apps list (#2015)
* [SALEOR-6645] Show appUrl in 3rd-party apps list
This commit is contained in:
parent
7254c2d3df
commit
116b2568d2
7 changed files with 30 additions and 4 deletions
|
@ -17,6 +17,7 @@ import {
|
||||||
} from "@saleor/macaw-ui";
|
} from "@saleor/macaw-ui";
|
||||||
import { renderCollection, stopPropagation } from "@saleor/misc";
|
import { renderCollection, stopPropagation } from "@saleor/misc";
|
||||||
import { ListProps } from "@saleor/types";
|
import { ListProps } from "@saleor/types";
|
||||||
|
import clsx from "clsx";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { FormattedMessage, useIntl } from "react-intl";
|
import { FormattedMessage, useIntl } from "react-intl";
|
||||||
|
|
||||||
|
@ -92,6 +93,14 @@ const InstalledApps: React.FC<InstalledAppsProps> = ({
|
||||||
)}
|
)}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell className={classes.colAction}>
|
<TableCell className={classes.colAction}>
|
||||||
|
{app.node.appUrl && (
|
||||||
|
<Typography
|
||||||
|
className={clsx(classes.text, classes.appUrl)}
|
||||||
|
variant="body2"
|
||||||
|
>
|
||||||
|
{app.node.appUrl}
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
<Button
|
<Button
|
||||||
onClick={stopPropagation(onRowAboutClick(app.node.id))}
|
onClick={stopPropagation(onRowAboutClick(app.node.id))}
|
||||||
>
|
>
|
||||||
|
|
|
@ -16,7 +16,8 @@ export const appsList: AppsListQuery["apps"]["edges"] = [
|
||||||
id: "QXBwOjE3Ng==",
|
id: "QXBwOjE3Ng==",
|
||||||
isActive: true,
|
isActive: true,
|
||||||
name: "app",
|
name: "app",
|
||||||
type: AppTypeEnum.THIRDPARTY
|
type: AppTypeEnum.THIRDPARTY,
|
||||||
|
appUrl: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -26,7 +27,8 @@ export const appsList: AppsListQuery["apps"]["edges"] = [
|
||||||
id: "QXBwOjE3Ng==",
|
id: "QXBwOjE3Ng==",
|
||||||
isActive: false,
|
isActive: false,
|
||||||
name: "app1",
|
name: "app1",
|
||||||
type: AppTypeEnum.THIRDPARTY
|
type: AppTypeEnum.THIRDPARTY,
|
||||||
|
appUrl: "http://localhost:3000"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -39,7 +41,8 @@ export const customAppsList: AppsListQuery["apps"]["edges"] = [
|
||||||
id: "QXBwOjE3Ng==",
|
id: "QXBwOjE3Ng==",
|
||||||
isActive: true,
|
isActive: true,
|
||||||
name: "app custom",
|
name: "app custom",
|
||||||
type: AppTypeEnum.LOCAL
|
type: AppTypeEnum.LOCAL,
|
||||||
|
appUrl: null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
@ -30,6 +30,7 @@ export const appsList = gql`
|
||||||
name
|
name
|
||||||
isActive
|
isActive
|
||||||
type
|
type
|
||||||
|
appUrl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,10 @@ export const useStyles = makeStyles(
|
||||||
paddingRight: theme.spacing(3),
|
paddingRight: theme.spacing(3),
|
||||||
textAlign: "right"
|
textAlign: "right"
|
||||||
},
|
},
|
||||||
|
alignItems: "center",
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "row",
|
||||||
|
justifyContent: "flex-end",
|
||||||
textAlign: "right"
|
textAlign: "right"
|
||||||
},
|
},
|
||||||
colInstallAction: {
|
colInstallAction: {
|
||||||
|
@ -206,6 +210,9 @@ export const useStyles = makeStyles(
|
||||||
"& img": {
|
"& img": {
|
||||||
marginRight: theme.spacing(1)
|
marginRight: theme.spacing(1)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
appUrl: {
|
||||||
|
marginRight: theme.spacing(1)
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
{ name: "AppList" }
|
{ name: "AppList" }
|
||||||
|
|
|
@ -3065,6 +3065,7 @@ export const AppsListDocument = gql`
|
||||||
name
|
name
|
||||||
isActive
|
isActive
|
||||||
type
|
type
|
||||||
|
appUrl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4846,7 +4846,7 @@ export type AppsListQueryVariables = Exact<{
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
|
|
||||||
export type AppsListQuery = { __typename: 'Query', apps: { __typename: 'AppCountableConnection', totalCount: number | null, pageInfo: { __typename: 'PageInfo', hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null, endCursor: string | null }, edges: Array<{ __typename: 'AppCountableEdge', node: { __typename: 'App', id: string, name: string | null, isActive: boolean | null, type: AppTypeEnum | null } }> } | null };
|
export type AppsListQuery = { __typename: 'Query', apps: { __typename: 'AppCountableConnection', totalCount: number | null, pageInfo: { __typename: 'PageInfo', hasNextPage: boolean, hasPreviousPage: boolean, startCursor: string | null, endCursor: string | null }, edges: Array<{ __typename: 'AppCountableEdge', node: { __typename: 'App', id: string, name: string | null, isActive: boolean | null, type: AppTypeEnum | null, appUrl: string | null } }> } | null };
|
||||||
|
|
||||||
export type AppsInstallationsQueryVariables = Exact<{ [key: string]: never; }>;
|
export type AppsInstallationsQueryVariables = Exact<{ [key: string]: never; }>;
|
||||||
|
|
||||||
|
|
|
@ -25267,6 +25267,11 @@ exports[`Storyshots Views / Apps / Apps list default 1`] = `
|
||||||
<td
|
<td
|
||||||
class="MuiTableCell-root-id MuiTableCell-body-id AppList-colAction-id"
|
class="MuiTableCell-root-id MuiTableCell-body-id AppList-colAction-id"
|
||||||
>
|
>
|
||||||
|
<div
|
||||||
|
class="MuiTypography-root-id AppList-text-id AppList-appUrl-id MuiTypography-body2-id"
|
||||||
|
>
|
||||||
|
http://localhost:3000
|
||||||
|
</div>
|
||||||
<button
|
<button
|
||||||
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-outlined-id MuiButton-outlinedPrimary-id MuiButton-outlinedSizeSmall-id MuiButton-sizeSmall-id"
|
class="MuiButtonBase-root-id MuiButton-root-id MuiButton-outlined-id MuiButton-outlinedPrimary-id MuiButton-outlinedSizeSmall-id MuiButton-sizeSmall-id"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
|
|
Loading…
Reference in a new issue