mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-20 01:11:25 +00:00
Move GitHub repos panel to react (#638)
Co-authored-by: Steve Faulkner <southpolesteve@gmail.com>
This commit is contained in:
@@ -23,8 +23,6 @@ export interface RepoListItem {
|
||||
}
|
||||
|
||||
export class GitHubReposComponent extends React.Component<GitHubReposComponentProps> {
|
||||
public static readonly ConnectToGitHubTitle = "Connect to GitHub";
|
||||
public static readonly ManageGitHubRepoTitle = "Manage GitHub settings";
|
||||
private static readonly ManageGitHubRepoDescription =
|
||||
"Select your GitHub repos and branch(es) to pin to your notebooks workspace.";
|
||||
private static readonly ManageGitHubRepoResetConnection = "View or change your GitHub authorization settings.";
|
||||
@@ -32,14 +30,6 @@ export class GitHubReposComponent extends React.Component<GitHubReposComponentPr
|
||||
private static readonly CancelButtonText = "Cancel";
|
||||
|
||||
public render(): JSX.Element {
|
||||
const header: JSX.Element = (
|
||||
<p>
|
||||
{this.props.showAuthorizeAccess
|
||||
? GitHubReposComponent.ConnectToGitHubTitle
|
||||
: GitHubReposComponent.ManageGitHubRepoTitle}
|
||||
</p>
|
||||
);
|
||||
|
||||
const content: JSX.Element = this.props.showAuthorizeAccess ? (
|
||||
<AuthorizeAccessComponent {...this.props.authorizeAccessProps} />
|
||||
) : (
|
||||
@@ -66,9 +56,6 @@ export class GitHubReposComponent extends React.Component<GitHubReposComponentPr
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className={"firstdivbg headerline"} role="heading" aria-level={2}>
|
||||
{header}
|
||||
</div>
|
||||
<div className={"paneMainContent"}>{content}</div>
|
||||
{!this.props.showAuthorizeAccess && (
|
||||
<>
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
import {
|
||||
IStyleFunctionOrObject,
|
||||
ICheckboxStyleProps,
|
||||
ICheckboxStyles,
|
||||
IDropdownStyles,
|
||||
IDropdownStyleProps,
|
||||
IDropdownStyles,
|
||||
IStyleFunctionOrObject,
|
||||
} from "office-ui-fabric-react";
|
||||
|
||||
export const ButtonsFooterStyle: React.CSSProperties = {
|
||||
padding: 14,
|
||||
paddingTop: 14,
|
||||
height: "auto",
|
||||
borderTop: "2px solid lightGray",
|
||||
};
|
||||
|
||||
export const ContentFooterStyle: React.CSSProperties = {
|
||||
padding: "10px 24px 10px 24px",
|
||||
paddingTop: "10px",
|
||||
height: "auto",
|
||||
borderTop: "2px solid lightGray",
|
||||
};
|
||||
|
||||
export const ChildrenMargin = 10;
|
||||
@@ -53,6 +55,11 @@ export const BranchesDropdownOptionContainerStyle: React.CSSProperties = {
|
||||
padding: 8,
|
||||
};
|
||||
|
||||
export const ContentMainStyle: React.CSSProperties = {
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
};
|
||||
|
||||
export const ReposListRepoColumnMinWidth = 192;
|
||||
export const ReposListBranchesColumnWidth = 116;
|
||||
export const BranchesDropdownWidth = 200;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user