Skip to content

Commit

Permalink
Different versions of vs profile use different icon to differentiate
Browse files Browse the repository at this point in the history
  • Loading branch information
Liangcheng Juves committed May 15, 2022
1 parent a5fb726 commit fa2bbe3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
1 change: 0 additions & 1 deletion tabby-local/src/icons/vs.svg

This file was deleted.

1 change: 1 addition & 0 deletions tabby-local/src/icons/vs2017.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions tabby-local/src/icons/vs2019.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions tabby-local/src/icons/vs2022.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion tabby-local/src/shells/vs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ import { HostAppService, Platform } from 'tabby-core'

import { ShellProvider, Shell } from '../api'

/* eslint-disable quote-props */
const vsIconMap: Record<string, string> = {
'2017': require('../icons/vs2017.svg'),
'2019': require('../icons/vs2019.svg'),
'2022': require('../icons/vs2022.svg'),
}
/* eslint-enable quote-props */

/** @hidden */
@Injectable()
export class VSDevToolsProvider extends ShellProvider {
Expand Down Expand Up @@ -40,7 +48,7 @@ export class VSDevToolsProvider extends ShellProvider {
name: `Developer Prompt for VS ${version}`,
command: 'cmd.exe',
args: ['/k', bat],
icon: require('../icons/vs.svg'),
icon: vsIconMap[version],
env: {},
})
}
Expand Down

0 comments on commit fa2bbe3

Please sign in to comment.