|
1 | 1 | import { css, LitElement, unsafeCSS } from 'lit'; |
2 | 2 | import { customElement, property } from 'lit/decorators.js'; |
| 3 | +import { gliconsMap } from './glicons'; |
3 | 4 |
|
4 | | -const iconMap = Object.freeze({ |
5 | | - // codicons |
| 5 | +const codiconsMap = Object.freeze({ |
6 | 6 | add: '\\ea60', |
7 | 7 | plus: '\\ea60', |
8 | 8 | 'gist-new': '\\ea60', |
@@ -573,50 +573,6 @@ const iconMap = Object.freeze({ |
573 | 573 | percentage: '\\ec33', |
574 | 574 | 'sort-percentage': '\\ec33', |
575 | 575 | 'git-fetch': '\\f101', |
576 | | - // glicons |
577 | | - 'gl-commit-horizontal': '\\f101', |
578 | | - 'gl-graph': '\\f102', |
579 | | - 'gl-next-commit': '\\f103', |
580 | | - 'gl-prev-commit-menu': '\\f104', |
581 | | - 'gl-prev-commit': '\\f105', |
582 | | - 'gl-compare-ref-working': '\\f106', |
583 | | - 'gl-branches-view': '\\f107', |
584 | | - 'gl-commit-view': '\\f108', |
585 | | - 'gl-commits-view': '\\f109', |
586 | | - 'gl-compare-view': '\\f10a', |
587 | | - 'gl-contributors-view': '\\f10b', |
588 | | - 'gl-history-view': '\\f10c', |
589 | | - 'gl-remotes-view': '\\f10d', |
590 | | - 'gl-repositories-view': '\\f10e', |
591 | | - 'gl-search-view': '\\f10f', |
592 | | - 'gl-stashes-view': '\\f110', |
593 | | - 'gl-tags-view': '\\f111', |
594 | | - 'gl-worktrees-view': '\\f112', |
595 | | - 'gl-gitlens': '\\f113', |
596 | | - 'gl-stash-pop': '\\f114', |
597 | | - 'gl-stash-save': '\\f115', |
598 | | - 'gl-unplug': '\\f116', |
599 | | - 'gl-open-revision': '\\f117', |
600 | | - 'gl-switch': '\\f118', |
601 | | - 'gl-expand': '\\f119', |
602 | | - 'gl-list-auto': '\\f11a', |
603 | | - 'gl-repo-force-push': '\\f11b', |
604 | | - 'gl-pinned-filled': '\\f11c', |
605 | | - 'gl-clock': '\\f11d', |
606 | | - 'gl-provider-azdo': '\\f11e', |
607 | | - 'gl-provider-bitbucket': '\\f11f', |
608 | | - 'gl-provider-gerrit': '\\f120', |
609 | | - 'gl-provider-gitea': '\\f121', |
610 | | - 'gl-provider-github': '\\f122', |
611 | | - 'gl-provider-gitlab': '\\f123', |
612 | | - 'gl-gitlens-inspect': '\\f124', |
613 | | - 'gl-workspaces-view': '\\f125', |
614 | | - 'gl-cloud-patch': '\\f128', |
615 | | - 'gl-cloud-patch-share': '\\f129', |
616 | | - 'gl-inspect': '\\f12a', |
617 | | - 'gl-repository-filled': '\\f12b', |
618 | | - 'gl-code-suggestion': '\\f12d', |
619 | | - 'gl-provider-jira': '\\f12e', |
620 | 576 | }); |
621 | 577 |
|
622 | 578 | @customElement('code-icon') |
@@ -646,13 +602,17 @@ export class CodeIcon extends LitElement { |
646 | 602 | } |
647 | 603 |
|
648 | 604 | ${unsafeCSS( |
649 | | - Object.entries(iconMap) |
650 | | - .map( |
651 | | - ([key, value]) => /*css*/ ` |
| 605 | + [codiconsMap, gliconsMap] |
| 606 | + .map(icons => |
| 607 | + Object.entries(icons) |
| 608 | + .map( |
| 609 | + ([key, value]) => /*css*/ ` |
652 | 610 | :host([icon='${key}'])::before { |
653 | 611 | content: '${value}'; |
654 | 612 | } |
655 | 613 | `, |
| 614 | + ) |
| 615 | + .join(''), |
656 | 616 | ) |
657 | 617 | .join(''), |
658 | 618 | )} |
|
0 commit comments