瀏覽代碼

Prettiers 💄

main
Eric Amodio 2 年之前
父節點
當前提交
4092918e14
共有 2 個檔案被更改,包括 34 行新增17 行删除
  1. +15
    -2
      src/webviews/apps/plus/graph/GraphWrapper.tsx
  2. +19
    -15
      src/webviews/apps/plus/graph/graph.scss

+ 15
- 2
src/webviews/apps/plus/graph/GraphWrapper.tsx 查看文件

@ -92,7 +92,7 @@ const getGraphModel = (
matchingRemote !== undefined ? branch.name.replace(`${matchingRemote.name}/`, '') : branch.name,
url: matchingRemote?.url,
avatarUrl: matchingRemote?.avatarUrl ?? undefined,
...matchingRemote?.name !== undefined ? { owner: matchingRemote.name } : {},
...(matchingRemote?.name !== undefined ? { owner: matchingRemote.name } : {}),
};
});
@ -162,7 +162,20 @@ const debounceFrame = (func: DebouncableFn): DebouncedFn => {
};
const createIconElements = (): { [key: string]: ReactElement<any> } => {
const iconList = ['head', 'remote', 'tag', 'stash', 'check', 'loading', 'warning', 'added', 'modified', 'deleted', 'renamed', 'resolved'];
const iconList = [
'head',
'remote',
'tag',
'stash',
'check',
'loading',
'warning',
'added',
'modified',
'deleted',
'renamed',
'resolved',
];
const elementLibrary: { [key: string]: ReactElement<any> } = {};
iconList.forEach(iconKey => {
elementLibrary[iconKey] = createElement('span', { className: `graph-icon icon--${iconKey}` });

+ 19
- 15
src/webviews/apps/plus/graph/graph.scss 查看文件

@ -180,7 +180,7 @@ body {
}
.icon--head {
&::before{
&::before {
// codicon-vm
font-family: codicon;
content: '\ea7a';
@ -188,7 +188,7 @@ body {
}
.icon--remote {
&::before{
&::before {
// codicon-cloud
font-family: codicon;
content: '\ebaa';
@ -196,7 +196,7 @@ body {
}
.icon--tag {
&::before{
&::before {
// codicon-tag
font-family: codicon;
content: '\ea66';
@ -212,7 +212,7 @@ body {
}
.icon--check {
&::before{
&::before {
// codicon-check
font-family: codicon;
content: '\eab2';
@ -220,59 +220,63 @@ body {
}
.icon--loading {
&::before{
&::before {
// codicon-loading
font-family: codicon;
content: '\eb19';
}
animation: spin 1s infinite linear;
animation-delay: .2s;
animation-delay: 0.2s;
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
}
.icon--warning {
:before{
:before {
// codicon-vm
font-family: codicon;
content: '\ea6c';
}
color: #DE9B43;
color: #de9b43;
}
.icon--added {
&::before{
&::before {
// codicon-add
font-family: codicon;
content: '\ea60';
}
}
.icon--modified {
&::before{
&::before {
// codicon-edit
font-family: codicon;
content: '\ea73';
}
}
.icon--deleted {
&::before{
&::before {
// codicon-dash
font-family: codicon;
content: '\eacc';
}
}
.icon--renamed {
&::before{
&::before {
// codicon-file
font-family: codicon;
content: '\eb60';
}
}
.icon--resolved {
&::before{
&::before {
// codicon-pass-filled
font-family: codicon;
content: '\ebb3';

Loading…
取消
儲存