Ver a proveniência

Implements cloud patch icons

main
Keith Daulton há 1 ano
ascendente
cometimento
9b0126d0da
4 ficheiros alterados com 23 adições e 12 eliminações
  1. +1
    -1
      package.json
  2. +2
    -0
      src/webviews/apps/commitDetails/components/gl-commit-details.ts
  3. +17
    -10
      src/webviews/apps/commitDetails/components/gl-details-base.ts
  4. +3
    -1
      src/webviews/apps/commitDetails/components/gl-wip-details.ts

+ 1
- 1
package.json Ver ficheiro

@ -15391,7 +15391,7 @@
"name": "Patch",
"when": "!gitlens:untrusted && config.gitlens.cloudPatches.enabled && gitlens:views:patchDetails:mode",
"contextualTitle": "GL",
"icon": "$(gitlens-commit-view)",
"icon": "$(gitlens-cloud-patch)",
"initialSize": 24
},
{

+ 2
- 0
src/webviews/apps/commitDetails/components/gl-commit-details.ts Ver ficheiro

@ -19,6 +19,8 @@ interface ExplainState {
@customElement('gl-commit-details')
export class GlCommitDetails extends GlDetailsBase {
override readonly tab = 'commit';
@property({ type: Object })
state?: Serialized<State>;

+ 17
- 10
src/webviews/apps/commitDetails/components/gl-details-base.ts Ver ficheiro

@ -12,6 +12,8 @@ type File = Files[0];
type Mode = 'commit' | 'stash' | 'wip';
export class GlDetailsBase extends LitElement {
readonly tab: 'wip' | 'commit' = 'commit';
@property({ type: Array })
files?: Files;
@ -30,16 +32,21 @@ export class GlDetailsBase extends LitElement {
return html`
<list-item tree branch hide-icon>
${label}
<span slot="actions"
><a
class="change-list__action ${!hasFiles ? 'is-disabled' : ''}"
href="#"
title="${shareLabel}"
aria-label="${shareLabel}"
data-action="create-patch"
data-wip-checked="${staged ? 'staged' : 'true'}"
><code-icon icon="live-share"></code-icon></a></span
></list-item>
${when(
this.tab === 'wip',
() =>
html` <span slot="actions"
><a
class="change-list__action ${!hasFiles ? 'is-disabled' : ''}"
href="#"
title="${shareLabel}"
aria-label="${shareLabel}"
data-action="create-patch"
data-wip-checked="${staged ? 'staged' : 'true'}"
><code-icon icon="gl-cloud-patch-share"></code-icon></a
></span>`,
)}</list-item
>
`;
}

+ 3
- 1
src/webviews/apps/commitDetails/components/gl-wip-details.ts Ver ficheiro

@ -7,6 +7,8 @@ import { GlDetailsBase } from './gl-details-base';
@customElement('gl-wip-details')
export class GlWipDetails extends GlDetailsBase {
override readonly tab = 'wip';
@property({ type: Object })
wip?: Wip;
@ -46,7 +48,7 @@ export class GlWipDetails extends GlDetailsBase {
aria-label="Share as Cloud Patch"
title="Share as Cloud Patch"
>
<code-icon icon="live-share"></code-icon>
<code-icon icon="gl-cloud-patch-share"></code-icon>
<span class="top-details__sha">Share</span>
</a>
<a

Carregando…
Cancelar
Guardar