UNPKG

@kui-shell/plugin-git

Version:

Kui plugin that offers git integrations

51 lines (50 loc) 1.6 kB
import React from 'react'; import { ViewLevel } from '@kui-shell/plugin-client-common/mdist/components/Client/StatusStripe/TextWithIconWidget'; interface Props { className?: string; } interface State { text: string; status: string; viewLevel: ViewLevel; } export default class CurrentGitBranch extends React.PureComponent<Props, State> { private readonly handler; constructor(props: Props); /** So we don't handle events after unmounting */ private _unmounted; private get unmounted(); private set unmounted(value); /** Avoid recomputation for a flurry of events */ private last; private debounce; /** * Check the current branch, and the dirtiness thereof. * */ private reportCurrentBranch; /** * Once we have mounted, we immediately check the current branch, * and schedule an update based on standard REPL events. * */ componentDidMount(): void; /** Make sure to unsubscribe! */ componentWillUnmount(): void; /** @return the header for the Popover component */ private popoverHeader; /** @return the body for the Popover component */ private popoverBody; /** @return a model of `git status -s` */ private statusModel; /** @return UI that summarizes the `statusModel` changes */ private summary; /** @return UI for changes represented by `statusModel` */ private changes; /** @return desired Popover model */ private popover; /** @return UI for changing branches */ private changeBranch; render(): JSX.Element; } export {};