-
Notifications
You must be signed in to change notification settings - Fork 874
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor github1s for supporting other scm
* chore: add type definations * chore: add type definations * chore: add type definations * chore: add type definations * chore: add type definations * chore: add github1s adapter * chore: implements adapter * chore: add github1s adapter * refactor: refact file system provider * refactor: refact fileSystemProvider * refactor: fill github datasource * refactor: fill github datasource * refactor: fill github datasource * refactor: fill github datasource * refactor: text search provider * refactor: definitions and references * refactor: move settings code to adapters * feat: add github1s adapter * refactor: refactor pull list view * refactor: refactor commit list view * refactor: changed file provider * refactor: definination provider and reference provider * refactor: hover provider * refactor: text search provider and file search provider * refactor: update provider files * refactor: extension listeners * refactor: editor and ref commands * refactor: rename constants * refactor: use singleton repository * refactor: blame commands * refactor: global commands * refactor: optimize file system provider * reafactor: clean entry files * reafactor: fix ts errors * reafactor: fix read submodule file * rafactor: optimize director structure & fix chnaged files decoration * feat: upgrade vscode to 1.66.2 * feat: update initialize rule * feat: update vscode deps and add workspace identifier * feat: update proload css * feat: add auth command * feat: github oauth token * feat: remove unused files * feat: update adapter context * feat: preload file structures * fix: css preload typo * fix: connect to github and set token * refactor: remove vscode loader.js modification * fix: invalid token status & localize webview libraries * feat: update dependencies & fix commit diff * fix: token changed create wrong octokit * fix: data source types * feat: add notifications & platform logos * feat: use sourcegraph api * feat: update github1s fetcher retry rule * feat: remove prebuilt vscode-anycode * feat: remove prebuilt vscode-anycode * feat: add sourcegraph api * feat: change settings page * feat: auto switch github api * chore: update datasource & fix user avatar url * feat: fix vercel build script * fix: commit list refresh lost data * feat: commit list paginations * fix: commit manager load data * feat: increase text search count * feat: add list file recursively limit * feat: add gitlab support * feat: add bitbucket support * fix: parse router path * default: use default branch for router parser in gitlab1s * feat: update default page title * feat: update logo link path * test: update test cases * chore: update logo icon * ci: fix ci error * feat: update use sourcegraph api strategy
- Loading branch information
Showing
228 changed files
with
13,328 additions
and
58,868 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,6 @@ | |
**/lib/vscode/** | ||
**/dist/** | ||
**/src/vs/** | ||
htm.module.js | ||
preact.module.js | ||
preact-hooks.module.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ lib | |
dist | ||
out | ||
node_modules | ||
.yalc | ||
yalc.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
.vscode-button { | ||
border: none; | ||
display: inline-block; | ||
padding: 0 10px; | ||
height: 26px; | ||
line-height: 26px; | ||
font-size: 14px; | ||
outline: 1px solid transparent; | ||
outline-offset: 2px !important; | ||
color: var(--vscode-button-foreground); | ||
background: var(--vscode-button-background); | ||
cursor: pointer; | ||
} | ||
|
||
.vscode-button.loading { | ||
opacity: .5; | ||
} | ||
|
||
.vscode-button.size-mini { | ||
padding: 0 8px; | ||
height: 22px; | ||
line-height: 22px; | ||
font-size: 12px; | ||
} | ||
|
||
.vscode-button.size-middle { | ||
padding: 0 12px; | ||
height: 30px; | ||
line-height: 30px; | ||
font-size: 14px; | ||
} | ||
|
||
.vscode-button.size-large { | ||
padding: 0 14px; | ||
height: 34px; | ||
line-height: 34px; | ||
font-size: 18px; | ||
} | ||
|
||
.vscode-button:not([disabled]):hover { | ||
background: var(--vscode-button-hoverBackground); | ||
} | ||
|
||
.vscode-button:not([disabled]):focus { | ||
outline-color: var(--vscode-focusBorder); | ||
} | ||
|
||
.vscode-input { | ||
border: none; | ||
display: inline-block; | ||
padding: 0 4px; | ||
height: 26px; | ||
line-height: 26px; | ||
font-size: 13px; | ||
outline: 1px solid transparent; | ||
font-family: var(--vscode-font-family); | ||
color: var(--vscode-input-foreground); | ||
border: 1px solid var(--vscode-input-background); | ||
background-color: var(--vscode-input-background); | ||
} | ||
|
||
.vscode-input.size-mini { | ||
padding: 0 2px; | ||
height: 22px; | ||
line-height: 22px; | ||
font-size: 12px; | ||
} | ||
|
||
.vscode-input.size-middle { | ||
padding: 0 4px; | ||
height: 30px; | ||
line-height: 30px; | ||
font-size: 13px; | ||
} | ||
|
||
.vscode-input.size-large { | ||
padding: 0 6px; | ||
height: 34px; | ||
line-height: 34px; | ||
font-size: 18px; | ||
} | ||
|
||
.vscode-input:not([disabled]):focus { | ||
outline-color: var(--vscode-focusBorder); | ||
outline: 1px solid -webkit-focus-ring-color; | ||
outline-offset: -1px; | ||
} | ||
|
||
.vscode-textarea { | ||
border: none; | ||
display: inline-block; | ||
outline: 1px solid transparent; | ||
font-family: var(--vscode-font-family); | ||
color: var(--vscode-input-foreground); | ||
border: 1px solid var(--vscode-input-background); | ||
background-color: var(--vscode-input-background); | ||
} | ||
|
||
.vscode-textarea:not([disabled]):focus { | ||
outline-color: var(--vscode-focusBorder); | ||
outline: 1px solid -webkit-focus-ring-color; | ||
outline-offset: -1px; | ||
} | ||
|
||
.vscode-loading { | ||
width: 100%; | ||
text-align: center; | ||
height: 26px; | ||
} | ||
|
||
.vscode-loading > span { | ||
height: 100%; | ||
width: 5px; | ||
display: inline-block; | ||
margin-right: 4px; | ||
background: var(--vscode-button-background); | ||
animation: vscodeLoading 1.2s infinite ease-in-out; | ||
} | ||
|
||
.vscode-loading > span:nth-child(2) { | ||
animation-delay: -1s; | ||
} | ||
|
||
.vscode-loading > span:nth-child(3) { | ||
animation-delay: -0.9s; | ||
} | ||
|
||
.vscode-loading > span:nth-child(4) { | ||
animation-delay: -0.8s; | ||
} | ||
|
||
.vscode-loading > span:nth-child(5) { | ||
margin-right: 0 !important; | ||
animation-delay: -0.7s; | ||
} | ||
|
||
@keyframes vscodeLoading { | ||
0% { | ||
transform: scaleY(0.4); | ||
} | ||
25% { | ||
transform: scaleY(1); | ||
} | ||
50% { | ||
transform: scaleY(0.4); | ||
} | ||
75% { | ||
transform: scaleY(0.4); | ||
} | ||
100% { | ||
transform: scaleY(0.4); | ||
} | ||
} | ||
|
||
.vscode-link { | ||
cursor: pointer; | ||
color: var(--vscode-textLink-foreground); | ||
text-decoration: underline; | ||
} | ||
|
||
.vscode-link:hover { | ||
color: var(--vscode-textLink-activeForeground); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import { h } from './preact.module.js'; | ||
import htm from './htm.module.js'; | ||
|
||
export const html = htm.bind(h); | ||
|
||
export const VscodeButton = ({ size, loading, ...props }) => { | ||
const sizeClass = `size-${size || 'small'}`; | ||
const loadingClass = loading ? 'loading' : ''; | ||
const classes = `vscode-button ${sizeClass} ${loadingClass}`; | ||
|
||
return html`<button class=${classes} disabled=${loading} ...${props} />`; | ||
}; | ||
|
||
export const VscodeInput = ({ size, ...props }) => { | ||
const classes = `vscode-input size-${size || 'small'}`; | ||
|
||
return html`<input class=${classes} ...${props} />`; | ||
}; | ||
|
||
export const VscodeTextarea = (props) => { | ||
return html` <textarea class="vscode-textarea" ...${props} /> `; | ||
}; | ||
|
||
export const VscodeLoading = ({ blockWidth, blockSpacing, ...props }) => { | ||
const _blockWidth = blockWidth || '5px'; | ||
const _blockSpacing = blockSpacing || '4px'; | ||
const styleStr = `width: ${_blockWidth}; margin-right: ${_blockSpacing}`; | ||
const blocks = Array.from({ length: 5 }).map(() => html`<span style=${styleStr} />`); | ||
|
||
return html`<div class="vscode-loading" ...${props}>${blocks}</div>`; | ||
}; | ||
|
||
export const VscodeLink = ({ to, external, ...props }) => { | ||
const hrefProp = to ? { href: to } : {}; | ||
const roleProp = to ? {} : { role: 'button' }; | ||
const targetProp = external ? { target: '_blank' } : {}; | ||
const combineProps = { ...hrefProp, ...roleProp, ...targetProp }; | ||
|
||
return html` <a class="vscode-link" ...${combineProps} ...${props} /> `; | ||
}; | ||
|
||
export const postMessage = (() => { | ||
const vscode = window.acquireVsCodeApi(); | ||
const uniqueId = ((id) => () => id++)(1); | ||
const messageMap = new Map(); | ||
|
||
window.addEventListener('message', ({ data }) => { | ||
messageMap.has(data.id) && messageMap.get(data.id)(data.data); | ||
}); | ||
|
||
return (type, data) => { | ||
const messageId = uniqueId(); | ||
vscode.postMessage({ type, data, id: messageId }); | ||
return new Promise((resolve) => { | ||
messageMap.set(messageId, resolve); | ||
}); | ||
}; | ||
})(); |
Oops, something went wrong.