pull/5370/head
bunsenstraat 3 months ago
parent 8d8a6ac232
commit daf2a8d9e2
  1. 5
      libs/remix-api/src/lib/types/git.ts
  2. 7
      libs/remix-ui/git/src/components/gitui.tsx
  3. 6
      libs/remix-ui/git/src/types/index.ts

@ -1,7 +1,5 @@
import { Endpoints } from "@octokit/types" import { Endpoints } from "@octokit/types"
import { CustomRemixApi } from "@remix-api"
import { AuthCallback, HttpClient, ReadCommitResult } from "isomorphic-git" import { AuthCallback, HttpClient, ReadCommitResult } from "isomorphic-git"
import { Plugin } from "@remixproject/engine";
export type branchDifference = { export type branchDifference = {
uniqueHeadCommits: ReadCommitResult[], uniqueHeadCommits: ReadCommitResult[],
@ -206,6 +204,3 @@ export type GitHubUser = Partial<Endpoints["GET /user"]["response"]['data']> & {
export type userEmails = Endpoints["GET /user/emails"]["response"]["data"] export type userEmails = Endpoints["GET /user/emails"]["response"]["data"]
export interface IGitUi {
plugin: Plugin<any, CustomRemixApi>
}

@ -4,7 +4,7 @@ import { loadFiles, setCallBacks } from '../lib/listeners'
import { openDiff, openFile, openFolderInSameWindow, sendToMatomo, saveToken, setModifiedDecorator, setPlugin, setUntrackedDecorator, statusChanged } from '../lib/pluginActions' import { openDiff, openFile, openFolderInSameWindow, sendToMatomo, saveToken, setModifiedDecorator, setPlugin, setUntrackedDecorator, statusChanged } from '../lib/pluginActions'
import { gitActionsContext, pluginActionsContext } from '../state/context' import { gitActionsContext, pluginActionsContext } from '../state/context'
import { gitReducer } from '../state/gitreducer' import { gitReducer } from '../state/gitreducer'
import { defaultGitState, defaultLoaderState, gitMatomoEventTypes, gitState, gitUIPanels, loaderState } from '../types' import { IGitUi, defaultGitState, defaultLoaderState, gitMatomoEventTypes, gitState, gitUIPanels, loaderState } from '../types'
import { Accordion, Button } from "react-bootstrap"; import { Accordion, Button } from "react-bootstrap";
import { CommitMessage } from './buttons/commitmessage' import { CommitMessage } from './buttons/commitmessage'
import { Commits } from './panels/commits' import { Commits } from './panels/commits'
@ -31,9 +31,8 @@ import { GitHubCredentials } from './panels/githubcredentials'
import { Setup } from './panels/setup' import { Setup } from './panels/setup'
import { Init } from './panels/init' import { Init } from './panels/init'
import { Disabled } from './disabled' import { Disabled } from './disabled'
import { AppContext, platformContext } from '@remix-ui/app' import { AppContext, appPlatformTypes, platformContext } from '@remix-ui/app'
import { Version } from './panels/version' import { Version } from './panels/version'
import { IGitUi } from '@remix-api'
export const gitPluginContext = React.createContext<gitState>(defaultGitState) export const gitPluginContext = React.createContext<gitState>(defaultGitState)
export const loaderContext = React.createContext<loaderState>(defaultLoaderState) export const loaderContext = React.createContext<loaderState>(defaultLoaderState)
@ -248,6 +247,8 @@ export const GitUI = (props: IGitUi) => {
</div> </div>
</Accordion.Collapse> </Accordion.Collapse>
</Accordion> </Accordion>
{ platform === appPlatformTypes.desktop &&
<Version /> }
</pluginActionsContext.Provider> </pluginActionsContext.Provider>
</gitActionsContext.Provider> </gitActionsContext.Provider>
</loaderContext.Provider> </loaderContext.Provider>

@ -1,6 +1,12 @@
import { Endpoints } from "@octokit/types" import { Endpoints } from "@octokit/types"
import { GitHubUser, branch, branchDifference, commitChange, pagedCommits, remote, remoteBranch, repository, syncStatus, userEmails } from "@remix-api" import { GitHubUser, branch, branchDifference, commitChange, pagedCommits, remote, remoteBranch, repository, syncStatus, userEmails } from "@remix-api"
import { ReadCommitResult } from "isomorphic-git" import { ReadCommitResult } from "isomorphic-git"
import { Plugin } from "@remixproject/engine";
import { CustomRemixApi } from "@remix-api"
export interface IGitUi {
plugin: Plugin<any, CustomRemixApi>
}
export type gitState = { export type gitState = {
currentBranch: branch currentBranch: branch

Loading…
Cancel
Save