parent
a61d3304a1
commit
9459e23d0e
@ -0,0 +1,10 @@ |
||||
import { commitChange } from "@remix-ui/git"; |
||||
import { IFileSystem } from "@remixproject/plugin-api" |
||||
|
||||
// Extended interface with 'diff' method
|
||||
export interface IExtendedFileSystem extends IFileSystem { |
||||
methods: IFileSystem['methods'] & { |
||||
/** Compare the differences between two files */ |
||||
diff(change: commitChange): Promise<void> |
||||
}; |
||||
} |
@ -0,0 +1,11 @@ |
||||
import { fileDecoration } from '@remix-ui/file-decorators' |
||||
import { StatusEvents } from '@remixproject/plugin-utils' |
||||
|
||||
export interface IFileDecoratorApi { |
||||
events: { |
||||
} & StatusEvents |
||||
methods: { |
||||
clearFileDecorators(path?: string): void |
||||
setFileDecorators(decorators: fileDecoration[]): void |
||||
} |
||||
} |
@ -0,0 +1,29 @@ |
||||
import { CustomTooltip } from '@remix-ui/helper'; |
||||
import { pull } from 'lodash'; |
||||
import React, { useContext } from 'react'; |
||||
import { FormattedMessage } from 'react-intl'; |
||||
import { gitActionsContext } from '../../state/context'; |
||||
import GitUIButton from '../buttons/gituibutton'; |
||||
|
||||
export const Init = () => { |
||||
|
||||
const actions = React.useContext(gitActionsContext) |
||||
|
||||
const init = async () => { |
||||
actions.init() |
||||
} |
||||
|
||||
return ( |
||||
<> |
||||
<div> |
||||
<div className='mt-1 mb-2'> |
||||
<GitUIButton |
||||
onClick={init} |
||||
className="btn w-md-25 w-100 btn-primary" |
||||
id="initgit-btn" |
||||
><FormattedMessage id='git.init'/></GitUIButton> |
||||
</div> |
||||
</div> |
||||
</> |
||||
) |
||||
} |
Loading…
Reference in new issue